set_mcontext()/grab_mcontext()

Justin Hibbits chmeeedalf at gmail.com
Thu Mar 20 05:13:30 UTC 2014


Running into problems with X exiting during a sigreturn(2) on my G4
PowerBooks, it seems sometimes bit 10 is set in the mc_srr1 field,
which, from the documentation, can only be set by hardware on an
external interrupt.

Looking at the references closer, bits 1-4, 10-15 (ppc32), also
numbered as bits 33-36, 42-47 (ppc64) are for exception-specific
information only.  I'm wondering if it makes sense to mask these off
when setting and getting the context, as those bits are useless upon an
rfi.

I know this is probably simply a band-aid for possible corruption in X,
but to me it makes sense, as the context data is useful only when
entering the interrupt context, not when context is restored (bits are
localized, not restored to MSR).

- Justin


More information about the freebsd-ppc mailing list