Changeset e3038b4 in mainline for kernel/arch/ppc32


Ignore:
Timestamp:
2010-06-28T22:45:51Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
49eb681
Parents:
05e3cb8 (diff), e4a4b44 (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 unified panic architecture (Phase 1).

Note that this is still work in progress as there are the following sharp edges:

  • imprecise detection of read/write accesses on some architectures
  • missing or imperfect capability to print stack traces on some architectures
  • istate_t on some architectures may contain too little valuable information
  • basically all trap frames need to be reorganized to look like a normal stack frame on the stack trace so that there are no missing frames
  • panic_common() could print more information about the current context such as the task name, thread name, ASID etc.
  • functions that call panic_*() should be protected against inlining to avoid missing or confusing stack frames in the stack trace
Location:
kernel/arch/ppc32
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/Makefile.inc

    r05e3cb8 re3038b4  
    4040ARCH_SOURCES = \
    4141        arch/$(KARCH)/src/context.S \
    42         arch/$(KARCH)/src/debug/panic.s \
    4342        arch/$(KARCH)/src/debug/stacktrace.c \
    4443        arch/$(KARCH)/src/debug/stacktrace_asm.S \
  • kernel/arch/ppc32/include/types.h

    r05e3cb8 re3038b4  
    5050} fncptr_t;
    5151
    52 /**< Formats for uintptr_t, size_t */
     52/** Formats for uintptr_t, size_t */
    5353#define PRIp  "x"
    5454#define PRIs  "u"
    5555
    56 /**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */
     56/** Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */
    5757#define PRId8   "d"
    5858#define PRId16  "d"
  • kernel/arch/ppc32/src/interrupt.c

    r05e3cb8 re3038b4  
    5050                :: [dec] "r" (1000)
    5151        );
     52}
     53
     54void istate_decode(istate_t *istate)
     55{
     56        printf("r0 =%p\tr1 =%p\tr2 =%p\n", istate->r0, istate->sp, istate->r2);
     57        printf("r3 =%p\tr4 =%p\tr5 =%p\n", istate->r3, istate->r4, istate->r5);
     58        printf("r6 =%p\tr7 =%p\tr8 =%p\n", istate->r6, istate->r7, istate->r8);
     59        printf("r9 =%p\tr10=%p\tr11=%p\n",
     60            istate->r9, istate->r10, istate->r11);
     61        printf("r12=%p\tr13=%p\tr14=%p\n",
     62            istate->r12, istate->r13, istate->r14);
     63        printf("r15=%p\tr16=%p\tr17=%p\n",
     64            istate->r15, istate->r16, istate->r17);
     65        printf("r18=%p\tr19=%p\tr20=%p\n",
     66            istate->r18, istate->r19, istate->r20);
     67        printf("r21=%p\tr22=%p\tr23=%p\n",
     68            istate->r21, istate->r22, istate->r23);
     69        printf("r24=%p\tr25=%p\tr26=%p\n",
     70            istate->r24, istate->r25, istate->r26);
     71        printf("r27=%p\tr28=%p\tr29=%p\n",
     72            istate->r27, istate->r28, istate->r29);
     73        printf("r30=%p\tr31=%p\n", istate->r30, istate->r31);
     74        printf("cr =%p\tpc =%p\tlr =%p\n", istate->cr, istate->pc, istate->lr);
     75        printf("ctr=%p\txer=%p\tdar=%p\n",
     76            istate->ctr, istate->xer, istate->dar);
     77        printf("srr1=%p\n", istate->srr1);
    5278}
    5379
  • kernel/arch/ppc32/src/mm/tlb.c

    r05e3cb8 re3038b4  
    111111static void pht_refill_fail(uintptr_t badvaddr, istate_t *istate)
    112112{
    113         const char *symbol = symtab_fmt_name_lookup(istate->pc);
    114         const char *sym2 = symtab_fmt_name_lookup(istate->lr);
    115        
    116         fault_if_from_uspace(istate,
    117             "PHT Refill Exception on %p.", badvaddr);
    118         panic("%p: PHT Refill Exception at %p (%s<-%s).", badvaddr,
    119             istate->pc, symbol, sym2);
     113        fault_if_from_uspace(istate, "PHT Refill Exception on %p.", badvaddr);
     114        panic_memtrap(istate, PF_ACCESS_READ, badvaddr,
     115            "PHT Refill Exception.");
    120116}
    121117
Note: See TracChangeset for help on using the changeset viewer.