diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-03-16 21:07:33 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-03-16 21:07:33 -0400 |
commit | 7958de33034ab22490ed14f6766324fb1cb5399c (patch) | |
tree | 63a6b3ca3ae3ce8817e471ca5d9de9aec97c3e63 | |
parent | a0dc29629c0091449a4065a93812e8522e7d0540 (diff) | |
download | seabios-7958de33034ab22490ed14f6766324fb1cb5399c.tar.gz |
Make sure we zero bss before calling rombios32 code.
This fixes reboots.
-rw-r--r-- | src/post.c | 4 | ||||
-rw-r--r-- | src/rombios32.lds.S | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -381,6 +381,10 @@ post() printf("BIOS - begin\n\n"); + // clear bss section -- XXX - shouldn't use globals + extern char __bss_start[], __bss_end[]; + memset(__bss_start, 0, __bss_end - __bss_start); + rombios32_init(); init_boot_vectors(); diff --git a/src/rombios32.lds.S b/src/rombios32.lds.S index bb17cf09..94b860e2 100644 --- a/src/rombios32.lds.S +++ b/src/rombios32.lds.S @@ -23,7 +23,7 @@ SECTIONS . = 0x00040000; __bss_start = . ; .bss : { *(.bss) *(COMMON) } - _end = . ; + __bss_end = . ; __call16_from32 = (0xf0000 | OFFSET___call16_from32) ; /DISCARD/ : { *(.stab) *(.stabstr) |