diff options
| author | Sumit Kumar <sumit_kumar@in.ibm.com> | 2017-06-06 04:18:53 -0500 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 18:19:14 -0500 |
| commit | 19e897dd16e86b1d3b3df4e082b6bd5a058eb4b7 (patch) | |
| tree | b3818f06d1aa92503cc291b922e4f5b816967013 /import/chips/p9/utils | |
| parent | cbf44abffbfe75e96e1480cd7621f1c0bf0c5976 (diff) | |
| download | talos-hcode-19e897dd16e86b1d3b3df4e082b6bd5a058eb4b7.tar.gz talos-hcode-19e897dd16e86b1d3b3df4e082b6bd5a058eb4b7.zip | |
GPTR/Overlays stage-1b support in xip_customize
- Enabled to poll Nimbus DD level with support for overlays
in the XIP.
- Enabled to pass hw image with overlays section populated
with dd levels.
Change-Id: Ib7de3698ac103b34293115d0b4870afd0e617315
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41407
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Claus M. Olsen <cmolsen@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: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'import/chips/p9/utils')
4 files changed, 61 insertions, 3 deletions
diff --git a/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H b/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H index 8061e0db..516f3a35 100644 --- a/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H +++ b/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H @@ -72,7 +72,7 @@ enum MODEBUILD #if defined(__FAPI) #include <fapi2.H> #define MY_INF(_fmt_, _args_...) FAPI_INF(_fmt_, ##_args_) - #define MY_ERR(_fmt_, _args_...) FAPI_INF(_fmt_, ##_args_) + #define MY_ERR(_fmt_, _args_...) FAPI_ERR(_fmt_, ##_args_) #define MY_DBG(_fmt_, _args_...) FAPI_DBG(_fmt_, ##_args_) #else #ifdef WIN32 diff --git a/import/chips/p9/utils/imageProcs/p9_scan_compression.C b/import/chips/p9/utils/imageProcs/p9_scan_compression.C index 10fdf003..8a245d4c 100644 --- a/import/chips/p9/utils/imageProcs/p9_scan_compression.C +++ b/import/chips/p9/utils/imageProcs/p9_scan_compression.C @@ -157,6 +157,7 @@ #include <string.h> #include <endian.h> #include "p9_scan_compression.H" +#include "p9_infrastruct_help.H" // Diagnostic aids for debugging #ifdef DEBUG_P9_SCAN_COMPRESSION @@ -990,3 +991,55 @@ rs4_extract_cmsk(CompressedScanData* i_rs4, return SCAN_COMPRESSION_OK; } + + +// This function prints out the raw decompressed ring content in the same +// format that it appears as in EKB's ifCompiler generated raw ring +// files, i.e. *.bin.srd (DATA) and *.bin.srd.bitsModified (CARE). +void print_raw_ring( uint8_t* data, + uint32_t bits ) +{ + uint32_t i; + uint8_t bytePerWordCount = 0; // Nibble count in each word + uint32_t bytePerLineCount = 0; // Column count + uint8_t rem = bits % 8; // Rem raw bits beyond 1-byte boundary + uint8_t nibblesToPrint; // The last 1 or 2 nibbles to dump + + for (i = 0; i < bits / 8; i++) + { + MY_DBG("%02x", *(data + i)); + + if (++bytePerWordCount == 4) + { + MY_DBG(" "); + bytePerWordCount = 0; + } + + if (++bytePerLineCount == 32) + { + MY_DBG("\n"); + bytePerLineCount = 0; + } + } + + // Dump remaining bits (in whole nibbles and with any + // unused bits being zeroed) + if (rem) + { + // Ensure the rightmost (8-rem) unused bits are zeroed out + nibblesToPrint = (*(data + i) >> (8 - rem)) << (8 - rem); + + if (rem <= 4) + { + // Content only in first nibble. Dump only first nibble + MY_DBG("%01x", nibblesToPrint >> 4); + } + else + { + // Content in both nibbles. Dump both nibbles + MY_DBG("%02x", nibblesToPrint); + } + } + + MY_DBG("\n"); +} diff --git a/import/chips/p9/utils/imageProcs/p9_scan_compression.H b/import/chips/p9/utils/imageProcs/p9_scan_compression.H index 412e7f79..0d399983 100644 --- a/import/chips/p9/utils/imageProcs/p9_scan_compression.H +++ b/import/chips/p9/utils/imageProcs/p9_scan_compression.H @@ -279,6 +279,11 @@ int rs4_extract_cmsk(CompressedScanData* i_rs4, #endif // __ASSEMBLER__ +// This function prints out the raw decompressed ring content in the same +// format that it appears as in EKB's ifCompiler generated raw ring +// files, i.e. *.bin.srd (DATA) and *.bin.srd.bitsModified (CARE). +void print_raw_ring( uint8_t* data, uint32_t bits); + /// \defgroup scan_compression_magic Scan Compression Magic Numbers /// diff --git a/import/chips/p9/utils/imageProcs/p9_tor.C b/import/chips/p9/utils/imageProcs/p9_tor.C index ea8ecd46..c316fd44 100644 --- a/import/chips/p9/utils/imageProcs/p9_tor.C +++ b/import/chips/p9/utils/imageProcs/p9_tor.C @@ -129,7 +129,7 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section return TOR_INVALID_CHIPLET; } - l_num_variant = (i_RingVariant == OVERRIDE) ? 1 : l_num_variant; + l_num_variant = (i_RingVariant == OVERRIDE || i_RingVariant == OVERLAY) ? 1 : l_num_variant; if (i_dbgl > 1) { @@ -157,7 +157,7 @@ int get_ring_from_sbe_image( void* i_ringSection, // Ring section if ((strcmp( (ring_id_list_common + i)->ringName, RING_PROPERTIES[i_ringId].iv_name) == 0) && ( i_RingVariant == ring_variant_order->variant[iVariant] - || (i_RingVariant == OVERRIDE && i_magic == P9_XIP_MAGIC_SEEPROM))) + || ( (i_RingVariant == OVERRIDE || i_RingVariant == OVERLAY) && i_magic == P9_XIP_MAGIC_SEEPROM))) { strcpy(o_ringName, RING_PROPERTIES[i_ringId].iv_name); |

