Rev 3830 | Rev 3836 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3830 | Rev 3833 | ||
---|---|---|---|
Line 109... | Line 109... | ||
109 | static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate) |
109 | static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate) |
110 | { |
110 | { |
111 | char *symbol = ""; |
111 | char *symbol = ""; |
112 | char *sym2 = ""; |
112 | char *sym2 = ""; |
113 | 113 | ||
114 | char *s = get_symtab_entry(istate->pc); |
114 | char *str = get_symtab_entry(istate->pc); |
115 | if (s) |
115 | if (str) |
116 | symbol = s; |
116 | symbol = str; |
117 | s = get_symtab_entry(istate->lr); |
117 | str = get_symtab_entry(istate->lr); |
118 | if (s) |
118 | if (str) |
119 | sym2 = s; |
119 | sym2 = str; |
120 | 120 | ||
121 | fault_if_from_uspace(istate, |
121 | fault_if_from_uspace(istate, |
122 | "%p: PHT Refill Exception at %p (%s<-%s).", badvaddr, |
122 | "PHT Refill Exception on %p.", badvaddr); |
123 | istate->pc, symbol, sym2); |
- | |
124 | panic("%p: PHT Refill Exception at %p (%s<-%s).", badvaddr, |
123 | panic("%p: PHT Refill Exception at %p (%s<-%s).", badvaddr, |
125 | istate->pc, symbol, sym2); |
124 | istate->pc, symbol, sym2); |
126 | } |
125 | } |
127 | 126 | ||
128 | 127 | ||
Line 289... | Line 288... | ||
289 | } else { |
288 | } else { |
290 | as = AS; |
289 | as = AS; |
291 | lock = true; |
290 | lock = true; |
292 | } |
291 | } |
293 | 292 | ||
294 | if (n == VECTOR_DATA_STORAGE) { |
293 | if (n == VECTOR_DATA_STORAGE) |
295 | asm volatile ( |
- | |
296 | "mfdar %0\n" |
- | |
297 | : "=r" (badvaddr) |
294 | badvaddr = istate->dar; |
298 | ); |
- | |
299 | } else |
295 | else |
300 | badvaddr = istate->pc; |
296 | badvaddr = istate->pc; |
301 | 297 | ||
302 | page_table_lock(as, lock); |
298 | page_table_lock(as, lock); |
303 | 299 | ||
304 | pte = find_mapping_and_check(as, lock, badvaddr, |
300 | pte = find_mapping_and_check(as, lock, badvaddr, |
Line 340... | Line 336... | ||
340 | */ |
336 | */ |
341 | bool pht_real_refill(int n, istate_t *istate) |
337 | bool pht_real_refill(int n, istate_t *istate) |
342 | { |
338 | { |
343 | uintptr_t badvaddr; |
339 | uintptr_t badvaddr; |
344 | 340 | ||
345 | if (n == VECTOR_DATA_STORAGE) { |
341 | if (n == VECTOR_DATA_STORAGE) |
346 | asm volatile ( |
- | |
347 | "mfdar %0\n" |
- | |
348 | : "=r" (badvaddr) |
342 | badvaddr = istate->dar; |
349 | ); |
- | |
350 | } else |
343 | else |
351 | badvaddr = istate->pc; |
344 | badvaddr = istate->pc; |
352 | 345 | ||
353 | uint32_t physmem; |
346 | uint32_t physmem; |
354 | asm volatile ( |
347 | asm volatile ( |
355 | "mfsprg3 %0\n" |
348 | "mfsprg3 %0\n" |