Rev 825 | Rev 832 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 825 | Rev 831 | ||
|---|---|---|---|
| Line 73... | Line 73... | ||
| 73 | #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) set_pt_flags((pte_t *)(ptl2), (index_t)(i), (x)) |
73 | #define SET_PTL3_FLAGS_ARCH(ptl2, i, x) set_pt_flags((pte_t *)(ptl2), (index_t)(i), (x)) |
| 74 | #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) |
74 | #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) set_pt_flags((pte_t *)(ptl3), (index_t)(i), (x)) |
| 75 | 75 | ||
| 76 | #ifndef __ASM__ |
76 | #ifndef __ASM__ |
| 77 | 77 | ||
| - | 78 | /** Page Table Entry. */ |
|
| 78 | struct page_specifier { |
79 | struct page_specifier { |
| 79 | unsigned present : 1; |
80 | unsigned present : 1; |
| 80 | unsigned writeable : 1; |
81 | unsigned writeable : 1; |
| 81 | unsigned uaccessible : 1; |
82 | unsigned uaccessible : 1; |
| 82 | unsigned page_write_through : 1; |
83 | unsigned page_write_through : 1; |
| 83 | unsigned page_cache_disable : 1; |
84 | unsigned page_cache_disable : 1; |
| 84 | unsigned accessed : 1; |
85 | unsigned accessed : 1; |
| 85 | unsigned dirty : 1; |
86 | unsigned dirty : 1; |
| 86 | unsigned unused: 1; |
87 | unsigned unused: 1; |
| 87 | unsigned global : 1; |
88 | unsigned global : 1; |
| - | 89 | unsigned soft_valid : 1; /**< Valid content even if present bit is cleared. */ |
|
| 88 | unsigned avl : 3; |
90 | unsigned avl : 2; |
| 89 | unsigned addr_12_31 : 30; |
91 | unsigned addr_12_31 : 30; |
| 90 | unsigned addr_32_51 : 21; |
92 | unsigned addr_32_51 : 21; |
| 91 | unsigned no_execute : 1; |
93 | unsigned no_execute : 1; |
| 92 | } __attribute__ ((packed)); |
94 | } __attribute__ ((packed)); |
| 93 | 95 | ||
| Line 122... | Line 124... | ||
| 122 | p->present = !(flags & PAGE_NOT_PRESENT); |
124 | p->present = !(flags & PAGE_NOT_PRESENT); |
| 123 | p->uaccessible = (flags & PAGE_USER) != 0; |
125 | p->uaccessible = (flags & PAGE_USER) != 0; |
| 124 | p->writeable = (flags & PAGE_WRITE) != 0; |
126 | p->writeable = (flags & PAGE_WRITE) != 0; |
| 125 | p->no_execute = (flags & PAGE_EXEC) == 0; |
127 | p->no_execute = (flags & PAGE_EXEC) == 0; |
| 126 | p->global = (flags & PAGE_GLOBAL) != 0; |
128 | p->global = (flags & PAGE_GLOBAL) != 0; |
| - | 129 | ||
| - | 130 | /* |
|
| - | 131 | * Ensure that there is at least one bit set even if the present bit is cleared. |
|
| - | 132 | */ |
|
| - | 133 | p->soft_valid = 1; |
|
| 127 | } |
134 | } |
| 128 | 135 | ||
| 129 | extern void page_arch_init(void); |
136 | extern void page_arch_init(void); |
| 130 | 137 | ||
| 131 | #endif |
138 | #endif |