Attempt to doff the pointy hat: implement 'hw.realmem' on remaining
architectures. Pointed out by O'Brien, ScottL via email. Reviewed by: obrien (various)
This commit is contained in:
parent
42a8b3a567
commit
92310fbdd7
@ -194,6 +194,7 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL)
|
||||
struct msgbuf *msgbufp=0;
|
||||
|
||||
long Maxmem = 0;
|
||||
long realmem = 0;
|
||||
|
||||
long totalphysmem; /* total amount of physical memory in system */
|
||||
long resvmem; /* amount of memory reserved for PROM */
|
||||
@ -250,6 +251,7 @@ cpu_startup(dummy)
|
||||
#endif
|
||||
printf("real memory = %ld (%ld MB)\n", alpha_ptob(Maxmem),
|
||||
alpha_ptob(Maxmem) / 1048576);
|
||||
realmem = alpha_ptob(Maxmem);
|
||||
|
||||
/*
|
||||
* Display any holes after the first chunk of extended memory.
|
||||
|
@ -143,6 +143,7 @@ SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL)
|
||||
struct msgbuf *msgbufp=0;
|
||||
|
||||
long Maxmem = 0;
|
||||
long realmem = 0;
|
||||
|
||||
vm_offset_t phys_avail[100];
|
||||
|
||||
@ -246,6 +247,7 @@ cpu_startup(dummy)
|
||||
#endif
|
||||
printf("real memory = %ld (%ld MB)\n", ia64_ptob(Maxmem),
|
||||
ia64_ptob(Maxmem) / 1048576);
|
||||
realmem = ia64_ptob(Maxmem);
|
||||
|
||||
/*
|
||||
* Display any holes after the first chunk of extended memory.
|
||||
|
@ -196,6 +196,7 @@ static void freebsd4_sendsig(sig_t catcher, int sig, sigset_t *mask,
|
||||
#endif
|
||||
|
||||
long Maxmem = 0;
|
||||
long realmem = 0;
|
||||
|
||||
vm_paddr_t phys_avail[10];
|
||||
|
||||
@ -228,6 +229,9 @@ cpu_startup(dummy)
|
||||
#endif
|
||||
printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)Maxmem),
|
||||
ptoa((uintmax_t)Maxmem) / 1048576);
|
||||
/* This truncates if memory > 4GB, is this possible on PC98? */
|
||||
realmem = (long)ptoa((uintmax_t)Maxmem);
|
||||
|
||||
/*
|
||||
* Display any holes after the first chunk of extended memory.
|
||||
*/
|
||||
|
@ -196,6 +196,7 @@ static void freebsd4_sendsig(sig_t catcher, int sig, sigset_t *mask,
|
||||
#endif
|
||||
|
||||
long Maxmem = 0;
|
||||
long realmem = 0;
|
||||
|
||||
vm_paddr_t phys_avail[10];
|
||||
|
||||
@ -228,6 +229,9 @@ cpu_startup(dummy)
|
||||
#endif
|
||||
printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)Maxmem),
|
||||
ptoa((uintmax_t)Maxmem) / 1048576);
|
||||
/* This truncates if memory > 4GB, is this possible on PC98? */
|
||||
realmem = (long)ptoa((uintmax_t)Maxmem);
|
||||
|
||||
/*
|
||||
* Display any holes after the first chunk of extended memory.
|
||||
*/
|
||||
|
@ -118,6 +118,7 @@ int kernel_tlb_slots;
|
||||
|
||||
int cold = 1;
|
||||
long Maxmem;
|
||||
long realmem;
|
||||
|
||||
char pcpu0[PCPU_PAGES * PAGE_SIZE];
|
||||
struct trapframe frame0;
|
||||
@ -198,6 +199,7 @@ cpu_startup(void *arg)
|
||||
physsz += sparc64_memreg[i].mr_size;
|
||||
printf("real memory = %lu (%lu MB)\n", physsz,
|
||||
physsz / (1024 * 1024));
|
||||
realmem = (long)physsz;
|
||||
|
||||
vm_ksubmap_init(&kmi);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user