MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / MachineCheckException

Function MachineCheckException

libcpu/ppc/ppc405/traps.c:131–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void MachineCheckException(struct pt_regs *regs)
132{
133 unsigned long fixup, val;
134
135 if ((fixup = search_exception_table(regs->nip)) != 0) {
136 regs->nip = fixup;
137 val = mfspr(MCSR);
138 /* Clear MCSR */
139 mtspr(SPRN_MCSR, val);
140 return;
141 }
142
143 rt_kprintf("Machine Check Exception.\n");
144 rt_kprintf("Caused by (from msr): ");
145 rt_kprintf("regs %p ", regs);
146
147 val = get_esr();
148
149 if (val& ESR_IMCP) {
150 rt_kprintf("Instruction");
151 mtspr(ESR, val & ~ESR_IMCP);
152 } else {
153 rt_kprintf("Data");
154 }
155 rt_kprintf(" machine check.\n");
156
157 show_regs(regs);
158 print_backtrace((unsigned long *)regs->gpr[1]);
159 panic("machine check");
160}
161
162void AlignmentException(struct pt_regs *regs)
163{

Callers

nothing calls this directly

Calls 5

search_exception_tableFunction · 0.85
rt_kprintfFunction · 0.85
print_backtraceFunction · 0.85
panicFunction · 0.85
show_regsFunction · 0.70

Tested by

no test coverage detected