diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 05:29:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 05:29:32 +0000 |
commit | 86b4fdd623d3c50d7bfd9427c2c9208454cd0da7 (patch) | |
tree | 5d95abcaf58d01703a30c7ab600537d3b8f67989 /sys/arch/vax/include/pmap.h | |
parent | e2cd6c399798843e13e76f49dc8ee048b51f99f1 (diff) |
update from netbsd (verbatim)
Diffstat (limited to 'sys/arch/vax/include/pmap.h')
-rw-r--r-- | sys/arch/vax/include/pmap.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index a753c873e51..bfc1996e920 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.10 1995/05/11 16:53:14 jtc Exp $ */ +/* $NetBSD: pmap.h,v 1.11 1995/11/12 14:41:41 ragge Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -83,6 +83,21 @@ typedef struct pv_entry { #define PHYS_TO_PV(phys_page) (&pv_table[((phys_page)>>PAGE_SHIFT)]) +/* ROUND_PAGE used before vm system is initialized */ +#define ROUND_PAGE(x) (((uint)(x) + PAGE_SIZE-1)& ~(PAGE_SIZE - 1)) + +/* Mapping macros used when allocating SPT */ +#define MAPVIRT(ptr, count) \ + (vm_offset_t)ptr = virtual_avail; \ + virtual_avail += (count) * NBPG; + +#define MAPPHYS(ptr, count, perm) \ + pmap_map(virtual_avail, avail_start, avail_start + \ + (count) * NBPG, perm); \ + (vm_offset_t)ptr = virtual_avail; \ + virtual_avail += (count) * NBPG; \ + avail_start += (count) * NBPG; + #ifdef _KERNEL pv_entry_t pv_table; /* array of entries, one per LOGICAL page */ |