Rev 1880 | Rev 1946 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1880 | Rev 1891 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | #include <arch/trap/trap.h> |
49 | #include <arch/trap/trap.h> |
50 | #include <arch/trap/exception.h> |
50 | #include <arch/trap/exception.h> |
51 | #include <panic.h> |
51 | #include <panic.h> |
52 | #include <arch/asm.h> |
52 | #include <arch/asm.h> |
53 | 53 | ||
- | 54 | #ifdef CONFIG_TSB |
|
- | 55 | #include <arch/mm/tsb.h> |
|
- | 56 | #endif |
|
- | 57 | ||
54 | static void dtlb_pte_copy(pte_t *t, bool ro); |
58 | static void dtlb_pte_copy(pte_t *t, bool ro); |
55 | static void itlb_pte_copy(pte_t *t); |
59 | static void itlb_pte_copy(pte_t *t); |
56 | static void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, const char *str); |
60 | static void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, const char *str); |
57 | static void do_fast_data_access_mmu_miss_fault(istate_t *istate, tlb_tag_access_reg_t tag, const char *str); |
61 | static void do_fast_data_access_mmu_miss_fault(istate_t *istate, tlb_tag_access_reg_t tag, const char *str); |
58 | static void do_fast_data_access_protection_fault(istate_t *istate, tlb_tag_access_reg_t tag, const char *str); |
62 | static void do_fast_data_access_protection_fault(istate_t *istate, tlb_tag_access_reg_t tag, const char *str); |
Line 142... | Line 146... | ||
142 | data.g = t->g; |
146 | data.g = t->g; |
143 | 147 | ||
144 | dtlb_data_in_write(data.value); |
148 | dtlb_data_in_write(data.value); |
145 | } |
149 | } |
146 | 150 | ||
- | 151 | /** Copy PTE to ITLB. |
|
- | 152 | * |
|
- | 153 | * @param t Page Table Entry to be copied. |
|
- | 154 | */ |
|
147 | void itlb_pte_copy(pte_t *t) |
155 | void itlb_pte_copy(pte_t *t) |
148 | { |
156 | { |
149 | tlb_tag_access_reg_t tag; |
157 | tlb_tag_access_reg_t tag; |
150 | tlb_data_t data; |
158 | tlb_data_t data; |
151 | page_address_t pg; |
159 | page_address_t pg; |
Line 187... | Line 195... | ||
187 | * The mapping was found in the software page hash table. |
195 | * The mapping was found in the software page hash table. |
188 | * Insert it into ITLB. |
196 | * Insert it into ITLB. |
189 | */ |
197 | */ |
190 | t->a = true; |
198 | t->a = true; |
191 | itlb_pte_copy(t); |
199 | itlb_pte_copy(t); |
- | 200 | #ifdef CONFIG_TSB |
|
- | 201 | itsb_pte_copy(t); |
|
- | 202 | #endif |
|
192 | page_table_unlock(AS, true); |
203 | page_table_unlock(AS, true); |
193 | } else { |
204 | } else { |
194 | /* |
205 | /* |
195 | * Forward the page fault to the address space page fault handler. |
206 | * Forward the page fault to the address space page fault handler. |
196 | */ |
207 | */ |
Line 231... | Line 242... | ||
231 | * The mapping was found in the software page hash table. |
242 | * The mapping was found in the software page hash table. |
232 | * Insert it into DTLB. |
243 | * Insert it into DTLB. |
233 | */ |
244 | */ |
234 | t->a = true; |
245 | t->a = true; |
235 | dtlb_pte_copy(t, true); |
246 | dtlb_pte_copy(t, true); |
- | 247 | #ifdef CONFIG_TSB |
|
- | 248 | dtsb_pte_copy(t, true); |
|
- | 249 | #endif |
|
236 | page_table_unlock(AS, true); |
250 | page_table_unlock(AS, true); |
237 | } else { |
251 | } else { |
238 | /* |
252 | /* |
239 | * Forward the page fault to the address space page fault handler. |
253 | * Forward the page fault to the address space page fault handler. |
240 | */ |
254 | */ |
Line 264... | Line 278... | ||
264 | */ |
278 | */ |
265 | t->a = true; |
279 | t->a = true; |
266 | t->d = true; |
280 | t->d = true; |
267 | dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY, va); |
281 | dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY, va); |
268 | dtlb_pte_copy(t, false); |
282 | dtlb_pte_copy(t, false); |
- | 283 | #ifdef CONFIG_TSB |
|
- | 284 | dtsb_pte_copy(t, false); |
|
- | 285 | #endif |
|
269 | page_table_unlock(AS, true); |
286 | page_table_unlock(AS, true); |
270 | } else { |
287 | } else { |
271 | /* |
288 | /* |
272 | * Forward the page fault to the address space page fault handler. |
289 | * Forward the page fault to the address space page fault handler. |
273 | */ |
290 | */ |