Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch more vm_offset_t/vm_size_t -> {p, v}{addr, size}_t ch...
details: https://anonhg.NetBSD.org/src/rev/e11ff4cdf173
branches: trunk
changeset: 504544:e11ff4cdf173
user: matt <matt%NetBSD.org@localhost>
date: Sun Mar 04 19:05:55 2001 +0000
description:
more vm_offset_t/vm_size_t -> {p,v}{addr,size}_t changes
move pmap_* declarations to pmap.h. fix conflicts this
exposed (e.g different definitions for pmap_bootstrap).
diffstat:
sys/arch/arm/arm32/pmap.c | 6 +-
sys/arch/arm/include/arm32/pmap.h | 15 ++++-
sys/arch/arm32/arm32/fault.c | 18 +----
sys/arch/arm32/arm32/ipkdb_glue.c | 10 +-
sys/arch/arm32/arm32/machdep.c | 86 ++++++++++++----------------
sys/arch/arm32/arm32/mem.c | 10 +-
sys/arch/arm32/arm32/stubs.c | 4 +-
sys/arch/arm32/arm32/vm_machdep.c | 21 ++----
sys/arch/arm32/footbridge/ebsa285_machdep.c | 7 +-
sys/arch/arm32/ofw/ofw.c | 5 +-
sys/arch/arm32/rc7500/rc7500_machdep.c | 6 +-
sys/arch/arm32/riscpc/rpc_machdep.c | 8 +-
12 files changed, 87 insertions(+), 109 deletions(-)
diffs (truncated from 622 to 300 lines):
diff -r 43827a6bfb95 -r e11ff4cdf173 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Sun Mar 04 18:16:42 2001 +0000
+++ b/sys/arch/arm/arm32/pmap.c Sun Mar 04 19:05:55 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.2 2001/03/04 07:30:19 matt Exp $ */
+/* $NetBSD: pmap.c,v 1.3 2001/03/04 19:05:55 matt Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -656,7 +656,7 @@
/*
- * void pmap_bootstrap(pd_entry_t *kernel_l1pt)
+ * void pmap_bootstrap(pd_entry_t *kernel_l1pt, pv_addr_t kernel_ptpt)
*
* bootstrap the pmap system. This is called from initarm and allows
* the pmap system to initailise any structures it requires.
@@ -2762,7 +2762,7 @@
pmap_procwr(p, va, len)
struct proc *p;
vaddr_t va;
- u_long len;
+ int len;
{
/* We only need to do anything if it is the current process. */
if (p == curproc)
diff -r 43827a6bfb95 -r e11ff4cdf173 sys/arch/arm/include/arm32/pmap.h
--- a/sys/arch/arm/include/arm32/pmap.h Sun Mar 04 18:16:42 2001 +0000
+++ b/sys/arch/arm/include/arm32/pmap.h Sun Mar 04 19:05:55 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.3 2001/03/04 07:30:20 matt Exp $ */
+/* $NetBSD: pmap.h,v 1.4 2001/03/04 19:05:56 matt Exp $ */
/*
* Copyright (c) 1994,1995 Mark Brinicombe.
@@ -141,6 +141,7 @@
extern pv_entry_t pv_table; /* Phys to virt mappings, per page. */
extern pmap_t kernel_pmap; /* pmap pointer used for the kernel */
extern struct pmap kernel_pmap_store; /* kernel_pmap points to this */
+extern int pmap_debug_level; /* Only exists if PMAP_DEBUG */
/*
* Macros that we need to export
@@ -158,9 +159,19 @@
extern boolean_t pmap_testbit __P((paddr_t, int));
extern void pmap_changebit __P((paddr_t, int, int));
extern vaddr_t pmap_map __P((vaddr_t, vaddr_t, vaddr_t, int));
-void pmap_procwr __P((struct proc *, vaddr_t, u_long));
+extern void pmap_procwr __P((struct proc *, vaddr_t, int));
#define PMAP_NEED_PROCWR
+/*
+ * Functions we use internally
+ */
+extern void pmap_bootstrap __P((pd_entry_t *, pv_addr_t));
+extern void pmap_debug __P((int));
+extern int pmap_handled_emulation __P((pmap_t, vaddr_t));
+extern int pmap_modified_emulation __P((pmap_t, vaddr_t));
+extern void pmap_postinit __P((void));
+extern pt_entry_t *pmap_pte __P((pmap_t, vaddr_t));
+
#endif /* _KERNEL */
/*
diff -r 43827a6bfb95 -r e11ff4cdf173 sys/arch/arm32/arm32/fault.c
--- a/sys/arch/arm32/arm32/fault.c Sun Mar 04 18:16:42 2001 +0000
+++ b/sys/arch/arm32/arm32/fault.c Sun Mar 04 19:05:55 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.50 2001/02/28 18:15:43 bjh21 Exp $ */
+/* $NetBSD: fault.c,v 1.51 2001/03/04 19:05:56 matt Exp $ */
/*
* Copyright (c) 1994-1997 Mark Brinicombe.
@@ -66,15 +66,7 @@
#include <arch/arm/arm/disassem.h>
-#ifdef PMAP_DEBUG
-extern int pmap_debug_level;
-#endif /* PMAP_DEBUG */
-
-int pmap_modified_emulation __P((pmap_t, vm_offset_t));
-int pmap_handled_emulation __P((pmap_t, vm_offset_t));
-pt_entry_t *pmap_pte __P((pmap_t pmap, vm_offset_t va));
int cowfault __P((vaddr_t));
-
int fetchuserword __P((u_int address, u_int *location));
extern char fusubailout[];
@@ -325,14 +317,14 @@
* the page and possibly the page table page.
*/
{
- register vm_offset_t va;
+ register vaddr_t va;
register struct vmspace *vm = p->p_vmspace;
register vm_map_t map;
int rv;
vm_prot_t ftype;
extern vm_map_t kernel_map;
- va = trunc_page((vm_offset_t)fault_address);
+ va = trunc_page((vaddr_t)fault_address);
#ifdef PMAP_DEBUG
if (pmap_debug_level >= 0)
@@ -567,7 +559,7 @@
/* Is the page already mapped ? */
/* This is debugging for rev K SA110 silicon */
- pte = pmap_pte(p->p_vmspace->vm_map.pmap, (vm_offset_t)fault_pc);
+ pte = pmap_pte(p->p_vmspace->vm_map.pmap, (vaddr_t)fault_pc);
if (pte && *pte != 0) {
if (kernel_debug & 1) {
printf("prefetch_abort: page is already mapped - pte=%p *pte=%08x\n",
@@ -601,7 +593,7 @@
disassemble(fault_pc);
printf("return addr=%08x", frame->tf_pc);
pte = pmap_pte(p->p_vmspace->vm_map.pmap,
- (vm_offset_t)fault_pc);
+ (vaddr_t)fault_pc);
if (pte)
printf(" pte=%p *pte=%08x\n", pte, *pte);
else
diff -r 43827a6bfb95 -r e11ff4cdf173 sys/arch/arm32/arm32/ipkdb_glue.c
--- a/sys/arch/arm32/arm32/ipkdb_glue.c Sun Mar 04 18:16:42 2001 +0000
+++ b/sys/arch/arm32/arm32/ipkdb_glue.c Sun Mar 04 19:05:55 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipkdb_glue.c,v 1.3 2000/06/29 08:52:58 mrg Exp $ */
+/* $NetBSD: ipkdb_glue.c,v 1.4 2001/03/04 19:05:56 matt Exp $ */
/*
* Copyright (C) 1994 Wolfgang Solfrank.
@@ -170,10 +170,10 @@
unsigned char *src;
{
pt_entry_t *ptep;
- vm_offset_t va;
+ vaddr_t va;
int ch;
- va = (unsigned long)src & (~PGOFSET);
+ va = (vaddr_t)src & (~PGOFSET);
ptep = vtopte(va);
if ((*ptep & L2_MASK) == L2_INVAL)
@@ -191,9 +191,9 @@
int ch;
{
pt_entry_t *ptep, pte, pteo;
- vm_offset_t va;
+ vaddr_t va;
- va = (unsigned long)dst & (~PGOFSET);
+ va = (vaddr_t)dst & (~PGOFSET);
ptep = vtopte(va);
if ((*ptep & L2_MASK) == L2_INVAL)
diff -r 43827a6bfb95 -r e11ff4cdf173 sys/arch/arm32/arm32/machdep.c
--- a/sys/arch/arm32/arm32/machdep.c Sun Mar 04 18:16:42 2001 +0000
+++ b/sys/arch/arm32/arm32/machdep.c Sun Mar 04 19:05:55 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.87 2001/03/04 01:50:53 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.88 2001/03/04 19:05:56 matt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -106,11 +106,7 @@
extern pt_entry_t msgbufpte;
caddr_t msgbufaddr;
-extern vm_offset_t msgbufphys;
-
-#ifdef PMAP_DEBUG
-extern int pmap_debug_level;
-#endif
+extern paddr_t msgbufphys;
int kernel_debug = 0;
@@ -122,26 +118,20 @@
void consinit __P((void));
-void map_section __P((vm_offset_t pt, vm_offset_t va, vm_offset_t pa,
+void map_section __P((vaddr_t pt, vaddr_t va, paddr_t pa,
int cacheable));
-void map_pagetable __P((vm_offset_t pt, vm_offset_t va, vm_offset_t pa));
-void map_entry __P((vm_offset_t pt, vm_offset_t va, vm_offset_t pa));
-void map_entry_nc __P((vm_offset_t pt, vm_offset_t va, vm_offset_t pa));
-void map_entry_ro __P((vm_offset_t pt, vm_offset_t va, vm_offset_t pa));
+void map_pagetable __P((vaddr_t pt, vaddr_t va, paddr_t pa));
+void map_entry __P((vaddr_t pt, vaddr_t va, paddr_t pa));
+void map_entry_nc __P((vaddr_t pt, vaddr_t va, paddr_t pa));
+void map_entry_ro __P((vaddr_t pt, vaddr_t va, paddr_t pa));
-void pmap_bootstrap __P((vm_offset_t kernel_l1pt));
u_long strtoul __P((const char *s, char **ptr, int base));
void data_abort_handler __P((trapframe_t *frame));
void prefetch_abort_handler __P((trapframe_t *frame));
void zero_page_readonly __P((void));
void zero_page_readwrite __P((void));
extern void configure __P((void));
-extern pt_entry_t *pmap_pte __P((pmap_t pmap, vm_offset_t va));
-extern void pmap_postinit __P((void));
extern void dumpsys __P((void));
-#ifdef PMAP_DEBUG
-extern void pmap_debug __P((int level));
-#endif /* PMAP_DEBUG */
/*
* Debug function just to park the CPU
@@ -188,9 +178,9 @@
void
map_section(pagetable, va, pa, cacheable)
- vm_offset_t pagetable;
- vm_offset_t va;
- vm_offset_t pa;
+ vaddr_t pagetable;
+ vaddr_t va;
+ paddr_t pa;
int cacheable;
{
#ifdef DIAGNOSTIC
@@ -209,9 +199,9 @@
void
map_pagetable(pagetable, va, pa)
- vm_offset_t pagetable;
- vm_offset_t va;
- vm_offset_t pa;
+ vaddr_t pagetable;
+ vaddr_t va;
+ paddr_t pa;
{
#ifdef DIAGNOSTIC
if ((pa & 0xc00) != 0)
@@ -228,19 +218,19 @@
L1_PTE((pa & PG_FRAME) + 0xc00);
}
-vm_size_t
+vsize_t
map_chunk(pd, pt, va, pa, size, acc, flg)
- vm_offset_t pd;
- vm_offset_t pt;
- vm_offset_t va;
- vm_offset_t pa;
- vm_size_t size;
+ vaddr_t pd;
+ vaddr_t pt;
+ vaddr_t va;
+ paddr_t pa;
+ vsize_t size;
u_int acc;
u_int flg;
{
pd_entry_t *l1pt = (pd_entry_t *)pd;
pt_entry_t *l2pt = (pt_entry_t *)pt;
- vm_size_t remain;
+ vsize_t remain;
u_int loop;
remain = (size + (NBPG - 1)) & ~(NBPG - 1);
@@ -296,9 +286,9 @@
void
map_entry(pagetable, va, pa)
- vm_offset_t pagetable;
- vm_offset_t va;
- vm_offset_t pa;
+ vaddr_t pagetable;
+ vaddr_t va;
+ paddr_t pa;
{
((pt_entry_t *)pagetable)[((va >> PGSHIFT) & 0x000003ff)] =
L2_PTE((pa & PG_FRAME), AP_KRW);
@@ -307,9 +297,9 @@
void
map_entry_nc(pagetable, va, pa)
- vm_offset_t pagetable;
- vm_offset_t va;
- vm_offset_t pa;
+ vaddr_t pagetable;
+ vaddr_t va;
+ paddr_t pa;
{
((pt_entry_t *)pagetable)[((va >> PGSHIFT) & 0x000003ff)] =
L2_PTE_NC_NB((pa & PG_FRAME), AP_KRW);
@@ -318,9 +308,9 @@
void
map_entry_ro(pagetable, va, pa)
- vm_offset_t pagetable;
- vm_offset_t va;
- vm_offset_t pa;
+ vaddr_t pagetable;
Home |
Main Index |
Thread Index |
Old Index