Draft: start lab 3
This commit is contained in:
@@ -14,6 +14,9 @@ wait:
|
||||
|
||||
run: // cpu id == 0
|
||||
mov x20, x0
|
||||
|
||||
bl el2_to_el1
|
||||
|
||||
adrp x0, __stack_end
|
||||
mov sp, x0
|
||||
|
||||
@@ -25,3 +28,11 @@ run: // cpu id == 0
|
||||
mov x0, x20
|
||||
bl main
|
||||
b wait
|
||||
|
||||
el2_to_el1:
|
||||
mov x0, (1 << 31)
|
||||
msr hcr_el2, x0
|
||||
mov x0, 0x3c5
|
||||
msr spsr_el2, x0
|
||||
msr elr_el2, lr
|
||||
eret
|
||||
|
||||
Reference in New Issue
Block a user