diff options
author | ian <ian@FreeBSD.org> | 2014-05-14 04:57:55 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-14 04:57:55 +0000 |
commit | 4a602a895785693d5def6282dbd784066341e805 (patch) | |
tree | 93e1dc02422784a7958c97bfd024009d3b8817ff /sys/powerpc/aim | |
parent | 9277bb1a2b74a398eb2fd572785d2d6db451d8c1 (diff) | |
download | FreeBSD-src-4a602a895785693d5def6282dbd784066341e805.zip FreeBSD-src-4a602a895785693d5def6282dbd784066341e805.tar.gz |
MFC r258259, r258798, r259010
Unify handling of illegal instruction faults between AIM and Book-E.
Make uart_cpu_powerpc work on both FDT and OFW systems.
Fix debug printfs in FPU_EMU to compile on powerpc64 and enable it for
powerpc64.
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r-- | sys/powerpc/aim/trap.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c index d234ba2..025b5cf 100644 --- a/sys/powerpc/aim/trap.c +++ b/sys/powerpc/aim/trap.c @@ -80,7 +80,6 @@ static void printtrap(u_int vector, struct trapframe *frame, int isfatal, int user); static int trap_pfault(struct trapframe *frame, int user); static int fix_unaligned(struct thread *td, struct trapframe *frame); -static int ppc_instr_emulate(struct trapframe *frame); static int handle_onfault(struct trapframe *frame); static void syscall(struct trapframe *frame); @@ -292,10 +291,9 @@ trap(struct trapframe *frame) } #endif sig = SIGTRAP; - } else if (ppc_instr_emulate(frame) == 0) - frame->srr0 += 4; - else - sig = SIGILL; + } else { + sig = ppc_instr_emulate(frame, td->td_pcb); + } break; default: @@ -800,20 +798,3 @@ fix_unaligned(struct thread *td, struct trapframe *frame) return -1; } -static int -ppc_instr_emulate(struct trapframe *frame) -{ - uint32_t instr; - int reg; - - instr = fuword32((void *)frame->srr0); - - if ((instr & 0xfc1fffff) == 0x7c1f42a6) { /* mfpvr */ - reg = (instr & ~0xfc1fffff) >> 21; - frame->fixreg[reg] = mfpvr(); - return (0); - } - - return (-1); -} - |