Machine check exception. 2.6.20 powerpc tree.

Ramirez-Ortiz, Jorge Jorge.Ramirez-Ortiz at xerox.com
Wed Jul 18 00:21:18 EST 2007


Running our multithreaded application on ppc8548 (E500 core) generates a
machine check exception when trying to access some ASIC's registers
mapped on the PCI space (This application maps a PCI device to access
its registers)

 

machine_check_exception: task my_process, MCSR=0x10008, NIP=0x10153530

Machine check in user mode.

Caused by (from MCSR=10008): Guarded Load or Cache-Inhibited stwcx.

Bus - Read Data Bus Error

 

Here is the assembly dump of the region of code containing the offending
instruction in user-space, with SRR0 pointing us at 0x10153530 when the
exception is raised:

 

0x10153528 <_ZN2vk7in_le32EPVKj+16>:    lwz     r0,8(r31)

0x1015352c <_ZN2vk7in_le32EPVKj+20>:    lwz     r9,8(r31)

0x10153530 <_ZN2vk7in_le32EPVKj+24>:    lwbrx   r0,0,r0

0x10153534 <_ZN2vk7in_le32EPVKj+28>:    twi     0,r0,0

0x10153538 <_ZN2vk7in_le32EPVKj+32>:    isync

 

All this is fully reproducible, the offending code is repeatedly the
byte-reverse load within the (m)mapped PCI memory segment. The offset
within the segment may vary, even if most of the hits seem to be taken
when reading 0x20030-0x20034 offsets from 0x80000000 PCI address space
(which is mapped to the application via /dev/mem)

 

/proc/pid/maps reports the following mappings to /dev/mem, with the
first one being an ASIC on the PCI space whose registers we are trying
to access, and the second one being system memory (this system memory is
out of kernel visibility...we use 'mem=256M' as a kernel parameter...):

 

303a9000-304a9000 rw-s 80000000 00:0c 2087       /dev/mem

304a9000-404a9000 rw-s 10000000 00:0c 2087       /dev/mem

 

Has anybody experienced something similar using a kernel based on a
2.6.20 powerpc tree? 

 

Many thanks

 

jorge

 

______________________________

Jorge Ramirez-Ortiz

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070717/4814cca1/attachment.htm 


More information about the Linuxppc-embedded mailing list