cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Newbie
Newbie
6,027 Views
Registered: ‎10-21-2008

linux driver bus error

hello at all,

 

at the moment I use developementboard ML410 with montavistalinux. 

I have a problem, plse help me! At the moment I try to write a linux-driver for writing or reading registers.

I have a ace-file, which contents Linux and EDK-project with a component (IP-wizared) which is added on a PLB-bus.

I also have a driver-construct which I can register (insmod driver.ko) into the linux-Kernel only if i do not use functions to write or read the bus (XIO_out32() or XIO_in32 ()  ). If I use this function after registering the driver I got an error.

If I try to insert the modul with Insmod driver.ko I get a bus error!  

 

In the messagefile var/lock/messages is written the whole error-message, which I do not understand!

 

 

The whole message u can see in the pdf-file.

 

Thank you very much for your kind help! 

0 Kudos
2 Replies
Highlighted
Explorer
Explorer
6,015 Views
Registered: ‎08-14-2007

Re: linux driver bus error

Oi, looks like a german kernel. Some of this will be missing holes because of translation issues, but here goes:

 

First, you had a Data Machine Check. That means that you tried to access something via the Data-side PLB and nothing responded properly. The error occured in the function read2_register_values(), which from my knowledge of the linux kernel is in your module.

 

The first problem I'd look at is this: Is the address you're trying to access mapped into the kernel's memory? The linux kernel operates in virtual mode, and as such requires virtual mappings for all physical addresses. To talk to a device on the PLB bus, you need to remap its addresses. The easiest way is to use ioremap(). Are you performing this?

 

 

 

 

0 Kudos
Highlighted
Newbie
Newbie
6,006 Views
Registered: ‎10-21-2008

Re: linux driver bus error

Thank you for the quick response
 

>First, you had a Data Machine Check. That means that you tried to access something via the Data-side PLB and nothing >responded properly. The error occured in the function read2_register_values(), which from my knowledge of the linux >kernel is in your module.

 yes it is.

 

 

>The first problem I'd look at is this: Is the address you're trying to access mapped into the kernel's memory? The linux >kernel operates in virtual mode, and as such requires virtual mappings for all physical addresses. To talk to a device on the >PLB bus, you need to remap its addresses. The easiest way is to use ioremap(). Are you performing this?

 

yes i remap the adresses.

in this way reg_remapped_address = (u32) ioremap(REG_BASE, remap_size);

and then i try to read reg0 in  the funktion read2_register_values() like this

 XIo_In32(reg_remapped_address + reg0_upper);

 

in the txt File driver-short you can see the driver init () and the read2_register_values function.

 

thanks for your help

 

 

 

 

 

 

0 Kudos