aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-03-09 13:32:03 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-03-09 13:32:03 -0400
commit157e213218113164fa346c87e09afdc59cc1a3fb (patch)
treeb36e18d28f6c241cf843dadb157eea7e6d659f79
parent983d619ef351b07e1ef6e204831c9b718ca01cdf (diff)
downloadseabios-157e213218113164fa346c87e09afdc59cc1a3fb.tar.gz
Make sure global variables are zerod before exiting bios post.
-rw-r--r--src/post.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/post.c b/src/post.c
index 851dbaee..216ed068 100644
--- a/src/post.c
+++ b/src/post.c
@@ -536,6 +536,10 @@ post()
// XXX - original bios calls ata_detect before rom scan.
rom_scan(0xc8000, 0xe0000);
+ // reset the memory (some boot loaders such as syslinux suppose
+ // that the memory is set to zero)
+ memset((void*)0x40000, 0, 0x40000); // XXX - shouldn't use globals
+
callrom(SEG_BIOS, OFFSET_begin_boot);
}