[Skiboot] [PATCH v4 09/18] fadump: Define FADUMP structure

Stewart Smith stewart at linux.vnet.ibm.com
Mon Sep 10 10:57:45 AEST 2018

Vasant Hegde <hegdevasant at linux.vnet.ibm.com> writes:
> On 08/07/2018 09:37 AM, Stewart Smith wrote:
>> Vasant Hegde <hegdevasant at linux.vnet.ibm.com> writes:
>>> This structure is shared between OPAL and payload. During fadump registration
>>> payload will use this structure to pass kernel memory reservation details to
>>> OPAL. OPAL will use this structure to fill MDST, MDDT table. After fadump,
>>> OPAL uses MDRT table to fill this structure and passes this to payload via
>>> device tree.
> Stewart,
>> We alread yhave the OPAL_(UN)REGISTER_DUMP_REGION calls, which look
>> really similar to this (and existing kernels support). Why not just use
>> these calls instead?
> Ideally we should have reused existing APIs. But unfortunately these existing 
> one doesn't suite
> our requirement here.
> OPAL_REGISTER_DUMP_REGION : Passes kernel memory to be copied as part of dump. 
> But we
> don't have a way to pass destination memory details.
> In case of MPIPL kernel will reserve destination memory for kernel memory to be 
> preserved.
> We want to pass below information to OPAL:
>    source address / size , destination address
> Hence I created separate API. Also unlike OPAL_(UN)REGISTER_DUMP_REGION, here we 
> will
> use single API for registration,un- registration.

Ahh yep, makes sense. We should probably ensure we have good API docs
that explain the difference and why.

Something like "OPAL can help with OS or firmware crash analysis by
saving machine state to be passed to the OS on next boot as a 'crash
dump'. The OPAL_DUMP_(UN)REGISTER calls are for explicitly setting small
amounts of memory (e.g. kernel log buffer) to be collected by an
external entity, typically over a (relatively) slow bus. The second
method is OPAL_FADUMP_ calls, which allow for a "

I do wonder if we could do something like reserve a few MB of memory in
OPAL for what would typically be registered for a sysdump and provide
some support to older kernels purely through a bit of trickery in OPAL
and maybe a bit of a fun time in the petitboot environment.

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list