From 977ffe5233849151bb042889780cc69babd7e899 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 12 Jun 2010 00:36:44 +0000 Subject: [PATCH] No longer ignore the physical memory beyond 4 GB, if we have a 64 bit phys_addr_t. IOW, if PAE is enabled, that memory should be put to use now. Apparently we report an incorrect amount of total memory (also counting memory gaps), which also suggests that we need another method to manage the vm_page structures (currently a huge array with indexes proportional to physical page addresses, i.e. wasting memory for the gaps). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37107 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/bios_ia32/mmu.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/system/boot/platform/bios_ia32/mmu.cpp b/src/system/boot/platform/bios_ia32/mmu.cpp index af5936795c..f395da0ff6 100644 --- a/src/system/boot/platform/bios_ia32/mmu.cpp +++ b/src/system/boot/platform/bios_ia32/mmu.cpp @@ -660,9 +660,12 @@ mmu_init(void) base = ROUNDUP(base, B_PAGE_SIZE); end = ROUNDDOWN(end, B_PAGE_SIZE); - // we ignore all memory beyond 4 GB - if (end > 0x100000000ULL) - end = 0x100000000ULL; + // We ignore all memory beyond 4 GB, if phys_addr_t is only + // 32 bit wide. + #if B_HAIKU_PHYSICAL_BITS == 32 + if (end > 0x100000000ULL) + end = 0x100000000ULL; + #endif // Also ignore memory below 1 MB. Apparently some BIOSes fail to // provide the correct range type for some ranges (cf. #1925).