diff options
author | Martin Peschke <mpeschke@de.ibm.com> | 2016-12-16 17:52:33 +0100 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-01-25 09:15:07 -0500 |
commit | 2371c946def6923c102d67dd1bf79f21b911c656 (patch) | |
tree | a4ef88e567128c9dc32148ea6ad7c6e1ba1dfafc /src/import/chips/p9/xip | |
parent | f5ebf5946f16f4fc0e336bc78661bc4b19f69912 (diff) | |
download | talos-sbe-2371c946def6923c102d67dd1bf79f21b911c656.tar.gz talos-sbe-2371c946def6923c102d67dd1bf79f21b911c656.zip |
TOR space reductions
These changes avoid some waste of valuable memory used to store
TOR and rings contained in TOR. This is mostly needed as a SEEPROM relief.
Contains:
- 12 byte ring header (former 31551 commit)
- less zero padding at the end of compressed ring (former 31524 commit)
- removed an additional ring meta data structure (former 31524 commit)
In addition, it contains these fixes:
- fixed a bunch of scan addresses (former 33969 commit)
- increased size of ring decompression buffer (former 32796 commit)
- zero byte ring padding up to 4 byte boundaries for SBE (former 33969
commit)
- added dbgl control of error trace after call to get_ring_from_sbe_image
- added enumerated ringId to the RS4v3 header
- fixed incorrect scan address masks for even/odd EX RS4 v3 ring handling
in MVPD accessor functions
- fixed incorrect scan address region bits for odd EX rings translated from
RS4 v2 to RS4 v3 in MVPD accessor functions
CMVC-Prereq: 1015124
Change-Id: I8fd00760e6ac2b3760994d1ca819fffbf35188ca
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33993
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34014
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/xip')
-rw-r--r-- | src/import/chips/p9/xip/p9_xip_tool.C | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/import/chips/p9/xip/p9_xip_tool.C b/src/import/chips/p9/xip/p9_xip_tool.C index 50200153..27150f55 100644 --- a/src/import/chips/p9/xip/p9_xip_tool.C +++ b/src/import/chips/p9/xip/p9_xip_tool.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -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 @@ -1752,9 +1753,6 @@ int dissectRingSectionTor( void* i_ringSection, void* ringBlockPtr; uint32_t ringBlockSize; char ringName[32]; - void* hostRs4Container; - uint32_t compressedBits = 0, ringLength = 0; - double compressionPct = 0; uint32_t ringSeqNo = 0; // Ring sequence number // @@ -1865,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); } @@ -1910,12 +1910,6 @@ int dissectRingSectionTor( void* i_ringSection, // Summarize all characteristics of the ring block if "normal" or "long" (default). if ( i_listingModeId == LMID_NORMAL || i_listingModeId == LMID_LONG ) { - // Calculate RS4 compression efficiency. - hostRs4Container = (void*)( (uintptr_t)ringBlockPtr + sizeof(RingLayout_t) ); - compressedBits = htobe32(((CompressedScanData*)hostRs4Container)->iv_algorithmReserved) * 4; - ringLength = htobe32(((CompressedScanData*)hostRs4Container)->iv_length); - compressionPct = (double)compressedBits / (double)ringLength * 100.0; - sizeDisLine = snprintf( lineDis, LINE_SIZE_MAX, "-----------------------------\n" "%i.\n" @@ -1925,13 +1919,10 @@ int dissectRingSectionTor( void* i_ringSection, "ringName = %s\n" "ringVariant = %s\n" "instanceId = 0x%02x\n" - "ringBlockSize = 0x%08x\n" - "RS4 ring size [bits] = %u\n" - "Raw ring size [bits] = %u\n" - "Compression [%%] = %0.2f\n", + "ringBlockSize = 0x%08x\n", ringSeqNo, ddLevel, ppeTypeName[ppeType], ringId, ringName, ringVariantName[ringVariant], instanceId, - ringBlockSize, compressedBits, ringLength, compressionPct ); + ringBlockSize); if (sizeDisLine >= LINE_SIZE_MAX) { |