Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/include/param.h
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* CACHE_LINE_SIZE is the compile-time maximum cache line size for an | * CACHE_LINE_SIZE is the compile-time maximum cache line size for an | ||||
* architecture. It should be used with appropriate caution. | * architecture. It should be used with appropriate caution. | ||||
*/ | */ | ||||
#define CACHE_LINE_SHIFT 6 | #define CACHE_LINE_SHIFT 6 | ||||
#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) | #define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT) | ||||
#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ | #define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */ | ||||
#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */ | #define PAGE_SIZE (1 << PAGE_SHIFT) /* bytes/page */ | ||||
#define PAGE_MASK (PAGE_SIZE-1) | #define PAGE_MASK (PAGE_SIZE - 1) | ||||
#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) | #define NPTEPG (PAGE_SIZE / sizeof(pt_entry_t)) | ||||
#if defined(PAE) || defined(PAE_TABLES) | /* Size in bytes of the page directory */ | ||||
#define NPGPTD 4 | |||||
#define PDRSHIFT 21 /* LOG2(NBPDR) */ | |||||
#define NPGPTD_SHIFT 9 | |||||
#else | |||||
#define NPGPTD 1 | |||||
#define PDRSHIFT 22 /* LOG2(NBPDR) */ | |||||
#define NPGPTD_SHIFT 10 | |||||
#endif | |||||
#define NBPTD (NPGPTD<<PAGE_SHIFT) | #define NBPTD (NPGPTD << PAGE_SHIFT) | ||||
#define NPDEPTD (NBPTD/(sizeof (pd_entry_t))) | /* Number of PDEs in page directory, 2048 for PAE, 1024 for non-PAE */ | ||||
#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t))) | #define NPDEPTD (NBPTD / sizeof(pd_entry_t)) | ||||
#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */ | /* Number of PDEs in one page of the page directory, 512 vs. 1024 */ | ||||
#define NPDEPG (PAGE_SIZE / sizeof(pd_entry_t)) | |||||
#define PDRMASK (NBPDR-1) | #define PDRMASK (NBPDR - 1) | ||||
#ifndef PDRSHIFT | |||||
#define PDRSHIFT i386_pmap_PDRSHIFT | |||||
#endif | |||||
#ifndef NBPDR | |||||
#define NBPDR (1 << PDRSHIFT) /* bytes/page dir */ | |||||
#endif | |||||
#define MAXPAGESIZES 2 /* maximum number of supported page sizes */ | #define MAXPAGESIZES 2 /* maximum number of supported page sizes */ | ||||
#define IOPAGES 2 /* pages of i/o permission bitmap */ | #define IOPAGES 2 /* pages of i/o permission bitmap */ | ||||
#ifndef KSTACK_PAGES | #ifndef KSTACK_PAGES | ||||
#define KSTACK_PAGES 4 /* Includes pcb! */ | #define KSTACK_PAGES 4 /* Includes pcb! */ | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |