summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorwes <wes@FreeBSD.org>2005-03-01 21:55:27 +0000
committerwes <wes@FreeBSD.org>2005-03-01 21:55:27 +0000
commit92310fbdd7e1345d153293b1f14f6941b1ddc9ef (patch)
tree0ec9dab36f40f315b19c728d553fe99853c6bdea /sys/pc98
parent42a8b3a5679e4bc34e942b115953f21edef85b88 (diff)
downloadFreeBSD-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.c4
-rw-r--r--sys/pc98/pc98/machdep.c4
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.
*/
OpenPOWER on IntegriCloud