Under PAE ULONG is insufficient for representing the physical memory size. Use QUAD
for "hw.physmem" so that a physical memory size greater than 4 GB can be specified from the boot loader.
This commit is contained in:
parent
a4432e6bf7
commit
9f10ddb8f6
@ -2463,10 +2463,10 @@ static void
|
||||
getmemsize(int first)
|
||||
{
|
||||
int has_smap, off, physmap_idx, pa_indx, da_indx;
|
||||
u_long physmem_tunable, memtest;
|
||||
u_long memtest;
|
||||
vm_paddr_t physmap[PHYSMAP_SIZE];
|
||||
pt_entry_t *pte;
|
||||
quad_t dcons_addr, dcons_size;
|
||||
quad_t dcons_addr, dcons_size, physmem_tunable;
|
||||
#ifndef XEN
|
||||
int hasbrokenint12, i, res;
|
||||
u_int extmem;
|
||||
@ -2650,7 +2650,7 @@ getmemsize(int first)
|
||||
Maxmem = MAXMEM / 4;
|
||||
#endif
|
||||
|
||||
if (TUNABLE_ULONG_FETCH("hw.physmem", &physmem_tunable))
|
||||
if (TUNABLE_QUAD_FETCH("hw.physmem", &physmem_tunable))
|
||||
Maxmem = atop(physmem_tunable);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user