LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Machine check exception. 2.6.20 powerpc tree.
@ 2007-07-17 14:21 Ramirez-Ortiz, Jorge
  2007-07-17 16:29 ` Kumar Gala
  0 siblings, 1 reply; 4+ messages in thread
From: Ramirez-Ortiz, Jorge @ 2007-07-17 14:21 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

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

 

 


[-- Attachment #2: Type: text/html, Size: 7708 bytes --]

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

end of thread, other threads:[~2007-07-18 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-17 14:21 Machine check exception. 2.6.20 powerpc tree Ramirez-Ortiz, Jorge
2007-07-17 16:29 ` Kumar Gala
2007-07-18  9:27   ` Ramirez-Ortiz, Jorge
2007-07-18 18:17     ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox