diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-08-18 05:58:35 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-08-18 05:58:35 +0000 |
commit | 080c67550fc82814a4fbea565daca7ebf54c6286 (patch) | |
tree | 0c9c90924da8aed5d0a08095f67f3f12e964b50e | |
parent | 1a93b860ae1af2f8061045adeb4bff032a04d3cd (diff) |
Only map memory above 256MB if the memory is present in the system.
-rw-r--r-- | sys/arch/powerpc/powerpc/machdep.c | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/sys/arch/powerpc/powerpc/machdep.c b/sys/arch/powerpc/powerpc/machdep.c index 40fbd7e754b..6dbefa47e49 100644 --- a/sys/arch/powerpc/powerpc/machdep.c +++ b/sys/arch/powerpc/powerpc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.74 2001/08/17 22:29:21 drahn Exp $ */ +/* $OpenBSD: machdep.c,v 1.75 2001/08/18 05:58:34 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -232,20 +232,35 @@ where = 3; battable[0].batu = BATU(0x00000000); /* map all of possible physical memory, ick */ - battable[0x1].batl = BATL(0x10000000, BAT_M); - battable[0x1].batu = BATU(0x10000000); - battable[0x2].batl = BATL(0x20000000, BAT_M); - battable[0x2].batu = BATU(0x20000000); - battable[0x3].batl = BATL(0x30000000, BAT_M); - battable[0x3].batu = BATU(0x30000000); - battable[0x4].batl = BATL(0x40000000, BAT_M); - battable[0x4].batu = BATU(0x40000000); - battable[0x5].batl = BATL(0x50000000, BAT_M); - battable[0x5].batu = BATU(0x50000000); - battable[0x6].batl = BATL(0x60000000, BAT_M); - battable[0x6].batu = BATU(0x60000000); - battable[0x7].batl = BATL(0x70000000, BAT_M); - battable[0x7].batu = BATU(0x70000000); + 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); |