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
This commit is contained in:
Ingo Weinhold 2010-06-12 00:36:44 +00:00
parent 4d2b2dc4d2
commit 977ffe5233

View File

@ -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).