Rev 3618 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3618 | Rev 3742 | ||
---|---|---|---|
Line 52... | Line 52... | ||
52 | 52 | ||
53 | #ifdef CONFIG_TSB |
53 | #ifdef CONFIG_TSB |
54 | #include <arch/mm/tsb.h> |
54 | #include <arch/mm/tsb.h> |
55 | #endif |
55 | #endif |
56 | 56 | ||
57 | static void dtlb_pte_copy(pte_t *t, index_t index, bool ro); |
57 | static void dtlb_pte_copy(pte_t *, index_t, bool); |
58 | static void itlb_pte_copy(pte_t *t, index_t index); |
58 | static void itlb_pte_copy(pte_t *, index_t); |
59 | static void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, |
59 | static void do_fast_instruction_access_mmu_miss_fault(istate_t *, const char *); |
60 | const char *str); |
- | |
61 | static void do_fast_data_access_mmu_miss_fault(istate_t *istate, |
60 | static void do_fast_data_access_mmu_miss_fault(istate_t *, tlb_tag_access_reg_t, |
62 | tlb_tag_access_reg_t tag, const char *str); |
61 | const char *); |
63 | static void do_fast_data_access_protection_fault(istate_t *istate, |
62 | static void do_fast_data_access_protection_fault(istate_t *, |
64 | tlb_tag_access_reg_t tag, const char *str); |
63 | tlb_tag_access_reg_t, const char *); |
65 | 64 | ||
66 | char *context_encoding[] = { |
65 | char *context_encoding[] = { |
67 | "Primary", |
66 | "Primary", |
68 | "Secondary", |
67 | "Secondary", |
69 | "Nucleus", |
68 | "Nucleus", |
Line 126... | Line 125... | ||
126 | 125 | ||
127 | /** Copy PTE to TLB. |
126 | /** Copy PTE to TLB. |
128 | * |
127 | * |
129 | * @param t Page Table Entry to be copied. |
128 | * @param t Page Table Entry to be copied. |
130 | * @param index Zero if lower 8K-subpage, one if higher 8K-subpage. |
129 | * @param index Zero if lower 8K-subpage, one if higher 8K-subpage. |
131 | * @param ro If true, the entry will be created read-only, regardless of its |
130 | * @param ro If true, the entry will be created read-only, regardless |
132 | * w field. |
131 | * of its w field. |
133 | */ |
132 | */ |
134 | void dtlb_pte_copy(pte_t *t, index_t index, bool ro) |
133 | void dtlb_pte_copy(pte_t *t, index_t index, bool ro) |
135 | { |
134 | { |
136 | tlb_tag_access_reg_t tag; |
135 | tlb_tag_access_reg_t tag; |
137 | tlb_data_t data; |
136 | tlb_data_t data; |
Line 233... | Line 232... | ||
233 | /** DTLB miss handler. |
232 | /** DTLB miss handler. |
234 | * |
233 | * |
235 | * Note that some faults (e.g. kernel faults) were already resolved by the |
234 | * Note that some faults (e.g. kernel faults) were already resolved by the |
236 | * low-level, assembly language part of the fast_data_access_mmu_miss handler. |
235 | * low-level, assembly language part of the fast_data_access_mmu_miss handler. |
237 | * |
236 | * |
238 | * @param tag Content of the TLB Tag Access register as it existed when the |
237 | * @param tag Content of the TLB Tag Access register as it existed |
239 | * trap happened. This is to prevent confusion created by clobbered |
238 | * when the trap happened. This is to prevent confusion |
240 | * Tag Access register during a nested DTLB miss. |
239 | * created by clobbered Tag Access register during a nested |
- | 240 | * DTLB miss. |
|
241 | * @param istate Interrupted state saved on the stack. |
241 | * @param istate Interrupted state saved on the stack. |
242 | */ |
242 | */ |
243 | void fast_data_access_mmu_miss(tlb_tag_access_reg_t tag, istate_t *istate) |
243 | void fast_data_access_mmu_miss(tlb_tag_access_reg_t tag, istate_t *istate) |
244 | { |
244 | { |
245 | uintptr_t va; |
245 | uintptr_t va; |
Line 285... | Line 285... | ||
285 | } |
285 | } |
286 | } |
286 | } |
287 | 287 | ||
288 | /** DTLB protection fault handler. |
288 | /** DTLB protection fault handler. |
289 | * |
289 | * |
290 | * @param tag Content of the TLB Tag Access register as it existed when the |
290 | * @param tag Content of the TLB Tag Access register as it existed |
291 | * trap happened. This is to prevent confusion created by clobbered |
291 | * when the trap happened. This is to prevent confusion |
292 | * Tag Access register during a nested DTLB miss. |
292 | * created by clobbered Tag Access register during a nested |
- | 293 | * DTLB miss. |
|
293 | * @param istate Interrupted state saved on the stack. |
294 | * @param istate Interrupted state saved on the stack. |
294 | */ |
295 | */ |
295 | void fast_data_access_protection(tlb_tag_access_reg_t tag, istate_t *istate) |
296 | void fast_data_access_protection(tlb_tag_access_reg_t tag, istate_t *istate) |
296 | { |
297 | { |
297 | uintptr_t va; |
298 | uintptr_t va; |
Line 483... | Line 484... | ||
483 | } |
484 | } |
484 | 485 | ||
485 | #if defined (US3) |
486 | #if defined (US3) |
486 | /** Invalidates given TLB entry if and only if it is non-locked or global. |
487 | /** Invalidates given TLB entry if and only if it is non-locked or global. |
487 | * |
488 | * |
488 | * @param tlb |
- | |
489 | * TLB number (one of TLB_DSMALL, TLB_DBIG_0, TLB_DBIG_1, |
489 | * @param tlb TLB number (one of TLB_DSMALL, TLB_DBIG_0, TLB_DBIG_1, |
490 | * TLB_ISMALL, TLB_IBIG) |
490 | * TLB_ISMALL, TLB_IBIG). |
491 | * @param entry entry index within the given TLB |
491 | * @param entry Entry index within the given TLB. |
492 | */ |
492 | */ |
493 | static void tlb_invalidate_entry(int tlb, index_t entry) |
493 | static void tlb_invalidate_entry(int tlb, index_t entry) |
494 | { |
494 | { |
495 | tlb_data_t d; |
495 | tlb_data_t d; |
496 | tlb_tag_read_reg_t t; |
496 | tlb_tag_read_reg_t t; |