pmap.h (04f183560501cd2dbec07fd7a3e1f60ddb88b675) pmap.h (ed7fcbd079ef3617e4ddb1ed51a6a75a7cea57c8)
1/*
2 * Copyright (c) 1991 Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * the Systems Programming Group of the University of Utah Computer
7 * Science Department and William Jolitz of UUNET Technologies Inc.
8 *

--- 28 unchanged lines hidden (view full) ---

37 * Derived from hp300 version by Mike Hibler, this version by William
38 * Jolitz uses a recursive map [a pde points to the page directory] to
39 * map the page tables using the pagetables themselves. This is done to
40 * reduce the impact on kernel virtual memory for lots of sparse address
41 * space, and to reduce the cost of memory to each process.
42 *
43 * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
44 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
1/*
2 * Copyright (c) 1991 Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * the Systems Programming Group of the University of Utah Computer
7 * Science Department and William Jolitz of UUNET Technologies Inc.
8 *

--- 28 unchanged lines hidden (view full) ---

37 * Derived from hp300 version by Mike Hibler, this version by William
38 * Jolitz uses a recursive map [a pde points to the page directory] to
39 * map the page tables using the pagetables themselves. This is done to
40 * reduce the impact on kernel virtual memory for lots of sparse address
41 * space, and to reduce the cost of memory to each process.
42 *
43 * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
44 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
45 * $Id: pmap.h,v 1.10 1994/01/31 04:19:00 davidg Exp $
45 * $Id: pmap.h,v 1.11 1994/03/07 11:38:48 davidg Exp $
46 */
47
48#ifndef _PMAP_MACHINE_
49#define _PMAP_MACHINE_ 1
50
51#include "vm/vm_prot.h"
52/*
53 * 386 page table entry and page table directory

--- 122 unchanged lines hidden (view full) ---

176#define vtophys(va) (((int) (*vtopte(va))&PG_FRAME) | ((int)(va) & PGOFSET))
177#define ispt(va) ((va) >= UPT_MIN_ADDRESS && (va) <= KPT_MAX_ADDRESS)
178
179#define avtopte(va) (APTmap + i386_btop(va))
180#define ptetoav(pt) (i386_ptob(pt - APTmap))
181#define avtophys(va) (((int) (*avtopte(va))&PG_FRAME) | ((int)(va) & PGOFSET))
182
183/*
46 */
47
48#ifndef _PMAP_MACHINE_
49#define _PMAP_MACHINE_ 1
50
51#include "vm/vm_prot.h"
52/*
53 * 386 page table entry and page table directory

--- 122 unchanged lines hidden (view full) ---

176#define vtophys(va) (((int) (*vtopte(va))&PG_FRAME) | ((int)(va) & PGOFSET))
177#define ispt(va) ((va) >= UPT_MIN_ADDRESS && (va) <= KPT_MAX_ADDRESS)
178
179#define avtopte(va) (APTmap + i386_btop(va))
180#define ptetoav(pt) (i386_ptob(pt - APTmap))
181#define avtophys(va) (((int) (*avtopte(va))&PG_FRAME) | ((int)(va) & PGOFSET))
182
183/*
184 * Routine: pmap_kextract
185 * Function:
186 * Extract the physical page address associated
187 * kernel virtual address.
188 */
189static inline vm_offset_t
190pmap_kextract(va)
191 vm_offset_t va;
192{
193 vm_offset_t pa = *(int *)vtopte(va);
194 pa = (pa & PG_FRAME) | (va & ~PG_FRAME);
195 return pa;
196}
197
198/*
184 * macros to generate page directory/table indicies
185 */
186
187#define pdei(va) (((va)&PD_MASK)>>PD_SHIFT)
188#define ptei(va) (((va)&PT_MASK)>>PG_SHIFT)
189
190/*
191 * Pmap stuff

--- 77 unchanged lines hidden ---
199 * macros to generate page directory/table indicies
200 */
201
202#define pdei(va) (((va)&PD_MASK)>>PD_SHIFT)
203#define ptei(va) (((va)&PT_MASK)>>PG_SHIFT)
204
205/*
206 * Pmap stuff

--- 77 unchanged lines hidden ---