From ef76156448231b399b2895ca432c34cde9cab67b Mon Sep 17 00:00:00 2001 From: Claus Michael Olsen Date: Wed, 24 Jan 2018 17:48:37 -0600 Subject: 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 Tested-by: Cronus HW CI Dev-Ready: Joseph J. McGill Reviewed-by: Joseph J. McGill Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53015 Reviewed-by: Sachin Gupta --- src/import/chips/p9/xip/p9_xip_tool.C | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'src/import/chips/p9/xip/p9_xip_tool.C') 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 #include -#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); -- cgit v1.2.1