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 ?