RE: Machine check exception. 2.6.20 powerpc tree.

2007-07-18 Thread Ramirez-Ortiz, Jorge
Hi Kumar

The address we are trying to access corresponds to a mapped device in
the PCI space
Attached some additional debugging information (we have instrumented the
kernel)

Thanks
jorge


INFO [_probe]: Found Device [irq=58]
INFO [_open]: device opened with irq 58
INFO [_read]: waiting for interrupt
INFO [_intr]: ISR 58

PCI1: Error! ERR_DETECT=0040, ATTR=00516001, addr=80020034,
data=0005

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

Call Trace:
[C7355EF0] [C0006E64] show_stack+0x48/0x19c (unreliable)
[C7355F20] [C000C04C] machine_check_exception+0x294/0x484
[C7355F40] [C000E48C] ret_from_mcheck_exc+0x0/0xe0

cat /proc/cpuinfo
processor   : 0
cpu : e500v2
clock   : 799.50MHz
revision: 2.0 (pvr 8021 0020)
bogomips: 99.84
timebase: 49968750
platform: MPC85xx CDS
Vendor  : Freescale Semiconductor
Machine : MPC85xx CDS (0xff)
PVR : 0x80210020
SVR : 0x80390220
PLL setting : 0x4
Memory  : 256 MB
LAW 1   : , 2000 - DDR SDRAM
LAW 2   : 8000, 1000 - PCI1
LAW 3   : 9000, 1000 - PCI2
LAW 4   : a000, 1000 - PCI Express
LAW 5   : e100, 0100 - PCI1
LAW 6   : e200, 0100 - PCI2
LAW 7   : e300, 0100 - PCI Express
LAW 8   : f000, 1000 - Local bus
DDR 0   : , 2000 - 2/14/10 addr bits
PCI1 Out_1  : 8000, 1000 - Mem: 8000
PCI1 Out_2  : e100, 0100 - I/O: 
PCI2 Out_1  : 9000, 1000 - Mem: 9000
PCI2 Out_2  : e200, 0100 - I/O: 
PCI3 Out_1  : a000, 1000 - Mem: a000
PCI3 Out_2  : e300, 0100 - I/O: 
PCI1 In_1   : , 2000 (Internal,R:snoop,W:snoop) -
 PF
PCI2 In_1   : , 2000 (Internal,R:snoop,W:snoop) -
 PF
PCI3 In_1   : , 2000 (Internal,R:snoop,W:snoop) -
 PF


__

 

-Original Message-
From: Kumar Gala [mailto:[EMAIL PROTECTED] 
Sent: 17 July 2007 17:29
To: Ramirez-Ortiz, Jorge
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Machine check exception. 2.6.20 powerpc tree. 


On Jul 17, 2007, at 9:21 AM, Ramirez-Ortiz, Jorge wrote:

 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

Can you get the code to dump the value of r0.  I'm wondering if  
you're really getting a read data bus error due to the fact that r0  
is pointing to a PCI address that doesn't have a device that will  
respond.

- k


___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Re: Machine check exception. 2.6.20 powerpc tree.

2007-07-18 Thread Kumar Gala

On Jul 18, 2007, at 4:27 AM, Ramirez-Ortiz, Jorge wrote:

 Hi Kumar

 The address we are trying to access corresponds to a mapped device in
 the PCI space
 Attached some additional debugging information (we have  
 instrumented the
 kernel)

 Thanks
 jorge


 INFO [_probe]: Found Device [irq=58]
 INFO [_open]: device opened with irq 58
 INFO [_read]: waiting for interrupt
 INFO [_intr]: ISR 58

 PCI1: Error! ERR_DETECT=0040, ATTR=00516001, addr=80020034,
 data=0005

So you are getting a master abort from the target.  I think you need  
to look at your PCI device and see what's going on there.

 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

 Call Trace:
 [C7355EF0] [C0006E64] show_stack+0x48/0x19c (unreliable)
 [C7355F20] [C000C04C] machine_check_exception+0x294/0x484
 [C7355F40] [C000E48C] ret_from_mcheck_exc+0x0/0xe0

 cat /proc/cpuinfo
 processor   : 0
 cpu : e500v2
 clock   : 799.50MHz
 revision: 2.0 (pvr 8021 0020)
 bogomips: 99.84
 timebase: 49968750
 platform: MPC85xx CDS
 Vendor  : Freescale Semiconductor
 Machine : MPC85xx CDS (0xff)
 PVR : 0x80210020
 SVR : 0x80390220
 PLL setting : 0x4
 Memory  : 256 MB
 LAW 1   : , 2000 - DDR SDRAM
 LAW 2   : 8000, 1000 - PCI1
 LAW 3   : 9000, 1000 - PCI2
 LAW 4   : a000, 1000 - PCI Express
 LAW 5   : e100, 0100 - PCI1
 LAW 6   : e200, 0100 - PCI2
 LAW 7   : e300, 0100 - PCI Express
 LAW 8   : f000, 1000 - Local bus
 DDR 0   : , 2000 - 2/14/10 addr bits
 PCI1 Out_1  : 8000, 1000 - Mem: 8000
 PCI1 Out_2  : e100, 0100 - I/O: 
 PCI2 Out_1  : 9000, 1000 - Mem: 9000
 PCI2 Out_2  : e200, 0100 - I/O: 
 PCI3 Out_1  : a000, 1000 - Mem: a000
 PCI3 Out_2  : e300, 0100 - I/O: 
 PCI1 In_1   : , 2000 (Internal,R:snoop,W:snoop) -
  PF
 PCI2 In_1   : , 2000 (Internal,R:snoop,W:snoop) -
  PF
 PCI3 In_1   : , 2000 (Internal,R:snoop,W:snoop) -
  PF


 __



 -Original Message-
 From: Kumar Gala [mailto:[EMAIL PROTECTED]
 Sent: 17 July 2007 17:29
 To: Ramirez-Ortiz, Jorge
 Cc: linuxppc-embedded@ozlabs.org
 Subject: Re: Machine check exception. 2.6.20 powerpc tree.


 On Jul 17, 2007, at 9:21 AM, Ramirez-Ortiz, Jorge wrote:

 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

 Can you get the code to dump the value of r0.  I'm wondering if
 you're really getting a read data bus error due to the fact that r0
 is pointing to a PCI address that doesn't have a device that will
 respond.

 - k



___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


Machine check exception. 2.6.20 powerpc tree.

2007-07-17 Thread Ramirez-Ortiz, Jorge
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 0x8000 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 8000 00:0c 2087   /dev/mem

304a9000-404a9000 rw-s 1000 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

 

 

___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Re: Machine check exception. 2.6.20 powerpc tree.

2007-07-17 Thread Kumar Gala

On Jul 17, 2007, at 9:21 AM, Ramirez-Ortiz, Jorge wrote:

 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

Can you get the code to dump the value of r0.  I'm wondering if  
you're really getting a read data bus error due to the fact that r0  
is pointing to a PCI address that doesn't have a device that will  
respond.

- k


___
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded