1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/x86
José Roberto de Souza 684b081a16 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).
2015-04-02 19:27:17 -03:00
..
include doc: fix remaining doxygen warnings 2014-12-04 17:16:57 +01:00
Makefile Initial import of the x86 port 2014-05-25 13:40:29 +02:00
Makefile.include Initial import of the x86 port 2014-05-25 13:40:29 +02:00
nop_nop_nop.inc Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_atomic.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_cmos.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_glue.c core: harmonizes the data type for the process ID 2014-08-01 12:02:54 +02:00
x86_hwtimer.c core: let valid PIDs start with 1 2014-08-17 19:51:03 +02:00
x86_interrupts.c core: introduce thread_yield_higher(), yield less 2014-10-24 00:09:56 +02:00
x86_memory.c Removing the warnings after running static code analyser. 2015-03-10 04:08:43 +05:30
x86_pci_init.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_pci_strings.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_pci.c Removing the warnings after running static code analyser. 2015-03-10 04:08:43 +05:30
x86_pic.c Fix a few cppcheck findings 2014-07-25 08:17:06 +02:00
x86_pit.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_reboot.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_rtc.c Removing the warnings after running static code analyser. 2015-03-10 04:08:43 +05:30
x86_startup.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_threading.c x86: fix FPU lazy swap 2015-04-02 19:27:17 -03:00
x86_uart.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_ucontext.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00
x86_videoram.c Initial import of the x86 port 2014-05-25 13:40:29 +02:00