summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/xip/p9_xip_tool.C
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2016-10-19 21:20:45 -0500
committerspashabk-in <shakeebbk@in.ibm.com>2016-12-20 05:18:56 -0600
commit1a3a8543f8c589f8f1ecb633798096e1d21417b0 (patch)
tree20abde6fdbbd1d74521dbf86cfe1639cadb39895 /src/import/chips/p9/xip/p9_xip_tool.C
parent6d78d6dc0ac045932e815ab2e6646ca40b46d701 (diff)
downloadtalos-sbe-1a3a8543f8c589f8f1ecb633798096e1d21417b0.tar.gz
talos-sbe-1a3a8543f8c589f8f1ecb633798096e1d21417b0.zip
TOR reduction: Ditching DeltaRingLayout and RingLayout_t
- Complete overhaul of get_ring_from_sbe_image for improved clarity in effort to remove anything related to 8Byte RingLayout header, incl built-in and hardcoded assumptions. - Functional overhaul of get_ring_from_cme/sgpe_image, but only slight improvement in clarity. Also removed any traces of RingLayout assumptions. (Beautification of these functions will be in separate commit.) - Overhaul of tor_append_ring for clarity and improved clarity elsewhere where PUT_SINGLE_RING is used. - Updated p9_tor.C|H in order to expose version 2 of TOR API, which eliminates the 8B RingLayout structure, in order to work with Cronus which currently assumes, due to pulling in the p9_tor.H header file, that RingLayout structure is being used. - Updated p9_scan_compression.C to remove most zero padding at end of compressed ring (i.e., merged commit 32647 into this commit in order to be able to merge into gerrit). - The scan compression code used to pad the compressed ring at its end with zeros up to the next 8 byte boundary. For P9, no padding is needed. Most of this padding is now removed, just keeping a padding to the next 2 byte boundary for convenience. Removal of these padding bytes saves about 400 bytes in SEEPROM. - Added p9_ipl_build.C because it assumes an 8B alignment of the SBE ring block which is no longer the case with RS4v3. We've been lucky so far in our tests. Change-Id: I08edef8e53302dab765a73dc4d6ca68cd8dce440 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31524 Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> 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: Prachi Gupta <pragupta@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32268 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/xip/p9_xip_tool.C')
-rw-r--r--src/import/chips/p9/xip/p9_xip_tool.C9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/import/chips/p9/xip/p9_xip_tool.C b/src/import/chips/p9/xip/p9_xip_tool.C
index 3eeb5107..680735d0 100644
--- a/src/import/chips/p9/xip/p9_xip_tool.C
+++ b/src/import/chips/p9/xip/p9_xip_tool.C
@@ -50,6 +50,7 @@
using namespace P9_TOR;
#endif
+
#define LINE_SIZE_MAX 1024 // Max size of a single snprintf dump.
#define RING_BUF_SIZE_MAX 1000000
@@ -1862,13 +1863,15 @@ int dissectRingSectionTor( void* i_ringSection,
//
if (rc == TOR_RING_FOUND)
{
+ uint32_t l_ringSize = htobe16(((CompressedScanData*)ringBlockPtr)->iv_size);
// Check ring block size.
- if ( htobe32(((RingLayout_t*)ringBlockPtr)->sizeOfThis) != ringBlockSize )
+ if ( l_ringSize != ringBlockSize || l_ringSize == 0 )
{
fprintf(stderr, "tor_access_ring() was successful and found a ring but "
- "sizeOfThis(=0x%08x) != ringBlockSize(=0x%08x) is a bug.\n",
- htobe32(((RingLayout_t*)ringBlockPtr)->sizeOfThis), ringBlockSize);
+ "RS4 header's iv_size(=0x%08x) is either zero or doesn't match "
+ "size of ring buffer (ringBlockSize=0x%08x).\n",
+ l_ringSize, ringBlockSize);
exit(1);
}
OpenPOWER on IntegriCloud