Changeset b2fa1204 in mainline for kernel/arch/mips32/src


Ignore:
Timestamp:
2014-01-05T21:12:26Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ca05e9b
Parents:
bd6ff94
Message:

Cherrypick usage of kernel logger

Location:
kernel/arch/mips32/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/debugger.c

    rbd6ff94 rb2fa1204  
    3939#include <console/cmd.h>
    4040#include <print.h>
     41#include <log.h>
    4142#include <panic.h>
    4243#include <arch.h>
     
    294295        cmd_initialize(&bkpts_info);
    295296        if (!cmd_register(&bkpts_info))
    296                 printf("Cannot register command %s\n", bkpts_info.name);
     297                log(LF_OTHER, LVL_WARN, "Cannot register command %s",
     298                    bkpts_info.name);
    297299       
    298300        cmd_initialize(&delbkpt_info);
    299301        if (!cmd_register(&delbkpt_info))
    300                 printf("Cannot register command %s\n", delbkpt_info.name);
     302                log(LF_OTHER, LVL_WARN, "Cannot register command %s",
     303                    delbkpt_info.name);
    301304       
    302305        cmd_initialize(&addbkpt_info);
    303306        if (!cmd_register(&addbkpt_info))
    304                 printf("Cannot register command %s\n", addbkpt_info.name);
     307                log(LF_OTHER, LVL_WARN, "Cannot register command %s",
     308                    addbkpt_info.name);
    305309       
    306310        cmd_initialize(&addbkpte_info);
    307311        if (!cmd_register(&addbkpte_info))
    308                 printf("Cannot register command %s\n", addbkpte_info.name);
     312                log(LF_OTHER, LVL_WARN, "Cannot register command %s",
     313                    addbkpte_info.name);
    309314#endif /* CONFIG_KCONSOLE */
    310315}
  • kernel/arch/mips32/src/exception.c

    rbd6ff94 rb2fa1204  
    4848#include <arch/debugger.h>
    4949#include <symtab.h>
     50#include <log.h>
    5051
    5152static const char *exctable[] = {
     
    7475void istate_decode(istate_t *istate)
    7576{
    76         printf("epc=%#010" PRIx32 "\tsta=%#010" PRIx32 "\t"
     77        log_printf("epc=%#010" PRIx32 "\tsta=%#010" PRIx32 "\t"
    7778            "lo =%#010" PRIx32 "\thi =%#010" PRIx32 "\n",
    7879            istate->epc, istate->status, istate->lo, istate->hi);
    7980       
    80         printf("a0 =%#010" PRIx32 "\ta1 =%#010" PRIx32 "\t"
     81        log_printf("a0 =%#010" PRIx32 "\ta1 =%#010" PRIx32 "\t"
    8182            "a2 =%#010" PRIx32 "\ta3 =%#010" PRIx32 "\n",
    8283            istate->a0, istate->a1, istate->a2, istate->a3);
    8384       
    84         printf("t0 =%#010" PRIx32 "\tt1 =%#010" PRIx32 "\t"
     85        log_printf("t0 =%#010" PRIx32 "\tt1 =%#010" PRIx32 "\t"
    8586            "t2 =%#010" PRIx32 "\tt3 =%#010" PRIx32 "\n",
    8687            istate->t0, istate->t1, istate->t2, istate->t3);
    8788       
    88         printf("t4 =%#010" PRIx32 "\tt5 =%#010" PRIx32 "\t"
     89        log_printf("t4 =%#010" PRIx32 "\tt5 =%#010" PRIx32 "\t"
    8990            "t6 =%#010" PRIx32 "\tt7 =%#010" PRIx32 "\n",
    9091            istate->t4, istate->t5, istate->t6, istate->t7);
    9192       
    92         printf("t8 =%#010" PRIx32 "\tt9 =%#010" PRIx32 "\t"
     93        log_printf("t8 =%#010" PRIx32 "\tt9 =%#010" PRIx32 "\t"
    9394            "v0 =%#010" PRIx32 "\tv1 =%#010" PRIx32 "\n",
    9495            istate->t8, istate->t9, istate->v0, istate->v1);
    9596       
    96         printf("s0 =%#010" PRIx32 "\ts1 =%#010" PRIx32 "\t"
     97        log_printf("s0 =%#010" PRIx32 "\ts1 =%#010" PRIx32 "\t"
    9798            "s2 =%#010" PRIx32 "\ts3 =%#010" PRIx32 "\n",
    9899            istate->s0, istate->s1, istate->s2, istate->s3);
    99100       
    100         printf("s4 =%#010" PRIx32 "\ts5 =%#010" PRIx32 "\t"
     101        log_printf("s4 =%#010" PRIx32 "\ts5 =%#010" PRIx32 "\t"
    101102            "s6 =%#010" PRIx32 "\ts7 =%#010" PRIx32 "\n",
    102103            istate->s4, istate->s5, istate->s6, istate->s7);
    103104       
    104         printf("s8 =%#010" PRIx32 "\tat =%#010" PRIx32 "\t"
     105        log_printf("s8 =%#010" PRIx32 "\tat =%#010" PRIx32 "\t"
    105106            "kt0=%#010" PRIx32 "\tkt1=%#010" PRIx32 "\n",
    106107            istate->s8, istate->at, istate->kt0, istate->kt1);
    107108       
    108         printf("sp =%#010" PRIx32 "\tra =%#010" PRIx32 "\t"
     109        log_printf("sp =%#010" PRIx32 "\tra =%#010" PRIx32 "\t"
    109110            "gp =%#010" PRIx32 "\n",
    110111            istate->sp, istate->ra, istate->gp);
     
    194195                                 */
    195196#ifdef CONFIG_DEBUG
    196                                 printf("cpu%u: spurious interrupt (inum=%u)\n",
     197                                log(LF_ARCH, LVL_DEBUG,
     198                                    "cpu%u: spurious interrupt (inum=%u)",
    197199                                    CPU->id, i);
    198200#endif
  • kernel/arch/mips32/src/mm/tlb.c

    rbd6ff94 rb2fa1204  
    4343#include <synch/mutex.h>
    4444#include <print.h>
     45#include <log.h>
    4546#include <debug.h>
    4647#include <align.h>
     
    217218         */
    218219        if (index.p) {
    219                 printf("%s: TLBP failed in exception handler (badvaddr=%#"
     220                log(LF_ARCH, LVL_WARN, "%s: TLBP failed in exception handler (badvaddr=%#"
    220221                    PRIxn ", ASID=%d).\n", __func__, badvaddr,
    221222                    AS ? AS->asid : -1);
Note: See TracChangeset for help on using the changeset viewer.