[riot-commits] [RIOT-OS/RIOT] 684b08: x86: fix FPU lazy swap

René Kijewski kijewski at mi.fu-berlin.de
Fri Apr 3 03:30:57 CEST 2015


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 684b081a1600769ba0afd4224a6dcee5b9b61880
      https://github.com/RIOT-OS/RIOT/commit/684b081a1600769ba0afd4224a6dcee5b9b61880
  Author: José Roberto de Souza <jose.souza at intel.com>
  Date:   2015-04-02 (Thu, 02 Apr 2015)

  Changed paths:
    M cpu/x86/x86_threading.c

  Log Message:
  -----------
  x86: fix FPU lazy swap

The ucontext->x86_fxsave is initialize as 512 bytes of zeros, but it
is not a valid value to be set onto FPU registers, causing a General
Protection Fault:

Interrupt 0x0d (General Protection Fault) while handling 0x07 (Device not available)
EAX=0012f4c0  ECX=001336e4  EDX=001334ac  EBX=001336e0
ESP=00123784  EBP=001237c8  ESI=00000200  EDI=00000000
Error code=00000000
CR0=80010031  CR2=00000000  CR3=0012d000  CR4=000001e0
EIP=0000:80010031  EFLAGS=0012d000
<stack trace>
00000000
???
</stack trace>
Halting.

So lets copy the initial state of FPU registers before FPU is used
and set it as the initial state of FPU to new threads(coroutine).


  Commit: 1d5c3e4176a922ea51162cb608c50faa72c89ace
      https://github.com/RIOT-OS/RIOT/commit/1d5c3e4176a922ea51162cb608c50faa72c89ace
  Author: René Kijewski <kijewski at mi.fu-berlin.de>
  Date:   2015-04-03 (Fri, 03 Apr 2015)

  Changed paths:
    M cpu/x86/x86_threading.c

  Log Message:
  -----------
  Merge pull request #2377 from zehortigoza/fpu-fix

Fix x86 FPU lazy swap


Compare: https://github.com/RIOT-OS/RIOT/compare/56f5a836a8fd...1d5c3e4176a9


More information about the commits mailing list