-typedef union {
- unsigned int word;
- struct {
- unsigned int valid : 1;
- unsigned int segment_id : 24;
- unsigned int hash_id : 1;
- unsigned int page_index : 6; /* Abbreviated */
- } bits;
- struct {
- unsigned int valid : 1;
- unsigned int not_used : 5;
- unsigned int segment_id : 19; /* Least Sig 19 bits */
- unsigned int hash_id : 1;
- unsigned int page_index : 6;
- } hash_bits;
-} pte0_t;
-
-typedef union {
- unsigned int word;
- struct {
- unsigned int phys_page : 20;
- unsigned int reserved3 : 3;
- unsigned int referenced : 1;
- unsigned int changed : 1;
- unsigned int wimg : 4;
- unsigned int reserved1 : 1;
- unsigned int protection : 2;
- } bits;
-} pte1_t;
-
-typedef struct pte_t {
- pte0_t pte0;
- pte1_t pte1;
-} pte_t;
-
-#define PTE_NULL ((pte_t*) NULL) /* No pte found/associated with this */
-#define PTE_EMPTY 0x7fffffbf /* Value in the pte0.word of a free pte */
-
-#define PTE_WIMG_CB_CACHED 0 /* cached, writeback */
-#define PTE_WIMG_CB_CACHED_GUARDED 1 /* cached, writeback, guarded */
-#define PTE_WIMG_CB_CACHED_COHERENT 2 /* cached, writeback, coherent (default) */
-#define PTE_WIMG_CB_CACHED_COHERENT_GUARDED 3 /* cached, writeback, coherent, guarded */
-#define PTE_WIMG_UNCACHED 4 /* uncached */
-#define PTE_WIMG_UNCACHED_GUARDED 5 /* uncached, guarded */
-#define PTE_WIMG_UNCACHED_COHERENT 6 /* uncached, coherentt */
-#define PTE_WIMG_UNCACHED_COHERENT_GUARDED 7 /* uncached, coherent, guarded */
-#define PTE_WIMG_WT_CACHED 8 /* cached, writethru */
-#define PTE_WIMG_WT_CACHED_GUARDED 9 /* cached, writethru, guarded */
-#define PTE_WIMG_WT_CACHED_COHERENT 10 /* cached, writethru, coherent */
-#define PTE_WIMG_WT_CACHED_COHERENT_GUARDED 11 /* cached, writethru, coherent, guarded */