summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2/plat_hw_access.C
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2018-01-11 08:29:37 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-03-06 16:17:40 -0500
commitb456c82ad8202fee197dee0274959cd020009f79 (patch)
treeb099ac1a763d869ec2013213d06095ac336ee949 /src/usr/fapi2/plat_hw_access.C
parent82aaa7df696af0aa1b4b593a25f15671e2214e7d (diff)
downloadtalos-hostboot-b456c82ad8202fee197dee0274959cd020009f79.tar.gz
talos-hostboot-b456c82ad8202fee197dee0274959cd020009f79.zip
Modify putrRing code to pull rings from centaur hw image
-Remove hardcoded data data used for centaur init -Add code to extract RS4 compressed ring data from centaur hardware image Change-Id: If3f5faaebe384a4e0756b06f518b270c7bd2062b RTC: 171739 CMVC-Prereq: 1043602 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52063 Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2/plat_hw_access.C')
-rw-r--r--src/usr/fapi2/plat_hw_access.C21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/usr/fapi2/plat_hw_access.C b/src/usr/fapi2/plat_hw_access.C
index 09da6e320..9339e4ed9 100644
--- a/src/usr/fapi2/plat_hw_access.C
+++ b/src/usr/fapi2/plat_hw_access.C
@@ -943,13 +943,15 @@ ReturnCode platPutRing(const Target<TARGET_TYPE_MEMBUF_CHIP>& i_target,
// trace in common fapi2_hw_access.H
bool l_traceit = platIsScanTraceEnabled();
- unsigned char * l_ringData = nullptr;
+ // max ring size in centaur is 76490 bits - allocate a 10k byte
+ // buffer as the max size
+ uint8_t * l_ringData = (uint8_t*)malloc(MAX_CENTAUR_RING_SIZE);
+
size_t l_ringLength = 0;
uint64_t l_ringAddress = 0;
// grab the ring data from the cen.hw_image
- l_rc = get_ring(i_target, i_ringID, l_ringData,
- l_ringLength, l_ringAddress);
+ l_rc = get_ring(i_target, i_ringID, l_ringData,l_ringLength, l_ringAddress);
if( l_rc == fapi2::FAPI2_RC_SUCCESS )
{
@@ -999,12 +1001,10 @@ ReturnCode platPutRing(const Target<TARGET_TYPE_MEMBUF_CHIP>& i_target,
}
else
{
- // $TODO RTC:171739 - add error case, current procedure calls
- // with ring ids for rings which currently do not have any known
- // content but were scanned in p8 - Joe confirmed these rings do
- // not currently have content - we will need to decide if procedure
- // should be updated to remove the calls or we continue to ignore
- FAPI_INF("platPutRing: called with unsupported ring ID %d!", i_ringID);
+ // Design decision was to add a trace but not error out for rings
+ // which did not exist in the hw image
+ FAPI_INF("platPutRing: ring ID %d not present in hw image",
+ i_ringID);
}
}
else
@@ -1013,6 +1013,9 @@ ReturnCode platPutRing(const Target<TARGET_TYPE_MEMBUF_CHIP>& i_target,
FAPI_ERR("get_ring() returned error");
}
+ free(l_ringData);
+ l_ringData = nullptr;
+
FAPI_DBG(EXIT_MRK "platPutRing() with RingId_t");
return l_rc;
}
OpenPOWER on IntegriCloud