summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-01-04 17:41:18 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-01-04 17:41:18 +0000
commit4f2f2d177c1bb984a3a62e39ce4da7bd64c2da5d (patch)
treea0b6ecffaca81994e4182657e9dc26da81b00cd6 /sys
parent64dbb61a29a5756fc001ac259d55a94c0e13a020 (diff)
memsize() serves no purpose anymore
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c48
1 files changed, 1 insertions, 47 deletions
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index ea30dc78f8e..28f8a23a2b3 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.73 2003/01/04 17:21:31 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.74 2003/01/04 17:41:17 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -1192,52 +1192,6 @@ memsize162()
}
#endif
-int
-memsize()
-{
- volatile unsigned int *look;
- unsigned int *max;
- extern char *end;
-#define MAXPHYSMEM (unsigned long)0x10000000 /* max physical memory */
-#define PATTERN 0x5a5a5a5a
-#define STRIDE (4*1024) /* 4k at a time */
-#define Roundup(value, stride) (((unsigned)(value) + (stride) - 1) & ~((stride)-1))
- /*
- * Put machine specific exception vectors in place.
- */
- initvectors();
- /*
- * count it up.
- */
- max = (void *)MAXPHYSMEM;
- for (look = (void *)Roundup(end, STRIDE); look < max;
- look = (int *)((unsigned)look + STRIDE)) {
- unsigned save;
-
- if (badvaddr((vaddr_t)look, 2)) {
-#if defined(DEBUG)
- printf("%x\n", look);
-#endif
- look = (int *)((int)look - STRIDE);
- break;
- }
-
- /*
- * If we write a value, we expect to read the same value back.
- * We'll do this twice, the 2nd time with the opposite bit
- * pattern from the first, to make sure we check all bits.
- */
- save = *look;
- if (*look = PATTERN, *look != PATTERN)
- break;
- if (*look = ~PATTERN, *look != ~PATTERN)
- break;
- *look = save;
- }
- physmem = btoc(trunc_page((unsigned)look)); /* in pages */
- return (trunc_page((unsigned)look));
-}
-
/*
* Boot console routines:
* Enables printing of boot messages before consinit().