summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2018-05-22 14:15:56 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-05-28 14:54:44 -0400
commitfd269e881530ad008e696e4c5571a8a9d0e92d43 (patch)
tree00827824651db34dcfbdacd2e32f684d88a578d9
parent2b37fd25aed152cf46acb314a54dfdcd018abd9f (diff)
downloadtalos-hostboot-fd269e881530ad008e696e4c5571a8a9d0e92d43.tar.gz
talos-hostboot-fd269e881530ad008e696e4c5571a8a9d0e92d43.zip
Clear obus fir mask attrs after restoring obus firmasks
After we have restored the values of the OBUS related fir masks, we need to make sure that the attributes where the values are stored are set back to 0. This will ensure that any future calls to the p9_io_obus_firmask_save_restore HWP with the RESTORE flag set will be no-ops until the HWP has been called with the SAVE flag Change-Id: I3b853ed269cfb3ca9cec1b19f1fc4604dca80589 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59222 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@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: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59256 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.C75
-rw-r--r--src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.H3
-rwxr-xr-xsrc/import/chips/p9/procedures/xml/error_info/p9_io_obus_errors.xml10
3 files changed, 57 insertions, 31 deletions
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.C b/src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.C
index 47857b524..c91c76b34 100644
--- a/src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.C
+++ b/src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.C
@@ -125,7 +125,8 @@ fapi2::ReturnCode p9_io_obus_firmask_save(const fapi2::Target<fapi2::TARGET_TYPE
/**
* @brief This function will look up attributes that contain firmask values that we have saved off earlier
-* and write the values to the appropriate firmask registers
+* and write the values to the appropriate firmask registers. If one or both of the attributes
+* then we will not restore either of the masks
*
* @param[in] i_target_chip Processor target we want to save/restore OBUS firmasks for
* @param[in] i_obus_targets vector the Processor's functional child OBUS targets
@@ -268,40 +269,74 @@ fapi2::ReturnCode p9_io_obus_firmask_restore(const fapi2::Target<fapi2::TARGET_T
FAPI_IMP("p9_io_obus_firmask_restore: Entering...");
uint64_t l_restoreValue;
- // Read the value we stored previously
+ // Read the proc's obus firmask value we stored previously
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_IO_PB_IOOFIR_MASK,
i_target_chip,
l_restoreValue),
"failed to get attribute ATTR_IO_PB_IOOFIR_MASK");
- FAPI_ASSERT(l_restoreValue,
- fapi2::P9_IO_FIRMASK_RESTORE_ERROR().set_TARGET( i_target_chip ),
- "Attempted to restore PU_IOE_PB_IOO_FIR_MASK_REG but ATTR_IO_PB_IOOFIR_MASK was never set");
+ // If ATTR_IO_PB_IOOFIR_MASK is zero that indicates that firmask_save has not been
+ // called yet so we will not restore this firmask
+ // Note: it was decided to keep these attribute checks seperate to allow
+ // attribute overrides of these attributes to take effect on HBRT reset
+ if(l_restoreValue)
+ {
+ // Write the stored value back to the scom register
+ FAPI_TRY(fapi2::putScom(i_target_chip,
+ PU_IOE_PB_IOO_FIR_MASK_REG,
+ l_restoreValue),
+ "putScom of PU_IOE_PB_IOO_FIR_MASK_REG failed");
+
+ // Need to write 0 to ATTR_IO_PB_IOOFIR_MASK to ensure
+ // we do not re-write the obus firmask values on HBRT
+ // reboots or MPIPLs
+ l_restoreValue = 0;
+ FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_IO_PB_IOOFIR_MASK,
+ i_target_chip,
+ l_restoreValue),
+ "failed to set attribute ATTR_IO_PB_IOOFIR_MASK");
+ }
+ else
+ {
+ FAPI_IMP("p9_io_obus_firmask_restore: Skipping restore of PU_IOE_PB_IOO_FIR_MASK_REG because ATTR_IO_PB_IOOFIR_MASK is 0");
+ }
- // Write the stored value back to the scom register
- FAPI_TRY(fapi2::putScom(i_target_chip,
- PU_IOE_PB_IOO_FIR_MASK_REG,
- l_restoreValue),
- "putScom of PU_IOE_PB_IOO_FIR_MASK_REG failed");
- // Loop through obus targets and restore the IOO LFIR value
+ // Loop through obus targets and restore the IOO LFIR value if necessary
for(const auto& l_obusTarget : i_obus_targets)
{
- // Read the value we stored previously
+ // Read the obus's obus firmask value we stored previously
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_IO_OLLFIR_MASK,
l_obusTarget,
l_restoreValue),
"failed to get attribute ATTR_IO_OLLFIR_MASK");
- FAPI_ASSERT(l_restoreValue,
- fapi2::P9_IO_FIRMASK_RESTORE_ERROR().set_TARGET( l_obusTarget ),
- "Attempted to restore OBUS_LL0_LL0_LL0_PB_IOOL_FIR_MASK_REG but ATTR_IO_OLLFIR_MASK was never set");
+ // If ATTR_IO_OLLFIR_MASK is zero that indicates that firmask_save has not been
+ // called yet so we will not restore this firmask
+ // Note: it was decided to keep these attribute checks seperate to allow
+ // attribute overrides of these attributes to take effect on HBRT reset
+ if(l_restoreValue)
+ {
- // Write the stored value back to the scom register
- FAPI_TRY(fapi2::putScom(l_obusTarget,
- OBUS_LL0_LL0_LL0_PB_IOOL_FIR_MASK_REG,
- l_restoreValue),
- "putScom of OBUS_LL0_LL0_LL0_PB_IOOL_FIR_MASK_REG failed");
+ // Write the stored value back to the scom register
+ FAPI_TRY(fapi2::putScom(l_obusTarget,
+ OBUS_LL0_LL0_LL0_PB_IOOL_FIR_MASK_REG,
+ l_restoreValue),
+ "putScom of OBUS_LL0_LL0_LL0_PB_IOOL_FIR_MASK_REG failed");
+
+ // Need to write 0 to ATTR_IO_OLLFIR_MASK to ensure
+ // we do not re-write the obus firmask values on HBRT
+ // reboots or MPIPLs
+ l_restoreValue = 0;
+ FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_IO_OLLFIR_MASK,
+ l_obusTarget,
+ l_restoreValue),
+ "failed to set attribute ATTR_IO_OLLFIR_MASK");
+ }
+ else
+ {
+ FAPI_IMP("p9_io_obus_firmask_restore: Skipping restore of OBUS_LL0_LL0_LL0_PB_IOOL_FIR_MASK_REG because ATTR_IO_OLLFIR_MASK is 0");
+ }
}
fapi_try_exit:
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.H b/src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.H
index 8eaf80539..8873fe11a 100644
--- a/src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.H
+++ b/src/import/chips/p9/procedures/hwp/io/p9_io_obus_firmask_save_restore.H
@@ -84,7 +84,8 @@ extern "C"
* the SAVE paramter after istep 10.6. Once we reach runtime HBRT will call this HWP again with
* the RESTORE OP_TYPE and the masks will be restored to their initial values. We expect the
* HWP to be called with the RESTORE_OP_TYPE during the HBRT initialzation after the target service
- * has been initialized in HBRT.
+ * has been initialized in HBRT. There should only be one single HWP call with the RESTORE flag for
+ * every call there is with the SAVE flag.
*
* Note: If this HWP is called with the SAVE op then after we read and store the firmasks
* into attributes, we will set additional bits in the mask.
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_io_obus_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_io_obus_errors.xml
index 0efba8eeb..85d526222 100755
--- a/src/import/chips/p9/procedures/xml/error_info/p9_io_obus_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_io_obus_errors.xml
@@ -52,14 +52,4 @@
<priority>HIGH</priority>
</callout>
</hwpError>
- <!-- *********************************************************************** -->
- <hwpError>
- <rc>RC_P9_IO_FIRMASK_RESTORE_ERROR</rc>
- <description>Attempted to restore OBUS firmasks when values were never saved</description>
- <ffdc>TARGET</ffdc>
- <callout>
- <procedure>CODE</procedure>
- <priority>HIGH</priority>
- </callout>
- </hwpError>
</hwpErrors>
OpenPOWER on IntegriCloud