From 6dacf0502db8609688097742f5de6454f16d1f45 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 3 Mar 2010 14:54:46 +0000 Subject: [PATCH] Ignore physical memory below 1 MB. This is a work-around for buggy BIOSes providing incorrect memory types. It doesn't cost us anything, since the kernel reserves all but the unusable range later anyway. Should fix #1925. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35736 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/bios_ia32/mmu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/system/boot/platform/bios_ia32/mmu.cpp b/src/system/boot/platform/bios_ia32/mmu.cpp index 9ad79f96b7..21eb631045 100644 --- a/src/system/boot/platform/bios_ia32/mmu.cpp +++ b/src/system/boot/platform/bios_ia32/mmu.cpp @@ -656,6 +656,15 @@ mmu_init(void) // we ignore all memory beyond 4 GB if (end > 0x100000000ULL) end = 0x100000000ULL; + + // Also ignore memory below 1 MB. Apparently some BIOSes fail to + // provide the correct range type for some ranges (cf. #1925). + // Later in the kernel we will reserve the range 0x0 - 0xa0000 + // and apparently 0xa0000 - 0x100000 never contain usable + // memory, so we don't lose anything by doing that. + if (base < 0x100000) + base = 0x100000; + if (end <= base) continue;