Fw: Re: Pb with FPUsupport and VMalloc activated on PPC platform
wolfgang.grandegger at bluewin.ch
Wed Oct 27 16:21:33 CEST 2004
On 10/27/2004 03:22 PM Christian Charreyre - CIO wrote:
> please find hereafter some additional informations about our problem :
> ----- Original Message -----
> From: "Nicolas Genevrier" <nicolas.genevrier at cioinfoindus.fr>
> To: "Christian CHARREYRE" <christian.charreyre at cioinfoindus.fr>
> Sent: Wednesday, October 27, 2004 2:14 PM
> Subject: Fwd: Re: Pb with FPUsupport and VMalloc activated on PPC platform
>> This is a forwarded message
>> From: Wolfgang Grandegger <wolfgang.grandegger at bluewin.ch>
>> To: Nicolas Genevrier <nicolas.genevrier at cioinfoindus.fr>
>> Date: Wednesday, October 27, 2004, 1:28:10 PM
>> Subject: Pb with FPUsupport and VMalloc activated on PPC platform
>> ===8<==============Original message text===============
>> On 10/27/2004 12:33 PM Nicolas Genevrier wrote:
>> > Hello,
>> > we have a configuration who needs FPU support, and due to amount of
>> > memory, we use VMalloc in the RTAI allocator.
>> You mean the RTAI memory allocater? I never got that working and for
>> this reason it's disabled by default.
>> > We use RTAI 3.0r2 (same problem with 3.0r4) on kernel 2.4.25, on a Men
>> > board (processor = MPC8245).
>> What kind of problems do you have with 3.0r4?
> The problem is described after.
>> > The problem is that in RT tasks, we get bus errors when calling
>> > After more investigation, it is due to the save and restore of processor
>> > flags in rt_sleep code.
>> > We have the same problem with a RT task who just make loops on the
>> > code :
>> > unsigned long flags;
>> > flags = rt_global_save_flags_and_cli(); // Save flags
>> > rt_global_restore_flags(flags); // Restore them
>> Hm, this is an interesting hint.
> What we do not understand, is that we have activated both
> CONFIG_RTAI_FPU_SUPPORT and RTAI_CONFIG_MALLOC_VMALLOC,
I wonder that you can enable RTAI_CONFIG_MALLOC_VMALLO. In previous
versions of RTAI it was disabled, at least.
> but in our test described here above, we just load RTAI modules, and this
> little kernel module, but we newer call RTAI malloc, nor use any float.
RTAI malloc is call when you create a RTAI task. From my point of view,
the vmalloc problem has nothing to do with FPU support. It's a problem
with virtual memory management.
> We really wonder how it can trigger a bus error when saving flags and
> restoring them.
The bus error is interesting. Can you locate where it happens.
>> > This problem does'nt appear on X86 architecture.
>> Yes, vmalloc support is working on X86.
>> > Can anyone give us a hint about such problems ?
>> > Has anyone already used both FPU support and VMalloc on rtai 3 on PPC ?
>> FPU support is working but there are known problems with vmalloc.
> In our software, we do need to allocate big amounts of memory after entering
> real time, it's the reason why we need to use VMALLOC.
As mentioned, I haven't got it working so far, sorry.
More information about the Rtai