summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/utils/imageProcs/p9_tor.C
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2017-12-29 14:04:28 -0600
committerSachin Gupta <sgupta2m@in.ibm.com>2018-01-14 07:50:47 -0500
commit12529174e4716303fd95a4735a3cb7f1bc4bf96b (patch)
treeb790410c7ab42ac3f08939a8be1589b730d07202 /src/import/chips/p9/utils/imageProcs/p9_tor.C
parentfc81ad0fabee2baa778e6c3063a698fe80869dcf (diff)
downloadtalos-sbe-12529174e4716303fd95a4735a3cb7f1bc4bf96b.tar.gz
talos-sbe-12529174e4716303fd95a4735a3cb7f1bc4bf96b.zip
xip_customize and TOR API: Improved DD level verification
This update propagates the extracted EC level in xip_customize through to the TOR API via the call to tor_get_single_ring(). The TOR API has been updated to verify that the requested DD level matches matches the DD level in the TOR header of the supplied ring section which, in the case of xip_customize, is an .overlays ring section. Key_Cronus_Test=XIP_REGRESS Change-Id: Ic087c269306acc0afcb8c759fe68eac63ae93d29 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51339 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Sumit Kumar <sumit_kumar@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51349 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/utils/imageProcs/p9_tor.C')
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_tor.C20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.C b/src/import/chips/p9/utils/imageProcs/p9_tor.C
index ea454c0c..e573fa9b 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_tor.C
+++ b/src/import/chips/p9/utils/imageProcs/p9_tor.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -284,7 +284,7 @@ int get_ring_from_ring_section( void* i_ringSection, // Ring secti
//////////////////////////////////////////////////////////////////////////////////////////
int tor_access_ring( void* i_ringSection, // Ring section ptr
RingId_t i_ringId, // Ring ID
- uint16_t i_ddLevel, // DD level
+ uint8_t i_ddLevel, // DD level
PpeType_t i_ppeType, // SBE, CME, SGPE
RingVariant_t i_ringVariant, // Base,CC,RL (SBE,CME,SGPE only)
uint8_t& io_instanceId, // Instance ID
@@ -372,6 +372,16 @@ int tor_access_ring( void* i_ringSection, // Ring section ptr
}
}
+ else
+ {
+ if ( i_ddLevel != torHeader->ddLevel &&
+ i_ddLevel != UNDEFINED_DD_LEVEL )
+ {
+ MY_ERR("Requested DD level (=0x%x) doesn't match TOR header DD level (=0x%x) nor UNDEFINED_DD_LEVEL\n",
+ i_ddLevel, torHeader->ddLevel);
+ return TOR_DD_LEVEL_NOT_FOUND;
+ }
+ }
if ( ( i_ringBlockType == GET_SINGLE_RING ) || // All Magics supported for GET
( i_ringBlockType == PUT_SINGLE_RING && // Can only append to SBE,CME,SGPE
@@ -491,7 +501,7 @@ int tor_access_ring( void* i_ringSection, // Ring section ptr
//
/////////////////////////////////////////////////////////////////////////////////////
int tor_get_single_ring ( void* i_ringSection, // Ring section ptr
- uint16_t i_ddLevel, // DD level
+ uint8_t i_ddLevel, // DD level
RingId_t i_ringId, // Ring ID
PpeType_t i_ppeType, // SBE, CME, SGPE
RingVariant_t i_ringVariant, // Base,CC,RL (SBE/CME/SGPE only)
@@ -537,7 +547,7 @@ int tor_get_single_ring ( void* i_ringSection, // Ring section ptr
//
///////////////////////////////////////////////////////////////////////////////////////
int tor_get_block_of_rings ( void* i_ringSection, // Ring section ptr
- uint16_t i_ddLevel, // DD level
+ uint8_t i_ddLevel, // DD level
PpeType_t i_ppeType, // SBE,CME,SGPE
RingVariant_t i_ringVariant, // Base,CC,RL
void** io_ringBlockPtr, // Output ring buffer
@@ -643,7 +653,7 @@ int tor_append_ring( void* i_ringSection, // Ring section ptr
rc = tor_access_ring( i_ringSection,
i_ringId,
- 0x00,
+ UNDEFINED_DD_LEVEL,
i_ppeType,
i_ringVariant,
i_instanceId,
OpenPOWER on IntegriCloud