summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-08-23 00:09:16 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-08-23 00:09:16 +0000
commit01257aafffb6bcbf637efb90af26091563f32310 (patch)
tree9814739be467875e6c55c9e895ad447241a5f046 /sys/arch
parent6c5db34b6579d7c04e4e0141729fa320858ab1bb (diff)
Move the limited memory mapping code later in configuration, after
physmem size is known. Now this runs on systems > 256M again. This is still a BAD idea. New pmap module is coming soon.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc/powerpc/machdep.c63
1 files changed, 31 insertions, 32 deletions
diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c
index 4b8325a62d6..ea1e351469e 100644
--- a/sys/arch/powerpc/powerpc/machdep.c
+++ b/sys/arch/powerpc/powerpc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.77 2001/08/21 03:07:02 drahn Exp $ */
+/* $OpenBSD: machdep.c,v 1.78 2001/08/23 00:09:15 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -231,37 +231,6 @@ where = 3;
battable[0].batl = BATL(0x00000000, BAT_M);
battable[0].batu = BATU(0x00000000);
- /* map all of possible physical memory, ick */
- if (ctob(physmem) > 0x10000000) {
- battable[0x1].batl = BATL(0x10000000, BAT_M);
- battable[0x1].batu = BATU(0x10000000);
- }
- if (ctob(physmem) > 0x20000000) {
- battable[0x2].batl = BATL(0x20000000, BAT_M);
- battable[0x2].batu = BATU(0x20000000);
- }
- if (ctob(physmem) > 0x30000000) {
- battable[0x3].batl = BATL(0x30000000, BAT_M);
- battable[0x3].batu = BATU(0x30000000);
- }
- if (ctob(physmem) > 0x40000000) {
- battable[0x4].batl = BATL(0x40000000, BAT_M);
- battable[0x4].batu = BATU(0x40000000);
- }
- if (ctob(physmem) > 0x50000000) {
- battable[0x5].batl = BATL(0x50000000, BAT_M);
- battable[0x5].batu = BATU(0x50000000);
- }
- if (ctob(physmem) > 0x60000000) {
- battable[0x6].batl = BATL(0x60000000, BAT_M);
- battable[0x6].batu = BATU(0x60000000);
- }
- if (ctob(physmem) > 0x70000000) {
- battable[0x7].batl = BATL(0x70000000, BAT_M);
- battable[0x7].batu = BATU(0x70000000);
- }
-
-
battable[0x8].batl = BATL(0x80000000, BAT_I);
battable[0x8].batu = BATU(0x80000000);
battable[0x9].batl = BATL(0x90000000, BAT_I);
@@ -349,6 +318,36 @@ where = 3;
*/
pmap_bootstrap(startkernel, endkernel);
+ /* now that we know physmem size, map physical memory with BATs */
+ if (physmem > btoc(0x10000000)) {
+ battable[0x1].batl = BATL(0x10000000, BAT_M);
+ battable[0x1].batu = BATU(0x10000000);
+ }
+ if (physmem > btoc(0x20000000)) {
+ battable[0x2].batl = BATL(0x20000000, BAT_M);
+ battable[0x2].batu = BATU(0x20000000);
+ }
+ if (physmem > btoc(0x30000000)) {
+ battable[0x3].batl = BATL(0x30000000, BAT_M);
+ battable[0x3].batu = BATU(0x30000000);
+ }
+ if (physmem > btoc(0x40000000)) {
+ battable[0x4].batl = BATL(0x40000000, BAT_M);
+ battable[0x4].batu = BATU(0x40000000);
+ }
+ if (physmem > btoc(0x50000000)) {
+ battable[0x5].batl = BATL(0x50000000, BAT_M);
+ battable[0x5].batu = BATU(0x50000000);
+ }
+ if (physmem > btoc(0x60000000)) {
+ battable[0x6].batl = BATL(0x60000000, BAT_M);
+ battable[0x6].batu = BATU(0x60000000);
+ }
+ if (physmem > btoc(0x70000000)) {
+ battable[0x7].batl = BATL(0x70000000, BAT_M);
+ battable[0x7].batu = BATU(0x70000000);
+ }
+
/*
* Now enable translation (and machine checks/recoverable interrupts).
*/