summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H2
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_scan_compression.H5
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_tor.C4
-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
6 files changed, 15 insertions, 63 deletions
diff --git a/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H b/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H
index 767b9ebb..508a6bc4 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_infrastruct_help.H
+++ b/src/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/src/import/chips/p9/utils/imageProcs/p9_scan_compression.H b/src/import/chips/p9/utils/imageProcs/p9_scan_compression.H
index e26b695a..93ff8a44 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_scan_compression.H
+++ b/src/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/src/import/chips/p9/utils/imageProcs/p9_tor.C b/src/import/chips/p9/utils/imageProcs/p9_tor.C
index 24d23d97..05f9ff3d 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_tor.C
+++ b/src/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);
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