diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2004-06-24 22:35:57 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2004-06-24 22:35:57 +0000 |
commit | f02777d3423dc56f57ca38be206942d1a6012150 (patch) | |
tree | 63c6eeab224da9f1a47b6f772e0acd219574c4dd /sys/arch/mvmeppc | |
parent | 956816507b79c80359f676418f22524f980c68fe (diff) |
Do a better job at containing powerpc specific #defines to PPC_...
ok deraadt@
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r-- | sys/arch/mvmeppc/include/vmparam.h | 6 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/genassym.cf | 6 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/locore.S | 28 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/machdep.c | 6 |
4 files changed, 23 insertions, 23 deletions
diff --git a/sys/arch/mvmeppc/include/vmparam.h b/sys/arch/mvmeppc/include/vmparam.h index 24c037f6ba6..0be296321eb 100644 --- a/sys/arch/mvmeppc/include/vmparam.h +++ b/sys/arch/mvmeppc/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.11 2004/01/22 23:29:29 miod Exp $ */ +/* $OpenBSD: vmparam.h,v 1.12 2004/06/24 22:35:56 drahn Exp $ */ /* $NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $ */ /*- @@ -87,13 +87,13 @@ #define VM_MIN_ADDRESS ((vm_offset_t)0) #define VM_MAXUSER_ADDRESS ((vm_offset_t)0xfffff000) #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHIFT)) +#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(PPC_KERNEL_SR << ADDR_SR_SHIFT)) /* ppc_kvm_size is so that vm space can be stolen before vm is fully * initialized. */ extern vm_offset_t ppc_kvm_stolen; -#define VM_KERN_ADDRESS_SIZE (SEGMENT_LENGTH - (32 * 1024 * 1024)) +#define VM_KERN_ADDRESS_SIZE (PPC_SEGMENT_LENGTH - (32 * 1024 * 1024)) #define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + VM_KERN_ADDRESS_SIZE) #define VM_PHYS_SIZE (USRIOSIZE * PAGE_SIZE) diff --git a/sys/arch/mvmeppc/mvmeppc/genassym.cf b/sys/arch/mvmeppc/mvmeppc/genassym.cf index 0a05248311b..e70bf0f2e95 100644 --- a/sys/arch/mvmeppc/mvmeppc/genassym.cf +++ b/sys/arch/mvmeppc/mvmeppc/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.6 2004/05/08 20:10:24 miod Exp $ +# $OpenBSD: genassym.cf,v 1.7 2004/06/24 22:35:56 drahn Exp $ # # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -63,8 +63,8 @@ member pcb_spl member PCB_FAULT pcb_onfault struct pmap -member PM_USRSR pm_sr[USER_SR] -member PM_KERNELSR pm_sr[KERNEL_SR] +member PM_USRSR pm_sr[PPC_USER_SR] +member PM_KERNELSR pm_sr[PPC_KERNEL_SR] struct proc member p_forw diff --git a/sys/arch/mvmeppc/mvmeppc/locore.S b/sys/arch/mvmeppc/mvmeppc/locore.S index b1c70ae3f9b..f18f41cb978 100644 --- a/sys/arch/mvmeppc/mvmeppc/locore.S +++ b/sys/arch/mvmeppc/mvmeppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.6 2004/01/29 21:30:02 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.7 2004/06/24 22:35:56 drahn Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -238,7 +238,7 @@ _C_LABEL(sw1): or. 30,30,30 /* old process was exiting? */ beq switch_exited - mfsr 10,USER_SR /* save USER_SR for copyin/copyout */ + mfsr 10,PPC_USER_SR /* save USER_SR for copyin/copyout */ mfcr 11 /* save cr */ mr 12,2 /* save r2 */ stwu 1,-SFRAMELEN(1) /* still running on old stack */ @@ -265,14 +265,14 @@ switch_exited: addic. 5,5,64 li 6,0 - mfsr 8,KERNEL_SR /* save kernel SR */ + mfsr 8,PPC_KERNEL_SR /* save kernel SR */ 1: addis 6,6,-0x10000000@ha /* set new procs segment registers */ or. 6,6,6 /* This is done from the real address pmap */ lwzu 7,-4(5) /* so we don't have to worry */ mtsrin 7,6 /* about accessibility */ bne 1b - mtsr KERNEL_SR,8 /* restore kernel SR */ + mtsr PPC_KERNEL_SR,8 /* restore kernel SR */ isync lwz 1,PCB_SP(4) /* get new procs SP */ @@ -285,7 +285,7 @@ switch_exited: mr 2,12 /* get saved r2 */ mtcr 11 /* get saved cr */ isync - mtsr USER_SR,10 /* get saved USER_SR */ + mtsr PPC_USER_SR,10 /* get saved USER_SR */ isync switch_return: @@ -788,9 +788,9 @@ _C_LABEL(ddbsize) = .-_C_LABEL(ddblow) lis 2,_C_LABEL(curpm)@ha; /* get real address of pmap */ \ lwz 2,_C_LABEL(curpm)@l(2); \ lwz 3,PM_USRSR(2); \ - mtsr USER_SR,3; \ + mtsr PPC_USER_SR,3; \ lwz 3,PM_KERNELSR(2); \ - mtsr KERNEL_SR,3; \ + mtsr PPC_KERNEL_SR,3; \ 1: mfsprg 2,1; /* restore cr */ \ mtcr 2; \ lwz 2,savearea(0); \ @@ -826,9 +826,9 @@ realtrap: */ s_trap: /* First have to enable KERNEL mapping */ - lis 31,KERNEL_SEGMENT@ha - addi 31,31,KERNEL_SEGMENT@l - mtsr KERNEL_SR,31 + lis 31,PPC_KERNEL_SEGMENT@ha + addi 31,31,PPC_KERNEL_SEGMENT@l + mtsr PPC_KERNEL_SR,31 FRAME_SETUP(tempsave) /* Now we can recover interrupts again: */ mfmsr 7 @@ -996,9 +996,9 @@ s_isitrap: stw 4,12(1); \ stw 3,8(1); \ /* interrupts are recoverable here, and enable translation */ \ - lis 3,(KERNEL_SEGMENT|SR_SUKEY|SR_PRKEY)@ha; \ - addi 3,3,(KERNEL_SEGMENT|SR_SUKEY|SR_PRKEY)@l; \ - mtsr KERNEL_SR,3; \ + lis 3,(PPC_KERNEL_SEGMENT|SR_SUKEY|SR_PRKEY)@ha; \ + addi 3,3,(PPC_KERNEL_SEGMENT|SR_SUKEY|SR_PRKEY)@l; \ + mtsr PPC_KERNEL_SR,3; \ mfmsr 5; \ ori 5,5,(PSL_IR|PSL_DR|PSL_RI); \ mtmsr 5; \ @@ -1037,7 +1037,7 @@ intr_exit: lis 3,_C_LABEL(curpm)@ha /* get current pmap real address */ lwz 3,_C_LABEL(curpm)@l(3) lwz 3,PM_KERNELSR(3) - mtsr KERNEL_SR,3 /* Restore kernel SR */ + mtsr PPC_KERNEL_SR,3 /* Restore kernel SR */ lis 3,_C_LABEL(astpending)@ha /* Test AST pending */ lwz 4,_C_LABEL(astpending)@l(3) andi. 4,4,1 diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 347d2fe8ee9..1e921d512fa 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.45 2004/05/06 20:15:08 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.46 2004/06/24 22:35:56 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -970,7 +970,7 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp) vaddr = VM_MIN_KERNEL_ADDRESS + ppc_kvm_stolen; ppc_kvm_stolen -= alloc_size; - if (ppc_kvm_stolen > SEGMENT_LENGTH) { + if (ppc_kvm_stolen > PPC_SEGMENT_LENGTH) { panic("ppc_kvm_stolen, out of space"); } } else { @@ -1011,7 +1011,7 @@ mapiodev(pa, len) /* need to steal vm space before kernel vm is initialized */ va = VM_MIN_KERNEL_ADDRESS + ppc_kvm_stolen; ppc_kvm_stolen += size; - if (ppc_kvm_stolen > SEGMENT_LENGTH) { + if (ppc_kvm_stolen > PPC_SEGMENT_LENGTH) { panic("ppc_kvm_stolen: out of space"); } } else { |