- Timestamp:
- Aug 16, 2017, 11:13:27 AM (7 years ago)
- Location:
- trunk/hal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_gpt.h
r315 r383 45 45 46 46 /**************************************************************************************** 47 * These global variables define the masks for the Generic Page Table Entry attributes. 48 * The actual values must be defined in the implementation (hal_gpt.c file). 47 * These macros define the masks for the Generic Page Table Entry attributes. 49 48 ***************************************************************************************/ 50 49 51 extern uint32_t GPT_MAPPED;/*! PTE is mapped */52 extern uint32_t GPT_SMALL;/*! PTE is a small page */53 extern uint32_t GPT_READABLE;/*! PTE is readable */54 extern uint32_t GPT_WRITABLE;/*! PTE is writable */55 extern uint32_t GPT_EXECUTABLE;/*! PTE is executable */56 extern uint32_t GPT_CACHABLE;/*! PTE can be cached */57 extern uint32_t GPT_USER;/*! PTE is user accessible */58 extern uint32_t GPT_DIRTY;/*! PTE has been "recently" written */59 extern uint32_t GPT_ACCESSED;/*! PTE has been "recently" accessed */60 extern uint32_t GPT_GLOBAL;/*! PTE is kept in TLB at context switch */61 extern uint32_t GPT_COW;/*! PTE must be copied on write */62 extern uint32_t GPT_SWAP;/*! PTE swapped on disk (not implemented yet) */63 extern uint32_t GPT_LOCKED;/*! PTE is protected against concurrent access */50 #define GPT_MAPPED 0x0000 /*! PTE is mapped */ 51 #define GPT_SMALL 0x0001 /*! PTE is a small page */ 52 #define GPT_READABLE 0x0002 /*! PTE is readable */ 53 #define GPT_WRITABLE 0x0004 /*! PTE is writable */ 54 #define GPT_EXECUTABLE 0x0008 /*! PTE is executable */ 55 #define GPT_CACHABLE 0x0010 /*! PTE can be cached */ 56 #define GPT_USER 0x0020 /*! PTE is user accessible */ 57 #define GPT_DIRTY 0x0040 /*! PTE has been "recently" written */ 58 #define GPT_ACCESSED 0x0080 /*! PTE has been "recently" accessed */ 59 #define GPT_GLOBAL 0x0100 /*! PTE is kept in TLB at context switch */ 60 #define GPT_COW 0x0200 /*! PTE must be copied on write */ 61 #define GPT_SWAP 0x0400 /*! PTE swapped on disk (not implemented yet) */ 62 #define GPT_LOCKED 0x0800 /*! PTE is protected against concurrent access */ 64 63 65 64 /**************************************************************************************** -
trunk/hal/x86_64/core/hal_gpt.c
r368 r383 236 236 /* -------------------------------------------------------------------------- */ 237 237 238 /****************************************************************************************239 * These global variables defines the masks for the Generic Page Table Entry attributes,240 * and must be defined in all GPT implementation.241 ***************************************************************************************/242 243 uint32_t GPT_MAPPED;244 uint32_t GPT_SMALL;245 uint32_t GPT_READABLE;246 uint32_t GPT_WRITABLE;247 uint32_t GPT_EXECUTABLE;248 uint32_t GPT_CACHABLE;249 uint32_t GPT_USER;250 uint32_t GPT_DIRTY;251 uint32_t GPT_ACCESSED;252 uint32_t GPT_GLOBAL;253 uint32_t GPT_COW;254 uint32_t GPT_SWAP;255 uint32_t GPT_LOCKED;256 257 238 error_t hal_gpt_create(gpt_t *gpt) 258 239 { … … 298 279 gpt->page = GET_PTR(page_xp); 299 280 300 /* initialize PTE entries attributes masks */301 GPT_MAPPED = PG_V;302 GPT_SMALL = 0;303 GPT_READABLE = PG_V;304 GPT_WRITABLE = PG_RW;305 GPT_EXECUTABLE = 0;306 GPT_CACHABLE = 0;307 GPT_USER = PG_u;308 GPT_DIRTY = 0;309 GPT_ACCESSED = 0;310 GPT_GLOBAL = PG_G;311 GPT_COW = 0;312 GPT_SWAP = 0;313 GPT_LOCKED = 0;314 281 315 282 return 0;
Note: See TracChangeset
for help on using the changeset viewer.