Deleted Added
full compact
pmap.h (69377) pmap.h (83757)
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 * $FreeBSD: head/sys/amd64/include/pmap.h 69377 2000-11-30 01:53:02Z peter $
45 * $FreeBSD: head/sys/amd64/include/pmap.h 83757 2001-09-21 06:23:03Z peter $
46 */
47
48#ifndef _MACHINE_PMAP_H_
49#define _MACHINE_PMAP_H_
50
51/*
52 * Page-directory and page-table entires follow this format, with a few
53 * of the fields not present here and there, depending on a lot of things.

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

78 * Page Protection Exception bits
79 */
80
81#define PGEX_P 0x01 /* Protection violation vs. not present */
82#define PGEX_W 0x02 /* during a Write cycle */
83#define PGEX_U 0x04 /* access from User mode (UPL) */
84
85/*
46 */
47
48#ifndef _MACHINE_PMAP_H_
49#define _MACHINE_PMAP_H_
50
51/*
52 * Page-directory and page-table entires follow this format, with a few
53 * of the fields not present here and there, depending on a lot of things.

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

78 * Page Protection Exception bits
79 */
80
81#define PGEX_P 0x01 /* Protection violation vs. not present */
82#define PGEX_W 0x02 /* during a Write cycle */
83#define PGEX_U 0x04 /* access from User mode (UPL) */
84
85/*
86 * Size of Kernel address space. This is the number of page table pages
87 * (4MB each) to use for the kernel. 256 pages == 1 Gigabyte.
88 * This **MUST** be a multiple of 4 (eg: 252, 256, 260, etc).
89 */
90#ifndef KVA_PAGES
91#define KVA_PAGES 256
92#endif
93
94/*
86 * Pte related macros
87 */
88#define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDRSHIFT)|((pti)<<PAGE_SHIFT)))
89
90#ifndef NKPT
95 * Pte related macros
96 */
97#define VADDR(pdi, pti) ((vm_offset_t)(((pdi)<<PDRSHIFT)|((pti)<<PAGE_SHIFT)))
98
99#ifndef NKPT
91#define NKPT 30 /* actual number of kernel page tables */
100#define NKPT 30 /* actual number of kernel page tables */
92#endif
93#ifndef NKPDE
94#ifdef SMP
101#endif
102#ifndef NKPDE
103#ifdef SMP
95#define NKPDE 254 /* addressable number of page tables/pde's */
104#define NKPDE (KVA_PAGES - 2) /* addressable number of page tables/pde's */
96#else
105#else
97#define NKPDE 255 /* addressable number of page tables/pde's */
98#endif /* SMP */
106#define NKPDE (KVA_PAGES - 1) /* addressable number of page tables/pde's */
99#endif
107#endif
108#endif
100
101/*
102 * The *PTDI values control the layout of virtual memory
103 *
104 * XXX This works for now, but I am not real happy with it, I'll fix it
105 * right after I fix locore.s and the magic 28K hole
106 *
107 * SMP_PRIVPAGES: The per-cpu address space is 0xff80000 -> 0xffbfffff

--- 161 unchanged lines hidden ---
109
110/*
111 * The *PTDI values control the layout of virtual memory
112 *
113 * XXX This works for now, but I am not real happy with it, I'll fix it
114 * right after I fix locore.s and the magic 28K hole
115 *
116 * SMP_PRIVPAGES: The per-cpu address space is 0xff80000 -> 0xffbfffff

--- 161 unchanged lines hidden ---