aboutsummaryrefslogtreecommitdiffstats
path: root/core
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 /core
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 'core')
-rw-r--r--core/highmem.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/highmem.inc b/core/highmem.inc
index 7341bf27..69652b7f 100644
--- a/core/highmem.inc
+++ b/core/highmem.inc
@@ -40,6 +40,11 @@ get_e820:
mov dword [E820Max],-(1 << 20) ; Max amount of high memory
mov dword [E820Mem],(1 << 20) ; End of detected high memory
.start_over:
+ mov di,E820Buf
+ xor ax,ax
+ mov cx,12
+ rep stosw ; Clear buffer
+ mov byte [di-4],01h ; Initial extattr value
xor ebx,ebx ; Start with first record
jmp short .do_e820 ; Skip "at end" check first time!
.int_loop: and ebx,ebx ; If we're back at beginning...