summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/pm
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2018-10-18 09:32:11 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-10-31 22:20:35 -0500
commit46edcd4b4dee9858a5039a204d4ad35fd03de853 (patch)
tree97996fa3cb30f8d0cd838ba453e52326240eb59f /src/import/chips/p9/procedures/hwp/pm
parent07f679f36f4c59e217abc620bf266605431e4c26 (diff)
downloadtalos-hostboot-46edcd4b4dee9858a5039a204d4ad35fd03de853.tar.gz
talos-hostboot-46edcd4b4dee9858a5039a204d4ad35fd03de853.zip
Only save the CME FIR Masks after they have been setup once
Making the CME FIR path follow the same logic as the other PM FIRs with regards to doing save/restore of the masks. Also added an enumeration for the attribute that controls things to make the code easier to read. Change-Id: I2f9eabec4cb036ec9f79da07143f18fe18ee5747 CQ: SW448193 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67668 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: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67787 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/pm')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.C21
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C6
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C3
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_firinit.C3
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_ppm_firinit.C8
5 files changed, 29 insertions, 12 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.C
index d72be6f87..1470a60bb 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_cme_firinit.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -177,6 +177,11 @@ fapi2::ReturnCode pm_cme_fir_reset(
FAPI_IMP("pm_cme_fir_reset start");
auto l_eqChiplets = i_target.getChildren<fapi2::TARGET_TYPE_EQ>
(fapi2::TARGET_STATE_FUNCTIONAL);
+ uint8_t firinit_done_flag;
+
+ FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PM_FIRINIT_DONE_ONCE_FLAG,
+ i_target, firinit_done_flag),
+ "ERROR: Failed to fetch the entry status of FIRINIT");
for (auto l_eq_chplt : l_eqChiplets)
{
@@ -239,9 +244,17 @@ fapi2::ReturnCode pm_cme_fir_reset(
FAPI_TRY(l_cmeFir.get(p9pmFIR::REG_FIRMASK),
"ERROR: Failed to get the CME FIR MASK value");
- /* Fetch the CME FIR MASK; Save it to HWP attribute; clear it */
- FAPI_TRY(l_cmeFir.saveMask(),
- "ERROR: Failed to save CME FIR Mask to the attribute");
+ /* Only save off the FIR masks if they have been initialized */
+ if (firinit_done_flag
+ == fapi2::ENUM_ATTR_PM_FIRINIT_DONE_ONCE_FLAG_FIRS_INITED)
+ {
+ FAPI_TRY(l_cmeFir.get(p9pmFIR::REG_FIRMASK),
+ "ERROR: Failed to get the PBA FIR MASK value");
+
+ /* Fetch the CME FIR MASK; Save it to HWP attribute; clear it */
+ FAPI_TRY(l_cmeFir.saveMask(),
+ "ERROR: Failed to save CME FIR Mask to the attribute");
+ }
FAPI_TRY(l_cmeFir.setAllRegBits(p9pmFIR::REG_FIRMASK),
"ERROR: Faled to set the CME FIR MASK");
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C
index 4d086a9aa..12a6073f8 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_firinit.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -105,9 +105,9 @@ fapi2::ReturnCode p9_pm_firinit(
// Set the ATTR_PM_FIRINIT_DONE_ONCE_FLAG attribute
if (i_mode == p9pm::PM_INIT)
{
- if (l_pm_firinit_flag != 1)
+ if (l_pm_firinit_flag != fapi2::ENUM_ATTR_PM_FIRINIT_DONE_ONCE_FLAG_FIRS_INITED)
{
- l_pm_firinit_flag = 1;
+ l_pm_firinit_flag = fapi2::ENUM_ATTR_PM_FIRINIT_DONE_ONCE_FLAG_FIRS_INITED;
FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_PM_FIRINIT_DONE_ONCE_FLAG,
i_target, l_pm_firinit_flag),
"ERROR: Failed to set firinit call status after init");
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C
index fde730c36..53eaf1b85 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_firinit.C
@@ -202,7 +202,8 @@ fapi2::ReturnCode pm_occ_fir_reset(
i_target, firinit_done_flag),
"ERROR: Failed to fetch the entry status of FIRINIT");
- if (firinit_done_flag == 1)
+ if (firinit_done_flag
+ == fapi2::ENUM_ATTR_PM_FIRINIT_DONE_ONCE_FLAG_FIRS_INITED)
{
FAPI_TRY(l_occFir.get(p9pmFIR::REG_FIRMASK),
"ERROR: Failed to get the OCC FIR MASK value");
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_firinit.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_firinit.C
index c577df609..ff20e4d05 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_firinit.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_firinit.C
@@ -163,7 +163,8 @@ fapi2::ReturnCode pm_pba_fir_reset(
i_target, firinit_done_flag),
"ERROR: Failed to fetch the entry status of FIRINIT");
- if (firinit_done_flag == 1)
+ if (firinit_done_flag
+ == fapi2::ENUM_ATTR_PM_FIRINIT_DONE_ONCE_FLAG_FIRS_INITED)
{
FAPI_TRY(l_pbaFir.get(p9pmFIR::REG_FIRMASK),
"ERROR: Failed to get the PBA FIR MASK value");
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ppm_firinit.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ppm_firinit.C
index bc70922d1..2238733d3 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ppm_firinit.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ppm_firinit.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -192,7 +192,8 @@ fapi2::ReturnCode pm_ppm_fir_reset(
{
p9pmFIR::PMFir <p9pmFIR::FIRTYPE_PPM_LFIR> l_ppmFir(l_eq_chplt);
- if (l_firinit_done_flag == 1)
+ if (l_firinit_done_flag
+ == fapi2::ENUM_ATTR_PM_FIRINIT_DONE_ONCE_FLAG_FIRS_INITED)
{
FAPI_TRY(l_ppmFir.get(p9pmFIR::REG_ERRMASK),
"ERROR: Failed to get the QUAD ERROR MASK value");
@@ -213,7 +214,8 @@ fapi2::ReturnCode pm_ppm_fir_reset(
{
p9pmFIR::PMFir <p9pmFIR::FIRTYPE_PPM_LFIR> l_cppmFir(l_c_chplt);
- if (l_firinit_done_flag == 1)
+ if (l_firinit_done_flag
+ == fapi2::ENUM_ATTR_PM_FIRINIT_DONE_ONCE_FLAG_FIRS_INITED)
{
FAPI_TRY(l_cppmFir.get(p9pmFIR::REG_ERRMASK),
"ERROR: Failed to get the Core ERROR MASK value");
OpenPOWER on IntegriCloud