linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Problems of using APU/FPU under linux
@ 2008-04-14 16:18 Shanyuan Gao
  2008-04-14 17:35 ` Stephen Neuendorffer
       [not found] ` <977C41F842E66D4CB2E41332313B615005CB0A39@XSJ-EXCHVS1.xlnx.xilinx.com>
  0 siblings, 2 replies; 13+ messages in thread
From: Shanyuan Gao @ 2008-04-14 16:18 UTC (permalink / raw)
  To: linuxppc-embedded

Hi,

Recently I was trying to make APU/FPU working under Linux on Xilinx  
ML410. The standalone programs work perfectly. However under Linux,  
when I try to use a floating point operation, like *fmuls*, it will  
give me a *trap*.

By studying the user guide from Xilinx and dumping the object files,  
I know I need to change the corresponding bits (APU enable, FP  
enable, maybe APU Exception enable) in Machine State Register. I  
guess I need to enable the bits whenever before the kernel uses  
*mtmsr*. However, it doesn't work. I got the same trap with the same  
MSR, as I had no APU/FPU before. I also tried to add the FPU.S to ppc  
tree, but it doesn't work either.

The questions are
1. I guess there might be some place that changed MSR after all my  
changes. But I don't know where. And can I write a kernel module to  
change the MSR after booting in Linux? (well, it's hard for me though)

2. Does it have any exception/interrupt mechanism to direct FP  
operation to APU/FPU? Or after enabling APU/FPU it will mask the  
exception/interrupt and decode FP operation by itself?


Any ideas are appreciated. Thank you very much!


Shan

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-04-15 19:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-14 16:18 Problems of using APU/FPU under linux Shanyuan Gao
2008-04-14 17:35 ` Stephen Neuendorffer
     [not found] ` <977C41F842E66D4CB2E41332313B615005CB0A39@XSJ-EXCHVS1.xlnx.xilinx.com>
2008-04-14 18:32   ` John Bonesio
2008-04-14 20:46     ` Shanyuan Gao
2008-04-14 21:56       ` John Bonesio
2008-04-14 22:20       ` John Bonesio
2008-04-15 18:20       ` Yoshio Kashiwagi
2008-04-15 18:34         ` Shanyuan Gao
2008-04-15 18:37           ` Stephen Neuendorffer
2008-04-15 18:47             ` Shanyuan Gao
2008-04-15 18:50               ` Stephen Neuendorffer
2008-04-15 18:59               ` John Bonesio
2008-04-15 19:26                 ` Shanyuan Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).