[Skiboot] [PATCH]: Implementation of opalmsg command in crash-utility
Stewart Smith
stewart at linux.vnet.ibm.com
Mon Feb 20 12:56:55 AEDT 2017
Ankit Kumar <ankit at linux.vnet.ibm.com> writes:
> Hi Stewart,
>
> Thank you so much for taking time and reviewing.
>
>
> On Thursday 16 February 2017 12:32 PM, Stewart Smith wrote:
>> Ankit Kumar <ankit at linux.vnet.ibm.com> writes:
>>> +/*
>>> + * Definitions derived from OPAL. These need to track corresponding values in
>>> + * https://github.com/open-power/skiboot/blob/master/include/mem-map.h
>>> + */
>>> +#define SKIBOOT_CONSOLE_DUMP_START 0x31000000
>>> +#define SKIBOOT_CONSOLE_DUMP_SIZE 0x40000
>> Where did you get this size from?
>>
>> INMEM_CON_LEN in skiboot is 0x100000
>
> Sorry about that.
> Will send a patch correcting this.
>
> ~Ankit
>
>> Even if booting a kdump kernel, you're going to have a device tree with
>> the appropriate nodes present to *programatically* find out where the
>> console is. You should certainly do that.
>
>
> 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 :)
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list