summaryrefslogtreecommitdiffstats
path: root/src/hwpf/src
diff options
context:
space:
mode:
authorPrasad Bg Ranganath <prasadbgr@in.ibm.com>2016-10-04 10:24:29 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-10-11 13:42:50 -0400
commitcfffbd57bd1feb4602b386b8ab3912820574293f (patch)
treeabedae5316353174aaab0f01c790020776dc060f /src/hwpf/src
parent338653266e2a4b4bf2218616e210c825975c1889 (diff)
downloadtalos-sbe-cfffbd57bd1feb4602b386b8ab3912820574293f.tar.gz
talos-sbe-cfffbd57bd1feb4602b386b8ab3912820574293f.zip
SBE:PUTRING: Instance repair support
Change-Id: Id0ec9ea3dadff49e785b73669b4e76bba77093b8 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30679 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30683 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/hwpf/src')
-rw-r--r--src/hwpf/src/plat_ring_traverse.C37
1 files changed, 29 insertions, 8 deletions
diff --git a/src/hwpf/src/plat_ring_traverse.C b/src/hwpf/src/plat_ring_traverse.C
index 86c6515d..f93e566d 100644
--- a/src/hwpf/src/plat_ring_traverse.C
+++ b/src/hwpf/src/plat_ring_traverse.C
@@ -346,6 +346,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
l_cpltRingVariantSz = i_applyOverride ? OVERRIDE_VARIANT_SIZE :
( sizeof(EQ::RingVariants) /
sizeof(l_cpltRingVariantSz));
+
l_sectionOffset = i_sectionTOR->TOC_EQ_COMMON_RING;
if(INSTANCE_RING == l_ringType)
@@ -388,28 +389,48 @@ fapi2::ReturnCode getRS4ImageFromTor(
SBE_TRACE ("l_sectionAddr %08X",l_sectionAddr);
+ uint16_t *l_ringTorAddr = NULL;
+
if(INSTANCE_RING == l_ringType)
{
- if ( l_chipletID > l_chipletData.iv_base_chiplet_number)
+ if ( l_chipletID >= l_chipletData.iv_base_chiplet_number)
{
uint8_t l_chipletOffset =
(l_chipletID - l_chipletData.iv_base_chiplet_number);
- l_sectionAddr += (l_chipletOffset *
- (l_chipletData.iv_num_instance_rings ));
+ if (l_chipLetType == EQ_TYPE)
+ {
+ if (fapi2::TARGET_TYPE_EX & (i_target.get().getFapiTargetType()))
+ {
+ uint32_t l_ex_number = i_target.get().getTargetInstance();
+ l_chipletOffset = l_ex_number;
+ SBE_TRACE ("l_chipletID %d l_ex_number %d",l_chipletID,l_ex_number);
+ }
+ }
+ SBE_TRACE ("l_chipletID %u l_chipletOffset %u",l_chipletID, l_chipletOffset);
+ l_ringTorAddr = reinterpret_cast<uint16_t *>(l_sectionAddr )+ ((l_chipletOffset *
+ (l_chipletData.iv_num_instance_rings *l_cpltRingVariantSz)) + (l_torOffset * l_cpltRingVariantSz));
+
+ }
+ else
+ {
+ l_ringTorAddr = reinterpret_cast<uint16_t *>(l_sectionAddr) +
+ (l_torOffset * l_cpltRingVariantSz);
}
}
+ else
+ {
+ // TOR records of Ring TOR are 2 bytes in size.
+ l_ringTorAddr = reinterpret_cast<uint16_t *>(l_sectionAddr) +
+ (l_torOffset * l_cpltRingVariantSz);
+ }
// The ring variants in section TOR are expected to be in the sequence -
// 1. Base
// 2. Cache-Contained
// 3. Risk Level
- SBE_TRACE ("l_sectionAddr %08X",l_sectionAddr);
- // TOR records of Ring TOR are 2 bytes in size.
- uint16_t *l_ringTorAddr = reinterpret_cast<uint16_t *>(l_sectionAddr) +
- (l_torOffset * l_cpltRingVariantSz);
SBE_TRACE ("ring tor address %04X\n",l_ringTorAddr);
// If there are non-base variants of the ring, we'll have to check
@@ -449,7 +470,7 @@ fapi2::ReturnCode getRS4ImageFromTor(
(l_addr + *l_ringTorAddr);
SBE_TRACE("l_rs4Address %08x",l_rs4Address);
l_rc = rs4DecompressionSvc(i_target,l_rs4Address,
- i_applyOverride,i_ringMode);
+ i_applyOverride,i_ringMode,l_ringType);
if(l_rc != fapi2::FAPI2_RC_SUCCESS)
{
SBE_TRACE("Error from applyRS4_SS");
OpenPOWER on IntegriCloud