diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2016-12-11 08:50:55 -0600 |
---|---|---|
committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 17:04:21 -0500 |
commit | b2390a76461552ba4f244457fdb4278a8009011a (patch) | |
tree | 5b405ef9bf2e4cf098725c084c41d8c7ff3812c9 /import/chips/p9/utils | |
parent | 1f939826fcf21ac0dab1ae4bd8a5558603cac911 (diff) | |
download | talos-hcode-b2390a76461552ba4f244457fdb4278a8009011a.tar.gz talos-hcode-b2390a76461552ba4f244457fdb4278a8009011a.zip |
Add check to verify SBE .ring section size
-Add option to p9_xip_tool to verify the size of the
DD specific .rings section intended for the SBE image
-Update makefiles to correctly run p9_ring_apply to insert
and extract the DD level specific rings.
-Update tor_access_ring to correctly advance the pointer
to the next DD level in the HW image so the size can
be extracted correctlty.
Change-Id: I21a53b5d11341a14a4e9cc88388c9c2050394095
RTC:165558
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33873
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'import/chips/p9/utils')
-rw-r--r-- | import/chips/p9/utils/imageProcs/p9_tor.C | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/import/chips/p9/utils/imageProcs/p9_tor.C b/import/chips/p9/utils/imageProcs/p9_tor.C index 1e3dcc30..30f4c4b1 100644 --- a/import/chips/p9/utils/imageProcs/p9_tor.C +++ b/import/chips/p9/utils/imageProcs/p9_tor.C @@ -1191,12 +1191,14 @@ int tor_access_ring( void* i_ringSection, // Ring section ptr MY_INF("tor_access_ring(): No of DD levels: %d \n", ddLevelCount); } - for (uint8_t i = 0; i < ddLevelCount; i++) + // start at one since we use that as an offset + for (uint8_t i = 1; i <= ddLevelCount; i++) { - local = 2; + local = 2 * (i); ddLevelOffset = *((uint32_t*)i_ringSection + local); - ddLevel = htobe32(ddLevelOffset) >> 24 & 0x000000FF; - ddLevelOffset = htobe32(ddLevelOffset) & 0x00FFFFFF; + + ddLevel = be32toh(ddLevelOffset) >> 24 & 0x000000FF; + ddLevelOffset = be32toh(ddLevelOffset) & 0x00FFFFFF; if (i_dbgl > 1) { @@ -1206,12 +1208,11 @@ int tor_access_ring( void* i_ringSection, // Ring section ptr if ( ddLevel == i_ddLevel) { - ddLevelOffset = *((uint32_t*)i_ringSection + local); - ddLevelOffset = htobe32(ddLevelOffset) & 0x00FFFFFF; ddLevelOffset = ddLevelOffset + sizeof(TorNumDdLevels_t); local = local + 1; ddBlockSize = *((uint32_t*)i_ringSection + local); - ddBlockSize = htobe32(ddBlockSize); + ddBlockSize = be32toh(ddBlockSize); + bDdCheck = 1; break; } |