Skip to content

Commit

Permalink
Fix getscom on DDR4 everst system
Browse files Browse the repository at this point in the history
The index values of pdbg targets are updated to match the physical
device path. So using the index value for getting the scoms shall fail.
The fapi position is still connected to the OMI index. So using the fapi
position to calculate the instance id in case of DDR4 system.
  • Loading branch information
deepakala-k committed May 15, 2024
1 parent 5217c82 commit 46e2ab7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libpdbg/ocmb.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ static int sbefifo_ocmb_getscom(struct ocmb *ocmb, uint64_t addr, uint64_t *valu
struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo);
uint8_t instance_id;

instance_id = pdbg_target_index(&ocmb->target) & 0x0f;
uint32_t fapi_pos = 0;
pdbg_target_get_attribute(&ocmb->target, "ATTR_FAPI_POS", 4, 1, &fapi_pos);
instance_id = fapi_pos & 0x0f;

return sbefifo_hw_register_get(sctx,
SBEFIFO_TARGET_TYPE_OCMB,
Expand Down

0 comments on commit 46e2ab7

Please sign in to comment.