[U-Boot] Whose responsibility is it to enable FPU?

Måns Rullgård
2010-06-14T20:10:15Z

gnemas at gmail.com writes:

> I built u-boot for a 440EPx board derived from the sequoia configuration.
>
> I am using an FPU-enabled gcc cross compiler.
>
> U-Boot runs fine and successfully boots my operating system (Linux and
> uClibc-based root filesystem).
>
> However, I was having a problem running busybox that I traced to
> errors occurring executing setjmp, which attempts to save floating
> point registers.
>
> Then I realized that the FPU was not enabled in the MSR or in the ccr0
> register.
>
> Have I misconfigured something, or should I go ahead and add code to
> u-boot to enable the FPU?

It is generally the responsibility of the kernel to enable the FPU for
tasks which require it, allowing lazy save/restore of the FPU state on
context switching. Enabling the FPU in u-boot might interfere with this.

--
M?ns Rullg?rd
mans at mansr.com