summaryrefslogtreecommitdiff
path: root/sys/arch/hp300
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-01-04 19:10:32 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-01-04 19:10:32 +0000
commite773e6ad3d1b4941ab60cb16fc3000b3f24aafad (patch)
tree20da089d083d470d4f3692237831776169f276e0 /sys/arch/hp300
parent19af6a81fc464b0c8862dc1ae686d04c58e5b686 (diff)
Compute physmem as the real physical memory size, not the physical memory
size minus two pages at the start and one page at the end. This gives us even MB sizes in dmesg (-:
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r--sys/arch/hp300/hp300/locore.s4
-rw-r--r--sys/arch/hp300/hp300/machdep.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s
index 0bb89e04776..89a0d6bb291 100644
--- a/sys/arch/hp300/hp300/locore.s
+++ b/sys/arch/hp300/hp300/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.62 2007/12/30 14:45:24 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.63 2008/01/04 19:10:31 miod Exp $ */
/* $NetBSD: locore.s,v 1.91 1998/11/11 06:41:25 thorpej Exp $ */
/*
@@ -485,6 +485,8 @@ Lstart2:
moveq #PGSHIFT,d2
subl d0,d1 | compute amount of RAM present
lsrl d2,d1 | convert to pages
+ addl #3,d1 | restore the 3 pages lost (2 from
+ | the bootloader and the MAXADDR one)
RELOC(physmem, a0)
movl d1,a0@ | save as physmem
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index 1e36b081f5a..f994edf2f93 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.116 2007/11/02 19:18:54 martin Exp $ */
+/* $OpenBSD: machdep.c,v 1.117 2008/01/04 19:10:31 miod Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -728,9 +728,10 @@ dumpconf(void)
return;
/*
- * XXX include the final RAM page which is not included in physmem.
+ * Since lowram starts two pages after the beginning of memory,
+ * we're not dumping exactly all the memory.
*/
- dumpsize = physmem;
+ dumpsize = physmem - 2;
/* hp300 only uses a single segment. */
cpu_kcore_hdr.ram_segs[0].start = lowram;