On Friday, February 28, 2014 1:15:45 pm Adrian Chadd wrote:
> Hi,
> On my i386 -HEAD laptops (running -HEAD as of last night, but it's
> been a problem for a while) I occasionally hit a point where I get an
> FPE on _all_ processes upon resume.
> I can still do a clean shutdown through the power-button method, but I
> can't do anything else.
> Has anyone seen this before? Does anyone have an inkling of an idea
> why I'd be getting FPE's for things like ps and sh?

I'm guessing fpcurthread is stale.  We should probably be flushing
the FPU state on suspend and starting off without any FPU state on

Ah, see this bit here in x86/acpica/acpi_wakeup.c:

acpi_sleep_machdep(struct acpi_softc *sc, int state)
        if (savectx(susppcbs[0])) {
#ifdef __amd64__

Looks like you need to implement ctx_fpusave() for i386.  kib@ did it as part 
of the AVX work, but I wonder if you can just steal the amd64 ctx_fpusave() 
and have it call npxsave() instead of fpxsave()?  Not sure if you'd need it to 
be in asm as it is on amd64 or if you can do this in C.

John Baldwin
freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to