Fw: debugging on ppc with xmon

R Sharada sharada at in.ibm.com
Mon Jul 5 16:53:00 EST 2004


Hello,
	Perhaps I sent this mail out earlier to the wrong id for the list. Did
not see it on the list. Hence resending - hopefully this time I am sending to
the right id.

Thanks and Regards,
Sharada
----- Forwarded message from R Sharada <sharada at in.ibm.com> -----

Date: Mon, 5 Jul 2004 11:28:21 +0530
From: R Sharada <sharada at in.ibm.com>
To: owner-linuxppc64-dev at lists.linuxppc.org
Subject: debugging on ppc with xmon
Reply-To: sharada at in.ibm.com

Hello,
	I have been learning and understanding ppc lately, and was working on
trying to do some re-ordering of the prom code.
	As a first step, I was trying to move the setting of the global cpuid
masks to a later point in time, in setup.c, within setup_system.
	So, I moved the code performing the cpuset in the prom_hold_cpus()
function to a function, cpuid_setup(), and called it within setup_system, after
finish_device_tree() (within CONFIG_PSERIES).
	When I rebooted this kernel, it oopsed in xmon right after prom_init,
with a data SLB access (which in this case is most likely to be a wrong memory
reference or null pointer reference).
	I did go through olof's mail on debugging with xmon on ppc. However, I
am still not clear as to what access is causing the invalid memory reference.
A zr at the xmon prompt does not reboot but faults back again into xmon.
	How can I obtain a objdump output with source line corelation to the
assembly code?
	Any pointers or directions as to how to debug this would be helpful,
as I am starting off with ppc debugging with this as the first.

The panic oops is pasted out here:

Calling quiesce ...
returning from prom_init
cpu 0x0: Vector: 380 (Data SLB Access) at [c000000000563b70]
    pc: c000000000039d98: .cpuid_setup+0x1d0/0x3b0
    lr: c000000000039d7c: .cpuid_setup+0x1b4/0x3b0
    sp: c000000000563df0
   msr: 9000000000001032
   dar: 4202000
  current = 0xc0000000005f5480
  paca    = 0xc000000000564000
    pid   = 0, comm = swapper
enter ? for help
0:mon> ?

0:mon> di c000000000039d98
c000000000039d98  901c0000      stw     r0,0(r28)
c000000000039d9c  4800097d      bl      c00000000003a718        # .get_property0c000000000039da0  60000000      nop
c000000000039da4  38a00000      li      r5,0
c000000000039da8  e882a318      ld      r4,-23784(r2)
c000000000039dac  7c7c1b78      mr      r28,r3
c000000000039db0  7fc3f378      mr      r3,r30
c000000000039db4  48000965      bl      c00000000003a718        # .get_property0c000000000039db8  60000000      nop
c000000000039dbc  38a00001      li      r5,1
c000000000039dc0  80030000      lwz     r0,0(r3)
c000000000039dc4  2f800000      cmpwi   cr7,r0,0
c000000000039dc8  419c0018      blt     cr7,c000000000039de0    # .cpuid_setup+0c000000000039dcc  7c0007b4      extsw   r0,r0
c000000000039dd0  7805f022      rldicl  r5,r0,62,32
c000000000039dd4  2b850002      cmplwi  cr7,r5,2

0:mon> zr
cpu 0x0: Vector: 380 (Data SLB Access) at [c0000000005630f0]
    pc: c00000000004be54: .cmds+0x1914/0x1f34
    lr: c00000000004a864: .cmds+0x324/0x1f34
    sp: c000000000563370
   msr: 9000000000001032
   dar: 0
  current = 0xc0000000005f5480
  paca    = 0xc000000000564000
    pid   = 0, comm = swapper
cpu 0x0: Exception 380 (Data SLB Access) in xmon, returning to main loop

Thanks and Regards,
Sharada


----- End forwarded message -----

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list