Ignore:
File:
1 edited

Legend:

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

    r646b996 r7e752b2  
    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>
     
    4243#include <print.h>
    4344#include <syscall/syscall.h>
    44 
    45 #ifdef MACHINE_testarm
    46         #include <arch/mach/testarm/testarm.h>
    47 #endif
    48 
    49 #ifdef MACHINE_integratorcp
    50         #include <arch/mach/integratorcp/integratorcp.h>
    51 #endif
     45#include <stacktrace.h>
    5246
    5347/** Offset used in calculation of exception handler's relative address.
     
    9084 *
    9185 * Dispatches the syscall.
     86 *
    9287 */
    93 static void swi_exception(int exc_no, istate_t *istate)
     88static void swi_exception(unsigned int exc_no, istate_t *istate)
    9489{
    9590        istate->r0 = syscall_handler(istate->r0, istate->r1, istate->r2,
     
    147142 * Determines the sources of interrupt and calls their handlers.
    148143 */
    149 static void irq_exception(int exc_no, istate_t *istate)
     144static void irq_exception(unsigned int exc_no, istate_t *istate)
    150145{
    151146        machine_irq_exception(exc_no, istate);
     
    164159        install_exception_handlers();
    165160       
    166         exc_register(EXC_IRQ, "interrupt", (iroutine) irq_exception);
    167         exc_register(EXC_PREFETCH_ABORT, "prefetch abort",
    168             (iroutine) prefetch_abort);
    169         exc_register(EXC_DATA_ABORT, "data abort", (iroutine) data_abort);
    170         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);
    171169}
    172170
     
    175173 * @param istate Structure to be printed.
    176174 */
    177 void print_istate(istate_t *istate)
     175void istate_decode(istate_t *istate)
    178176{
    179         printf("istate dump:\n");
    180        
    181         printf(" r0: %x    r1: %x    r2: %x    r3: %x\n",
     177        printf("r0 =%#0" PRIx32 "\tr1 =%#0" PRIx32 "\t"
     178            "r2 =%#0" PRIx32 "\tr3 =%#0" PRIx32 "\n",
    182179            istate->r0, istate->r1, istate->r2, istate->r3);
    183         printf(" r4: %x    r5: %x    r6: %x    r7: %x\n",
     180        printf("r4 =%#" PRIx32 "\tr5 =%#0" PRIx32 "\t"
     181            "r6 =%#0" PRIx32 "\tr7 =%#0" PRIx32 "\n",
    184182            istate->r4, istate->r5, istate->r6, istate->r7);
    185         printf(" r8: %x    r8: %x   r10: %x   r11: %x\n",
    186             istate->r8, istate->r9, istate->r10, istate->r11);
    187         printf(" r12: %x    sp: %x    lr: %x  spsr: %x\n",
    188             istate->r12, istate->sp, istate->lr, istate->spsr);
    189        
    190         printf(" pc: %x\n", istate->pc);
     183        printf("r8 =%#0" PRIx32 "\tr9 =%#0" PRIx32 "\t"
     184            "r10=%#0" PRIx32 "\tfp =%p\n",
     185            istate->r8, istate->r9, istate->r10,
     186            (void *) istate->fp);
     187        printf("r12=%#0" PRIx32 "\tsp =%p\tlr =%p\tspsr=%p\n",
     188            istate->r12, (void *) istate->sp,
     189            (void *) istate->lr, (void *) istate->spsr);
    191190}
    192191
Note: See TracChangeset for help on using the changeset viewer.