diff options
-rw-r--r-- | sys/arch/vax/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/include/pmap.h | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/types.h | 13 | ||||
-rw-r--r-- | sys/arch/vax/include/vmparam.h | 12 | ||||
-rw-r--r-- | sys/arch/vax/vax/bus_dma.c | 26 | ||||
-rw-r--r-- | sys/arch/vax/vax/db_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/vax/machdep.c | 16 | ||||
-rw-r--r-- | sys/arch/vax/vax/mem.c | 8 | ||||
-rw-r--r-- | sys/arch/vax/vax/uvax.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/vax/uvaxII.c | 14 | ||||
-rw-r--r-- | sys/compat/vax1k/vax1k_subr.c | 4 |
11 files changed, 57 insertions, 60 deletions
diff --git a/sys/arch/vax/include/db_machdep.h b/sys/arch/vax/include/db_machdep.h index 6ac6e275d12..0355545a562 100644 --- a/sys/arch/vax/include/db_machdep.h +++ b/sys/arch/vax/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.10 2005/01/04 21:14:35 espie Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.11 2005/11/06 22:21:30 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.6 1998/08/10 14:33:33 ragge Exp $ */ /* @@ -40,7 +40,7 @@ #include <machine/trap.h> #include <machine/psl.h> -typedef vm_offset_t db_addr_t; /* address - unsigned */ +typedef vaddr_t db_addr_t; /* address - unsigned */ typedef long db_expr_t; /* expression - signed */ typedef struct trapframe db_regs_t; diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index d1d483686d3..159a98a2759 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.25 2005/06/29 06:07:04 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.26 2005/11/06 22:21:30 miod Exp $ */ /* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */ /* @@ -91,11 +91,11 @@ struct pv_entry { /* Mapping macros used when allocating SPT */ #define MAPVIRT(ptr, count) \ - (vm_offset_t)ptr = virtual_avail; \ + (vaddr_t)ptr = virtual_avail; \ virtual_avail += (count) * VAX_NBPG; #define MAPPHYS(ptr, count, perm) \ - (vm_offset_t)ptr = avail_start + KERNBASE; \ + (paddr_t)ptr = avail_start + KERNBASE; \ avail_start += (count) * VAX_NBPG; #ifdef _KERNEL @@ -148,7 +148,7 @@ extern struct pmap kernel_pmap_store; /* Prototypes */ void pmap_bootstrap(void); -vaddr_t pmap_map(vm_offset_t, vm_offset_t, vm_offset_t, int); +vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int); void pmap_pinit(pmap_t); #endif /* _KERNEL */ diff --git a/sys/arch/vax/include/types.h b/sys/arch/vax/include/types.h index 448661fd32d..c6c9d65e4b7 100644 --- a/sys/arch/vax/include/types.h +++ b/sys/arch/vax/include/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.14 2004/11/26 21:23:06 miod Exp $ */ +/* $OpenBSD: types.h,v 1.15 2005/11/06 22:21:30 miod Exp $ */ /* $NetBSD: types.h,v 1.14 1998/08/13 02:10:49 eeh Exp $ */ /*- @@ -43,13 +43,10 @@ typedef struct label_t { } label_t; #endif -typedef unsigned long vm_offset_t; -typedef unsigned long vm_size_t; - -typedef vm_offset_t paddr_t; -typedef vm_size_t psize_t; -typedef vm_offset_t vaddr_t; -typedef vm_size_t vsize_t; +typedef unsigned long paddr_t; +typedef unsigned long psize_t; +typedef unsigned long vaddr_t; +typedef unsigned long vsize_t; /* * Basic integral types. Omit the typedef if diff --git a/sys/arch/vax/include/vmparam.h b/sys/arch/vax/include/vmparam.h index 1c48b37d7ae..66fed2bd658 100644 --- a/sys/arch/vax/include/vmparam.h +++ b/sys/arch/vax/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.24 2005/06/30 21:53:13 deraadt Exp $ */ +/* $OpenBSD: vmparam.h,v 1.25 2005/11/06 22:21:30 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.32 2000/03/07 00:05:59 matt Exp $ */ /*- @@ -102,11 +102,11 @@ struct pmap_physseg { #define vax_trunc_page(x) ((vaddr_t)(x) & ~VAX_PGOFSET) /* user/kernel map constants */ -#define VM_MIN_ADDRESS ((vm_offset_t)0) -#define VM_MAXUSER_ADDRESS ((vm_offset_t)KERNBASE) -#define VM_MAX_ADDRESS ((vm_offset_t)KERNBASE) -#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNBASE) -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)(0xC0000000)) +#define VM_MIN_ADDRESS ((vaddr_t)0) +#define VM_MAXUSER_ADDRESS ((vaddr_t)KERNBASE) +#define VM_MAX_ADDRESS ((vaddr_t)KERNBASE) +#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)KERNBASE) +#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(0xC0000000)) #define USRIOSIZE (8 * VAX_NPTEPG) /* 512MB */ #define VM_PHYS_SIZE (USRIOSIZE*VAX_NBPG) diff --git a/sys/arch/vax/vax/bus_dma.c b/sys/arch/vax/vax/bus_dma.c index ceb7fe94f73..e42acf8da04 100644 --- a/sys/arch/vax/vax/bus_dma.c +++ b/sys/arch/vax/vax/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.14 2004/12/25 23:02:26 miod Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.15 2005/11/06 22:21:33 miod Exp $ */ /* $NetBSD: bus_dma.c,v 1.5 1999/11/13 00:32:20 thorpej Exp $ */ /*- @@ -66,7 +66,7 @@ extern vaddr_t avail_start, avail_end, virtual_avail; int _bus_dmamap_load_buffer(bus_dma_tag_t, bus_dmamap_t, void *, - bus_size_t, struct proc *, int, vm_offset_t *, int *, int); + bus_size_t, struct proc *, int, paddr_t *, int *, int); int _bus_dma_inrange(bus_dma_segment_t *, int, bus_addr_t); int _bus_dmamem_alloc_range(bus_dma_tag_t, bus_size_t, bus_size_t, bus_size_t, bus_dma_segment_t*, int, int *, int, vaddr_t, vaddr_t); @@ -161,7 +161,7 @@ _bus_dmamap_load(t, map, buf, buflen, p, flags) struct proc *p; int flags; { - vm_offset_t lastaddr; + paddr_t lastaddr; int seg, error; #ifdef DEBUG_DMA @@ -201,7 +201,7 @@ _bus_dmamap_load_mbuf(t, map, m0, flags) struct mbuf *m0; int flags; { - vm_offset_t lastaddr; + paddr_t lastaddr; int seg, error, first; struct mbuf *m; @@ -254,7 +254,7 @@ _bus_dmamap_load_uio(t, map, uio, flags) struct uio *uio; int flags; { - vm_offset_t lastaddr; + paddr_t lastaddr; int seg, i, error, first; bus_size_t minlen, resid; struct proc *p = NULL; @@ -432,7 +432,7 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags) caddr_t *kvap; int flags; { - vm_offset_t va; + vaddr_t va; bus_addr_t addr; int curseg; @@ -501,7 +501,7 @@ _bus_dmamem_unmap(t, kva, size) /* Avoid free'ing if not mapped */ if (kva >= (caddr_t)virtual_avail) - uvm_km_free(kernel_map, (vm_offset_t)kva, round_page(size)); + uvm_km_free(kernel_map, (vaddr_t)kva, round_page(size)); } /* @@ -547,7 +547,7 @@ _bus_dmamem_mmap(t, segs, nsegs, off, prot, flags) /* * Utility function to load a linear buffer. lastaddrp holds state * between invocations (for multiple-buffer loads). segp contains - * the starting segment on entrace, and the ending segment on exit. + * the starting segment on entrance, and the ending segment on exit. * first indicates if this is the first invocation of this function. */ int @@ -558,13 +558,13 @@ _bus_dmamap_load_buffer(t, map, buf, buflen, p, flags, lastaddrp, segp, first) bus_size_t buflen; struct proc *p; int flags; - vm_offset_t *lastaddrp; + paddr_t *lastaddrp; int *segp; int first; { bus_size_t sgsize; bus_addr_t curaddr, lastaddr, baddr, bmask; - vm_offset_t vaddr = (vm_offset_t)buf; + vaddr_t vaddr = (vaddr_t)buf; int seg; pmap_t pmap; @@ -685,10 +685,10 @@ _bus_dmamem_alloc_range(t, size, alignment, boundary, segs, nsegs, rsegs, int nsegs; int *rsegs; int flags; - vm_offset_t low; - vm_offset_t high; + vaddr_t low; + vaddr_t high; { - vm_offset_t curaddr, lastaddr; + paddr_t curaddr, lastaddr; struct vm_page *m; struct pglist mlist; int curseg, error; diff --git a/sys/arch/vax/vax/db_machdep.c b/sys/arch/vax/vax/db_machdep.c index 9e91a93d769..444a302d017 100644 --- a/sys/arch/vax/vax/db_machdep.c +++ b/sys/arch/vax/vax/db_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.c,v 1.12 2002/05/18 09:49:17 art Exp $ */ +/* $OpenBSD: db_machdep.c,v 1.13 2005/11/06 22:21:33 miod Exp $ */ /* $NetBSD: db_machdep.c,v 1.17 1999/06/20 00:58:23 ragge Exp $ */ /* @@ -178,7 +178,7 @@ kdbprinttrap(type, code) */ void db_read_bytes(addr, size, data) - vm_offset_t addr; + db_addr_t addr; size_t size; char *data; { @@ -190,7 +190,7 @@ db_read_bytes(addr, size, data) */ void db_write_bytes(addr, size, data) - vm_offset_t addr; + db_addr_t addr; size_t size; char *data; { diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index aa601ee081a..cc971d7a31d 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.73 2005/08/06 14:26:52 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.74 2005/11/06 22:21:33 miod Exp $ */ /* $NetBSD: machdep.c,v 1.108 2000/09/13 15:00:23 thorpej Exp $ */ /* @@ -168,8 +168,8 @@ cpu_startup() { caddr_t v; int base, residual, i, sz; - vm_offset_t minaddr, maxaddr; - vm_size_t size; + vaddr_t minaddr, maxaddr; + vsize_t size; extern unsigned int avail_end; extern char cpu_model[]; @@ -211,13 +211,13 @@ cpu_startup() size = MAXBSIZE * nbuf; /* # bytes for buffers */ /* allocate VM for buffers... area is not managed by VM system */ - if (uvm_map(kernel_map, (vm_offset_t *) &buffers, round_page(size), + if (uvm_map(kernel_map, (vaddr_t *)&buffers, round_page(size), NULL, UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE, UVM_ADV_NORMAL, 0))) panic("cpu_startup: cannot allocate VM for buffers"); - minaddr = (vm_offset_t) buffers; + minaddr = (vaddr_t)buffers; if ((bufpages / nbuf) >= btoc(MAXBSIZE)) { /* don't want to alloc more physical mem than needed */ bufpages = btoc(MAXBSIZE) * nbuf; @@ -226,8 +226,8 @@ cpu_startup() residual = bufpages % nbuf; /* now allocate RAM for buffers */ for (i = 0; i < nbuf; i++) { - vm_offset_t curbuf; - vm_size_t curbufsize; + vaddr_t curbuf; + vsize_t curbufsize; struct vm_page *pg; /* @@ -237,7 +237,7 @@ cpu_startup() * The rest of each buffer occupies virtual space, but has no * physical memory allocated for it. */ - curbuf = (vm_offset_t) buffers + i * MAXBSIZE; + curbuf = (vaddr_t)buffers + i * MAXBSIZE; curbufsize = PAGE_SIZE * (i < residual ? base + 1 : base); while (curbufsize) { pg = uvm_pagealloc(NULL, 0, NULL, 0); diff --git a/sys/arch/vax/vax/mem.c b/sys/arch/vax/vax/mem.c index 68f430fa674..f41ee6a3752 100644 --- a/sys/arch/vax/vax/mem.c +++ b/sys/arch/vax/vax/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.13 2003/06/02 23:27:59 millert Exp $ */ +/* $OpenBSD: mem.c,v 1.14 2005/11/06 22:21:33 miod Exp $ */ /* $NetBSD: mem.c,v 1.15 1999/03/24 05:51:17 mrg Exp $ */ /* @@ -98,9 +98,9 @@ mmrw(dev, uio, flags) struct uio *uio; int flags; { - register vm_offset_t v; - register int c; - register struct iovec *iov; + vaddr_t v; + int c; + struct iovec *iov; int error = 0; while (uio->uio_resid > 0 && error == 0) { diff --git a/sys/arch/vax/vax/uvax.c b/sys/arch/vax/vax/uvax.c index 7ee69bd8a4c..f19154cdfd3 100644 --- a/sys/arch/vax/vax/uvax.c +++ b/sys/arch/vax/vax/uvax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvax.c,v 1.9 2003/06/12 01:07:31 deraadt Exp $ */ +/* $OpenBSD: uvax.c,v 1.10 2005/11/06 22:21:33 miod Exp $ */ /* $NetBSD: uvax.c,v 1.4 1997/02/19 10:04:27 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -58,7 +58,7 @@ void uvax_fillmap() { - extern vm_offset_t avail_start, virtual_avail, avail_end; + extern vaddr_t avail_start, virtual_avail, avail_end; register struct uc_map *p; register u_int base, end, off, size; @@ -72,7 +72,7 @@ uvax_fillmap() } end = base + size - 1; MAPVIRT(p->um_virt, size/NBPG); - pmap_map((vm_offset_t)p->um_virt, base, end, + pmap_map((vaddr_t)p->um_virt, base, end, VM_PROT_READ|VM_PROT_WRITE); } diff --git a/sys/arch/vax/vax/uvaxII.c b/sys/arch/vax/vax/uvaxII.c index 2db693bc3e6..2d7b7a567ab 100644 --- a/sys/arch/vax/vax/uvaxII.c +++ b/sys/arch/vax/vax/uvaxII.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvaxII.c,v 1.12 2003/06/02 23:27:59 millert Exp $ */ +/* $OpenBSD: uvaxII.c,v 1.13 2005/11/06 22:21:33 miod Exp $ */ /* $NetBSD: uvaxII.c,v 1.10 1996/10/13 03:36:04 christos Exp $ */ /*- @@ -262,7 +262,7 @@ ka630_clkwrite(year_secs) void uvaxII_steal_pages() { - extern vm_offset_t avail_start, virtual_avail, avail_end; + extern vaddr_t avail_start, virtual_avail, avail_end; int junk; /* @@ -273,16 +273,16 @@ uvaxII_steal_pages() MAPPHYS(junk, 2, VM_PROT_READ|VM_PROT_WRITE); MAPVIRT(nexus, btoc(0x400000)); - pmap_map((vm_offset_t)nexus, 0x20088000, 0x20090000, + pmap_map((vaddr_t)nexus, 0x20088000, 0x20090000, VM_PROT_READ|VM_PROT_WRITE); MAPVIRT(uvaxIIcpu_ptr, 1); - pmap_map((vm_offset_t)uvaxIIcpu_ptr, (vm_offset_t)UVAXIICPU, - (vm_offset_t)UVAXIICPU + NBPG, VM_PROT_READ|VM_PROT_WRITE); + pmap_map((vaddr_t)uvaxIIcpu_ptr, (paddr_t)UVAXIICPU, + (paddr_t)UVAXIICPU + NBPG, VM_PROT_READ|VM_PROT_WRITE); MAPVIRT(ka630clk_ptr, 1); - pmap_map((vm_offset_t)ka630clk_ptr, (vm_offset_t)KA630CLK, - (vm_offset_t)KA630CLK + NBPG, VM_PROT_READ|VM_PROT_WRITE); + pmap_map((vaddr_t)ka630clk_ptr, (paddr_t)KA630CLK, + (paddr_t)KA630CLK + NBPG, VM_PROT_READ|VM_PROT_WRITE); /* * Clear restart and boot in progress flags diff --git a/sys/compat/vax1k/vax1k_subr.c b/sys/compat/vax1k/vax1k_subr.c index 6164197cf6d..a9dac2d5170 100644 --- a/sys/compat/vax1k/vax1k_subr.c +++ b/sys/compat/vax1k/vax1k_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vax1k_subr.c,v 1.2 2001/11/28 13:47:39 art Exp $ */ +/* $OpenBSD: vax1k_subr.c,v 1.3 2005/11/06 22:21:33 miod Exp $ */ /* $NetBSD: vax1k_subr.c,v 1.2 1999/03/24 05:51:20 mrg Exp $ */ /* @@ -55,7 +55,7 @@ vax1k_map_readvn(p, cmd) struct proc *p; struct exec_vmcmd *cmd; { - vm_offset_t oaddr; + vaddr_t oaddr; int error; if (cmd->ev_len == 0) |