Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/exception.c

    r15817089 r22a28a69  
    3737#include <arch/memstr.h>
    3838#include <arch/regutils.h>
     39#include <arch/machine_func.h>
    3940#include <interrupt.h>
    4041#include <arch/mm/page_fault.h>
     
    4344#include <syscall/syscall.h>
    4445#include <stacktrace.h>
    45 
    46 #ifdef MACHINE_testarm
    47         #include <arch/mach/testarm/testarm.h>
    48 #endif
    49 
    50 #ifdef MACHINE_integratorcp
    51         #include <arch/mach/integratorcp/integratorcp.h>
    52 #endif
    5346
    5447/** Offset used in calculation of exception handler's relative address.
     
    9184 *
    9285 * Dispatches the syscall.
     86 *
    9387 */
    94 static void swi_exception(int exc_no, istate_t *istate)
     88static void swi_exception(unsigned int exc_no, istate_t *istate)
    9589{
    9690        istate->r0 = syscall_handler(istate->r0, istate->r1, istate->r2,
     
    148142 * Determines the sources of interrupt and calls their handlers.
    149143 */
    150 static void irq_exception(int exc_no, istate_t *istate)
     144static void irq_exception(unsigned int exc_no, istate_t *istate)
    151145{
    152146        machine_irq_exception(exc_no, istate);
     
    165159        install_exception_handlers();
    166160       
    167         exc_register(EXC_IRQ, "interrupt", (iroutine) irq_exception);
    168         exc_register(EXC_PREFETCH_ABORT, "prefetch abort",
    169             (iroutine) prefetch_abort);
    170         exc_register(EXC_DATA_ABORT, "data abort", (iroutine) data_abort);
    171         exc_register(EXC_SWI, "software interrupt", (iroutine) swi_exception);
     161        exc_register(EXC_IRQ, "interrupt", true,
     162            (iroutine_t) irq_exception);
     163        exc_register(EXC_PREFETCH_ABORT, "prefetch abort", true,
     164            (iroutine_t) prefetch_abort);
     165        exc_register(EXC_DATA_ABORT, "data abort", true,
     166            (iroutine_t) data_abort);
     167        exc_register(EXC_SWI, "software interrupt", true,
     168            (iroutine_t) swi_exception);
    172169}
    173170
     
    176173 * @param istate Structure to be printed.
    177174 */
    178 void print_istate(istate_t *istate)
     175void istate_decode(istate_t *istate)
    179176{
    180         printf("istate dump:\n");
    181        
    182         printf(" r0: %x    r1: %x    r2: %x    r3: %x\n",
     177        printf("r0 =%#0.8lx\tr1 =%#0.8lx\tr2 =%#0.8lx\tr3 =%#0.8lx\n",
    183178            istate->r0, istate->r1, istate->r2, istate->r3);
    184         printf(" r4: %x    r5: %x    r6: %x    r7: %x\n",
     179        printf("r4 =%#0.8lx\tr5 =%#0.8lx\tr6 =%#0.8lx\tr7 =%#0.8lx\n",
    185180            istate->r4, istate->r5, istate->r6, istate->r7);
    186         printf(" r8: %x    r8: %x   r10: %x    fp: %x\n",
     181        printf("r8 =%#0.8lx\tr9 =%#0.8lx\tr10=%#0.8lx\tfp =%#0.8lx\n",
    187182            istate->r8, istate->r9, istate->r10, istate->fp);
    188         printf(" r12: %x    sp: %x    lr: %x  spsr: %x\n",
     183        printf("r12=%#0.8lx\tsp =%#0.8lx\tlr =%#0.8lx\tspsr=%#0.8lx\n",
    189184            istate->r12, istate->sp, istate->lr, istate->spsr);
    190        
    191         printf(" pc: %x\n", istate->pc);
    192 
    193         stack_trace_istate(istate);
    194185}
    195186
Note: See TracChangeset for help on using the changeset viewer.