Ignore:
Timestamp:
2010-07-25T10:11:13Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
377cce8
Parents:
24a2517 (diff), a2da43c (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 with mainline.

File:
1 edited

Legend:

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

    r24a2517 rc621f4aa  
    167167/** Handles "data abort" exception (load or store at invalid address).
    168168 *
    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)
     169 * @param exc_no Exception number.
     170 * @param istate CPU state when exception occured.
     171 *
     172 */
     173void data_abort(unsigned int exc_no, istate_t *istate)
    173174{
    174175        fault_status_t fsr __attribute__ ((unused)) =
     
    182183        if (ret == AS_PF_FAULT) {
    183184                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.");
     185                panic_memtrap(istate, access, badvaddr, NULL);
    190186        }
    191187}
     
    193189/** Handles "prefetch abort" exception (instruction couldn't be executed).
    194190 *
    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)
     191 * @param exc_no Exception number.
     192 * @param istate CPU state when exception occured.
     193 *
     194 */
     195void prefetch_abort(unsigned int exc_no, istate_t *istate)
    199196{
    200197        int ret = as_page_fault(istate->pc, PF_ACCESS_EXEC, istate);
    201198
    202199        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);
     200                fault_if_from_uspace(istate,
     201                    "Page fault - prefetch_abort: %#x.", istate->pc);
     202                panic_memtrap(istate, PF_ACCESS_EXEC, istate->pc, NULL);
    207203        }
    208204}
Note: See TracChangeset for help on using the changeset viewer.