FPU state management in L4Fiasco.OC program
haohui.mai at gmail.com
Mon Apr 9 00:22:21 CEST 2012
I'm writing a new OS kernel atop of L4Fiasco.OC. I'm having some
difficulties to let my OS support user-level processes that uses
So far, My OS closely follows L4Linux, it creates a new task for each
user-level process, and marks as all threads of the task as alien thread to
capture all page faults and exceptions.
My OS works fines with page fault and syscalls. However, I'm confused with
what I should do with floating-point exception (exception #7), which is
issued to my kernel at the first time it tries to perform floating-point
I tried to return to the user-level process with an empty message (
l4_msgtag_t tag = l4_msgtag(0, 0, 0, 0) ), or an empty message with
L4_MSGTAG_TRANSFER_FPU (l4_msgtag_t tag = l4_msgtag(0, 0, 0,
L4_MSGTAG_TRANSFER_FPU) ), but I had no luck.
The user-level process immediately calls "int $0x3" and stops.
I read through L4Linux's code and it seems it's doing similar thing, except
that it did initialize the FPU state before asking L4 to transfer the FPU
state to user-level process.
Am I missing something? What's the recommend way of doing it? Your comments
are highly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the l4-hackers