summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/xip
diff options
context:
space:
mode:
authorSumit Kumar <sumit_kumar@in.ibm.com>2017-06-06 04:18:53 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2017-07-17 00:30:55 -0400
commita4192faf2267e753085895944499bf6b024afab2 (patch)
tree1db78fadfbc88bc9acd80e31f92bc31e1eb08b04 /src/import/chips/p9/xip
parentf4d1d2ceb2bced8640e9622e01bde5ed5e256735 (diff)
downloadtalos-sbe-a4192faf2267e753085895944499bf6b024afab2.tar.gz
talos-sbe-a4192faf2267e753085895944499bf6b024afab2.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> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41408 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> 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_image.C6
-rw-r--r--src/import/chips/p9/xip/p9_xip_image.h3
-rw-r--r--src/import/chips/p9/xip/p9_xip_tool.C58
3 files changed, 7 insertions, 60 deletions
diff --git a/src/import/chips/p9/xip/p9_xip_image.C b/src/import/chips/p9/xip/p9_xip_image.C
index f73eb531..50393442 100644
--- a/src/import/chips/p9/xip/p9_xip_image.C
+++ b/src/import/chips/p9/xip/p9_xip_image.C
@@ -2054,7 +2054,6 @@ p9_xip_get_section(const void* i_image,
{
int rc = 0;
P9XipSection* imageSection;
-
rc = xipGetSectionPointer(i_image, i_sectionId, &imageSection);
if (!rc)
@@ -2110,6 +2109,11 @@ p9_xip_get_section(const void* i_image,
}
}
}
+ else
+ {
+ // Invalid arg, caller error or code bug.
+ rc = P9_XIP_INVALID_ARGUMENT;
+ }
return rc;
}
diff --git a/src/import/chips/p9/xip/p9_xip_image.h b/src/import/chips/p9/xip/p9_xip_image.h
index 48943b6a..924acfa8 100644
--- a/src/import/chips/p9/xip/p9_xip_image.h
+++ b/src/import/chips/p9/xip/p9_xip_image.h
@@ -1506,8 +1506,6 @@ p9_xip_decode_toc_dump(void* i_image, void* i_dump,
/// Code bug in the ddLevel handling codes
#define P9_XIP_DDLEVEL_CODE_BUG 22
-/// Temporary error code to help prevent image co-req for stage 2 release of RTC174302
-#define P9_XIP_OVERLAYS_NOT_SUPPORTED 23
/// Applications can expand this macro to declare an array of string forms of
/// the error codes if desired.
@@ -1536,7 +1534,6 @@ p9_xip_decode_toc_dump(void* i_image, void* i_dump,
"P9_XIP_NO_DDLEVEL_SUPPORT", \
"P9_XIP_DDLEVEL_NOT_FOUND", \
"P9_XIP_DDLEVEL_CODE_BUG", \
- "P9_XIP_OVERLAYS_NOT_SUPPORTED", \
}
/// Applications can use this macro to safely index the array of error
diff --git a/src/import/chips/p9/xip/p9_xip_tool.C b/src/import/chips/p9/xip/p9_xip_tool.C
index e219abf4..04555105 100644
--- a/src/import/chips/p9/xip/p9_xip_tool.C
+++ b/src/import/chips/p9/xip/p9_xip_tool.C
@@ -1742,60 +1742,6 @@ TEST(void* io_image, const int i_argc, const char** i_argv)
#ifndef __PPE__ // Needed on the ppe side to avoid TOR API
-
-// 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).
-static
-void printRawRing( 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++)
- {
- fprintf( stdout, "%02x", *(data + i));
-
- if (++bytePerWordCount == 4)
- {
- fprintf( stdout, " ");
- bytePerWordCount = 0;
- }
-
- if (++bytePerLineCount == 32)
- {
- fprintf( stdout, "\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
- fprintf( stdout, "%01x", nibblesToPrint >> 4);
- }
- else
- {
- // Content in both nibbles. Dump both nibbles
- fprintf( stdout, "%02x", nibblesToPrint);
- }
- }
-
- fprintf( stdout, "\n");
-}
-
-
//@FIXME: This should be improved. Probably defined somewhere else.
#define CHIPLET_ID_MAX (uint8_t)0x37
@@ -2115,10 +2061,10 @@ int dissectRingSectionTor( void* i_ringSection,
if (i_listingModeId == LMID_RAW)
{
fprintf( stdout, "\nRaw decompressed DATA nibbles:\n");
- printRawRing( data, bits);
+ print_raw_ring( data, bits);
fprintf( stdout, "\nRaw decompressed CARE nibbles:\n");
- printRawRing( care, bits);
+ print_raw_ring( care, bits);
fprintf( stdout, "\n");
}
OpenPOWER on IntegriCloud