* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Science Department and Ralph Campbell.
* %sccs.include.redist.c%
* from: Utah $Hdr: pte.h 1.11 89/09/03$
* @(#)pte.h 7.2 (Berkeley) %G%
* R2000 hardware page table entry
#if BYTE_ORDER == BIG_ENDIAN
unsigned int pg_pfnum
:20, /* HW: core page frame number or 0 */
pg_n
:1, /* HW: non-cacheable bit */
pg_m
:1, /* HW: modified (dirty) bit */
pg_v
:1, /* HW: valid bit */
pg_g
:1, /* HW: ignore pid bit */
pg_swapm
:1, /* SW: page must be forced to swap */
pg_fod
:1, /* SW: is fill on demand (=0) */
pg_prot
:2; /* SW: access control */
#if BYTE_ORDER == LITTLE_ENDIAN
unsigned int pg_prot
:2, /* SW: access control */
pg_fod
:1, /* SW: is fill on demand (=0) */
pg_swapm
:1, /* SW: page must be forced to swap */
pg_g
:1, /* HW: ignore pid bit */
pg_v
:1, /* HW: valid bit */
pg_m
:1, /* HW: modified (dirty) bit */
pg_n
:1, /* HW: non-cacheable bit */
pg_pfnum
:20; /* HW: core page frame number or 0 */
unsigned int pt_entry
; /* for copying, etc. */
struct pte pt_pte
; /* for getting to bits by name */
} pt_entry_t
; /* Mach page table entry */
#define PT_ENTRY_NULL ((pt_entry_t *) 0)
#define PG_PROT 0x00000003
#define PG_WIRED 0x00000002
#define PG_FRAME 0xfffff000
#define PG_PFNUM(x) (((x) & PG_FRAME) >> PG_SHIFT)
* Kernel virtual address to page table entry and visa versa.
((pt_entry_t *)PMAP_HASH_KADDR + \
(((vm_offset_t)(va) - VM_MIN_KERNEL_ADDRESS) >> PGSHIFT))
((((pt_entry_t *)(pte) - PMAP_HASH_KADDR) << PGSHIFT) + \