[Pdbg] [RFC] main: Implement 'dmesg' command

Joel Stanley joel at jms.id.au
Fri Jun 1 13:47:14 AEST 2018


On 1 June 2018 at 13:13, Alistair Popple <alistair at popple.id.au> wrote:
>> > Skiboot sticks this in the debug descriptor:
>> >
>> > core/dump-region.c
>> >
>> >         static int64_t bmc_opal_register_dump_region(uint32_t id,
>> >                                                      uint64_t addr, uint64_t size)
>> >         {
>> >                 ...
>> >                 prlog(PR_INFO, "Registered log buf at 0x%016llx\n", addr);
>> >                 debug_descriptor.log_buf_phys = addr;
>> >
>> > Looking at the host's kallsyms, we can see where __log_buf starts. If we
>> > hardcode that as the address to read from in pdbg, we can get data out:
>> >
>>
>> Let's not hardcode, please. Have you tried this with CONFIG_RELOCATABLE
>> and CONFIG_RELOCATABLE_TEST set?
>
> I'm not sure the patch actually hardcodes the address if that's what you're
> getting at? I think it's registered dynamically at boot time with an OPAL call.

Yep.

> Have you tested this on P8 at all? The ADU error is a bit strange so we will
> have to get to the bottom of that, but having a dmesg command is pretty useful.

Lets park this patch for the moment, for a few reasons:

We're having discussions on the skiboot list about how to store and
retrieve this information.

In addition, the command as it stands will not work once the host
buffer has wrapped. For most cases that's fine, as the host has a nice
long buffer, and when you're debugging a machine it hasn't been up for
months.

However I can see this being used in the field at a later date, so I
will fix it to work in all cases.

Cheers,

Joel


More information about the Pdbg mailing list