Ignore:
Timestamp:
2010-11-26T20:08:10Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45df59a
Parents:
fb150d78 (diff), ffdd2b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/mm/page_fault.c

    rfb150d78 r46c20c8  
    141141        if (instr.condition == 0xf) {
    142142                panic("page_fault - instruction does not access memory "
    143                     "(instr_code: %x, badvaddr:%x).", instr, badvaddr);
     143                    "(instr_code: %#0" PRIx32 ", badvaddr:%p).",
     144                    instr_union.pc, (void *) badvaddr);
    144145                return PF_ACCESS_EXEC;
    145146        }
     
    160161
    161162        panic("page_fault - instruction doesn't access memory "
    162             "(instr_code: %x, badvaddr:%x).", instr, badvaddr);
     163            "(instr_code: %#0" PRIx32 ", badvaddr:%p).",
     164            instr_union.pc, (void *) badvaddr);
    163165
    164166        return PF_ACCESS_EXEC;
     
    167169/** Handles "data abort" exception (load or store at invalid address).
    168170 *
    169  * @param exc_no        Exception number.
    170  * @param istate        CPU state when exception occured.
    171  */
    172 void data_abort(int exc_no, istate_t *istate)
     171 * @param exc_no Exception number.
     172 * @param istate CPU state when exception occured.
     173 *
     174 */
     175void data_abort(unsigned int exc_no, istate_t *istate)
    173176{
    174177        fault_status_t fsr __attribute__ ((unused)) =
     
    182185        if (ret == AS_PF_FAULT) {
    183186                fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr);
    184                 print_istate(istate);
    185                 printf("page fault - pc: %x, va: %x, status: %x(%x), "
    186                     "access:%d\n", istate->pc, badvaddr, fsr.status, fsr,
    187                     access);
    188                
    189                 panic("Page fault.");
     187                panic_memtrap(istate, access, badvaddr, NULL);
    190188        }
    191189}
     
    193191/** Handles "prefetch abort" exception (instruction couldn't be executed).
    194192 *
    195  * @param exc_no        Exception number.
    196  * @param istate        CPU state when exception occured.
    197  */
    198 void prefetch_abort(int exc_no, istate_t *istate)
     193 * @param exc_no Exception number.
     194 * @param istate CPU state when exception occured.
     195 *
     196 */
     197void prefetch_abort(unsigned int exc_no, istate_t *istate)
    199198{
    200199        int ret = as_page_fault(istate->pc, PF_ACCESS_EXEC, istate);
    201200
    202201        if (ret == AS_PF_FAULT) {
    203                 printf("prefetch_abort\n");
    204                 print_istate(istate);
    205                 panic("page fault - prefetch_abort at address: %x.",
    206                     istate->pc);
     202                fault_if_from_uspace(istate,
     203                    "Page fault - prefetch_abort: %#x.", istate->pc);
     204                panic_memtrap(istate, PF_ACCESS_EXEC, istate->pc, NULL);
    207205        }
    208206}
Note: See TracChangeset for help on using the changeset viewer.