diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2002-03-21 03:02:33 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2002-03-21 03:02:33 +0000 |
commit | 231220dde73212c6e18704314f5682a3d2ea7ebe (patch) | |
tree | 8fb12945c6dbcc7b24dbe0642f803f2c472e0302 /sys/arch/macppc | |
parent | b34eac12de5a6806deee89ee0fd864261b089c59 (diff) |
Map up to 1G 1-1 using dbats, this disables dynamically swapped bats for now,
until the issue with SR invalidation/loading is corrected.
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/genassym.cf | 3 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/locore.S | 6 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 22 |
3 files changed, 28 insertions, 3 deletions
diff --git a/sys/arch/macppc/macppc/genassym.cf b/sys/arch/macppc/macppc/genassym.cf index 9d3aa02c871..b80754e872e 100644 --- a/sys/arch/macppc/macppc/genassym.cf +++ b/sys/arch/macppc/macppc/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.4 2001/11/06 19:53:15 miod Exp $ +# $OpenBSD: genassym.cf,v 1.5 2002/03/21 03:02:32 drahn Exp $ # # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -67,6 +67,7 @@ member pcb_spl member PCB_FAULT pcb_onfault struct pmap +member PM_SR pm_sr[0] member PM_USRSR pm_sr[USER_SR] member PM_KERNELSR pm_sr[KERNEL_SR] diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S index 39b1b4ea894..83e92875bae 100644 --- a/sys/arch/macppc/macppc/locore.S +++ b/sys/arch/macppc/macppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.2 2002/03/13 18:27:36 drahn Exp $ */ +/* $OpenBSD: locore.S,v 1.3 2002/03/21 03:02:32 drahn Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -440,6 +440,7 @@ _C_LABEL(dsitrap): mfxer 30 /* save XER */ mtsprg 2,30 /* in SPRG2 */ mfsrr1 31 /* test kernel mode */ +#if 0 mtcr 31 bc 12,17,1f /* branch if PSL_PR is set */ mfdar 31 /* get fault address */ @@ -466,6 +467,7 @@ _C_LABEL(dsitrap): lmw 28,disisave(0) /* restore r28-r31 */ rfi /* return to trapped code */ 1: +#endif mflr 28 /* save LR */ bla s_dsitrap _C_LABEL(dsisize) = .-_C_LABEL(dsitrap) @@ -481,6 +483,7 @@ _C_LABEL(isitrap): mflr 28 /* save LR */ mfcr 29 /* save CR */ mfsrr1 31 /* test kernel mode */ +#if 0 mtcr 31 bc 12,17,1f /* branch if PSL_PR is set */ mfsrr0 31 /* get fault address */ @@ -496,6 +499,7 @@ _C_LABEL(isitrap): lmw 28,disisave(0) /* restore r28-r31 */ rfi /* return to trapped code */ 1: +#endif bla s_isitrap _C_LABEL(isisize) = .-_C_LABEL(isitrap) diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index addab52a2e8..1300b1b572b 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.31 2002/03/14 23:51:47 drahn Exp $ */ +/* $OpenBSD: machdep.c,v 1.32 2002/03/21 03:02:32 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -251,6 +251,8 @@ where = 3; __asm__ volatile ("mtdbatl 0,%0; mtdbatu 0,%1" :: "r"(battable[0].batl), "r"(battable[0].batu)); + + /* * Set up trap vectors */ @@ -322,6 +324,23 @@ where = 3; */ pmap_bootstrap(startkernel, endkernel); + /* use BATs to map 1GB memory, no pageable BATs now */ + if (physmem > btoc(0x10000000)) { + __asm__ volatile ("mtdbatl 1,%0; mtdbatu 1,%1" + :: "r"(BATL(0x10000000, BAT_M)), + "r"(BATU(0x10000000))); + } + if (physmem > btoc(0x20000000)) { + __asm__ volatile ("mtdbatl 2,%0; mtdbatu 2,%1" + :: "r"(BATL(0x20000000, BAT_M)), + "r"(BATU(0x20000000))); + } + if (physmem > btoc(0x30000000)) { + __asm__ volatile ("mtdbatl 3,%0; mtdbatu 3,%1" + :: "r"(BATL(0x30000000, BAT_M)), + "r"(BATU(0x30000000))); + } +#if 0 /* now that we know physmem size, map physical memory with BATs */ if (physmem > btoc(0x10000000)) { battable[0x1].batl = BATL(0x10000000, BAT_M); @@ -351,6 +370,7 @@ where = 3; battable[0x7].batl = BATL(0x70000000, BAT_M); battable[0x7].batu = BATU(0x70000000); } +#endif /* * Now enable translation (and machine checks/recoverable interrupts). |