#include <vm/vm_page.h>
#include <i386/i386_lowmem.h>
+extern ppnum_t max_ppnum;
+
#define MAX_BANKS 32
+int hibernate_page_list_allocate_avoided;
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
hibernate_page_list_t *
msize = args->MemoryMapDescriptorSize;
mcount = args->MemoryMapSize / msize;
+ hibernate_page_list_allocate_avoided = 0;
+
num_banks = 0;
for (i = 0; i < mcount; i++, mptr = (EfiMemoryRange *)(((vm_offset_t)mptr) + msize))
{
base = (ppnum_t) (mptr->PhysicalStart >> I386_PGSHIFT);
num = (ppnum_t) mptr->NumberOfPages;
+
+ if (base > max_ppnum)
+ continue;
+ if ((base + num - 1) > max_ppnum)
+ num = max_ppnum - base + 1;
if (!num)
continue;
case kEfiRuntimeServicesData:
// contents are volatile once the platform expert starts
case kEfiACPIReclaimMemory:
+ hibernate_page_list_allocate_avoided += num;
+ break;
+
// non dram
case kEfiReservedMemoryType:
case kEfiUnusableMemory: