pmap.h (97444) | pmap.h (97446) |
---|---|
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 * --- 23 unchanged lines hidden (view full) --- 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 38 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 39 * from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30 | 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 * --- 23 unchanged lines hidden (view full) --- 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 38 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 39 * from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30 |
40 * $FreeBSD: head/sys/sparc64/include/pmap.h 97444 2002-05-29 05:24:16Z jake $ | 40 * $FreeBSD: head/sys/sparc64/include/pmap.h 97446 2002-05-29 05:56:05Z jake $ |
41 */ 42 43#ifndef _MACHINE_PMAP_H_ 44#define _MACHINE_PMAP_H_ 45 46#include <machine/tte.h> 47 48#define DCACHE_COLOR_BITS (1) 49#define DCACHE_COLORS (1 << DCACHE_COLOR_BITS) 50#define DCACHE_COLOR_MASK (DCACHE_COLORS - 1) 51#define DCACHE_COLOR(va) (((va) >> PAGE_SHIFT) & DCACHE_COLOR_MASK) 52 53#define PMAP_CONTEXT_MAX 8192 54 55#define pmap_resident_count(pm) (pm->pm_stats.resident_count) 56 | 41 */ 42 43#ifndef _MACHINE_PMAP_H_ 44#define _MACHINE_PMAP_H_ 45 46#include <machine/tte.h> 47 48#define DCACHE_COLOR_BITS (1) 49#define DCACHE_COLORS (1 << DCACHE_COLOR_BITS) 50#define DCACHE_COLOR_MASK (DCACHE_COLORS - 1) 51#define DCACHE_COLOR(va) (((va) >> PAGE_SHIFT) & DCACHE_COLOR_MASK) 52 53#define PMAP_CONTEXT_MAX 8192 54 55#define pmap_resident_count(pm) (pm->pm_stats.resident_count) 56 |
57struct pv_entry; 58 | |
59typedef struct pmap *pmap_t; | 57typedef struct pmap *pmap_t; |
60typedef struct pv_entry *pv_entry_t; | |
61 62struct md_page { | 58 59struct md_page { |
63 TAILQ_HEAD(, pv_entry) pv_list; 64 int pv_list_count; | 60 STAILQ_HEAD(, tte) tte_list; |
65 int colors[DCACHE_COLORS]; 66}; 67 68struct pmap { 69 struct tte *pm_tsb; 70 vm_object_t pm_tsb_obj; 71 u_int pm_active; 72 u_int pm_context[MAXCPU]; 73 struct pmap_statistics pm_stats; 74}; 75 | 61 int colors[DCACHE_COLORS]; 62}; 63 64struct pmap { 65 struct tte *pm_tsb; 66 vm_object_t pm_tsb_obj; 67 u_int pm_active; 68 u_int pm_context[MAXCPU]; 69 struct pmap_statistics pm_stats; 70}; 71 |
76struct pv_entry { 77 TAILQ_ENTRY(pv_entry) pv_list; 78 TAILQ_ENTRY(pv_entry) pv_plist; 79 pmap_t pv_pmap; 80 vm_offset_t pv_va; 81 vm_page_t pv_m; 82}; 83 | |
84void pmap_bootstrap(vm_offset_t ekva); 85void pmap_context_rollover(void); 86vm_offset_t pmap_kextract(vm_offset_t va); 87void pmap_kenter_flags(vm_offset_t va, vm_offset_t pa, u_long flags); 88void pmap_qenter_flags(vm_offset_t va, vm_page_t *m, int count, u_long fl); 89 90int pmap_cache_enter(vm_page_t m, vm_offset_t va); 91void pmap_cache_remove(vm_page_t m, vm_offset_t va); --- 28 unchanged lines hidden --- | 72void pmap_bootstrap(vm_offset_t ekva); 73void pmap_context_rollover(void); 74vm_offset_t pmap_kextract(vm_offset_t va); 75void pmap_kenter_flags(vm_offset_t va, vm_offset_t pa, u_long flags); 76void pmap_qenter_flags(vm_offset_t va, vm_page_t *m, int count, u_long fl); 77 78int pmap_cache_enter(vm_page_t m, vm_offset_t va); 79void pmap_cache_remove(vm_page_t m, vm_offset_t va); --- 28 unchanged lines hidden --- |