jlaitine commented on code in PR #12353:
URL: https://github.com/apache/nuttx/pull/12353#discussion_r1601605844


##########
arch/arm64/src/common/arm64_head.S:
##########
@@ -235,6 +235,15 @@ switch_el:
 
     bl    arm64_boot_el3_init
 
+#ifdef CONFIG_ARCH_BOOT_EL3
+    msr   SPSel, #1
+
+    /* Set SP_EL3 (with SPSel = 1) */
+
+    mov   sp, x24
+    b     el3_boot
+#endif

Review Comment:
   Yes, the macros look a bit confusing. If I understand this correctly, the 
original code assumes that if "CONFIG_ARCH_HAVE_EL3" is enabled, it expects to 
switch to EL1 if entered in EL3. And now if "CONFIG_ARCH_BOOT_EL3" is defined, 
it continues booting in EL3
   
   If I did get this right, then you can as well just #else away the EL 
switching if "CONFIG_ARCH_BOOT_EL3" is defined. It doesn't change the 
functionality though, IMHO.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to