Author: bonefish Date: 2010-06-12 02:36:44 +0200 (Sat, 12 Jun 2010) New Revision: 37107 Changeset: http://dev.haiku-os.org/changeset/37107/haiku Modified: haiku/trunk/src/system/boot/platform/bios_ia32/mmu.cpp Log: 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). Modified: haiku/trunk/src/system/boot/platform/bios_ia32/mmu.cpp =================================================================== --- haiku/trunk/src/system/boot/platform/bios_ia32/mmu.cpp 2010-06-12 00:13:54 UTC (rev 37106) +++ haiku/trunk/src/system/boot/platform/bios_ia32/mmu.cpp 2010-06-12 00:36:44 UTC (rev 37107) @@ -660,9 +660,12 @@ 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).