summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/xip/p9_xip_tool.C
diff options
context:
space:
mode:
authorSumit Kumar <sumit_kumar@in.ibm.com>2017-01-31 04:50:15 -0600
committerSachin Gupta <sgupta2m@in.ibm.com>2017-11-02 02:50:48 -0400
commit0d8c248cc29e659ab67fffcd26f54a660569ab8a (patch)
tree855fc8c36bdc6db447061de8c971b03bc069a751 /src/import/chips/p9/xip/p9_xip_tool.C
parent67a37783b04bb5b8de3648def3329b0b5000b852 (diff)
downloadtalos-sbe-0d8c248cc29e659ab67fffcd26f54a660569ab8a.tar.gz
talos-sbe-0d8c248cc29e659ab67fffcd26f54a660569ab8a.zip
Centaur ring support - ring_apply and ring data
- Introduces Centaur ring ID header files and ring_apply support to generate a separate Centaur ring image file. - Introduces common ring ID header file consumed by both P9 and Centaur and all user codes, e.g. putRing, ipl_build, xip_tool, etc. - Introduces a namespace approach for complete separation of P9 and Centaur ring data and to facilitate execution time selection of either P9 and Centaur ring data. - Added Centaur image .rings generation function to p9_ring_apply. - This commit does NOT support Centaur in the TOR API nor in xip_tool. See commit 38018 for that support. - Modified hw_image.mk file to support Centaur XIP image generation. - Updated ring_apply to also support .overrides ring gen for Centaur. Change-Id: I12a27b194dc14d906fea7bc273eb9f766f0fc5bf Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35639 Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sumit Kumar <sumit_kumar@in.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Thi N. Tran <thi@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/36010 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.C73
1 files changed, 49 insertions, 24 deletions
diff --git a/src/import/chips/p9/xip/p9_xip_tool.C b/src/import/chips/p9/xip/p9_xip_tool.C
index 069cb426..011f90e4 100644
--- a/src/import/chips/p9/xip/p9_xip_tool.C
+++ b/src/import/chips/p9/xip/p9_xip_tool.C
@@ -46,9 +46,16 @@
#include "p9_xip_image.h"
#ifndef __PPE__ // Needed on ppe side to avoid TOR API
- #include "p9_tor.H"
- #include "p9_scan_compression.H"
- using namespace P9_TOR;
+#include "p9_tor.H"
+#include "p9_scan_compression.H"
+namespace P9_RID
+{
+#include "p9_ringId.H"
+};
+namespace CEN_RID
+{
+#include "cen_ringId.H"
+}
#endif
@@ -211,15 +218,10 @@ static inline const char* get_sectionName(uint64_t magic, int index)
{
switch (magic)
{
-// case P9_XIP_MAGIC_BASE:
-// FIXME
-// break;
-// case P9_XIP_MAGIC_CENTAUR:
-// FIXME
-// break;
case P9_XIP_MAGIC_SEEPROM:
return P9_XIP_SECTION_NAME(g_sectionNamesSbe, index);
+ case P9_XIP_MAGIC_CENTAUR:
case P9_XIP_MAGIC_HW:
return P9_XIP_SECTION_NAME(g_sectionNamesHw, index);
@@ -1770,14 +1772,15 @@ int dissectRingSectionTor( void* i_ringSection,
{
int rc = 0;
uint32_t i;
+ RingId_t numRingIds = 0;
uint32_t torMagic = 0xffffffff; // Undefined value
- uint8_t chipType = 0xff; // Undefined value
+ ChipType_t chipType = 0xff; // Undefined value
uint32_t numDdLevels = 0; // Undefined value
uint8_t iDdLevel, ddLevel = 0xff; // Undefined value
- uint8_t ppeType;
- uint8_t ringId;
+ PpeType_t ppeType;
+ RingId_t ringId;
RingType_t ringType;
- uint8_t ringVariant;
+ RingVariant_t ringVariant;
uint8_t instanceId;
void* ringBlockPtr;
uint32_t ringBlockSize;
@@ -1808,6 +1811,28 @@ int dissectRingSectionTor( void* i_ringSection,
ddLevel = torHeader->ddLevel;
numDdLevels = torHeader->numDdLevels;
+ //
+ // Make some ChipType specific data translations
+ //
+ switch (chipType)
+ {
+ case CT_P9N:
+ numRingIds = P9_RID::NUM_RING_IDS;
+ break;
+
+ case CT_P9C:
+ numRingIds = P9_RID::NUM_RING_IDS;
+ break;
+
+ case CT_CEN:
+ numRingIds = CEN_RID::NUM_RING_IDS;
+ break;
+
+ default:
+ fprintf(stderr, "ERROR: Invalid chipType(=%d)\n", chipType);
+ exit(1);
+ }
+
fprintf(stdout, "---------------------------------\n");
fprintf(stdout, "* TOR header summary *\n");
fprintf(stdout, "---------------------------------\n");
@@ -1858,10 +1883,10 @@ int dissectRingSectionTor( void* i_ringSection,
for (ppeType = 0; ppeType < NUM_PPE_TYPES; ppeType++)
{
- if ((torMagic == TOR_MAGIC_SGPE && ppeType != SGPE) ||
- (torMagic == TOR_MAGIC_CME && ppeType != CME) ||
- (torMagic == TOR_MAGIC_SBE && ppeType != SBE) ||
- (torMagic == TOR_MAGIC_OVRD && ppeType != SBE))
+ if ((torMagic == TOR_MAGIC_SGPE && ppeType != PT_SGPE) ||
+ (torMagic == TOR_MAGIC_CME && ppeType != PT_CME) ||
+ (torMagic == TOR_MAGIC_SBE && ppeType != PT_SBE) ||
+ (torMagic == TOR_MAGIC_OVRD && ppeType != PT_SBE))
{
continue;
}
@@ -1879,15 +1904,15 @@ int dissectRingSectionTor( void* i_ringSection,
//----------------------
// Unique ring ID loop.
- for (ringId = 0; ringId < NUM_RING_IDS; ringId++)
+ for (ringId = 0; ringId < numRingIds; ringId++)
{
- ringType = (RingType_t)(-1);
+ ringType = -1;
//---------------------------
// Chiplet instance ID loop.
// - Only loop once if ringId is a common ring.
- for (instanceId = 0; instanceId <= CHIPLET_ID_MAX && ringType != COMMON; instanceId++)
+ for (instanceId = 0; instanceId <= CHIPLET_ID_MAX && ringType != COMMON_RING; instanceId++)
{
#ifdef P9_XIP_TOOL_VERBOSE
fprintf( stderr, "Processing: "
@@ -1901,11 +1926,11 @@ int dissectRingSectionTor( void* i_ringSection,
ringBlockSize = RING_BUF_SIZE_MAX;
rc = tor_access_ring( i_ringSection,
- (RingID)ringId,
+ ringId,
ddLevel,
- (PpeType_t)ppeType,
+ ppeType,
ringType, // IO parm
- (RingVariant_t)ringVariant,
+ ringVariant,
instanceId, // IO parm
GET_SINGLE_RING,
&ringBlockPtr, // IO parm
@@ -2467,7 +2492,7 @@ int check_sbe_ring_section_size( void* i_hwImage,
// section size
rc = tor_get_block_of_rings( ringsSection,
i_ddLevel,
- SBE,
+ PT_SBE,
l_ringType,
BASE,
unused_parm,
OpenPOWER on IntegriCloud