summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2018-01-24 17:48:37 -0600
committerhostboot <hostboot@us.ibm.com>2018-03-22 14:05:36 -0500
commit8fa011fcf55c2b262369920aab415db1a4741ea5 (patch)
treeca95f693048ef9c75a51e69564db96e7b5c2f7f0
parent089726145fffdd09737af9ba348b18f9ef5e498e (diff)
downloadtalos-hcode-8fa011fcf55c2b262369920aab415db1a4741ea5.tar.gz
talos-hcode-8fa011fcf55c2b262369920aab415db1a4741ea5.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>
-rw-r--r--import/chips/p9/xip/p9_xip_tool.C25
1 files changed, 7 insertions, 18 deletions
diff --git a/import/chips/p9/xip/p9_xip_tool.C b/import/chips/p9/xip/p9_xip_tool.C
index e4c17dc7..99091b1e 100644
--- a/import/chips/p9/xip/p9_xip_tool.C
+++ b/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