summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-05-19 22:51:10 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-05-19 22:51:10 +0000
commite1c004296b5d7861b4663c49c231dc23078a314f (patch)
tree2a2afc7b3293f68911a78f65a379173041477602 /sys/arch
parentc3f6b76388754f636c24daf8ce83aad3b644ddca (diff)
Get rid of ``maxmem'' and fix the descriptive comment for ``physmem''.
Either maxmem is not used (mac68k), or the position of the physical memory is set in stone so we don't need to know the top of the memory (MAXADDR on hp300, physmem on mvme68k) it was pointing to. Plus this gets rid of unused lowram on mvme68k - all the m68k world is not an hp300, after all.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hp300/hp300/locore.s13
-rw-r--r--sys/arch/hp300/hp300/machdep.c5
-rw-r--r--sys/arch/hp300/hp300/pmap_bootstrap.c5
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/locore.s21
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c5
-rw-r--r--sys/arch/mvme68k/mvme68k/mem.c8
-rw-r--r--sys/arch/mvme68k/mvme68k/pmap_bootstrap.c6
8 files changed, 23 insertions, 45 deletions
diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s
index 996212b349d..331931705cc 100644
--- a/sys/arch/hp300/hp300/locore.s
+++ b/sys/arch/hp300/hp300/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.52 2006/01/21 12:27:56 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.53 2006/05/19 22:51:07 miod Exp $ */
/* $NetBSD: locore.s,v 1.91 1998/11/11 06:41:25 thorpej Exp $ */
/*
@@ -475,17 +475,14 @@ Lstart2:
moveq #FC_USERD,d0 | user space
movc d0,sfc | as source
movc d0,dfc | and destination of transfers
-/* initialize memory sizes (for pmap_bootstrap) */
+/* initialize memory size (for pmap_bootstrap) */
movl #MAXADDR,d1 | last page
- moveq #PGSHIFT,d2
- lsrl d2,d1 | convert to page (click) number
- RELOC(maxmem, a0)
- movl d1,a0@ | save as maxmem
movl a5,d0 | lowram value from ROM via boot
- lsrl d2,d0 | convert to page number
+ moveq #PGSHIFT,d2
subl d0,d1 | compute amount of RAM present
+ lsrl d2,d1 | convert to pages
RELOC(physmem, a0)
- movl d1,a0@ | and physmem
+ movl d1,a0@ | save as physmem
/* configure kernel and proc0 VA space so we can get going */
#if defined(DDB) || NKSYMS > 0
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c
index ef1619753d5..4499fa5db40 100644
--- a/sys/arch/hp300/hp300/machdep.c
+++ b/sys/arch/hp300/hp300/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.107 2005/12/30 18:14:12 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.108 2006/05/19 22:51:07 miod Exp $ */
/* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */
/*
@@ -120,8 +120,7 @@ int bufpages = 0;
#endif
int bufcachepercent = BUFCACHEPERCENT;
-int maxmem; /* max memory per process */
-int physmem; /* max supported memory, changes to actual */
+int physmem; /* size of physical memory, in pages */
/*
* safepri is a safe priority for sleep to set for a spin-wait
* during autoconfiguration or after a panic.
diff --git a/sys/arch/hp300/hp300/pmap_bootstrap.c b/sys/arch/hp300/hp300/pmap_bootstrap.c
index 02b22567375..b0a63a57af1 100644
--- a/sys/arch/hp300/hp300/pmap_bootstrap.c
+++ b/sys/arch/hp300/hp300/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.23 2005/10/28 09:07:48 martin Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.24 2006/05/19 22:51:07 miod Exp $ */
/* $NetBSD: pmap_bootstrap.c,v 1.13 1997/06/10 18:56:50 veego Exp $ */
/*
@@ -53,7 +53,6 @@ caddr_t ledbase; /* SPU LEDs mapping */
extern vaddr_t CLKbase, MMUbase;
extern char *extiobase;
-extern int maxmem;
extern int eiomapsize;
#define RELOC(v, t) *((t*)((u_int)&(v) + firstpa))
@@ -89,7 +88,7 @@ do { \
#define PMAP_MD_MEMSIZE() \
do { \
- RELOC(avail_end, paddr_t) = ptoa(RELOC(maxmem, int)) - \
+ RELOC(avail_end, paddr_t) = MAXADDR - \
(round_page(MSGBUFSIZE) + ptoa(1)); \
} while (0)
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index ed0a86f83d6..7a0e812c0a6 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.130 2006/01/24 06:50:13 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.131 2006/05/19 22:51:09 miod Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -190,8 +190,7 @@ int bufpages = 0;
#endif
int bufcachepercent = BUFCACHEPERCENT;
-int maxmem; /* max memory per process */
-int physmem; /* max supported memory, changes to actual */
+int physmem; /* size of physical memory, in pages */
/*
* safepri is a safe priority for sleep to set for a spin-wait
diff --git a/sys/arch/mvme68k/mvme68k/locore.s b/sys/arch/mvme68k/mvme68k/locore.s
index ad6474e916a..3d753d72d03 100644
--- a/sys/arch/mvme68k/mvme68k/locore.s
+++ b/sys/arch/mvme68k/mvme68k/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.50 2006/04/21 22:21:54 miod Exp $ */
+/* $OpenBSD: locore.s,v 1.51 2006/05/19 22:51:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -101,7 +101,6 @@ ASLOCAL(tmpstk)
* On entry, args on stack are boot device, boot filename, console unit,
* boot flags (howto), boot device name, filesystem type name.
*/
-BSS(lowram, 4)
BSS(esym, 4)
BSS(emini, 4)
BSS(smini, 4)
@@ -118,7 +117,6 @@ GLOBAL(kernel_text)
ASENTRY_NOPROFILE(start)
movw #PSL_HIGHIPL,sr | no interrupts
- movl #0,a5 | RAM starts at 0
movl sp@(4), d7 | get boothowto
movl sp@(8), d6 | get bootaddr
movl sp@(12),d5 | get bootctrllun
@@ -144,9 +142,6 @@ ASENTRY_NOPROFILE(start)
movl d2,a0@ | store end of symbol table
/* note: d2 now free, d3-d7 still in use */
- RELOC(lowram, a0)
- movl a5,a0@ | store start of physical memory
-
clrl sp@-
BUGCALL(MVMEPROM_GETBRDID)
movl sp@+, a1
@@ -397,14 +392,9 @@ Lstart1:
movc d0,sfc | as source
movc d0,dfc | and destination of transfers
moveq #PGSHIFT,d2
- lsrl d2,d1 | convert to page (click) number
- RELOC(maxmem, a0)
- movl d1,a0@ | save as maxmem
- movl a5,d0 | lowram value from ROM via boot
- lsrl d2,d0 | convert to page number
- subl d0,d1 | compute amount of RAM present
+ lsrl d2,d1 | convert to pages
RELOC(physmem, a0)
- movl d1,a0@ | and physmem
+ movl d1,a0@ | save as physmem
/* configure kernel and proc0 VA space so we can get going */
#if defined(DDB) || NKSYMS > 0
@@ -417,7 +407,6 @@ Lstart2:
addl #NBPG-1,d2
andl #PG_FRAME,d2 | round to a page
movl d2,a4
- addl a5,a4 | convert to PA
#if 0
| XXX clear from end-of-kernel to 1M, as a workaround for an
| insane pmap_bootstrap bug I cannot find (68040-specific)
@@ -433,8 +422,7 @@ Lstart2:
#endif
/* do pmap_bootstrap stuff */
- RELOC(mmutype, a0)
- pea a5@ | firstpa
+ clrl sp@- | firstpa
pea a4@ | nextpa
RELOC(pmap_bootstrap,a0)
jbsr a0@ | pmap_bootstrap(firstpa, nextpa)
@@ -464,7 +452,6 @@ Lstart2:
Lmmu_enable:
RELOC(Sysseg, a0) | system segment table addr
movl a0@,d1 | read value (a KVA)
- addl a5,d1 | convert to PA
RELOC(mmutype, a0)
cmpl #MMU_68040,a0@ | 68040 or 68060?
jgt Lmotommu1 | no, skip
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 8b6d3fe56f3..60e92a977ee 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.97 2006/04/25 06:12:23 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.98 2006/05/19 22:51:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -143,8 +143,7 @@ int bufpages = 0;
#endif
int bufcachepercent = BUFCACHEPERCENT;
-int maxmem; /* max memory per process */
-int physmem; /* max supported memory, changes to actual */
+int physmem; /* size of physical memory, in pages */
/*
* safepri is a safe priority for sleep to set for a spin-wait
* during autoconfiguration or after a panic.
diff --git a/sys/arch/mvme68k/mvme68k/mem.c b/sys/arch/mvme68k/mvme68k/mem.c
index 2a90a1b3b55..84e26b37b1c 100644
--- a/sys/arch/mvme68k/mvme68k/mem.c
+++ b/sys/arch/mvme68k/mvme68k/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.23 2005/12/17 07:31:26 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.24 2006/05/19 22:51:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -74,7 +74,6 @@
#include <uvm/uvm_extern.h>
-extern u_int lowram;
static caddr_t devzeropage;
/*ARGSUSED*/
@@ -147,7 +146,7 @@ mmrw(dev, uio, flags)
v = uio->uio_offset;
#ifndef DEBUG
/* allow reads only in RAM (except for DEBUG) */
- if (v >= 0xFFFFFFFC || v < lowram || v < NBPG) {
+ if (v >= 0xFFFFFFFC || v < NBPG) {
error = EFAULT;
goto unlock;
}
@@ -246,8 +245,7 @@ mmmmap(dev, off, prot)
* XXX could be extended to allow access to IO space but must
* be very careful.
*/
- if ((unsigned)off < lowram || (unsigned)off >= 0xFFFFFFFC ||
- (unsigned)off < NBPG)
+ if ((unsigned)off >= 0xFFFFFFFC || (unsigned)off < NBPG)
return (-1);
return (atop(off));
}
diff --git a/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c b/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
index 14b9a4eb26a..1f6c1d3e6fb 100644
--- a/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
+++ b/sys/arch/mvme68k/mvme68k/pmap_bootstrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_bootstrap.c,v 1.21 2005/11/24 22:43:19 miod Exp $ */
+/* $OpenBSD: pmap_bootstrap.c,v 1.22 2006/05/19 22:51:09 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -76,7 +76,7 @@ void *etherbuf;
int etherlen;
extern vaddr_t extiobase;
-extern int maxmem;
+extern int physmem;
#define RELOC(v, t) *((t*)((u_int)&(v) + firstpa))
#define PA2VA(v, t) *((t*)((u_int)&(v)))
@@ -120,7 +120,7 @@ do { \
#define PMAP_MD_MEMSIZE() \
do { \
- RELOC(avail_end, paddr_t) = ptoa(RELOC(maxmem, int)) - \
+ RELOC(avail_end, paddr_t) = ptoa(RELOC(physmem, int)) - \
(round_page(MSGBUFSIZE) + ptoa(1)); \
} while (0)