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

Alistair Popple alistair at popple.id.au
Fri Jun 1 13:43:59 AEST 2018


> > 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.

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.

- Alistair

> Balbir Singh.
> 




More information about the Pdbg mailing list