[Pdbg] [PATCH v2 03/12] libpdbg: Add api to get/dump ffdc data from sbefifo
Amitay Isaacs
amitay at ozlabs.org
Thu Jul 11 15:24:19 AEST 2019
On Thu, 2019-07-11 at 15:17 +1000, Alistair Popple wrote:
> Hi Amitay,
>
> I'm not very familiar with the way FFDC data is passed from the
> kernel, so for
> my own education what is the difference between getting ffdc data and
> dumping
> ffdc data? Thanks.
ffdc_get() will give you the entire FFDC blob as received from SBE.
ffdc_dump() will try to parse the FFDC packages inside the blob and
dump them.
Any application linked against libpdbg, can get the FFDC data using
ffdc_get() and then parse that.
I am using ffdc_dump() to dump the FFDC packages inside FFDC blob if
SBE chip-op fails when run as pdbg. It's partial unpacking of FFDC
data. This was my way of testing if the correct FFDC data is received.
We can drop ffdc_dump() function altogether.
Amitay.
> - Alistair
>
> On Thursday, 4 July 2019 6:05:16 PM AEST Amitay Isaacs wrote:
> > Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> > ---
> > libpdbg/libpdbg.h | 2 ++
> > libpdbg/target.c | 20 ++++++++++++++++++++
> > 2 files changed, 22 insertions(+)
> >
> > diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
> > index 711c817..b9b271f 100644
> > --- a/libpdbg/libpdbg.h
> > +++ b/libpdbg/libpdbg.h
> > @@ -239,6 +239,8 @@ int opb_read(struct pdbg_target *target,
> > uint32_t addr,
> > uint32_t *data); int opb_write(struct pdbg_target *target, uint32_t
> > addr,
> > uint32_t data);
> >
> > int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t
> > minor);
> > +uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t
> > **ffdc,
> > uint32_t *ffdc_len); +void sbe_ffdc_dump(struct pdbg_target
> > *target);
> >
> > typedef void (*pdbg_progress_tick_t)(uint64_t cur, uint64_t end);
> >
> > diff --git a/libpdbg/target.c b/libpdbg/target.c
> > index e193e7e..9495d61 100644
> > --- a/libpdbg/target.c
> > +++ b/libpdbg/target.c
> > @@ -275,6 +275,26 @@ int sbe_istep(struct pdbg_target *target,
> > uint32_t
> > major, uint32_t minor) return sbefifo->istep(sbefifo, major,
> > minor);
> > }
> >
> > +uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t
> > **ffdc,
> > uint32_t *ffdc_len) +{
> > + struct sbefifo *sbefifo;
> > +
> > + assert(pdbg_target_is_class(target, "sbefifo"));
> > +
> > + sbefifo = target_to_sbefifo(target);
> > + return sbefifo->ffdc_get(sbefifo, ffdc, ffdc_len);
> > +}
> > +
> > +void sbe_ffdc_dump(struct pdbg_target *target)
> > +{
> > + struct sbefifo *sbefifo;
> > +
> > + assert(pdbg_target_is_class(target, "sbefifo"));
> > +
> > + sbefifo = target_to_sbefifo(target);
> > + sbefifo->ffdc_dump(sbefifo);
> > +}
> > +
> > struct pdbg_target *require_target_parent(struct pdbg_target
> > *target)
> > {
> > assert(target->parent);
>
>
>
Amitay.
--
In the game of life even the 50-yard line seats don't interest me. I came to
play!
More information about the Pdbg
mailing list