Rev 877 | Rev 894 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 877 | Rev 883 | ||
|---|---|---|---|
| Line 38... | Line 38... | ||
| 38 | #include <config.h> |
38 | #include <config.h> |
| 39 | #include <arch/trap/trap.h> |
39 | #include <arch/trap/trap.h> |
| 40 | #include <panic.h> |
40 | #include <panic.h> |
| 41 | #include <arch/asm.h> |
41 | #include <arch/asm.h> |
| 42 | #include <symtab.h> |
42 | #include <symtab.h> |
| - | 43 | #include <arch/drivers/fb.h> |
|
| 43 | 44 | ||
| 44 | char *context_encoding[] = { |
45 | char *context_encoding[] = { |
| 45 | "Primary", |
46 | "Primary", |
| 46 | "Secondary", |
47 | "Secondary", |
| 47 | "Nucleus", |
48 | "Nucleus", |
| Line 108... | Line 109... | ||
| 108 | immu_enable(); |
109 | immu_enable(); |
| 109 | 110 | ||
| 110 | /* |
111 | /* |
| 111 | * Quick hack: map frame buffer |
112 | * Quick hack: map frame buffer |
| 112 | */ |
113 | */ |
| 113 | fr.address = 0x1C901000000ULL; |
114 | fr.address = FB_PHYS_ADDRESS; |
| 114 | pg.address = 0xc0000000; |
115 | pg.address = FB_VIRT_ADDRESS; |
| 115 | 116 | ||
| 116 | tag.value = ASID_KERNEL; |
117 | tag.value = ASID_KERNEL; |
| 117 | tag.vpn = pg.vpn; |
118 | tag.vpn = pg.vpn; |
| 118 | 119 | ||
| 119 | dtlb_tag_access_write(tag.value); |
120 | dtlb_tag_access_write(tag.value); |
| Line 128... | Line 129... | ||
| 128 | data.p = true; |
129 | data.p = true; |
| 129 | data.w = true; |
130 | data.w = true; |
| 130 | data.g = true; |
131 | data.g = true; |
| 131 | 132 | ||
| 132 | dtlb_data_in_write(data.value); |
133 | dtlb_data_in_write(data.value); |
| 133 | - | ||
| 134 | } |
134 | } |
| 135 | 135 | ||
| 136 | /** ITLB miss handler. */ |
136 | /** ITLB miss handler. */ |
| 137 | void fast_instruction_access_mmu_miss(void) |
137 | void fast_instruction_access_mmu_miss(void) |
| 138 | { |
138 | { |
| Line 144... | Line 144... | ||
| 144 | { |
144 | { |
| 145 | tlb_tag_access_reg_t tag; |
145 | tlb_tag_access_reg_t tag; |
| 146 | tlb_data_t data; |
146 | tlb_data_t data; |
| 147 | __address tpc; |
147 | __address tpc; |
| 148 | char *tpc_str; |
148 | char *tpc_str; |
| 149 | 149 | ||
| 150 | tag.value = dtlb_tag_access_read(); |
150 | tag.value = dtlb_tag_access_read(); |
| 151 | if (tag.context != ASID_KERNEL || tag.vpn == 0) { |
151 | if (tag.context != ASID_KERNEL || tag.vpn == 0) { |
| 152 | tpc = tpc_read(); |
152 | tpc = tpc_read(); |
| 153 | tpc_str = get_symtab_entry(tpc); |
153 | tpc_str = get_symtab_entry(tpc); |
| 154 | 154 | ||