diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mvmeppc/include/vmparam.h | 13 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/locore.S | 12 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c | 9 |
4 files changed, 26 insertions, 19 deletions
diff --git a/sys/arch/mvmeppc/include/vmparam.h b/sys/arch/mvmeppc/include/vmparam.h index fb40fb98c50..ebfb2afe779 100644 --- a/sys/arch/mvmeppc/include/vmparam.h +++ b/sys/arch/mvmeppc/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.9 2002/02/17 22:59:53 maja Exp $ */ +/* $OpenBSD: vmparam.h,v 1.10 2002/06/07 01:01:38 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $ */ /*- @@ -87,22 +87,21 @@ #define VM_MIN_ADDRESS ((vm_offset_t)0) #define VM_MAX_ADDRESS ((vm_offset_t)0xfffff000) #define VM_MAXUSER_ADDRESS VM_MAX_ADDRESS -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT)) +#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHIFT)) /* ppc_kvm_size is so that vm space can be stolen before vm is fully * initialized. */ #define VM_KERN_ADDR_SIZE_DEF SEGMENT_LENGTH -extern vm_offset_t ppc_kvm_size; -#define VM_KERN_ADDRESS_SIZE (ppc_kvm_size) -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)((KERNEL_SR << ADDR_SR_SHFT) \ - + SEGMENT_LENGTH)) +extern vm_offset_t ppc_kvm_stolen; +#define VM_KERN_ADDRESS_SIZE (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) #define __HAVE_PMAP_PHYSSEG struct pmap_physseg { - struct pv_entry *pvent; + struct pted_pv_head *pvent; char *attrs; /* NULL ??? */ }; diff --git a/sys/arch/mvmeppc/mvmeppc/locore.S b/sys/arch/mvmeppc/mvmeppc/locore.S index 967a4213b0a..e6c37c21030 100644 --- a/sys/arch/mvmeppc/mvmeppc/locore.S +++ b/sys/arch/mvmeppc/mvmeppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.1 2001/06/26 21:57:54 smurph Exp $ */ +/* $OpenBSD: locore.S,v 1.2 2002/06/07 01:01:40 miod Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -945,12 +945,16 @@ s_dsitrap: stw 10,16(1) stw 11,12(1) stw 12,8(1) + mfxer 30 /* save XER */ + mtsprg 2,30 mflr 30 /* save trap type */ mfctr 31 /* & CTR */ mfdar 3 + mfsrr1 4 + mfdsisr 5 s_pte_spill: - bl _C_LABEL(pte_spill) /* try a spill */ - or. 3,3,3 + bl _C_LABEL(pte_spill_r) /* try a spill */ + cmpwi 0,3,0 mtctr 31 /* restore CTR */ mtlr 30 /* and trap type */ mfsprg 31,2 /* get saved XER */ @@ -1000,6 +1004,8 @@ s_isitrap: mflr 30 /* save trap type */ mfctr 31 /* & ctr */ mfsrr0 3 + mfsrr1 4 + li 5, 0 b s_pte_spill /* above */ /* diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 8824de9c06d..a5918e5266d 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.24 2002/03/23 13:28:34 espie Exp $ */ +/* $OpenBSD: machdep.c,v 1.25 2002/06/07 01:01:40 miod Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1073,6 +1073,8 @@ ppc_set_msr(msr) return(msr); } +vaddr_t ppc_kvm_stolen = VM_KERN_ADDRESS_SIZE; + #if 0 /* BUS functions */ int @@ -1185,9 +1187,12 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp) /* need to steal vm space before kernel vm is initialized */ alloc_size = trunc_page(size + NBPG); - ppc_kvm_size -= alloc_size; - vaddr = VM_MIN_KERNEL_ADDRESS + ppc_kvm_size; + vaddr = VM_MIN_KERNEL_ADDRESS + ppc_kvm_stolen; + ppc_kvm_stolen -= alloc_size; + if (ppc_kvm_stolen > SEGMENT_LENGTH) { + panic("ppc_kvm_stolen, out of space"); + } } else { vaddr = uvm_km_valloc_wait(phys_map, len); } diff --git a/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c b/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c index a07b5e6a744..bfcf5632283 100644 --- a/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/ppc1_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ppc1_machdep.c,v 1.6 2002/03/14 03:15:58 millert Exp $ */ +/* $OpenBSD: ppc1_machdep.c,v 1.7 2002/06/07 01:01:40 miod Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -163,10 +163,8 @@ size_memory(void) */ void PPC1_mem_regions(memp, availp) -struct mem_region **memp, **availp; + struct mem_region **memp, **availp; { - extern int avail_start; - bzero(&PPC1mem[0], sizeof(struct mem_region) * PPC1_REGIONS); bzero(&PPC1avail[0], sizeof(struct mem_region) * PPC1_REGIONS); /* @@ -175,8 +173,7 @@ struct mem_region **memp, **availp; PPC1mem[0].start = 0; PPC1mem[0].size = size_memory(); - PPC1avail[0].start = avail_start; - PPC1avail[0].size = (PPC1mem[0].size - avail_start); + PPC1avail[0] = PPC1mem[0]; *memp = PPC1mem; *availp = PPC1avail; |