Rev 765 | Rev 831 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 765 | Rev 825 | ||
---|---|---|---|
Line 97... | Line 97... | ||
97 | ((p->lo.c>PAGE_UNCACHED)<<PAGE_CACHEABLE_SHIFT) | |
97 | ((p->lo.c>PAGE_UNCACHED)<<PAGE_CACHEABLE_SHIFT) | |
98 | ((!p->lo.v)<<PAGE_PRESENT_SHIFT) | |
98 | ((!p->lo.v)<<PAGE_PRESENT_SHIFT) | |
99 | (1<<PAGE_USER_SHIFT) | |
99 | (1<<PAGE_USER_SHIFT) | |
100 | (1<<PAGE_READ_SHIFT) | |
100 | (1<<PAGE_READ_SHIFT) | |
101 | ((p->w)<<PAGE_WRITE_SHIFT) | |
101 | ((p->w)<<PAGE_WRITE_SHIFT) | |
102 | (1<<PAGE_EXEC_SHIFT) |
102 | (1<<PAGE_EXEC_SHIFT) | |
- | 103 | p->lo.g<<PAGE_GLOBAL_SHIFT |
|
103 | ); |
104 | ); |
104 | 105 | ||
105 | } |
106 | } |
106 | 107 | ||
107 | static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
108 | static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
108 | { |
109 | { |
109 | pte_t *p = &pt[i]; |
110 | pte_t *p = &pt[i]; |
110 | 111 | ||
111 | p->lo.c = (flags & PAGE_CACHEABLE) != 0 ? PAGE_CACHEABLE_EXC_WRITE : PAGE_UNCACHED; |
112 | p->lo.c = (flags & PAGE_CACHEABLE) != 0 ? PAGE_CACHEABLE_EXC_WRITE : PAGE_UNCACHED; |
112 | p->lo.v = !(flags & PAGE_NOT_PRESENT); |
113 | p->lo.v = !(flags & PAGE_NOT_PRESENT); |
- | 114 | p->lo.g = (flags & PAGE_GLOBAL) != 0; |
|
113 | p->w = (flags & PAGE_WRITE) != 0; |
115 | p->w = (flags & PAGE_WRITE) != 0; |
114 | } |
116 | } |
115 | 117 | ||
116 | extern void page_arch_init(void); |
118 | extern void page_arch_init(void); |
117 | 119 |