Skip to content

Commit

Permalink
POZ: fix ffdc_get method to take chipop target
Browse files Browse the repository at this point in the history
Signed-off-by: Marri Devender Rao <[email protected]>
Change-Id: I7e364416f9f8dc50d0b38e0503bef50e432ff41b
  • Loading branch information
devenrao committed Mar 2, 2024
1 parent e81f3f6 commit d37560b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libpdbg/hwunit.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct chipop {

struct chipop_ody {
struct pdbg_target target;
uint32_t (*ffdc_get)(struct pdbg_target *, const uint8_t **, uint32_t *);
uint32_t (*ffdc_get)(struct chipop_ody*, struct pdbg_target*, const uint8_t **, uint32_t *);
int (*dump)(struct chipop_ody *, uint8_t, uint8_t, uint8_t, uint8_t **, uint32_t *);
};
#define target_to_chipop_ody(x) container_of(x, struct chipop_ody, target)
Expand Down
4 changes: 3 additions & 1 deletion libpdbg/sbe_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ int sbe_ffdc_get(struct pdbg_target *target, uint32_t *status, uint8_t **ffdc,
return -1;
}

*status = chipop->ffdc_get(target, &data, &len);
struct pdbg_target *fsi = get_ody_fsi_target(target);

*status = chipop->ffdc_get(chipop, fsi, &data, &len);
if (data && len > 0) {
*ffdc = malloc(len);
assert(*ffdc);
Expand Down
8 changes: 4 additions & 4 deletions libpdbg/sbefifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ static uint32_t sbefifo_op_ffdc_get(struct chipop *chipop, const uint8_t **ffdc,

}

static uint32_t sbefifo_op_ody_ffdc_get(struct pdbg_target *ocmb, const uint8_t **ffdc, uint32_t *ffdc_len)
static uint32_t sbefifo_op_ody_ffdc_get(struct chipop_ody *chipop, struct pdbg_target *fsi,
const uint8_t **ffdc, uint32_t *ffdc_len)
{
struct pdbg_target *fsi = get_ody_fsi_target(ocmb);
struct sbefifo *sbefifo = target_to_sbefifo(ocmb);

struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent);

struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo);
uint32_t status, value = 0;
int rc;
Expand Down

0 comments on commit d37560b

Please sign in to comment.