Changeset 8b863a62 in mainline for kernel/arch/mips32/src
- Timestamp:
- 2014-04-16T17:14:06Z (12 years ago)
- 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. - Location:
- kernel/arch/mips32/src
- Files:
-
- 4 edited
-
debugger.c (modified) (2 diffs)
-
exception.c (modified) (3 diffs)
-
mach/malta/malta.c (modified) (2 diffs)
-
mm/tlb.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/debugger.c
rdba3e2c r8b863a62 39 39 #include <console/cmd.h> 40 40 #include <print.h> 41 #include <log.h> 41 42 #include <panic.h> 42 43 #include <arch.h> … … 294 295 cmd_initialize(&bkpts_info); 295 296 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); 297 299 298 300 cmd_initialize(&delbkpt_info); 299 301 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); 301 304 302 305 cmd_initialize(&addbkpt_info); 303 306 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); 305 309 306 310 cmd_initialize(&addbkpte_info); 307 311 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); 309 314 #endif /* CONFIG_KCONSOLE */ 310 315 } -
kernel/arch/mips32/src/exception.c
rdba3e2c r8b863a62 48 48 #include <arch/debugger.h> 49 49 #include <symtab.h> 50 #include <log.h> 50 51 51 52 static const char *exctable[] = { … … 74 75 void istate_decode(istate_t *istate) 75 76 { 76 printf("epc=%#010" PRIx32 "\tsta=%#010" PRIx32 "\t"77 log_printf("epc=%#010" PRIx32 "\tsta=%#010" PRIx32 "\t" 77 78 "lo =%#010" PRIx32 "\thi =%#010" PRIx32 "\n", 78 79 istate->epc, istate->status, istate->lo, istate->hi); 79 80 80 printf("a0 =%#010" PRIx32 "\ta1 =%#010" PRIx32 "\t"81 log_printf("a0 =%#010" PRIx32 "\ta1 =%#010" PRIx32 "\t" 81 82 "a2 =%#010" PRIx32 "\ta3 =%#010" PRIx32 "\n", 82 83 istate->a0, istate->a1, istate->a2, istate->a3); 83 84 84 printf("t0 =%#010" PRIx32 "\tt1 =%#010" PRIx32 "\t"85 log_printf("t0 =%#010" PRIx32 "\tt1 =%#010" PRIx32 "\t" 85 86 "t2 =%#010" PRIx32 "\tt3 =%#010" PRIx32 "\n", 86 87 istate->t0, istate->t1, istate->t2, istate->t3); 87 88 88 printf("t4 =%#010" PRIx32 "\tt5 =%#010" PRIx32 "\t"89 log_printf("t4 =%#010" PRIx32 "\tt5 =%#010" PRIx32 "\t" 89 90 "t6 =%#010" PRIx32 "\tt7 =%#010" PRIx32 "\n", 90 91 istate->t4, istate->t5, istate->t6, istate->t7); 91 92 92 printf("t8 =%#010" PRIx32 "\tt9 =%#010" PRIx32 "\t"93 log_printf("t8 =%#010" PRIx32 "\tt9 =%#010" PRIx32 "\t" 93 94 "v0 =%#010" PRIx32 "\tv1 =%#010" PRIx32 "\n", 94 95 istate->t8, istate->t9, istate->v0, istate->v1); 95 96 96 printf("s0 =%#010" PRIx32 "\ts1 =%#010" PRIx32 "\t"97 log_printf("s0 =%#010" PRIx32 "\ts1 =%#010" PRIx32 "\t" 97 98 "s2 =%#010" PRIx32 "\ts3 =%#010" PRIx32 "\n", 98 99 istate->s0, istate->s1, istate->s2, istate->s3); 99 100 100 printf("s4 =%#010" PRIx32 "\ts5 =%#010" PRIx32 "\t"101 log_printf("s4 =%#010" PRIx32 "\ts5 =%#010" PRIx32 "\t" 101 102 "s6 =%#010" PRIx32 "\ts7 =%#010" PRIx32 "\n", 102 103 istate->s4, istate->s5, istate->s6, istate->s7); 103 104 104 printf("s8 =%#010" PRIx32 "\tat =%#010" PRIx32 "\t"105 log_printf("s8 =%#010" PRIx32 "\tat =%#010" PRIx32 "\t" 105 106 "kt0=%#010" PRIx32 "\tkt1=%#010" PRIx32 "\n", 106 107 istate->s8, istate->at, istate->kt0, istate->kt1); 107 108 108 printf("sp =%#010" PRIx32 "\tra =%#010" PRIx32 "\t"109 log_printf("sp =%#010" PRIx32 "\tra =%#010" PRIx32 "\t" 109 110 "gp =%#010" PRIx32 "\n", 110 111 istate->sp, istate->ra, istate->gp); … … 194 195 */ 195 196 #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)", 197 199 CPU->id, i); 198 200 #endif -
kernel/arch/mips32/src/mach/malta/malta.c
rdba3e2c r8b863a62 92 92 static outdev_operations_t yamon_outdev_ops = { 93 93 .write = yamon_putchar, 94 .redraw = NULL 94 .redraw = NULL, 95 .scroll_up = NULL, 96 .scroll_down = NULL 95 97 }; 96 98 … … 103 105 void malta_input_init(void) 104 106 { 107 (void) stdin_wire(); 105 108 } 106 109 -
kernel/arch/mips32/src/mm/tlb.c
rdba3e2c r8b863a62 43 43 #include <synch/mutex.h> 44 44 #include <print.h> 45 #include <log.h> 45 46 #include <debug.h> 46 47 #include <align.h> … … 48 49 #include <symtab.h> 49 50 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) 60 63 61 64 /** Initialize TLB. … … 215 218 */ 216 219 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=%#" 218 221 PRIxn ", ASID=%d).\n", __func__, badvaddr, 219 222 AS ? AS->asid : -1); … … 266 269 { 267 270 hi->value = 0; 268 hi->vpn2 = ADDR2 VPN2(ALIGN_DOWN(addr, PAGE_SIZE));271 hi->vpn2 = ADDR2HI_VPN2(ALIGN_DOWN(addr, PAGE_SIZE)); 269 272 hi->asid = asid; 270 273 } … … 295 298 296 299 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)); 299 302 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)); 301 304 } 302 305
Note:
See TracChangeset
for help on using the changeset viewer.
