version 1.43, 2000/02/11 07:00:13 |
version 1.43.2.6, 2000/09/23 16:05:59 |
|
|
* (the following assumes that KERNBASE is 0xc0000000) |
* (the following assumes that KERNBASE is 0xc0000000) |
* |
* |
* PDE#s VA range usage |
* PDE#s VA range usage |
* 0->767 0x0 -> 0xbfc00000 user address space, note that the |
* 0->766 0x0 -> 0xbfc00000 user address space, note that the |
* max user address is 0xbfbfe000 |
* max user address is 0xbfbfe000 |
* the final two pages in the last 4MB |
* the final two pages in the last 4MB |
* used to be reserved for the UAREA |
* used to be reserved for the UAREA |
* but now are no longer used |
* but now are no longer used |
* 768 0xbfc00000-> recursive mapping of PDP (used for |
* 767 0xbfc00000-> recursive mapping of PDP (used for |
* 0xc0000000 linear mapping of PTPs) |
* 0xc0000000 linear mapping of PTPs) |
* 768->1023 0xc0000000-> kernel address space (constant |
* 768->1023 0xc0000000-> kernel address space (constant |
* 0xffc00000 across all pmap's/processes) |
* 0xffc00000 across all pmap's/processes) |
|
|
* note that in the APTE_BASE space, the APDP appears at VA |
* note that in the APTE_BASE space, the APDP appears at VA |
* "APDP_BASE" (0xfffff000). |
* "APDP_BASE" (0xfffff000). |
*/ |
*/ |
|
/* XXX MP should we allocate one APDP_PDE per processor?? */ |
|
|
/* |
/* |
* the following defines identify the slots used as described above. |
* the following defines identify the slots used as described above. |
|
|
#define PG_PVLIST PG_AVAIL2 /* mapping has entry on pvlist */ |
#define PG_PVLIST PG_AVAIL2 /* mapping has entry on pvlist */ |
/* PG_AVAIL3 not used */ |
/* PG_AVAIL3 not used */ |
|
|
|
/* |
|
* Number of PTE's per cache line. 4 byte pte, 32-byte cache line |
|
* Used to avoid false sharing of cache lines. |
|
*/ |
|
#define NPTECL 8 |
|
|
#ifdef _KERNEL |
#ifdef _KERNEL |
/* |
/* |
* pmap data structures: see pmap.c for details of locking. |
* pmap data structures: see pmap.c for details of locking. |
Line 336 struct pv_page { |
|
Line 343 struct pv_page { |
|
*/ |
*/ |
|
|
#define PMAP_RR_MAX 16 /* max of 16 pages (64K) */ |
#define PMAP_RR_MAX 16 /* max of 16 pages (64K) */ |
|
#if 0 |
struct pmap_remove_record { |
struct pmap_remove_record { |
int prr_npages; |
int prr_npages; |
vaddr_t prr_vas[PMAP_RR_MAX]; |
vaddr_t prr_vas[PMAP_RR_MAX]; |
}; |
}; |
|
#endif |
|
|
|
#if 0 |
/* |
/* |
* pmap_transfer_location: used to pass the current location in the |
* pmap_transfer_location: used to pass the current location in the |
* pmap between pmap_transfer and pmap_transfer_ptes [e.g. during |
* pmap between pmap_transfer and pmap_transfer_ptes [e.g. during |
Line 353 struct pmap_transfer_location { |
|
Line 362 struct pmap_transfer_location { |
|
pt_entry_t *pte; /* the PTE that maps address */ |
pt_entry_t *pte; /* the PTE that maps address */ |
struct vm_page *ptp; /* the PTP that the PTE lives in */ |
struct vm_page *ptp; /* the PTP that the PTE lives in */ |
}; |
}; |
|
#endif |
|
|
/* |
/* |
* global kernel variables |
* global kernel variables |
Line 375 extern int pmap_pg_g; /* do we support |
|
Line 385 extern int pmap_pg_g; /* do we support |
|
|
|
#define pmap_clear_modify(pg) pmap_change_attrs(pg, 0, PG_M) |
#define pmap_clear_modify(pg) pmap_change_attrs(pg, 0, PG_M) |
#define pmap_clear_reference(pg) pmap_change_attrs(pg, 0, PG_U) |
#define pmap_clear_reference(pg) pmap_change_attrs(pg, 0, PG_U) |
#define pmap_copy(DP,SP,D,L,S) pmap_transfer(DP,SP,D,L,S, FALSE) |
#define pmap_copy(DP,SP,D,L,S) |
#define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M) |
#define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M) |
#define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U) |
#define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U) |
#define pmap_move(DP,SP,D,L,S) pmap_transfer(DP,SP,D,L,S, TRUE) |
#define pmap_move(DP,SP,D,L,S) |
#define pmap_phys_address(ppn) i386_ptob(ppn) |
#define pmap_phys_address(ppn) i386_ptob(ppn) |
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */ |
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */ |
|
|
Line 406 void pmap_write_protect __P((struct pma |
|
Line 416 void pmap_write_protect __P((struct pma |
|
|
|
vaddr_t reserve_dumppages __P((vaddr_t)); /* XXX: not a pmap fn */ |
vaddr_t reserve_dumppages __P((vaddr_t)); /* XXX: not a pmap fn */ |
|
|
|
#if defined(MULTIPROCESSOR) |
|
void pmap_tlb_shootdown __P((pmap_t, vaddr_t, pt_entry_t)); |
|
#endif /* MULTIPROCESSOR */ |
|
void pmap_tlb_dshootdown __P((pmap_t, vaddr_t, pt_entry_t)); |
|
void pmap_do_tlb_shootdown __P((struct cpu_info *)); |
|
|
#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ |
#define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ |
|
|
/* |
/* |
|
* Do idle page zero'ing uncached to avoid polluting the cache. |
|
*/ |
|
void pmap_zero_page_uncached __P((paddr_t)); |
|
#define PMAP_PAGEIDLEZERO(pa) (pmap_zero_page_uncached((pa)), TRUE) |
|
|
|
/* |
* inline functions |
* inline functions |
*/ |
*/ |
|
|