summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/xip/p9_xip_tool.C
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2018-01-24 17:48:37 -0600
committerSachin Gupta <sgupta2m@in.ibm.com>2018-02-08 18:53:36 -0500
commitef76156448231b399b2895ca432c34cde9cab67b (patch)
treeb70acf0fc71bb4347e1538fbcb71d8064db3a70b /src/import/chips/p9/xip/p9_xip_tool.C
parent1f773f1f298361bc64ebd97859a997e400e4442d (diff)
downloadtalos-sbe-ef76156448231b399b2895ca432c34cde9cab67b.tar.gz
talos-sbe-ef76156448231b399b2895ca432c34cde9cab67b.zip
Additional risk level support - (step 1) Backward compatibility
The purpose of this commit is to avoid a coreq situation by ensuring this commit is fully propagated through our repos and test drivers before introducing the change to the new HW image with two RLs. The commit enables simultaneous support for producing a HW image and retrieving rings from an image that has either one or two risk level (RL) rings in the .rings section. The commit however does NOT actually, yet, make any changes to the image which is the aim of the (step 2) commit 53292. Nor does this commit generate any raw ring files or process any RL2 level rings yet. Again this will happen in 53292. The commit also includes, - various related cleanups in data naming and ring file processing, - some data and invironment specific parts in ring_apply.C have been moved to common_ringId.C. Key_Cronus_Test=XIP_REGRESS HW-Image-Prereq=53292 - This commit (52659) must be fully merged before merging 53292. Change-Id: I402d53c4a3ca6a084c958321069cc6f60e04ad24 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52659 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Dev-Ready: Joseph J. McGill <jmcgill@us.ibm.com> Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+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/53015 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.C25
1 files changed, 7 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 935867fe..3955b62d 100644
--- a/src/import/chips/p9/xip/p9_xip_tool.C
+++ b/src/import/chips/p9/xip/p9_xip_tool.C
@@ -40,8 +40,6 @@
#include <unistd.h>
#include <string>
-#undef P9_XIP_TOOL_VERBOSE
-
#include "p9_xip_image.h"
#include "common_ringId.H"
#ifndef __PPE__ // Needed on ppe side to avoid having to include various APIs
@@ -2066,17 +2064,17 @@ int dissectRingSectionTor( uint8_t* i_ringSection,
//--------------------
// Ring variant loop.
// - Base, cache, risk or just "base" if no ring variant
- for (ringVariant = 0; ringVariant < OVERRIDE; ringVariant++)
+ for (ringVariant = 0; ringVariant < NUM_RING_VARIANTS; ringVariant++)
{
- if ((torMagic == TOR_MAGIC_OVRD && ringVariant != BASE) ||
- (torMagic == TOR_MAGIC_OVLY && ringVariant != BASE) ||
- (torMagic == TOR_MAGIC_CEN && ringVariant == CC))
+ if ((torMagic == TOR_MAGIC_OVRD && ringVariant != RV_BASE) ||
+ (torMagic == TOR_MAGIC_OVLY && ringVariant != RV_BASE) ||
+ (torMagic == TOR_MAGIC_CEN && ringVariant == RV_CC))
{
continue;
}
//----------------------
- // Unique ring ID loop.
+ // Ring ID loop.
for (ringId = 0; ringId < numRingIds; ringId++)
{
@@ -2087,21 +2085,12 @@ int dissectRingSectionTor( uint8_t* i_ringSection,
// with the input value of instanceId, instanceInputId.
// - Start looping safely from 0 so that if instanceId is adjusted
// in tor_access_ring, i.e. in case it's an instance ring, it will
- // return a non-zeor value for instanceId.
+ // return a non-zero value for instanceId.
uint8_t instanceInputId;
for (instanceId = 0; instanceId <= INSTANCE_ID_MAX; instanceId++)
{
instanceInputId = instanceId;
-#ifdef P9_XIP_TOOL_VERBOSE
- fprintf( stderr, "Processing: "
- "DD=0x%02x "
- "PPE=%s "
- "Variant=%s "
- "RingID=%d "
- "InstanceID=0x%02x\n",
- ddLevel, ppeTypeName[ppeType], ringVariantName[ringVariant], ringId, instanceId);
-#endif
ringBlockSize = MAX_RING_BUF_SIZE_TOOL;
rc = tor_access_ring( i_ringSection,
@@ -2904,7 +2893,7 @@ int check_sbe_ring_section_size( void* i_hwImage,
rc = tor_get_block_of_rings( ringsSection,
i_ddLevel,
PT_SBE,
- NOT_VALID,
+ UNDEFINED_RING_VARIANT,
l_blockPtr,
l_blockSize);
OpenPOWER on IntegriCloud