[rtems commit] bsps/aarch64: replace boot options with asm switch code

Gedare Bloom gedare at rtems.org
Thu Jun 24 18:58:08 UTC 2021


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

Author:    Gedare Bloom <gedare at rtems.org>
Date:      Thu Jun 24 09:33:22 2021 -0600

bsps/aarch64: replace boot options with asm switch code

---

 bsps/aarch64/shared/start/start.S                    | 15 ++++++++-------
 spec/build/bsps/aarch64/xilinx-versal/grp_qemu.yml   |  2 --
 spec/build/bsps/aarch64/xilinx-versal/grp_vck190.yml |  2 --
 spec/build/bsps/aarch64/xilinx-zynqmp/grp_zu3eg.yml  |  2 --
 spec/build/bsps/optstartmon.yml                      | 16 ----------------
 5 files changed, 8 insertions(+), 29 deletions(-)

diff --git a/bsps/aarch64/shared/start/start.S b/bsps/aarch64/shared/start/start.S
index 338c51f..bc1fb00 100644
--- a/bsps/aarch64/shared/start/start.S
+++ b/bsps/aarch64/shared/start/start.S
@@ -98,7 +98,13 @@ _start:
 #endif
 	msr SCTLR_EL1, x0
 
-#ifdef BSP_START_IN_EL3_MONITOR_MODE_SUPPORT
+  mrs x0, CurrentEL
+  cmp x0, #(1<<2)
+  b.eq _el1_start
+  cmp x0, #(2<<2)
+  b.eq _el2_start
+
+_el3_start:
 	/* Drop from EL3 to EL2 */
 
   /* Initialize HCR_EL2 and SCTLR_EL2 */
@@ -131,12 +137,7 @@ _start:
 #endif
   msr ELR_EL3, x0
   eret
-#endif
 
-#if defined(BSP_START_IN_HYP_SUPPORT) || \
-    ( defined(BSP_START_IN_EL3_MONITOR_MODE_SUPPORT) && \
-      defined(AARCH64_IS_NONSECURE) \
-    )
 _el2_start:
 	/* Drop from EL2 to EL1 */
 
@@ -159,8 +160,8 @@ _el2_start:
 	adr x0, _el1_start
 	msr ELR_EL2, x0
 	eret
+
 _el1_start:
-#endif
 
 #ifdef RTEMS_SMP
 	/* Read MPIDR and get current processor index */
diff --git a/spec/build/bsps/aarch64/xilinx-versal/grp_qemu.yml b/spec/build/bsps/aarch64/xilinx-versal/grp_qemu.yml
index 71d8c9a..5a98190 100644
--- a/spec/build/bsps/aarch64/xilinx-versal/grp_qemu.yml
+++ b/spec/build/bsps/aarch64/xilinx-versal/grp_qemu.yml
@@ -10,8 +10,6 @@ links:
 - role: build-dependency
   uid: grp
 - role: build-dependency
-  uid: ../../optstartmon
-- role: build-dependency
   uid: tstqemu
 type: build
 use-after: []
diff --git a/spec/build/bsps/aarch64/xilinx-versal/grp_vck190.yml b/spec/build/bsps/aarch64/xilinx-versal/grp_vck190.yml
index c10f2a7..d47895b 100644
--- a/spec/build/bsps/aarch64/xilinx-versal/grp_vck190.yml
+++ b/spec/build/bsps/aarch64/xilinx-versal/grp_vck190.yml
@@ -10,8 +10,6 @@ links:
 - role: build-dependency
   uid: grp
 - role: build-dependency
-  uid: ../../optstarthyp
-- role: build-dependency
   uid: tstvck190
 type: build
 use-after: []
diff --git a/spec/build/bsps/aarch64/xilinx-zynqmp/grp_zu3eg.yml b/spec/build/bsps/aarch64/xilinx-zynqmp/grp_zu3eg.yml
index 801195c..fa6347b 100644
--- a/spec/build/bsps/aarch64/xilinx-zynqmp/grp_zu3eg.yml
+++ b/spec/build/bsps/aarch64/xilinx-zynqmp/grp_zu3eg.yml
@@ -10,8 +10,6 @@ links:
 - role: build-dependency
   uid: grp
 - role: build-dependency
-  uid: ../../optstarthyp
-- role: build-dependency
   uid: tstzu3eg
 type: build
 use-after: []
diff --git a/spec/build/bsps/optstartmon.yml b/spec/build/bsps/optstartmon.yml
deleted file mode 100644
index 9c48aad..0000000
--- a/spec/build/bsps/optstartmon.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
-actions:
-- get-boolean: null
-- define-condition: null
-build-type: option
-copyrights:
-- Copyright (C) 2021 Gedare Bloom <gedare at rtems.org>
-default: true
-default-by-variant: []
-description: |
-  If set to true, then a system start in monitor mode (EL3) is
-  supported, otherwise it is unsupported.
-enabled-by: true
-links: []
-name: BSP_START_IN_EL3_MONITOR_MODE_SUPPORT
-type: build



More information about the vc mailing list