[rtems commit] bsp/xilinx_zynq: Enable support for 4kiB MMU pages

Sebastian Huber sebh at rtems.org
Fri Dec 11 10:41:15 UTC 2020


Module:    rtems
Branch:    master
Commit:    cadbd7d15086b76dc4e5dd199e47b68d40006e6d
Changeset: http://git.rtems.org/rtems/commit/?id=cadbd7d15086b76dc4e5dd199e47b68d40006e6d

Author:    Jan Sommer <jan.sommer at dlr.de>
Date:      Fri Nov 27 14:43:19 2020 +0100

bsp/xilinx_zynq: Enable support for 4kiB MMU pages

- Disabled by default
- Enable using ARM_MMU_USE_SMALL_PAGES option

Close 4192.

---

 c/src/lib/libbsp/arm/xilinx-zynq/configure.ac |  4 ++++
 spec/build/bsps/arm/optmmusmallpages.yml      | 16 ++++++++++++++--
 spec/build/bsps/arm/xilinx-zynq/grp.yml       |  2 +-
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac b/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
index 6599b34..51e4a12 100644
--- a/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
+++ b/c/src/lib/libbsp/arm/xilinx-zynq/configure.ac
@@ -70,11 +70,15 @@ RTEMS_BSPOPTS_SET([BSP_ZYNQ_RAM_LENGTH],[xilinx_zynq_zedboard],[512M])
 RTEMS_BSPOPTS_SET([BSP_ZYNQ_RAM_LENGTH],[*],[256M])
 RTEMS_BSPOPTS_HELP([BSP_ZYNQ_RAM_LENGTH],[override a BSP's default RAM length])
 
+RTEMS_BSPOPTS_SET([ARM_MMU_USE_SMALL_PAGES],[*],[0])
+RTEMS_BSPOPTS_HELP([ARM_MMU_USE_SMALL_PAGES],[use MMU with small pages (4KiB)])
+
 RTEMS_BSPOPTS_SET([BSP_ZYNQ_NOCACHE_LENGTH],[*],[1M])
 RTEMS_BSPOPTS_HELP([BSP_ZYNQ_NOCACHE_LENGTH],[length of nocache RAM region])
 
 ZYNQ_RAM_ORIGIN="0x00100000"
 ZYNQ_RAM_MMU_LENGTH="16k"
+AS_IF([test "x${ARM_MMU_USE_SMALL_PAGES}" == x1], [ZYNQ_RAM_MMU_LENGTH="(16k+4M)"])
 ZYNQ_RAM_INT_0_ORIGIN="0x00000000"
 ZYNQ_RAM_INT_0_LENGTH="64k + 64k + 64k"
 ZYNQ_RAM_INT_1_ORIGIN="0xFFFF0000"
diff --git a/spec/build/bsps/arm/optmmusmallpages.yml b/spec/build/bsps/arm/optmmusmallpages.yml
index 5ef991e..5d42039 100644
--- a/spec/build/bsps/arm/optmmusmallpages.yml
+++ b/spec/build/bsps/arm/optmmusmallpages.yml
@@ -2,11 +2,23 @@ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
 actions:
 - get-boolean: null
 - define-condition: null
+- script: |
+    if conf.is_defined("ARM_MMU_TRANSLATION_TABLE_SIZE"):
+        conf.fatal("ARM_MMU_TRANSLATION_TABLE_SIZE already defined by conflicting option.")
+
+    tbl_sz = 16 * 1024
+    if value:
+        tbl_sz += 4 * 1024 * 1024
+
+    conf.env["ARM_MMU_TRANSLATION_TABLE_SIZE"] = tbl_sz
 build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-default: true
-default-by-variant: []
+default: false
+default-by-variant:
+- value: true
+  variants:
+  - arm/realview_pbx_a9_qemu
 description: |
   Use MMU with small pages (4KiB)
 enabled-by: true
diff --git a/spec/build/bsps/arm/xilinx-zynq/grp.yml b/spec/build/bsps/arm/xilinx-zynq/grp.yml
index a058061..74adbd7 100644
--- a/spec/build/bsps/arm/xilinx-zynq/grp.yml
+++ b/spec/build/bsps/arm/xilinx-zynq/grp.yml
@@ -42,7 +42,7 @@ links:
 - role: build-dependency
   uid: optint1ori
 - role: build-dependency
-  uid: ../optmmusz
+  uid: ../optmmusmallpages
 - role: build-dependency
   uid: optnocachelen
 - role: build-dependency



More information about the vc mailing list