aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-13 12:35:42 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-10-13 12:35:42 -0700
commite5c9012ac933f95aee0cd0da11451a7c0986b84d (patch)
treebcbf6b0cd2df2784152f958861b9afc1a185e1cb /com32/lib
parente6f38a11e398dd934d567178174fbc3a6ebcbc1a (diff)
downloadsyslinux-elf-e5c9012ac933f95aee0cd0da11451a7c0986b84d.tar.gz
syslinux-elf-e5c9012ac933f95aee0cd0da11451a7c0986b84d.tar.xz
syslinux-elf-e5c9012ac933f95aee0cd0da11451a7c0986b84d.zip
e820: pre-initialize buffer
Pre-initialize the e820 buffer to all zero, except for the active bit; we have found that BIOSes will make assumptions about the pre-existing value of the buffer and this seems the most conservative value. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/lib')
-rw-r--r--com32/lib/syslinux/memmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/com32/lib/syslinux/memmap.c b/com32/lib/syslinux/memmap.c
index e14dd70b..105c9473 100644
--- a/com32/lib/syslinux/memmap.c
+++ b/com32/lib/syslinux/memmap.c
@@ -78,6 +78,8 @@ struct syslinux_memmap *syslinux_memory_map(void)
ireg.ecx.l = sizeof(*e820buf);
ireg.es = SEG(e820buf);
ireg.edi.w[0] = OFFS(e820buf);
+ memset(e820buf, 0, sizeof *e820buf);
+ e820buf->extattr = 1;
do {
__intcall(0x15, &ireg, &oreg);