diff options
Diffstat (limited to 'ArmPkg/Include/AsmMacroIoLibV8.h')
-rw-r--r-- | ArmPkg/Include/AsmMacroIoLibV8.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ArmPkg/Include/AsmMacroIoLibV8.h b/ArmPkg/Include/AsmMacroIoLibV8.h index 78a033cb4f..5ab1b5723e 100644 --- a/ArmPkg/Include/AsmMacroIoLibV8.h +++ b/ArmPkg/Include/AsmMacroIoLibV8.h @@ -106,24 +106,24 @@ _InitializePrimaryStackEnd: // Provide the Macro with a safe temp xreg to use.
#define EL1_OR_EL2(SAFE_XREG) \
mrs SAFE_XREG, CurrentEL ;\
- cmp SAFE_XREG, #0x4 ;\
- b.eq 1f ;\
- cmp SAFE_XREG, #0x8 ;\
- b.eq 2f ;\
- b dead ;// We should never get here.
+ cmp SAFE_XREG, #0x8 ;\
+ b.eq 2f ;\
+ cmp SAFE_XREG, #0x4 ;\
+ b.ne . ;// We should never get here
+// EL1 code starts here
// CurrentEL : 0xC = EL3; 8 = EL2; 4 = EL1
// This only selects between EL1 and EL2 and EL3, else we die.
// Provide the Macro with a safe temp xreg to use.
-#define EL1_OR_EL2_OR_EL3(SAFE_XREG) \
+#define EL1_OR_EL2_OR_EL3(SAFE_XREG) \
mrs SAFE_XREG, CurrentEL ;\
+ cmp SAFE_XREG, #0xC ;\
+ b.eq 3f ;\
+ cmp SAFE_XREG, #0x8 ;\
+ b.eq 2f ;\
cmp SAFE_XREG, #0x4 ;\
- b.eq 1f ;\
- cmp SAFE_XREG, #0x8 ;\
- b.eq 2f ;\
- cmp SAFE_XREG, #0xC ;\
- b.eq 3f ;\
- b dead ;// We should never get here.
+ b.ne . ;// We should never get here
+// EL1 code starts here
#else
|