aboutsummaryrefslogtreecommitdiff
path: root/src/boot.S
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-02-24 18:38:20 -0700
committerChristian Cunningham <cc@localhost>2022-02-24 18:38:20 -0700
commita9e89946ad7f6918b954d7416c755a90c0eace9d (patch)
tree35a624cdc2fa135bc435aaf40bb2e294902a3dd1 /src/boot.S
parenta621bee817320cc3e17b097da29b3d46c62a90b4 (diff)
Fixed HYP Code
Diffstat (limited to 'src/boot.S')
-rw-r--r--src/boot.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/boot.S b/src/boot.S
index 6da500b..46ef3d0 100644
--- a/src/boot.S
+++ b/src/boot.S
@@ -9,13 +9,20 @@
_start:
reset:
cpsid aif
+
+ // Exit Hypervisor Mode
mrs r0, cpsr
+ and r1, r0, #0x1F
+ cmp r1, #0x1A
+ bne 1f
bic r0, r0, #0x1f
orr r0, r0, #0x13
msr spsr_cxsf, r0
add r0, pc, #4
msr ELR_hyp, r0
eret
+
+1:
// disable core0,1,2.
mrc p15, #0, r1, c0, c0, #5
and r1, r1, #3