don't touch registers used by calling convention
This commit is contained in:
parent
b6b96f651f
commit
a7c0dcabf4
1 changed files with 11 additions and 11 deletions
|
@ -2,26 +2,26 @@
|
||||||
.global _start
|
.global _start
|
||||||
|
|
||||||
_start:
|
_start:
|
||||||
mrs x1, MPIDR_EL1
|
mrs x4, MPIDR_EL1
|
||||||
and x1, x1, 0b11
|
and x4, x1, 0b11
|
||||||
|
|
||||||
cbz x1, init
|
cbz x4, init
|
||||||
halt:
|
halt:
|
||||||
wfe
|
wfe
|
||||||
b halt
|
b halt
|
||||||
|
|
||||||
init:
|
init:
|
||||||
adr x1, __stack_base
|
adr x4, __stack_base
|
||||||
mov sp, x1
|
mov sp, x4
|
||||||
|
|
||||||
adr x1, __bss_start
|
adr x4, __bss_start
|
||||||
adr x2, __bss_size
|
adr x5, __bss_size
|
||||||
cbz x2, exec_kernel
|
cbz x5, exec_kernel
|
||||||
|
|
||||||
clear_bss:
|
clear_bss:
|
||||||
str xzr, [x1], 8
|
str xzr, [x4], 8
|
||||||
sub x2, x2, 1
|
sub x5, x5, 1
|
||||||
cbnz w2, clear_bss
|
cbnz w5, clear_bss
|
||||||
|
|
||||||
exec_kernel:
|
exec_kernel:
|
||||||
bl main
|
bl main
|
||||||
|
|
Loading…
Add table
Reference in a new issue