[PATCH v2 1/1] bsp/xilinx_zynq: Enable support for 4kiB MMU pages

Jan Sommer jan.sommer at dlr.de
Fri Nov 27 13:43:19 UTC 2020


- Disabled by default
- Enable using ARM_MMU_USE_SMALL_PAGES option
---
 c/src/lib/libbsp/arm/xilinx-zynq/configure.ac |  4 ++++
 spec/build/bsps/arm/optmmusmallpages.yml      | 17 +++++++++++++++--
 spec/build/bsps/arm/xilinx-zynq/grp.yml       |  2 +-
 3 files changed, 20 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 6599b34292..51e4a121e0 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 5ef991e7d5..e42d1a9e2f 100644
--- a/spec/build/bsps/arm/optmmusmallpages.yml
+++ b/spec/build/bsps/arm/optmmusmallpages.yml
@@ -2,11 +2,24 @@ 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 spec.")
+
+    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 264308e6ad..b7efedc17b 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
-- 
2.17.1



More information about the devel mailing list