Get rid of vm_offset_t/vm_size_t

This commit is contained in:
leo 1998-09-02 14:58:01 +00:00
parent 77e8bc0d0f
commit fcfae9e5df
13 changed files with 230 additions and 227 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: atari_init.c,v 1.39 1998/07/04 22:18:21 jonathan Exp $ */
/* $NetBSD: atari_init.c,v 1.40 1998/09/02 14:58:01 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman
@ -115,7 +115,7 @@ extern struct pcb *curpcb;
/*
* This is the virtual address of physical page 0. Used by 'do_boot()'.
*/
vm_offset_t page_zero;
vaddr_t page_zero;
/*
* Crude support for allocation in ST-ram. Currently only used to allocate
@ -641,7 +641,7 @@ pt_entry_t *pt;
u_int ptsize; /* Size of 'pt' in bytes */
u_int ptextra; /* #of additional I/O pte's */
{
vm_offset_t ioaddr;
vaddr_t ioaddr;
pt_entry_t *pg, *epg;
pt_entry_t pg_proto;
u_long mask;

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus.c,v 1.9 1998/08/03 13:09:01 leo Exp $ */
/* $NetBSD: bus.c,v 1.10 1998/09/02 14:58:01 leo Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -52,14 +52,14 @@
#include <machine/bus.h>
static int _bus_dmamap_load_buffer __P((bus_dma_tag_t tag, bus_dmamap_t,
void *, bus_size_t, struct proc *, int, vm_offset_t *,
void *, bus_size_t, struct proc *, int, paddr_t *,
int *, int));
static int _bus_dmamem_alloc_range __P((bus_dma_tag_t tag, bus_size_t size,
bus_size_t alignment, bus_size_t boundary,
bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags,
vm_offset_t low, vm_offset_t high));
paddr_t low, paddr_t high));
extern vm_offset_t avail_end;
extern paddr_t avail_end;
int
bus_space_map(t, bpa, size, flags, mhp)
@ -69,8 +69,8 @@ bus_size_t size;
int flags;
bus_space_handle_t *mhp;
{
vm_offset_t va;
u_long pa, endpa;
vaddr_t va;
paddr_t pa, endpa;
pa = m68k_trunc_page(bpa + t->base);
endpa = m68k_round_page((bpa + t->base + size) - 1);
@ -90,7 +90,7 @@ bus_space_handle_t *mhp;
*mhp = (caddr_t)(va + (bpa & PGOFSET));
for(; pa < endpa; pa += NBPG, va += NBPG) {
pmap_enter(pmap_kernel(), (vm_offset_t)va, pa,
pmap_enter(pmap_kernel(), (vaddr_t)va, pa,
VM_PROT_READ|VM_PROT_WRITE, TRUE);
if (!(flags & BUS_SPACE_MAP_CACHEABLE))
pmap_changebit(pa, PG_CI, TRUE);
@ -104,7 +104,7 @@ bus_space_tag_t t;
bus_space_handle_t memh;
bus_size_t size;
{
vm_offset_t va, endva;
vaddr_t va, endva;
va = m68k_trunc_page(memh);
endva = m68k_round_page((memh + size) - 1);
@ -115,7 +115,7 @@ bus_size_t size;
#endif
#if defined(UVM)
uvm_km_free(kernel_map, (vm_offset_t)va, endva - va);
uvm_km_free(kernel_map, va, endva - va);
#else
kmem_free(kernel_map, va, endva - va);
#endif
@ -210,7 +210,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;
/*
@ -242,7 +242,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;
@ -285,7 +285,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;
@ -502,7 +502,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, offset;
int curseg;
@ -561,9 +561,9 @@ bus_dmamem_unmap(t, kva, size)
size = round_page(size);
#if defined(UVM)
uvm_km_free(kernel_map, (vm_offset_t)kva, size);
uvm_km_free(kernel_map, (vaddr_t)kva, size);
#else
kmem_free(kernel_map, (vm_offset_t)kva, size);
kmem_free(kernel_map, (vaddr_t)kva, size);
#endif
}
@ -623,13 +623,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, offset, baddr, bmask;
vm_offset_t vaddr = (vm_offset_t)buf;
vaddr_t vaddr = (vaddr_t)buf;
int seg;
pmap_t pmap;
@ -721,10 +721,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;
paddr_t low;
paddr_t high;
{
vm_offset_t curaddr, lastaddr;
paddr_t curaddr, lastaddr;
bus_addr_t offset;
vm_page_t m;
struct pglist mlist;

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_memrw.c,v 1.11 1997/10/09 07:37:50 jtc Exp $ */
/* $NetBSD: db_memrw.c,v 1.12 1998/09/02 14:58:01 leo Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -70,7 +70,7 @@
#include <ddb/db_access.h>
static void db_write_text __P((vm_offset_t, size_t, char *));
static void db_write_text __P((vaddr_t, size_t, char *));
/*
* Read bytes from kernel address space for debugger.
@ -79,7 +79,7 @@ static void db_write_text __P((vm_offset_t, size_t, char *));
*/
void
db_read_bytes(addr, size, data)
vm_offset_t addr;
vaddr_t addr;
register size_t size;
register char *data;
{
@ -108,13 +108,13 @@ db_read_bytes(addr, size, data)
*/
static void
db_write_text(addr, size, data)
vm_offset_t addr;
vaddr_t addr;
register size_t size;
register char *data;
register char *data;
{
register char *dst, *odst;
pt_entry_t *pte, oldpte, tmppte;
vm_offset_t pgva;
vaddr_t pgva;
int limit;
if (size == 0)
@ -169,7 +169,7 @@ db_write_text(addr, size, data)
tmppte = (oldpte & ~PG_RO) | PG_RW | PG_CI;
*pte = tmppte;
TBIS((vm_offset_t)odst);
TBIS((vaddr_t)odst);
/*
* Page is now writable. Do as much access as we
@ -182,7 +182,7 @@ db_write_text(addr, size, data)
* Restore the old PTE.
*/
*pte = oldpte;
TBIS((vm_offset_t)odst);
TBIS((vaddr_t)odst);
} while (size != 0);
/*
@ -198,7 +198,7 @@ db_write_text(addr, size, data)
extern char kernel_text[], etext[];
void
db_write_bytes(addr, size, data)
vm_offset_t addr;
vaddr_t addr;
register size_t size;
register char *data;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.69 1998/08/11 12:22:57 leo Exp $ */
/* $NetBSD: machdep.c,v 1.70 1998/09/02 14:58:02 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -125,8 +125,8 @@ int bufpages = BUFPAGES;
#else
int bufpages = 0;
#endif
caddr_t msgbufaddr;
vm_offset_t msgbufpa;
caddr_t msgbufaddr;
vaddr_t msgbufpa;
int physmem = MAXMEM; /* max supported memory, changes to actual */
/*
@ -187,9 +187,9 @@ cpu_startup()
extern int pmapdebug;
int opmapdebug = pmapdebug;
#endif
vm_offset_t minaddr, maxaddr;
vm_size_t size = 0;
extern vm_size_t mem_size; /* from pmap.c */
vaddr_t minaddr, maxaddr;
vsize_t size = 0;
extern vsize_t mem_size; /* from pmap.c */
/*
* Initialize error message buffer (at end of core).
@ -202,7 +202,7 @@ cpu_startup()
* memory segment - map and initialize it now.
*/
for (i = 0; i < btoc(MSGBUFSIZE); i++)
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufaddr + i * NBPG,
pmap_enter(pmap_kernel(), (vaddr_t)msgbufaddr + i * NBPG,
msgbufpa + i * NBPG, VM_PROT_ALL, TRUE);
initmsgbuf(msgbufaddr, m68k_round_page(MSGBUFSIZE));
@ -286,7 +286,7 @@ again:
* End of first pass, size has been calculated so allocate memory
*/
if (firstaddr == 0) {
size = (vm_size_t)(v - firstaddr);
size = (vsize_t)(v - firstaddr);
#if defined(UVM)
firstaddr = (caddr_t) uvm_km_zalloc(kernel_map,
round_page(size));
@ -300,7 +300,7 @@ again:
/*
* End of second pass, addresses have been assigned
*/
if ((vm_size_t)(v - firstaddr) != size)
if ((vsize_t)(v - firstaddr) != size)
panic("startup: table size inconsistency");
/*
@ -309,17 +309,17 @@ again:
*/
size = MAXBSIZE * nbuf;
#if defined(UVM)
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,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
UVM_ADV_NORMAL, 0)) != KERN_SUCCESS)
panic("startup: cannot allocate VM for buffers");
minaddr = (vm_offset_t)buffers;
minaddr = (vaddr_t)buffers;
#else
buffer_map = kmem_suballoc(kernel_map, (vm_offset_t *)&buffers,
buffer_map = kmem_suballoc(kernel_map, (vaddr_t *)&buffers,
&maxaddr, size, TRUE);
minaddr = (vm_offset_t)buffers;
if (vm_map_find(buffer_map, vm_object_allocate(size), (vm_offset_t)0,
minaddr = (vaddr_t)buffers;
if (vm_map_find(buffer_map, vm_object_allocate(size), (vaddr_t)0,
&minaddr, size, FALSE) != KERN_SUCCESS)
panic("startup: cannot allocate buffers");
#endif
@ -331,8 +331,8 @@ again:
residual = bufpages % nbuf;
for (i = 0; i < nbuf; i++) {
#if defined(UVM)
vm_size_t curbufsize;
vm_offset_t curbuf;
vsize_t curbufsize;
vaddr_t curbuf;
struct vm_page *pg;
/*
@ -341,7 +341,7 @@ again:
* for the first "residual" buffers, and then we allocate
* "base" pages for the rest.
*/
curbuf = (vm_offset_t) buffers + (i * MAXBSIZE);
curbuf = (vaddr_t) buffers + (i * MAXBSIZE);
curbufsize = CLBYTES * ((i < residual) ? (base+1) : base);
while (curbufsize) {
@ -355,8 +355,8 @@ again:
curbufsize -= PAGE_SIZE;
}
#else /* ! UVM */
vm_size_t curbufsize;
vm_offset_t curbuf;
vsize_t curbufsize;
vaddr_t curbuf;
/*
* First <residual> buffers get (base+1) physical pages
@ -365,7 +365,7 @@ again:
* 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 = CLBYTES * (i < residual ? base+1 : base);
vm_map_pageable(buffer_map, curbuf, curbuf+curbufsize, FALSE);
vm_map_simplify(buffer_map, curbuf);
@ -399,10 +399,10 @@ again:
* Finally, allocate mbuf cluster submap.
*/
#if defined(UVM)
mb_map = uvm_km_suballoc(kernel_map, (vm_offset_t *)&mbutl, &maxaddr,
mb_map = uvm_km_suballoc(kernel_map, (vaddr_t *)&mbutl, &maxaddr,
VM_MBUF_SIZE, FALSE, FALSE, NULL);
#else
mb_map = kmem_suballoc(kernel_map, (vm_offset_t *)&mbutl, &maxaddr,
mb_map = kmem_suballoc(kernel_map, (vaddr_t *)&mbutl, &maxaddr,
VM_MBUF_SIZE, FALSE);
#endif
@ -652,14 +652,14 @@ cpu_reboot(howto, bootstr)
}
#define BYTES_PER_DUMP NBPG /* Must be a multiple of NBPG */
static vm_offset_t dumpspace; /* Virt. space to map dumppages */
static vaddr_t dumpspace; /* Virt. space to map dumppages */
/*
* Reserve _virtual_ memory to map in the page to be dumped
*/
vm_offset_t
vaddr_t
reserve_dumppages(p)
vm_offset_t p;
vaddr_t p;
{
dumpspace = p;
return(p + BYTES_PER_DUMP);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.10 1998/05/11 07:46:18 leo Exp $ */
/* $NetBSD: mem.c,v 1.11 1998/09/02 14:58:02 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -102,7 +102,7 @@ mmrw(dev, uio, flags)
struct uio *uio;
int flags;
{
vm_offset_t o, v;
vsize_t o, v;
int c;
struct iovec *iov;
struct memseg *ms;
@ -145,14 +145,14 @@ mmrw(dev, uio, flags)
goto unlock;
}
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
pmap_enter(pmap_kernel(), (vaddr_t)vmmap,
trunc_page(v), uio->uio_rw == UIO_READ ?
VM_PROT_READ : VM_PROT_WRITE, TRUE);
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(NBPG - o));
error = uiomove((caddr_t)vmmap + o, c, uio);
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
(vm_offset_t)vmmap + NBPG);
pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
(vaddr_t)vmmap + NBPG);
break;
case 1: /* minor device 1 is kernel memory */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.33 1998/07/08 04:35:24 thorpej Exp $ */
/* $NetBSD: pmap.c,v 1.34 1998/09/02 14:58:02 leo Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -153,8 +153,8 @@ struct kpt_stats kpt_stats;
int debugmap = 0;
int pmapdebug = PDB_PARANOIA;
static void pmap_check_wiring __P((char *, vm_offset_t));
static void pmap_pvdump __P((vm_offset_t));
static void pmap_check_wiring __P((char *, vaddr_t));
static void pmap_pvdump __P((paddr_t));
#endif
/*
@ -162,8 +162,8 @@ static void pmap_pvdump __P((vm_offset_t));
*/
#if defined(M68040) || defined(M68060)
#define pmap_ste(m, v) (&((m)->pm_stab[(vm_offset_t)(v) >> pmap_ishift]))
#define pmap_ste1(m, v) (&((m)->pm_stab[(vm_offset_t)(v) >> SG4_SHIFT1]))
#define pmap_ste(m, v) (&((m)->pm_stab[(vaddr_t)(v) >> pmap_ishift]))
#define pmap_ste1(m, v) (&((m)->pm_stab[(vaddr_t)(v) >> SG4_SHIFT1]))
/* XXX assumes physically contiguous ST pages (if more than one) */
#define pmap_ste2(m, v) \
(&((m)->pm_stab[(u_int *)(*(u_int *)pmap_ste1(m,v) & SG4_ADDR1) \
@ -174,11 +174,11 @@ static void pmap_pvdump __P((vm_offset_t));
(*pmap_ste2(m, v) & SG_V)) \
: (*pmap_ste(m, v) & SG_V))
#else /* defined(M68040) || defined(M68060) */
#define pmap_ste(m, v) (&((m)->pm_stab[(vm_offset_t)(v) >> SG_ISHIFT]))
#define pmap_ste(m, v) (&((m)->pm_stab[(vaddr_t)(v) >> SG_ISHIFT]))
#define pmap_ste_v(m, v) (*pmap_ste(m, v) & SG_V)
#endif /* defined(M68040) || defined(M68060) */
#define pmap_pte(m, v) (&((m)->pm_ptab[(vm_offset_t)(v) >> PG_SHIFT]))
#define pmap_pte(m, v) (&((m)->pm_ptab[(vaddr_t)(v) >> PG_SHIFT]))
#define pmap_pte_pa(pte) (*(u_int *)(pte) & PG_FRAME)
@ -223,8 +223,8 @@ int protection_codes[8];
struct kpt_page {
struct kpt_page *kpt_next; /* link on either used or free list */
vm_offset_t kpt_va; /* always valid kernel VA */
vm_offset_t kpt_pa; /* PA of this page (for speed) */
vaddr_t kpt_va; /* always valid kernel VA */
paddr_t kpt_pa; /* PA of this page (for speed) */
};
struct kpt_page *kpt_free_list, *kpt_used_list;
struct kpt_page *kpt_pages;
@ -241,7 +241,7 @@ struct kpt_page *kpt_pages;
u_int *Sysseg, *Sysseg_pa;
u_int *Sysmap, *Sysptmap;
u_int *Segtabzero, *Segtabzeropa;
vm_size_t Sysptsize = VM_KERNEL_PT_PAGES + 4 / NPTEPG;
vsize_t Sysptsize = VM_KERNEL_PT_PAGES + 4 / NPTEPG;
struct pmap kernel_pmap_store;
vm_map_t pt_map;
@ -249,10 +249,10 @@ vm_map_t pt_map;
struct vm_map pt_map_store;
#endif
vm_size_t mem_size; /* memory size in bytes */
vm_offset_t avail_end; /* PA of last available physical page */
vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss)*/
vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */
vsize_t mem_size; /* memory size in bytes */
paddr_t avail_end; /* PA of last available physical page */
vaddr_t virtual_avail; /* VA of first avail page (after kernel bss)*/
vaddr_t virtual_end; /* VA of last avail page (end of kernel AS) */
int page_cnt; /* number of pages managed by the VM system */
boolean_t pmap_initialized = FALSE; /* Has pmap_init completed? */
char *pmap_attributes; /* reference and modify bits */
@ -263,17 +263,17 @@ static int pmap_ishift; /* segment table index shift */
int protostfree; /* prototype (default) free ST map */
#endif
extern caddr_t msgbufaddr;
extern vm_offset_t msgbufpa;
extern caddr_t msgbufaddr;
extern vaddr_t msgbufpa;
static boolean_t pmap_testbit __P((vm_offset_t, int));
static void pmap_enter_ptpage __P((pmap_t, vm_offset_t));
static boolean_t pmap_testbit __P((paddr_t, int));
static void pmap_enter_ptpage __P((pmap_t, vaddr_t));
static struct pv_entry* pmap_alloc_pv __P((void));
static void pmap_free_pv __P((struct pv_entry *));
static void pmap_pinit __P((pmap_t));
static void pmap_release __P((pmap_t));
static void atari_protection_init __P((void));
static void pmap_collect1 __P((pmap_t, vm_offset_t, vm_offset_t));
static void pmap_collect1 __P((pmap_t, paddr_t, paddr_t));
/*
* All those kernel PT submaps that BSD is so fond of
@ -320,12 +320,12 @@ static u_int atarihwpg;
*/
void
pmap_bootstrap(kernel_size, hw_addr, hw_pages)
vm_offset_t kernel_size;
u_int hw_addr, hw_pages;
psize_t kernel_size;
u_int hw_addr, hw_pages;
{
vm_offset_t va;
u_int *pte;
int i;
vaddr_t va;
u_int *pte;
int i;
/*
* Record start & size of I/O area for use by pmap_init()
@ -417,8 +417,9 @@ u_int hw_addr, hw_pages;
void
pmap_init()
{
vm_offset_t addr, addr2;
vm_size_t npg, s;
vaddr_t addr, addr2;
vsize_t s;
u_int npg;
struct pv_entry *pv;
char *attr;
int rv, bank;
@ -443,7 +444,7 @@ pmap_init()
UVM_INH_NONE, UVM_ADV_RANDOM,
UVM_FLAG_FIXED)) != KERN_SUCCESS)
goto bogons;
addr = (vm_offset_t) Sysmap;
addr = (vaddr_t) Sysmap;
if (uvm_map(kernel_map, &addr, ATARI_KPTSIZE,
NULL, UVM_UNKNOWN_OFFSET,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE,
@ -463,7 +464,7 @@ pmap_init()
if (addr != atarihwaddr)
panic("pmap_init: bogons in the VM system!\n");
addr = (vm_offset_t) Sysmap;
addr = (vaddr_t) Sysmap;
vm_object_reference(kernel_object);
(void) vm_map_find(kernel_map, kernel_object, addr, &addr,
ATARI_KPTSIZE, FALSE);
@ -472,7 +473,7 @@ pmap_init()
* the kernel page table isn't big enough and we overran the
* page table map. Need to adjust pmap_size() in atari_init.c.
*/
if (addr != (vm_offset_t)Sysmap)
if (addr != (vaddr_t)Sysmap)
panic("pmap_init: bogons in the VM system!\n");
#endif /* UVM */
@ -502,11 +503,11 @@ pmap_init()
s = round_page(s);
#if defined(UVM)
addr = (vm_offset_t) uvm_km_zalloc(kernel_map, s);
addr = uvm_km_zalloc(kernel_map, s);
if (addr == 0)
panic("pmap_init: can't allocate data structures");
#else
addr = (vm_offset_t) kmem_alloc(kernel_map, s);
addr = (vaddr_t) kmem_alloc(kernel_map, s);
#endif
Segtabzero = (u_int *) addr;
Segtabzeropa = (u_int *) pmap_extract(pmap_kernel(), addr);
@ -564,7 +565,7 @@ pmap_init()
rv = uvm_map(kernel_map, &addr, s, NULL, UVM_UNKNOWN_OFFSET,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
UVM_ADV_RANDOM, UVM_FLAG_NOMERGE));
if (rv != KERN_SUCCESS || (addr + s) >= (vm_offset_t)Sysmap)
if (rv != KERN_SUCCESS || (addr + s) >= (vaddr_t)Sysmap)
panic("pmap_init: kernel PT too small");
rv = uvm_unmap(kernel_map, addr, addr + s, FALSE);
if (rv != KERN_SUCCESS)
@ -572,7 +573,7 @@ pmap_init()
#else
addr = 0;
rv = vm_map_find(kernel_map, NULL, 0, &addr, s, TRUE);
if (rv != KERN_SUCCESS || addr + s >= (vm_offset_t)Sysmap)
if (rv != KERN_SUCCESS || addr + s >= (vaddr_t)Sysmap)
panic("pmap_init: kernel PT too small");
vm_map_remove(kernel_map, addr, addr + s);
#endif
@ -582,11 +583,11 @@ pmap_init()
* form the KPT free list.
*/
#if defined(UVM)
addr = (vm_offset_t) uvm_km_zalloc(kernel_map, s);
addr = uvm_km_zalloc(kernel_map, s);
if (addr == 0)
panic("pmap_init: cannot allocate KPT free list");
#else
addr = (vm_offset_t) kmem_alloc(kernel_map, s);
addr = (vaddr_t) kmem_alloc(kernel_map, s);
#endif
s = ptoa(npg);
addr2 = addr + s;
@ -672,8 +673,8 @@ pmap_init()
kptp = kptp->kpt_next;
}
addr2 = (vm_offset_t)Segtabzeropa;
while (addr2 < (vm_offset_t)Segtabzeropa + ATARI_STSIZE) {
addr2 = (vaddr_t)Segtabzeropa;
while (addr2 < (vaddr_t)Segtabzeropa + ATARI_STSIZE) {
pmap_changebit(addr2, PG_CCB, 0);
pmap_changebit(addr2, PG_CI, 1);
addr2 += NBPG;
@ -743,9 +744,9 @@ pmap_free_pv(pv)
pv_nfree -= NPVPPG - 1;
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
#if defined(UVM)
uvm_km_free(kernel_map, (vm_offset_t)pvp, NBPG);
uvm_km_free(kernel_map, (vaddr_t)pvp, NBPG);
#else
kmem_free(kernel_map, (vm_offset_t)pvp, NBPG);
kmem_free(kernel_map, (vaddr_t)pvp, NBPG);
#endif
break;
}
@ -758,12 +759,12 @@ pmap_free_pv(pv)
* For now, VM is already on, we only need to map the
* specified memory.
*/
vm_offset_t
vaddr_t
pmap_map(virt, start, end, prot)
vm_offset_t virt;
vm_offset_t start;
vm_offset_t end;
int prot;
vaddr_t virt;
paddr_t start;
paddr_t end;
int prot;
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
@ -791,7 +792,7 @@ pmap_map(virt, start, end, prot)
*/
pmap_t
pmap_create(size)
vm_size_t size;
vsize_t size;
{
register pmap_t pmap;
@ -894,18 +895,18 @@ pmap_release(pmap)
#endif
if (pmap->pm_ptab)
#if defined(UVM)
uvm_km_free_wakeup(pt_map, (vm_offset_t)pmap->pm_ptab,
uvm_km_free_wakeup(pt_map, (vaddr_t)pmap->pm_ptab,
ATARI_UPTSIZE);
#else
kmem_free_wakeup(pt_map, (vm_offset_t)pmap->pm_ptab,
kmem_free_wakeup(pt_map, (vaddr_t)pmap->pm_ptab,
ATARI_UPTSIZE);
#endif
if (pmap->pm_stab != Segtabzero)
#if defined(UVM)
uvm_km_free_wakeup(kernel_map, (vm_offset_t)pmap->pm_stab,
uvm_km_free_wakeup(kernel_map, (vaddr_t)pmap->pm_stab,
ATARI_STSIZE);
#else
kmem_free_wakeup(kernel_map, (vm_offset_t)pmap->pm_stab,
kmem_free_wakeup(kernel_map, (vaddr_t)pmap->pm_stab,
ATARI_STSIZE);
#endif
}
@ -937,9 +938,10 @@ pmap_reference(pmap)
void
pmap_remove(pmap, sva, eva)
register pmap_t pmap;
vm_offset_t sva, eva;
vaddr_t sva, eva;
{
register vm_offset_t pa, va;
register paddr_t pa;
register vaddr_t va;
register u_int *pte;
register pv_entry_t pv, npv;
pmap_t ptpmap;
@ -968,7 +970,7 @@ pmap_remove(pmap, sva, eva)
*/
if (!pmap_ste_v(pmap, va)) {
/* XXX: avoid address wrap around */
if (va >= m68k_trunc_seg((vm_offset_t)-1))
if (va >= m68k_trunc_seg((vaddr_t)-1))
break;
va = m68k_round_seg(va + PAGE_SIZE) - PAGE_SIZE;
continue;
@ -1127,11 +1129,11 @@ pmap_remove(pmap, sva, eva)
#endif
#if defined(UVM)
uvm_km_free_wakeup(kernel_map,
(vm_offset_t)ptpmap->pm_stab,
(vaddr_t)ptpmap->pm_stab,
ATARI_STSIZE);
#else
kmem_free_wakeup(kernel_map,
(vm_offset_t)ptpmap->pm_stab,
(vaddr_t)ptpmap->pm_stab,
ATARI_STSIZE);
#endif
ptpmap->pm_stab = Segtabzero;
@ -1184,7 +1186,7 @@ pmap_remove(pmap, sva, eva)
*/
void
pmap_page_protect(pa, prot)
vm_offset_t pa;
paddr_t pa;
vm_prot_t prot;
{
register pv_entry_t pv;
@ -1237,11 +1239,11 @@ pmap_page_protect(pa, prot)
void
pmap_protect(pmap, sva, eva, prot)
register pmap_t pmap;
vm_offset_t sva, eva;
vaddr_t sva, eva;
vm_prot_t prot;
{
register u_int *pte;
register vm_offset_t va;
register vaddr_t va;
boolean_t needtflush;
int isro;
@ -1270,7 +1272,7 @@ pmap_protect(pmap, sva, eva, prot)
*/
if (!pmap_ste_v(pmap, va)) {
/* XXX: avoid address wrap around */
if (va >= m68k_trunc_seg((vm_offset_t)-1))
if (va >= m68k_trunc_seg((vaddr_t)-1))
break;
va = m68k_round_seg(va + PAGE_SIZE) - PAGE_SIZE;
pte = pmap_pte(pmap, va);
@ -1290,7 +1292,7 @@ pmap_protect(pmap, sva, eva, prot)
* "7.3 Cache Coherency" in the manual).
*/
if (isro && mmutype == MMU_68040) {
vm_offset_t pa = pmap_pte_pa(pte);
paddr_t pa = pmap_pte_pa(pte);
DCFP(pa);
ICPP(pa);
@ -1318,14 +1320,14 @@ pmap_protect(pmap, sva, eva, prot)
void
pmap_enter(pmap, va, pa, prot, wired)
register pmap_t pmap;
vm_offset_t va;
register vm_offset_t pa;
vaddr_t va;
register paddr_t pa;
vm_prot_t prot;
boolean_t wired;
{
register u_int *pte;
register int npte;
vm_offset_t opa;
paddr_t opa;
boolean_t cacheable = TRUE;
boolean_t checkpv = TRUE;
@ -1591,7 +1593,7 @@ validate:
void
pmap_change_wiring(pmap, va, wired)
register pmap_t pmap;
vm_offset_t va;
vaddr_t va;
boolean_t wired;
{
register u_int *pte;
@ -1644,12 +1646,12 @@ pmap_change_wiring(pmap, va, wired)
* with the given map/virtual_address pair.
*/
vm_offset_t
paddr_t
pmap_extract(pmap, va)
register pmap_t pmap;
vm_offset_t va;
vaddr_t va;
{
register vm_offset_t pa;
register paddr_t pa;
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
@ -1675,11 +1677,11 @@ pmap_extract(pmap, va)
* This routine is only advisory and need not do anything.
*/
void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
pmap_t dst_pmap;
pmap_t src_pmap;
vm_offset_t dst_addr;
vm_size_t len;
vm_offset_t src_addr;
pmap_t dst_pmap;
pmap_t src_pmap;
vaddr_t dst_addr;
vsize_t len;
vaddr_t src_addr;
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
@ -1757,12 +1759,12 @@ pmap_collect(pmap)
static void
pmap_collect1(pmap, startpa, endpa)
pmap_t pmap;
vm_offset_t startpa, endpa;
paddr_t startpa, endpa;
{
vm_offset_t pa;
paddr_t pa;
struct pv_entry *pv;
pt_entry_t *pte;
vm_offset_t kpa;
paddr_t kpa;
#ifdef DEBUG
int *ste;
int opmapdebug = 0;
@ -1785,8 +1787,8 @@ pmap_collect1(pmap, startpa, endpa)
if (pv == NULL)
continue;
#ifdef DEBUG
if (pv->pv_va < (vm_offset_t)Sysmap ||
pv->pv_va >= (vm_offset_t)Sysmap + ATARI_KPTSIZE)
if (pv->pv_va < (vaddr_t)Sysmap ||
pv->pv_va >= (vaddr_t)Sysmap + ATARI_KPTSIZE)
printf("collect: kernel PT VA out of range\n");
else
goto ok;
@ -1888,7 +1890,7 @@ pmap_deactivate(p)
*/
void
pmap_zero_page(phys)
register vm_offset_t phys;
register paddr_t phys;
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
@ -1906,7 +1908,7 @@ pmap_zero_page(phys)
*/
void
pmap_copy_page(src, dst)
register vm_offset_t src, dst;
register paddr_t src, dst;
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
@ -1935,7 +1937,7 @@ pmap_copy_page(src, dst)
void
pmap_pageable(pmap, sva, eva, pageable)
pmap_t pmap;
vm_offset_t sva, eva;
vaddr_t sva, eva;
boolean_t pageable;
{
#ifdef DEBUG
@ -1953,7 +1955,7 @@ pmap_pageable(pmap, sva, eva, pageable)
*/
if (pmap == pmap_kernel() && pageable && sva + PAGE_SIZE == eva) {
register pv_entry_t pv;
register vm_offset_t pa;
register paddr_t pa;
#ifdef DEBUG
if ((pmapdebug & (PDB_FOLLOW|PDB_PTPAGE)) == PDB_PTPAGE)
@ -1995,7 +1997,7 @@ pmap_pageable(pmap, sva, eva, pageable)
void
pmap_clear_modify(pa)
vm_offset_t pa;
paddr_t pa;
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
@ -2011,7 +2013,7 @@ pmap_clear_modify(pa)
*/
void pmap_clear_reference(pa)
vm_offset_t pa;
paddr_t pa;
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
@ -2029,7 +2031,7 @@ void pmap_clear_reference(pa)
boolean_t
pmap_is_referenced(pa)
vm_offset_t pa;
paddr_t pa;
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW) {
@ -2050,7 +2052,7 @@ pmap_is_referenced(pa)
boolean_t
pmap_is_modified(pa)
vm_offset_t pa;
paddr_t pa;
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW) {
@ -2062,7 +2064,7 @@ pmap_is_modified(pa)
return(pmap_testbit(pa, PG_M));
}
vm_offset_t
paddr_t
pmap_phys_address(ppn)
int ppn;
{
@ -2101,7 +2103,7 @@ atari_protection_init()
static boolean_t
pmap_testbit(pa, bit)
register vm_offset_t pa;
register paddr_t pa;
int bit;
{
register pv_entry_t pv;
@ -2139,13 +2141,13 @@ pmap_testbit(pa, bit)
void
pmap_changebit(pa, bit, setem)
register vm_offset_t pa;
register paddr_t pa;
int bit;
boolean_t setem;
{
register pv_entry_t pv;
register int *pte, npte;
vm_offset_t va;
vaddr_t va;
boolean_t firstpage;
int s;
@ -2185,7 +2187,7 @@ pmap_changebit(pa, bit, setem)
if (va >= uvm.pager_sva && va < uvm.pager_eva)
continue;
#else
extern vm_offset_t pager_sva, pager_eva;
extern vaddr_t pager_sva, pager_eva;
if (va >= pager_sva && va < pager_eva)
continue;
@ -2222,9 +2224,9 @@ pmap_changebit(pa, bit, setem)
static void
pmap_enter_ptpage(pmap, va)
register pmap_t pmap;
register vm_offset_t va;
register vaddr_t va;
{
register vm_offset_t ptpa;
register paddr_t ptpa;
register pv_entry_t pv;
#ifdef M68060
u_int stpa;
@ -2253,7 +2255,7 @@ pmap_enter_ptpage(pmap, va)
kmem_alloc(kernel_map, ATARI_STSIZE);
#endif
pmap->pm_stpa = (u_int *) pmap_extract(
pmap_kernel(), (vm_offset_t)pmap->pm_stab);
pmap_kernel(), (vaddr_t)pmap->pm_stab);
#if defined(M68040) || defined(M68060)
if (mmutype == MMU_68040) {
#if defined(M68060)
@ -2326,7 +2328,7 @@ pmap_enter_ptpage(pmap, va)
}
#endif /* defined(M68040) || defined(M68060) */
va = trunc_page((vm_offset_t)pmap_pte(pmap, va));
va = trunc_page((vaddr_t)pmap_pte(pmap, va));
/*
* In the kernel we allocate a page from the kernel PT page
@ -2490,7 +2492,7 @@ pmap_enter_ptpage(pmap, va)
*/
void
pmap_virtual_space(vstartp, vendp)
vm_offset_t *vstartp, *vendp;
vaddr_t *vstartp, *vendp;
{
*vstartp = virtual_avail;
@ -2500,7 +2502,7 @@ pmap_virtual_space(vstartp, vendp)
#ifdef DEBUG
static void
pmap_pvdump(pa)
vm_offset_t pa;
paddr_t pa;
{
register pv_entry_t pv;
@ -2515,7 +2517,7 @@ pmap_pvdump(pa)
static void
pmap_check_wiring(str, va)
char *str;
vm_offset_t va;
vaddr_t va;
{
vm_map_entry_t entry;
register int count, *pte;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.13 1998/05/24 19:32:38 is Exp $ */
/* $NetBSD: sys_machdep.c,v 1.14 1998/09/02 14:58:03 leo Exp $ */
/*
* Copyright (c) 1982, 1986 Regents of the University of California.
@ -156,8 +156,9 @@ cachectl(req, addr, len)
*/
if (!doall &&
(pa == 0 || ((int)addr & PGOFSET) == 0)) {
pa = pmap_extract(curproc->p_vmspace->vm_map.pmap,
(vm_offset_t)addr);
pa = pmap_extract(
curproc->p_vmspace->vm_map.pmap,
(vaddr_t)addr);
if (pa == 0)
doall = 1;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.34 1998/07/04 22:18:21 jonathan Exp $ */
/* $NetBSD: trap.c,v 1.35 1998/09/02 14:58:03 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -589,7 +589,7 @@ trap(type, code, v, frame)
/*FALLTHROUGH*/
case T_MMUFLT|T_USER: /* page fault */
{
register vm_offset_t va;
register vaddr_t va;
register struct vmspace *vm = p->p_vmspace;
register vm_map_t map;
int rv;
@ -618,7 +618,7 @@ trap(type, code, v, frame)
ftype = VM_PROT_READ | VM_PROT_WRITE;
else
ftype = VM_PROT_READ;
va = trunc_page((vm_offset_t)v);
va = trunc_page(v);
#ifdef DEBUG
if (map == kernel_map && va == 0) {
printf("trap: bad kernel access at %x\n", v);
@ -752,13 +752,13 @@ writeback(fp, docachepush)
* cache push after a signal handler has been called.
*/
if (docachepush) {
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap,
pmap_enter(pmap_kernel(), (vaddr_t)vmmap,
trunc_page(f->f_fa), VM_PROT_WRITE, TRUE);
fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF];
bcopy((caddr_t)&f->f_pd0, (caddr_t)fa, 16);
DCFL(pmap_extract(pmap_kernel(), (vm_offset_t)fa));
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
(vm_offset_t)&vmmap[NBPG]);
DCFL(pmap_extract(pmap_kernel(), (vaddr_t)fa));
pmap_remove(pmap_kernel(), (vaddr_t)vmmap,
(vaddr_t)&vmmap[NBPG]);
} else
printf("WARNING: pid %d(%s) uid %d: CPUSH not done\n",
p->p_pid, p->p_comm, p->p_ucred->cr_uid);
@ -1000,13 +1000,13 @@ dumpwb(num, s, a, d)
u_int a, d;
{
register struct proc *p = curproc;
vm_offset_t pa;
paddr_t pa;
printf(" writeback #%d: VA %x, data %x, SZ=%s, TT=%s, TM=%s\n",
num, a, d, f7sz[(s & SSW4_SZMASK) >> 5],
f7tt[(s & SSW4_TTMASK) >> 3], f7tm[s & SSW4_TMMASK]);
printf(" PA ");
pa = pmap_extract(p->p_vmspace->vm_map.pmap, (vm_offset_t)a);
pa = pmap_extract(p->p_vmspace->vm_map.pmap, (vaddr_t)a);
if (pa == 0)
printf("<invalid address>");
else

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.17 1998/07/28 18:34:54 thorpej Exp $ */
/* $NetBSD: vm_machdep.c,v 1.18 1998/09/02 14:58:03 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -166,24 +166,24 @@ pagemove(from, to, size)
register caddr_t from, to;
size_t size;
{
register vm_offset_t pa;
register paddr_t pa;
#ifdef DEBUG
if (size & CLOFSET)
panic("pagemove");
#endif
while (size > 0) {
pa = pmap_extract(pmap_kernel(), (vm_offset_t)from);
pa = pmap_extract(pmap_kernel(), (vaddr_t)from);
#ifdef DEBUG
if (pa == 0)
panic("pagemove 2");
if (pmap_extract(pmap_kernel(), (vm_offset_t)to) != 0)
if (pmap_extract(pmap_kernel(), (vaddr_t)to) != 0)
panic("pagemove 3");
#endif
pmap_remove(pmap_kernel(),
(vm_offset_t)from, (vm_offset_t)from + PAGE_SIZE);
(vaddr_t)from, (vaddr_t)from + PAGE_SIZE);
pmap_enter(pmap_kernel(),
(vm_offset_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, 1);
(vaddr_t)to, pa, VM_PROT_READ|VM_PROT_WRITE, 1);
from += PAGE_SIZE;
to += PAGE_SIZE;
size -= PAGE_SIZE;
@ -324,16 +324,16 @@ setredzone(pte, vaddr)
/*
* Convert kernel VA to physical address
*/
vm_offset_t
paddr_t
kvtop(addr)
register caddr_t addr;
{
vm_offset_t va;
paddr_t pa;
va = pmap_extract(pmap_kernel(), (vm_offset_t)addr);
if (va == 0)
pa = pmap_extract(pmap_kernel(), (vaddr_t)addr);
if (pa == 0)
panic("kvtop: zero page frame");
return((int)va);
return(pa);
}
extern vm_map_t phys_map;
@ -349,13 +349,13 @@ extern vm_map_t phys_map;
void
vmapbuf(bp, len)
struct buf *bp;
vm_size_t len;
vsize_t len;
{
struct pmap *upmap, *kpmap;
vm_offset_t uva; /* User VA (map from) */
vm_offset_t kva; /* Kernel VA (new to) */
vm_offset_t pa; /* physical address */
vm_size_t off;
vsize_t off;
if ((bp->b_flags & B_PHYS) == 0)
panic("vmapbuf");
@ -389,10 +389,10 @@ vmapbuf(bp, len)
void
vunmapbuf(bp, len)
struct buf *bp;
vm_size_t len;
vsize_t len;
{
vm_offset_t kva;
vm_size_t off;
vsize_t off;
if ((bp->b_flags & B_PHYS) == 0)
panic("vunmapbuf");

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.24 1998/02/19 16:17:17 leo Exp $ */
/* $NetBSD: cpu.h,v 1.25 1998/09/02 15:01:55 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -190,14 +190,14 @@ int fpu_probe __P((void));
/*
* Prototypes from vm_machdep.c
*/
int badbaddr __P((caddr_t, int));
void consinit __P((void));
void cpu_set_kpc __P((struct proc *, void (*)(struct proc *)));
void dumpconf __P((void));
vm_offset_t kvtop __P((caddr_t));
void physaccess __P((caddr_t, caddr_t, int, int));
void physunaccess __P((caddr_t, int));
void setredzone __P((u_int *, caddr_t));
int badbaddr __P((caddr_t, int));
void consinit __P((void));
void cpu_set_kpc __P((struct proc *, void (*)(struct proc *)));
void dumpconf __P((void));
paddr_t kvtop __P((caddr_t));
void physaccess __P((caddr_t, caddr_t, int, int));
void physunaccess __P((caddr_t, int));
void setredzone __P((u_int *, caddr_t));
/*
* Prototypes from locore.s
@ -206,18 +206,18 @@ struct fpframe;
struct user;
struct pcb;
void clearseg __P((vm_offset_t));
void clearseg __P((paddr_t));
void doboot __P((void));
void loadustp __P((int));
void m68881_save __P((struct fpframe *));
void m68881_restore __P((struct fpframe *));
void physcopyseg __P((vm_offset_t, vm_offset_t));
void physcopyseg __P((paddr_t, paddr_t));
u_int probeva __P((u_int, u_int));
void proc_trampoline __P((void));
void savectx __P((struct pcb *));
int suline __P((caddr_t, caddr_t));
void switch_exit __P((struct proc *));
void DCIAS __P((vm_offset_t));
void DCIAS __P((vaddr_t));
void DCIA __P((void));
void DCIS __P((void));
void DCIU __P((void));
@ -225,18 +225,18 @@ void ICIA __P((void));
void ICPA __P((void));
void PCIA __P((void));
void TBIA __P((void));
void TBIS __P((vm_offset_t));
void TBIS __P((vaddr_t));
void TBIAS __P((void));
void TBIAU __P((void));
#if defined(M68040) || defined(M68060)
void DCFA __P((void));
void DCFP __P((vm_offset_t));
void DCFL __P((vm_offset_t));
void DCPL __P((vm_offset_t));
void DCPP __P((vm_offset_t));
void ICPL __P((vm_offset_t));
void ICPP __P((vm_offset_t));
void DCFP __P((paddr_t));
void DCFL __P((paddr_t));
void DCPL __P((paddr_t));
void DCPP __P((paddr_t));
void ICPL __P((paddr_t));
void ICPP __P((paddr_t));
#endif
/*
@ -247,7 +247,7 @@ void add_sicallback __P((si_farg, void *, void *));
void rem_sicallback __P((si_farg));
void cpu_startup __P((void));
void dumpsys __P((void));
vm_offset_t reserve_dumppages __P((vm_offset_t));
vaddr_t reserve_dumppages __P((vaddr_t));
void softint __P((void));

View File

@ -1,4 +1,4 @@
/* $NetBSD: iomap.h,v 1.3 1996/08/23 11:17:00 leo Exp $ */
/* $NetBSD: iomap.h,v 1.4 1998/09/02 15:01:55 leo Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@ -37,18 +37,18 @@
* I/O Address maps
*/
#ifdef _KERNEL
vm_offset_t stio_addr; /* Where the st io-area is mapped */
vaddr_t stio_addr; /* Where the st io-area is mapped */
#define AD_STIO (stio_addr) /* .. see atari_init.c */
/*
* PCI KVA addresses. These are determined in atari_init.c. Exept for
* PCI KVA addresses. These are determined in atari_init.c. Except for
* the config-space, they should be used for a PCI-console only. Other
* cards should use the bus-functions to map io & mem spaces.
* Each card gets an config area of NBPG bytes.
*/
vm_offset_t pci_conf_addr; /* KVA base of PCI config space */
vm_offset_t pci_io_addr; /* KVA base of PCI io-space */
vm_offset_t pci_mem_addr; /* KVA base of PCI mem-space */
vaddr_t pci_conf_addr; /* KVA base of PCI config space */
vaddr_t pci_io_addr; /* KVA base of PCI io-space */
vaddr_t pci_mem_addr; /* KVA base of PCI mem-space */
#endif /* _KERNEL */
#define PCI_CONFB_PHYS (0xA0000000L)

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.18 1998/05/07 07:26:05 leo Exp $ */
/* $NetBSD: pmap.h,v 1.19 1998/09/02 15:01:55 leo Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@ -82,7 +82,7 @@ typedef struct pmap *pmap_t;
#define PMAP_ACTIVATE(pmap, loadhw) \
{ \
if ((loadhw)) \
loadustp(m68k_btop((vm_offset_t)(pmap)->pm_stpa)); \
loadustp(m68k_btop((pmap)->pm_stpa)); \
}
/*
@ -92,9 +92,9 @@ typedef struct pmap *pmap_t;
*/
#define NMEM_SEGS 8
struct memseg {
vm_offset_t start; /* PA of first page in segment */
vm_offset_t end; /* PA of last page in segment */
int first_page; /* relative page# of 'start' */
paddr_t start; /* PA of first page in segment */
paddr_t end; /* PA of last page in segment */
int first_page; /* relative page# of 'start' */
};
/*
@ -104,7 +104,7 @@ struct memseg {
typedef struct pv_entry {
struct pv_entry *pv_next; /* next pv_entry */
struct pmap *pv_pmap; /* pmap where mapping lies */
vm_offset_t pv_va; /* virtual address for mapping */
vaddr_t pv_va; /* virtual address for mapping */
u_int *pv_ptste; /* non-zero if VA maps a PT page */
struct pmap *pv_ptpmap; /* if pv_ptste, pmap for PT page */
int pv_flags; /* flags */
@ -156,10 +156,10 @@ struct pmap kernel_pmap_store;
(curproc && \
(pm) != pmap_kernel() && (pm) == curproc->p_vmspace->vm_map.pmap)
void pmap_bootstrap __P((vm_offset_t, u_int, u_int));
void pmap_changebit __P((vm_offset_t, int, boolean_t));
void pmap_bootstrap __P((psize_t, u_int, u_int));
void pmap_changebit __P((paddr_t, int, boolean_t));
vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int));
vaddr_t pmap_map __P((vaddr_t, paddr_t, paddr_t, int));
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: vmparam.h,v 1.6 1998/07/08 04:35:24 thorpej Exp $ */
/* $NetBSD: vmparam.h,v 1.7 1998/09/02 15:01:55 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -142,11 +142,11 @@
/*
* user/kernel map constants
*/
#define VM_MIN_ADDRESS ((vm_offset_t)0)
#define VM_MAX_ADDRESS ((vm_offset_t)(USRSTACK))
#define VM_MAXUSER_ADDRESS ((vm_offset_t)(VM_MAX_ADDRESS))
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0)
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)(0-NBPG))
#define VM_MIN_ADDRESS ((vaddr_t)0)
#define VM_MAX_ADDRESS ((vaddr_t)(USRSTACK))
#define VM_MAXUSER_ADDRESS ((vaddr_t)(VM_MAX_ADDRESS))
#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0)
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(0-NBPG))
/*
* virtual sizes (bytes) for various kernel submaps
@ -177,5 +177,5 @@ struct pmap_physseg {
/*
* number of kernel PT pages (initial only, can grow dynamically)
*/
#define VM_KERNEL_PT_PAGES ((vm_size_t)2) /* XXX: SYSPTSIZE */
#define VM_KERNEL_PT_PAGES ((vsize_t)2) /* XXX: SYSPTSIZE */
#endif /* !_MACHINE_VMPARAM_H_ */