diff options
author | wes <wes@FreeBSD.org> | 2005-03-01 21:55:27 +0000 |
---|---|---|
committer | wes <wes@FreeBSD.org> | 2005-03-01 21:55:27 +0000 |
commit | 92310fbdd7e1345d153293b1f14f6941b1ddc9ef (patch) | |
tree | 0ec9dab36f40f315b19c728d553fe99853c6bdea /sys/pc98 | |
parent | 42a8b3a5679e4bc34e942b115953f21edef85b88 (diff) | |
download | FreeBSD-src-92310fbdd7e1345d153293b1f14f6941b1ddc9ef.zip FreeBSD-src-92310fbdd7e1345d153293b1f14f6941b1ddc9ef.tar.gz |
Attempt to doff the pointy hat: implement 'hw.realmem' on remaining
architectures. Pointed out by O'Brien, ScottL via email.
Reviewed by: obrien (various)
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/i386/machdep.c | 4 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 3a0e7ab..7779104 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -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. */ diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 3a0e7ab..7779104 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -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. */ |