aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-04-04 15:55:26 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-04-04 15:55:26 -0700
commit248011cda22da250b4e506ed72270a292fa7efde (patch)
treec3af733e113c1087a967d2ffe71d7685b7609ca9
parent5ec84eb68a72803ca7d7b459f49fbd8df58007f6 (diff)
downloadsyslinux.git-248011cda22da250b4e506ed72270a292fa7efde.tar.gz
syslinux.git-248011cda22da250b4e506ed72270a292fa7efde.tar.xz
syslinux.git-248011cda22da250b4e506ed72270a292fa7efde.zip
memscan: protect 0-0x7c00 until the new shuffler is merged
Mark the memory range 0-0x7c00 unavailable until the new shuffler code is ready, at which point we can go for a tighter bound. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/lib/syslinux/memscan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/com32/lib/syslinux/memscan.c b/com32/lib/syslinux/memscan.c
index 69f8a189..d7541284 100644
--- a/com32/lib/syslinux/memscan.c
+++ b/com32/lib/syslinux/memscan.c
@@ -59,9 +59,9 @@ int syslinux_scan_memory(scan_memory_callback_t callback, void *data)
/* Use INT 12h to get DOS memory above 0x7c00 */
__intcall(0x12, &zireg, &oreg);
- if (oreg.eax.w[0] > 2 && oreg.eax.w[0] <= 640) {
- addr_t dosmem = (oreg.eax.w[0] << 10) - 0x504;
- rv = callback(data, 0x504, dosmem, true);
+ if (oreg.eax.w[0] >= 32 && oreg.eax.w[0] <= 640) {
+ addr_t dosmem = (oreg.eax.w[0] << 10) - 0x7c00;
+ rv = callback(data, 0x7c00, dosmem, true);
if (rv)
return rv;
}