Commit 2d1eb995 authored by Anton Blanchard's avatar Anton Blanchard

[PATCH] various xmon cleanups

Heres a patch I've had for a while, it removes a bunch of debugger code
which is good :) The next patch will sanitise it (and the rest of the
debugger hooks).

Various xmon cleanups

- recover from bad SPR read/write (we get a program check)
- remove some old code (bat and segment register stuff)
- update the help text to match reality
- add a "press ? for help" when xmon first appears to make rusty happy
- protect against flushing bad parts of memory from Milton
- dont print iseries specific stuff on pseries in SPR dump (S)
- add code to dump the segment table or SLB
- remove a number of functions that wouldnt work on LPAR
parent 5c234152
...@@ -372,6 +372,13 @@ ProgramCheckException(struct pt_regs *regs) ...@@ -372,6 +372,13 @@ ProgramCheckException(struct pt_regs *regs)
{ {
siginfo_t info; siginfo_t info;
#ifdef CONFIG_DEBUG_KERNEL
if (debugger_fault_handler) {
debugger_fault_handler(regs);
return;
}
#endif
if (regs->msr & 0x100000) { if (regs->msr & 0x100000) {
/* IEEE FP exception */ /* IEEE FP exception */
......
...@@ -43,39 +43,12 @@ GSETSPR(274, sprg2) ...@@ -43,39 +43,12 @@ GSETSPR(274, sprg2)
GSETSPR(275, sprg3) GSETSPR(275, sprg3)
GSETSPR(282, ear) GSETSPR(282, ear)
GSETSPR(287, pvr) GSETSPR(287, pvr)
GSETSPR(528, bat0u)
GSETSPR(529, bat0l)
GSETSPR(530, bat1u)
GSETSPR(531, bat1l)
GSETSPR(532, bat2u)
GSETSPR(533, bat2l)
GSETSPR(534, bat3u)
GSETSPR(535, bat3l)
GSETSPR(1008, hid0) GSETSPR(1008, hid0)
GSETSPR(1009, hid1) GSETSPR(1009, hid1)
GSETSPR(1010, iabr) GSETSPR(1010, iabr)
GSETSPR(1013, dabr) GSETSPR(1013, dabr)
GSETSPR(1023, pir) GSETSPR(1023, pir)
static inline int get_sr(int n)
{
int ret;
#if 0
// DRENG does not assemble
asm (" mfsrin %0,%1" : "=r" (ret) : "r" (n << 28));
#endif
return ret;
}
static inline void set_sr(int n, int val)
{
#if 0
// DRENG does not assemble
asm ("mtsrin %0,%1" : : "r" (val), "r" (n << 28));
#endif
}
static inline void store_inst(void *p) static inline void store_inst(void *p)
{ {
asm volatile ("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r" (p)); asm volatile ("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r" (p));
...@@ -90,4 +63,3 @@ static inline void cinval(void *p) ...@@ -90,4 +63,3 @@ static inline void cinval(void *p)
{ {
asm volatile ("dcbi 0,%0; icbi 0,%0" : : "r" (p)); asm volatile ("dcbi 0,%0; icbi 0,%0" : : "r" (p));
} }
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment