pmap.h (194611) | pmap.h (195649) |
---|---|
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 * --- 24 unchanged lines hidden (view full) --- 33 * Derived from hp300 version by Mike Hibler, this version by William 34 * Jolitz uses a recursive map [a pde points to the page directory] to 35 * map the page tables using the pagetables themselves. This is done to 36 * reduce the impact on kernel virtual memory for lots of sparse address 37 * space, and to reduce the cost of memory to each process. 38 * 39 * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 40 * 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 * --- 24 unchanged lines hidden (view full) --- 33 * Derived from hp300 version by Mike Hibler, this version by William 34 * Jolitz uses a recursive map [a pde points to the page directory] to 35 * map the page tables using the pagetables themselves. This is done to 36 * reduce the impact on kernel virtual memory for lots of sparse address 37 * space, and to reduce the cost of memory to each process. 38 * 39 * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 40 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 |
41 * $FreeBSD: head/sys/i386/include/pmap.h 194611 2009-06-22 04:21:02Z alc $ | 41 * $FreeBSD: head/sys/i386/include/pmap.h 195649 2009-07-12 23:31:20Z alc $ |
42 */ 43 44#ifndef _MACHINE_PMAP_H_ 45#define _MACHINE_PMAP_H_ 46 47/* 48 * Page-directory and page-table entries follow this format, with a few 49 * of the fields not present here and there, depending on a lot of things. --- 334 unchanged lines hidden (view full) --- 384/* 385 * Pmap stuff 386 */ 387struct pv_entry; 388struct pv_chunk; 389 390struct md_page { 391 TAILQ_HEAD(,pv_entry) pv_list; | 42 */ 43 44#ifndef _MACHINE_PMAP_H_ 45#define _MACHINE_PMAP_H_ 46 47/* 48 * Page-directory and page-table entries follow this format, with a few 49 * of the fields not present here and there, depending on a lot of things. --- 334 unchanged lines hidden (view full) --- 384/* 385 * Pmap stuff 386 */ 387struct pv_entry; 388struct pv_chunk; 389 390struct md_page { 391 TAILQ_HEAD(,pv_entry) pv_list; |
392 int pat_mode; |
|
392}; 393 394struct pmap { 395 struct mtx pm_mtx; 396 pd_entry_t *pm_pdir; /* KVA of page directory */ 397 TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ 398 u_int pm_active; /* active on cpus */ 399 struct pmap_statistics pm_stats; /* pmap statistics */ --- 53 unchanged lines hidden (view full) --- 453extern vm_paddr_t phys_avail[]; 454extern vm_paddr_t dump_avail[]; 455extern int pseflag; 456extern int pgeflag; 457extern char *ptvmmap; /* poor name! */ 458extern vm_offset_t virtual_avail; 459extern vm_offset_t virtual_end; 460 | 393}; 394 395struct pmap { 396 struct mtx pm_mtx; 397 pd_entry_t *pm_pdir; /* KVA of page directory */ 398 TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ 399 u_int pm_active; /* active on cpus */ 400 struct pmap_statistics pm_stats; /* pmap statistics */ --- 53 unchanged lines hidden (view full) --- 454extern vm_paddr_t phys_avail[]; 455extern vm_paddr_t dump_avail[]; 456extern int pseflag; 457extern int pgeflag; 458extern char *ptvmmap; /* poor name! */ 459extern vm_offset_t virtual_avail; 460extern vm_offset_t virtual_end; 461 |
462#define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) |
|
461#define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) 462 463void pmap_bootstrap(vm_paddr_t); 464int pmap_change_attr(vm_offset_t, vm_size_t, int); 465void pmap_init_pat(void); 466void pmap_kenter(vm_offset_t va, vm_paddr_t pa); 467void *pmap_kenter_temporary(vm_paddr_t pa, int i); 468void pmap_kremove(vm_offset_t); 469void *pmap_mapbios(vm_paddr_t, vm_size_t); 470void *pmap_mapdev(vm_paddr_t, vm_size_t); 471void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, int); 472boolean_t pmap_page_is_mapped(vm_page_t m); | 463#define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) 464 465void pmap_bootstrap(vm_paddr_t); 466int pmap_change_attr(vm_offset_t, vm_size_t, int); 467void pmap_init_pat(void); 468void pmap_kenter(vm_offset_t va, vm_paddr_t pa); 469void *pmap_kenter_temporary(vm_paddr_t pa, int i); 470void pmap_kremove(vm_offset_t); 471void *pmap_mapbios(vm_paddr_t, vm_size_t); 472void *pmap_mapdev(vm_paddr_t, vm_size_t); 473void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, int); 474boolean_t pmap_page_is_mapped(vm_page_t m); |
475void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); |
|
473void pmap_unmapdev(vm_offset_t, vm_size_t); 474pt_entry_t *pmap_pte(pmap_t, vm_offset_t) __pure2; 475void pmap_set_pg(void); 476void pmap_invalidate_page(pmap_t, vm_offset_t); 477void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); 478void pmap_invalidate_all(pmap_t); 479void pmap_invalidate_cache(void); 480 481#endif /* _KERNEL */ 482 483#endif /* !LOCORE */ 484 485#endif /* !_MACHINE_PMAP_H_ */ | 476void pmap_unmapdev(vm_offset_t, vm_size_t); 477pt_entry_t *pmap_pte(pmap_t, vm_offset_t) __pure2; 478void pmap_set_pg(void); 479void pmap_invalidate_page(pmap_t, vm_offset_t); 480void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); 481void pmap_invalidate_all(pmap_t); 482void pmap_invalidate_cache(void); 483 484#endif /* _KERNEL */ 485 486#endif /* !LOCORE */ 487 488#endif /* !_MACHINE_PMAP_H_ */ |