floating point support for ARM
Ralph Siemsen
ralphs at netwinder.org
Thu Jun 16 22:09:08 CEST 2005
David Keller wrote:
>
> We have compiled the hole environment with a soft-float-compiler, but
> the FPE is still on in kernel-config.
In that case the kernel FPE should not be exercised at all.
>> Normally floating-point is not allowed in the kernel.
>
> But shouldn't RTAI allow to do this in real-time tasks?
Perhaps... I honestly have never tried nor wanted to try :)
> Since the hole environment is compiled with soft-float, we didn't link
> it satically. We thought statically linked libraries are only necessary,
> if only a part of the system uses soft-float and another one uses the
> kernels FPE. Please correct me, if this I'm wrong here.
The kernel FPE does emulation only on behalf of user-space programs.
Its necessary because the FP registers are piggypacked on the task
structure. On the other hand kernel modules that are executing code do
not have a "task" structure. So there is nowhere to store FP registers.
If you load into the kernel (via insmod) something with real FP
instructions, you will probably crash the kernel when they execute (I'm
guessing. Never tried it). On the other hand, if you take care to link
in code compiled with soft-float, _AND_ all the actual libraries that it
calls (including softfloat calls) are present, then it should be
possible to run. Same reason if you call a glibc function and expect it
to work "in kernel" then you have to statically link in that function.
> But LXRT is missing for ARM, so real-time FP stuff should be done in
> kernel-space, shouldn't it?
I guess so...
-R
More information about the Rtai
mailing list