diff options
author | Claus Michael Olsen <cmolsen@us.ibm.com> | 2018-02-12 14:24:33 -0600 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2018-02-13 22:19:23 -0500 |
commit | 37930cd26aeecd7b71096b60b1ef23b4b747e9ed (patch) | |
tree | 3f8e8d65887971b02048d190e3383f13ce56c26d /src/import/chips/p9/utils/imageProcs/p9_tor.C | |
parent | 615f07e237ef412e12d0dd5dc95ce28ec882ecbe (diff) | |
download | talos-sbe-37930cd26aeecd7b71096b60b1ef23b4b747e9ed.tar.gz talos-sbe-37930cd26aeecd7b71096b60b1ef23b4b747e9ed.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>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53904
Diffstat (limited to 'src/import/chips/p9/utils/imageProcs/p9_tor.C')
-rw-r--r-- | src/import/chips/p9/utils/imageProcs/p9_tor.C | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.C b/src/import/chips/p9/utils/imageProcs/p9_tor.C index 56919312..b249b32d 100644 --- a/src/import/chips/p9/utils/imageProcs/p9_tor.C +++ b/src/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; } |