alistair23-linux/arch/powerpc/xmon
Michael Ellerman ddadb6b8e8 powerpc: Add an xmon command to dump one or all pacas
This was originally motivated by a desire to see the mapping between
logical and hardware cpu numbers.

But it seemed that it made more sense to just add a command to dump
(most of) the paca.

With no arguments "dp" will dump the paca for the current cpu.

It also takes an argument, eg. "dp 3" which is the logical cpu number
in hex. This form does not check if the cpu is possible, but displays
the paca regardless, as well as the cpu's state in the possible, present
and online masks.

Thirdly, "dpa" will display the paca for all possible cpus. If there are
no possible cpus, like early in boot, it will tell you that.

Sample output, number in brackets is the offset into the struct:

2:mon> dp 3
paca for cpu 0x3 @ c00000000ff20a80:
 possible         = yes
 present          = yes
 online           = yes
 lock_token       = 0x8000            	(0x8)
 paca_index       = 0x3               	(0xa)
 kernel_toc       = 0xc00000000144f990	(0x10)
 kernelbase       = 0xc000000000000000	(0x18)
 kernel_msr       = 0xb000000000001032	(0x20)
 stab_real        = 0x0               	(0x28)
 stab_addr        = 0x0               	(0x30)
 emergency_sp     = 0xc00000003ffe4000	(0x38)
 data_offset      = 0xa40000          	(0x40)
 hw_cpu_id        = 0x9               	(0x50)
 cpu_start        = 0x1               	(0x52)
 kexec_state      = 0x0               	(0x53)
 __current        = 0xc00000007e568680	(0x218)
 kstack           = 0xc00000007e5a3e30	(0x220)
 stab_rr          = 0x1a              	(0x228)
 saved_r1         = 0xc00000007e7cb450	(0x230)
 trap_save        = 0x0               	(0x240)
 soft_enabled     = 0x0               	(0x242)
 irq_happened     = 0x0               	(0x243)
 io_sync          = 0x0               	(0x244)
 irq_work_pending = 0x0               	(0x245)
 nap_state_lost   = 0x0               	(0x246)

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-09-18 15:02:36 +10:00
..
ansidecl.h powerpc: Merge xmon 2005-10-28 22:53:37 +10:00
dis-asm.h [POWERPC] Make xmon disassembly optional 2006-12-04 20:40:32 +11:00
Makefile powerpc/Makefiles: Change to new flag variables 2010-10-13 16:19:22 +11:00
nonstdio.c [POWERPC] fix showing xmon help 2007-07-22 21:30:58 +10:00
nonstdio.h [POWERPC] fix showing xmon help 2007-07-22 21:30:58 +10:00
ppc-dis.c [POWERPC] Import updated version of ppc disassembly code for xmon 2006-12-04 20:40:36 +11:00
ppc-opc.c bug.h: add include of it to various implicit C users 2012-02-29 17:15:08 -05:00
ppc.h [POWERPC] Import updated version of ppc disassembly code for xmon 2006-12-04 20:40:36 +11:00
spu-dis.c [PATCH] arch/powerpc trivial annotations 2007-02-09 09:14:06 -08:00
spu-insns.h [POWERPC] Import spu disassembly code into xmon 2006-12-04 20:40:29 +11:00
spu-opc.c bug.h: add include of it to various implicit C users 2012-02-29 17:15:08 -05:00
spu.h [POWERPC] Import spu disassembly code into xmon 2006-12-04 20:40:29 +11:00
start.c [POWERPC] Make xmon_write accept a const buffer 2007-07-22 21:30:58 +10:00
xmon.c powerpc: Add an xmon command to dump one or all pacas 2012-09-18 15:02:36 +10:00