[Skiboot] [PATCH]: Implementation of opalmsg command in crash-utility

Ankit Kumar ankit at linux.vnet.ibm.com
Mon Feb 20 15:31:39 AEDT 2017


Hi Stewart,



On Monday 20 February 2017 07:26 AM, Stewart Smith wrote:
> Currently, INMEM_CON_START(console start address) and
>> INMEM_CON_LEN(size) is not part of kernel symbol table.
>>
>> In crash-utility , I didn't find a way to read device-tree node from
>> collected vmcore file and Hence, I hard-coded these values.
>>
>> I am looking on it. Will correct this, once I get the way to read
>> device-tree entry in crash-utility from collected vmcore dump.
> In ./arch/powerpc/platforms/powernv/opal-msglog.c
> there's this:
> /* OPAL in-memory console. Defined in OPAL source at core/console.c */
> struct memcons {
>          __be64 magic;
> #define MEMCONS_MAGIC   0x6630696567726173L
>          __be64 obuf_phys;
>          __be64 ibuf_phys;
>          __be32 obuf_size;
>          __be32 ibuf_size;
>          __be32 out_pos;
> #define MEMCONS_OUT_POS_WRAP    0x80000000u
> #define MEMCONS_OUT_POS_MASK    0x00ffffffu
>          __be32 in_prod;
>          __be32 in_cons;
> };
>
> static struct memcons *opal_memcons = NULL;
>
> Of course.. since opal_memcons ends up pointing into memory owned by
> OPAL, it may not be that useful.
>
> Although... if that memory isn't being captured in a crash dump, it
> maybe should be :)
>


crash-utility provides an interface to read kernel symbol but As "struct 
opal_memcons" is static and hence, is not part of kernel symbol table 
(kallsyms).
crash-utility doesn't provide an way to read device-tree from vmcore 
file(As fas as I analyzed).
We will replace hard-coded value , once we find a way to read 
device-tree from collected vmcore file in crash-utility(or any other 
alternative).


~Ankit



More information about the Skiboot mailing list