From 157e213218113164fa346c87e09afdc59cc1a3fb Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 9 Mar 2008 13:32:03 -0400 Subject: [PATCH] Make sure global variables are zerod before exiting bios post. --- src/post.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/post.c b/src/post.c index 851dbae..216ed06 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); } -- 2.25.1