mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
Kernel: Zero out .bss contents on aarch64
After building and running objcopy -O binary Build/aarch64/Kernel/Prekernel/Prekernel \ /media/sdcard/kernel8.img things start booting on an actual RPi4 :^) (Assuming the sdcard contains RPi firmware, an empty config.txt, and no other kernel*.img files).
This commit is contained in:
parent
715f9666f2
commit
d0c1db5efc
Notes:
sideshowbarker
2024-07-18 03:17:25 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/d0c1db5efc8 Pull-request: https://github.com/SerenityOS/serenity/pull/10276
@ -21,6 +21,14 @@ start:
|
||||
ldr x14, =start
|
||||
mov sp, x14
|
||||
|
||||
// Clear BSS.
|
||||
ldr x14, =start_of_bss
|
||||
ldr x15, =size_of_bss_divided_by_8
|
||||
Lbss_clear_loop:
|
||||
str xzr, [x14], #8
|
||||
subs x15, x15, #1
|
||||
bne Lbss_clear_loop
|
||||
|
||||
b init
|
||||
|
||||
.globl wait_cycles
|
||||
|
@ -29,6 +29,10 @@ SECTIONS
|
||||
|
||||
.bss ALIGN(4K) (NOLOAD) : AT (ADDR(.bss))
|
||||
{
|
||||
start_of_bss = .;
|
||||
*(.bss)
|
||||
end_of_bss = .;
|
||||
} :bss
|
||||
}
|
||||
|
||||
size_of_bss_divided_by_8 = (end_of_bss - start_of_bss) / 8;
|
||||
|
Loading…
Reference in New Issue
Block a user