Rev 826 | Rev 1044 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 826 | Rev 902 | ||
---|---|---|---|
Line 169... | Line 169... | ||
169 | spinlock_lock(&page_ht_lock); |
169 | spinlock_lock(&page_ht_lock); |
170 | 170 | ||
171 | if (!hash_table_find(&page_ht, key)) { |
171 | if (!hash_table_find(&page_ht, key)) { |
172 | t = (pte_t *) malloc(sizeof(pte_t), FRAME_ATOMIC); |
172 | t = (pte_t *) malloc(sizeof(pte_t), FRAME_ATOMIC); |
173 | ASSERT(t != NULL); |
173 | ASSERT(t != NULL); |
174 | 174 | ||
- | 175 | t->g = (flags & PAGE_GLOBAL) != 0; |
|
- | 176 | t->x = (flags & PAGE_EXEC) != 0; |
|
- | 177 | t->w = (flags & PAGE_WRITE) != 0; |
|
- | 178 | t->k = !(flags & PAGE_USER); |
|
- | 179 | t->c = (flags & PAGE_CACHEABLE) != 0; |
|
- | 180 | t->p = !(flags & PAGE_NOT_PRESENT); |
|
- | 181 | ||
- | 182 | t->as = as; |
|
- | 183 | t->page = page; |
|
- | 184 | t->frame = frame; |
|
- | 185 | ||
175 | hash_table_insert(&page_ht, key, &t->link); |
186 | hash_table_insert(&page_ht, key, &t->link); |
176 | } |
187 | } |
177 | 188 | ||
178 | spinlock_unlock(&page_ht_lock); |
189 | spinlock_unlock(&page_ht_lock); |
179 | } |
190 | } |