PPC405 with H/W FPU

Hello ,
I’m working on an customized ml410 board with Virtex4 FPGA and an implementation of ppc405 with h/w fpu attached through an apu .
The original procnto-400 doesn’t support h/w fpu , I’m trying to run 1 thread that deals with floating point calculations .
I notify the cpu about the presence of the apu and the fpu trough the msr register after i do that i no longer receive fpu unavailable exception but when i try to do simple floating point calculations the system freezes without any errors or exceptions.

ThreadCtl( _NTO_TCTL_IO, 0 );
/* notify ppc about APU & FPU */
x = get_msr();
printf(“msr = 0x%x \n”,x);
set_msr(get_msr() | PPC_MSR_FP | PPC_MSR_SPE );
x = get_msr();
printf(“msr = 0x%x \n”,x);

c = 10.5 * 2.2 ;

if (c > 21) printf(“over 21\n”);
else printf(“under 21 \n”);

the calculation itself is done without errors but when i try to access the c variable in the if statement the system freezes .
I tried to lock the section with InterruptLock but i doesn’t seem to help .

What am i missing here ?

Don’t know PPC but this seems overly simplified. There must be some register that need to be configure in the APU as well.

A quick use of google pointed me to : embeddedrelated.com/usenet/e … 3446-1.php

embeddedrelated.com/usenet/e … 3446-1.php – been there done that read it already .

There must be some register that need to be configure in the APU as well. – there is and it is configured in the FPGA image creation process .

Again the question is how can I lock the thread (except InterruptLock) do my calculations without any interruptions