aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules/mboot.c
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@cl.cam.ac.uk>2006-03-17 16:57:52 +0000
committerH. Peter Anvin <hpa@zytor.com>2006-03-17 09:04:29 -0800
commit42d474f9c42baa78f19b05ca5394d4bd4f24450c (patch)
tree6bf146cf133f912e1ea63c84611dfc947346e58b /com32/modules/mboot.c
parent3ad6a46b2a8432a61337078f181a1726a3c07fcc (diff)
downloadsyslinux.git-42d474f9c42baa78f19b05ca5394d4bd4f24450c.tar.gz
syslinux.git-42d474f9c42baa78f19b05ca5394d4bd4f24450c.tar.xz
syslinux.git-42d474f9c42baa78f19b05ca5394d4bd4f24450c.zip
mboot.c32: clear inputs to BIOS calls
Zero the inputs to BIOS calls, to fix two bugs in mboot.c32's E820 mmap code. Signed-off-by: Tim Deegan <Tim.Deegan@cl.cam.ac.uk>
Diffstat (limited to 'com32/modules/mboot.c')
-rw-r--r--com32/modules/mboot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/com32/modules/mboot.c b/com32/modules/mboot.c
index 4238c5cb..96e41023 100644
--- a/com32/modules/mboot.c
+++ b/com32/modules/mboot.c
@@ -358,7 +358,8 @@ static void init_mmap(struct multiboot_info *mbi)
while(((void *)(e820 + 1)) < __com32.cs_bounce + __com32.cs_bounce_size)
{
-
+ memset(e820, 0, sizeof (*e820));
+ memset(&regs_in, 0, sizeof regs_in);
e820->size = sizeof(*e820) - sizeof(e820->size);
/* Ask the BIOS to fill in this descriptor */
@@ -862,6 +863,7 @@ static void boot(size_t mbi_run_addr, size_t entry)
memmove(trampoline, trampoline_start, trampoline_size);
/* Tell SYSLINUX to clean up */
+ memset(&regs, 0, sizeof regs);
regs.eax.l = 0x000c; /* "Perform final cleanup" */
regs.edx.l = 0; /* "Normal cleanup" */
__intcall(0x22, &regs, NULL);