aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
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 /memdisk
parente6f38a11e398dd934d567178174fbc3a6ebcbc1a (diff)
downloadsyslinux.git-e5c9012ac933f95aee0cd0da11451a7c0986b84d.tar.gz
syslinux.git-e5c9012ac933f95aee0cd0da11451a7c0986b84d.tar.xz
syslinux.git-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 'memdisk')
-rw-r--r--memdisk/msetup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/memdisk/msetup.c b/memdisk/msetup.c
index 60149c3b..a2067011 100644
--- a/memdisk/msetup.c
+++ b/memdisk/msetup.c
@@ -45,6 +45,8 @@ static inline int get_e820(void)
com32sys_t regs;
memset(&regs, 0, sizeof regs);
+ memset(buf, 0, sizeof *buf);
+ buf->extattr = 1;
do {
regs.eax.l = 0x0000e820;