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:
Wes Peters 2005-03-01 21:55:27 +00:00
parent 35e75c686f
commit 95e2054492
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142956
5 changed files with 14 additions and 0 deletions

View file

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

View file

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

View file

@ -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.
*/

View file

@ -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.
*/

View file

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