diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2014-09-05 15:13:41 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2014-09-05 15:13:41 +0000 |
commit | 7d1fd313b1130fe8268b9e749103786c69bd0f6f (patch) | |
tree | 4022e2e21563c8f565e845f914a25c8dfd0d1d75 /sys/powerpc/powerpc | |
parent | db4159a95c99ba2e1d62e884a99c2e2688d0119e (diff) | |
download | FreeBSD-src-7d1fd313b1130fe8268b9e749103786c69bd0f6f.zip FreeBSD-src-7d1fd313b1130fe8268b9e749103786c69bd0f6f.tar.gz |
MFC r261095,r263464,r263752,r264189
r263464,r263752,r275189:
Mask out SRR1 bits that aren't exported to the MSR.
This appears to fix a strange condition with X on 32-bit PowerBooks I
observed, caused by one of these bits getting set in the mcontext, but
not set in the thread, which is a symptom of another problem, more
difficult to diagnose. Since these bits aren't exported anyway, this
change makes it more explicit that the bits aren't MSR-related in SRR1.
r261095:
Fix 32-bit signal handling on ppc64. This was broken when the
PSL_USERSTATIC macro was changed. Since copying 64-bit srr1 into
32-bit srr1 drops the upper 32 bits, any bits set in the context were
dropped, meaning the context check fails. Since 32-bit set_context()
can't change those bits anyway, copy the ones from the current context
(td->td_frame) before calling set_context().
Approved by: re
Relnotes: yes (Affects 10-stable, but not 10.0-release)
Diffstat (limited to 'sys/powerpc/powerpc')
-rw-r--r-- | sys/powerpc/powerpc/exec_machdep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index acacb3d..cc639fc 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -752,6 +752,7 @@ set_mcontext32(struct thread *td, const mcontext32_t *mcp) memcpy(mcp64.mc_av,mcp->mc_av,sizeof(mcp64.mc_av)); for (i = 0; i < 42; i++) mcp64.mc_frame[i] = mcp->mc_frame[i]; + mcp64.mc_srr1 |= (td->td_frame->srr1 & 0xFFFFFFFF00000000ULL); memcpy(mcp64.mc_fpreg,mcp->mc_fpreg,sizeof(mcp64.mc_fpreg)); error = set_mcontext(td, &mcp64); |