Changeset 8b863a62 in mainline for kernel/arch/mips32/src


Ignore:
Timestamp:
2014-04-16T17:14:06Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f857e8b
Parents:
dba3e2c (diff), 70b570c (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 mainline changes

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

Legend:

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

    rdba3e2c r8b863a62  
    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

    rdba3e2c r8b863a62  
    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/mach/malta/malta.c

    rdba3e2c r8b863a62  
    9292static outdev_operations_t yamon_outdev_ops = {
    9393        .write = yamon_putchar,
    94         .redraw = NULL
     94        .redraw = NULL,
     95        .scroll_up = NULL,
     96        .scroll_down = NULL
    9597};
    9698
     
    103105void malta_input_init(void)
    104106{
     107        (void) stdin_wire();
    105108}
    106109
  • kernel/arch/mips32/src/mm/tlb.c

    rdba3e2c r8b863a62  
    4343#include <synch/mutex.h>
    4444#include <print.h>
     45#include <log.h>
    4546#include <debug.h>
    4647#include <align.h>
     
    4849#include <symtab.h>
    4950
    50 #define PFN_SHIFT       12
    51 #define VPN_SHIFT       12
    52 #define ADDR2VPN(a)     ((a) >> VPN_SHIFT)
    53 #define ADDR2VPN2(a)    (ADDR2VPN((a)) >> 1)
    54 #define VPN2ADDR(vpn)   ((vpn) << VPN_SHIFT)
    55 #define VPN22ADDR(vpn2) (VPN2ADDR(vpn2) << 1)
    56 #define PFN2ADDR(pfn)   ((pfn) << PFN_SHIFT)
    57 
    58 #define BANK_SELECT_BIT(a)      (((a) >> PAGE_WIDTH) & 1)
    59        
     51#define PFN_SHIFT  12
     52#define VPN_SHIFT  12
     53
     54#define ADDR2HI_VPN(a)   ((a) >> VPN_SHIFT)
     55#define ADDR2HI_VPN2(a)  (ADDR2HI_VPN((a)) >> 1)
     56
     57#define HI_VPN2ADDR(vpn)    ((vpn) << VPN_SHIFT)
     58#define HI_VPN22ADDR(vpn2)  (HI_VPN2ADDR(vpn2) << 1)
     59
     60#define LO_PFN2ADDR(pfn)  ((pfn) << PFN_SHIFT)
     61
     62#define BANK_SELECT_BIT(a)  (((a) >> PAGE_WIDTH) & 1)
    6063
    6164/** Initialize TLB.
     
    215218         */
    216219        if (index.p) {
    217                 printf("%s: TLBP failed in exception handler (badvaddr=%#"
     220                log(LF_ARCH, LVL_WARN, "%s: TLBP failed in exception handler (badvaddr=%#"
    218221                    PRIxn ", ASID=%d).\n", __func__, badvaddr,
    219222                    AS ? AS->asid : -1);
     
    266269{
    267270        hi->value = 0;
    268         hi->vpn2 = ADDR2VPN2(ALIGN_DOWN(addr, PAGE_SIZE));
     271        hi->vpn2 = ADDR2HI_VPN2(ALIGN_DOWN(addr, PAGE_SIZE));
    269272        hi->asid = asid;
    270273}
     
    295298               
    296299                printf("%-4u %-6u %0#10x %-#6x  %1u%1u%1u%1u  %0#10x\n",
    297                     i, hi.asid, VPN22ADDR(hi.vpn2), mask.mask,
    298                     lo0.g, lo0.v, lo0.d, lo0.c, PFN2ADDR(lo0.pfn));
     300                    i, hi.asid, HI_VPN22ADDR(hi.vpn2), mask.mask,
     301                    lo0.g, lo0.v, lo0.d, lo0.c, LO_PFN2ADDR(lo0.pfn));
    299302                printf("                               %1u%1u%1u%1u  %0#10x\n",
    300                     lo1.g, lo1.v, lo1.d, lo1.c, PFN2ADDR(lo1.pfn));
     303                    lo1.g, lo1.v, lo1.d, lo1.c, LO_PFN2ADDR(lo1.pfn));
    301304        }
    302305       
Note: See TracChangeset for help on using the changeset viewer.