summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2018-02-12 14:24:33 -0600
committerhostboot <hostboot@us.ibm.com>2018-03-22 14:07:16 -0500
commit09661ceffcc087df516f7d74942976d3f181acd3 (patch)
tree68c15b80cd06b2ba9abf83f8565101409d23d3c6
parent14732bcb69ba7d79ef6446d676cb66101f39a05b (diff)
downloadtalos-hcode-09661ceffcc087df516f7d74942976d3f181acd3.tar.gz
talos-hcode-09661ceffcc087df516f7d74942976d3f181acd3.zip
Fix to TOR API failure on 32b systems
This fixes a bug wrt incorrect use of sizeof() on a pointer that only shows up on 32b system (but is luckily successful on 64b systems). Key_Cronus_Test=XIP_REGRESS Change-Id: I9f33c5728cb68acaeee55580c9f1c1b8743cbd8d CQ: SW412437 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53875 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
-rw-r--r--import/chips/p9/utils/imageProcs/p9_tor.C7
1 files changed, 6 insertions, 1 deletions
diff --git a/import/chips/p9/utils/imageProcs/p9_tor.C b/import/chips/p9/utils/imageProcs/p9_tor.C
index 769e6dad..7014beb3 100644
--- a/import/chips/p9/utils/imageProcs/p9_tor.C
+++ b/import/chips/p9/utils/imageProcs/p9_tor.C
@@ -121,7 +121,7 @@ int get_ring_from_ring_section( void* i_ringSection, // Ring secti
//
// 1. Calc offset to TOR slot pointing to chiplet's COM or INST section
cpltOffset = sizeof(TorHeader_t) +
- iCplt * sizeof(cpltBlock) +
+ iCplt * sizeof(TorCpltBlock_t) +
bInstCase * sizeof(cpltBlock->cmnOffset);
// 2. Retrive offset, endian convert and make it relative to ring section origin
cpltOffset = *(uint32_t*)( (uint8_t*)i_ringSection + cpltOffset );
@@ -226,6 +226,11 @@ int get_ring_from_ring_section( void* i_ringSection, // Ring secti
if (ringOffset)
{
MY_ERR("Ring container is already present in image\n");
+ MY_ERR(" Ring section addr: 0x%016lx (First 8B: 0x%016lx)\n",
+ (uintptr_t)i_ringSection,
+ be64toh(*((uint64_t*)i_ringSection)));
+ MY_ERR(" cpltOffset=0x%08x, torSlotNum=0x%x, TOR offset=0x%04x\n",
+ cpltOffset, torSlotNum, ringOffset);
return TOR_RING_AVAILABLE_IN_RINGSECTION;
}
OpenPOWER on IntegriCloud