summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2014-06-25 10:06:34 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-07-23 15:04:20 -0500
commitdf671d4cc6c597764f40a00d4278a9a6f1bfa25d (patch)
tree36ef740fbe81e59d2649219d541d560ff23ed3c9 /src/usr/hwpf/hwp
parent2bb008546b5aab64a059862bd08d5c4d21de00c9 (diff)
downloadtalos-hostboot-df671d4cc6c597764f40a00d4278a9a6f1bfa25d.tar.gz
talos-hostboot-df671d4cc6c597764f40a00d4278a9a6f1bfa25d.zip
SW260003: PMPROC: PM firinit procedures need to overlay present mask value durin
CQ:SW260003 Change-Id: I91a90fb8934dde5b1d41716e101bd01e8e788108 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11455 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Tested-by: Thi N. Tran <thi@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11807 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp')
-rw-r--r--src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_firinit.C37
-rw-r--r--src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_occ_firinit.C55
-rwxr-xr-xsrc/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pba_firinit.C56
-rw-r--r--src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pmc_firinit.C57
-rw-r--r--src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml58
5 files changed, 249 insertions, 14 deletions
diff --git a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_firinit.C b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_firinit.C
index 93caacf24..f08f00b7a 100644
--- a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_firinit.C
+++ b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_firinit.C
@@ -22,7 +22,8 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_pm_firinit.C,v 1.14 2013/10/30 17:13:05 stillgs Exp $
+
+// $Id: p8_pm_firinit.C,v 1.17 2014/07/09 14:49:32 daviddu Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_pm_firinit.C,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
@@ -115,12 +116,13 @@ p8_pm_firinit(const fapi::Target &i_target , uint32_t i_mode)
ecmdDataBufferBase data(64);
uint64_t any_error = 0;
const char * PM_MODE_NAME_VAR; // Defines storage for PM_MODE_NAME
+ uint8_t attr_pm_firinit_done_once_flag;
FAPI_INF("p8_pm_firinit start for mode %s", PM_MODE_NAME(i_mode));
do
{
-
+
// *************************************************************
// CHECKING FOR FIRS BEFORE RESET and INIT
// *************************************************************
@@ -240,6 +242,37 @@ p8_pm_firinit(const fapi::Target &i_target , uint32_t i_mode)
break;
}
+ // -----------
+ // SW260003
+ // -----------
+
+ rc = FAPI_ATTR_GET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed.");
+ break;
+ }
+
+ if (i_mode == PM_INIT) {
+ if (attr_pm_firinit_done_once_flag != 1) {
+ attr_pm_firinit_done_once_flag = 1;
+ rc = FAPI_ATTR_SET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiSetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed");
+ break;
+ }
+ }
+ }
+ else if (i_mode == PM_RESET) {
+ if (attr_pm_firinit_done_once_flag == 1) {
+ attr_pm_firinit_done_once_flag = 2;
+ rc = FAPI_ATTR_SET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiSetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed");
+ break;
+ }
+ }
+ }
+
} while(0);
FAPI_INF("p8_pm_firinit end for mode %s", PM_MODE_NAME(i_mode));
diff --git a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_occ_firinit.C b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_occ_firinit.C
index d931e8b7c..6bb9b96a5 100644
--- a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_occ_firinit.C
+++ b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_occ_firinit.C
@@ -22,7 +22,8 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_pm_occ_firinit.C,v 1.18 2014/03/10 15:10:09 stillgs Exp $
+
+// $Id: p8_pm_occ_firinit.C,v 1.22 2014/07/09 14:49:32 daviddu Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_pm_occ_firinit.C,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
@@ -86,8 +87,11 @@ p8_pm_occ_firinit(const fapi::Target& i_target , uint32_t mode)
ecmdDataBufferBase action_0(64);
ecmdDataBufferBase action_1(64);
ecmdDataBufferBase mask(64);
+ ecmdDataBufferBase data(64);
uint32_t e_rc = 0;
uint8_t ce_fir_disable = 0;;
+ uint64_t attr_pm_occ_lfir_mask;
+ uint8_t attr_pm_firinit_done_once_flag;
FAPI_DBG("Executing p8_pm_occ_firinit ....");
@@ -96,8 +100,30 @@ p8_pm_occ_firinit(const fapi::Target& i_target , uint32_t mode)
if (mode == PM_RESET)
{
- e_rc = mask.flushTo0();
- e_rc |= mask.setBit(0,OCC_FIR_REGISTER_LENGTH);
+ // -----------
+ // SW260003
+ // -----------
+ rc = FAPI_ATTR_GET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed.");
+ break;
+ }
+ if (attr_pm_firinit_done_once_flag == 1) {
+ rc = fapiGetScom(i_target, OCC_LFIR_MASK_0x01010803, data );
+ if (!rc.ok())
+ {
+ FAPI_ERR("fapiGetScom(OCC_LFIR_MASK_0x01010803) failed.");
+ break;
+ }
+ attr_pm_occ_lfir_mask = data.getDoubleWord(0);
+ rc = FAPI_ATTR_SET(ATTR_PM_OCC_LFIR_MASK, &i_target, attr_pm_occ_lfir_mask);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiSetAttribute of ATTR_PM_OCC_LFIR_MASK failed");
+ break;
+ }
+ }
+
+ e_rc = mask.flushTo1();
if (e_rc)
{
rc.setEcmdError(e_rc);
@@ -274,6 +300,29 @@ p8_pm_occ_firinit(const fapi::Target& i_target , uint32_t mode)
break;
}
+ // -----------
+ // SW260003
+ // -----------
+ rc = FAPI_ATTR_GET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed.");
+ break;
+ }
+ if (attr_pm_firinit_done_once_flag) {
+ rc = FAPI_ATTR_GET(ATTR_PM_OCC_LFIR_MASK, &i_target, attr_pm_occ_lfir_mask);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_OCC_LFIR_MASK failed.");
+ break;
+ }
+ e_rc |= data.setDoubleWord(0, attr_pm_occ_lfir_mask);
+ e_rc |= mask.setOr(data, 0, 64);
+ if (e_rc)
+ {
+ rc.setEcmdError(e_rc);
+ break;
+ }
+ }
+
// ------------
// OCC_FIR_MASK
// ------------
diff --git a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pba_firinit.C b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pba_firinit.C
index c934f6d57..16aa2d801 100755
--- a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pba_firinit.C
+++ b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pba_firinit.C
@@ -22,7 +22,8 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_pm_pba_firinit.C,v 1.18 2014/03/21 19:11:18 stillgs Exp $
+
+// $Id: p8_pm_pba_firinit.C,v 1.22 2014/07/09 14:49:32 daviddu Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_pm_pba_firinit.C,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
@@ -97,8 +98,10 @@ p8_pm_pba_firinit(const fapi::Target& i_target , uint32_t mode )
ecmdDataBufferBase action_0(64);
ecmdDataBufferBase action_1(64);
ecmdDataBufferBase mask(64);
+ ecmdDataBufferBase data(64);
uint32_t e_rc = 0;
-
+ uint64_t attr_pm_pba_fir_mask;
+ uint8_t attr_pm_firinit_done_once_flag;
FAPI_DBG("Executing p8_pm_pba_firinit ....");
do
@@ -106,8 +109,30 @@ p8_pm_pba_firinit(const fapi::Target& i_target , uint32_t mode )
if (mode == PM_RESET)
{
- e_rc = mask.flushTo0();
- e_rc |= mask.setBit(0, PBA_FIR_REGISTER_LENGTH);
+ // -----------
+ // SW260003
+ // -----------
+ rc = FAPI_ATTR_GET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed.");
+ break;
+ }
+ if (attr_pm_firinit_done_once_flag == 1) {
+ rc = fapiGetScom(i_target, PBA_FIR_MASK_0x02010843, data );
+ if (!rc.ok())
+ {
+ FAPI_ERR("fapiGetScom(PBA_FIR_MASK_0x02010843) failed.");
+ break;
+ }
+ attr_pm_pba_fir_mask = data.getDoubleWord(0);
+ rc = FAPI_ATTR_SET(ATTR_PM_PBA_FIR_MASK, &i_target, attr_pm_pba_fir_mask);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiSetAttribute of ATTR_PM_PBA_FIR_MASK failed");
+ break;
+ }
+ }
+
+ e_rc = mask.flushTo1();
if (e_rc)
{
rc.setEcmdError(e_rc);
@@ -225,6 +250,29 @@ p8_pm_pba_firinit(const fapi::Target& i_target , uint32_t mode )
break;
}
+ // -----------
+ // SW260003
+ // -----------
+ rc = FAPI_ATTR_GET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed.");
+ break;
+ }
+ if (attr_pm_firinit_done_once_flag) {
+ rc = FAPI_ATTR_GET(ATTR_PM_PBA_FIR_MASK, &i_target, attr_pm_pba_fir_mask);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_PBA_FIR_MASK failed.");
+ break;
+ }
+ e_rc |= data.setDoubleWord(0, attr_pm_pba_fir_mask);
+ e_rc |= mask.setOr(data, 0, 64);
+ if (e_rc)
+ {
+ rc.setEcmdError(e_rc);
+ break;
+ }
+ }
+
//--******************************************************************************
//-- PBA_FIR_MASK (W0_OR_45) (WR_43) (WO_AND_44)
//--******************************************************************************
diff --git a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pmc_firinit.C b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pmc_firinit.C
index 4362486dd..c1fc19e3b 100644
--- a/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pmc_firinit.C
+++ b/src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_pmc_firinit.C
@@ -22,7 +22,8 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_pm_pmc_firinit.C,v 1.20 2014/04/07 02:55:10 stillgs Exp $
+
+// $Id: p8_pm_pmc_firinit.C,v 1.24 2014/07/09 14:49:32 daviddu Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_pm_pmc_firinit.C,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2011
@@ -103,19 +104,44 @@ p8_pm_pmc_firinit(const fapi::Target& i_target , uint32_t mode )
ecmdDataBufferBase action_0(64);
ecmdDataBufferBase action_1(64);
ecmdDataBufferBase mask(64);
+ ecmdDataBufferBase data(64);
ecmdDataBufferBase pmc_ocb_mask_hi(64);
ecmdDataBufferBase pmc_ocb_mask_lo(64);
uint32_t e_rc = 0;
-
+ uint64_t attr_pm_pmc_lfir_mask;
+ uint8_t attr_pm_firinit_done_once_flag;
FAPI_DBG("Executing p8_pm_pmc_firinit ...");
do
{
if (mode == PM_RESET)
{
+
+ // -----------
+ // SW260003
+ // -----------
+ rc = FAPI_ATTR_GET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed.");
+ break;
+ }
+ if (attr_pm_firinit_done_once_flag == 1) {
+ rc = fapiGetScom(i_target, PMC_LFIR_MASK_0x01010843, data );
+ if (!rc.ok())
+ {
+ FAPI_ERR("fapiGetScom(PMC_LFIR_MASK_0x01010843) failed.");
+ break;
+ }
+ attr_pm_pmc_lfir_mask = data.getDoubleWord(0);
+ rc = FAPI_ATTR_SET(ATTR_PM_PMC_LFIR_MASK, &i_target, attr_pm_pmc_lfir_mask);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiSetAttribute of ATTR_PM_PMC_LFIR_MASK failed");
+ break;
+ }
+ }
+
FAPI_INF("Hard reset detected. Full PMC LFIR is masked");
- e_rc = mask.flushTo0();
- e_rc |= mask.setBit(0,PMC_FIR_REGISTER_LENGTH);
+ e_rc = mask.flushTo1();
if (e_rc)
{
rc.setEcmdError(e_rc);
@@ -336,6 +362,29 @@ p8_pm_pmc_firinit(const fapi::Target& i_target , uint32_t mode )
break;
}
+ // -----------
+ // SW260003
+ // -----------
+ rc = FAPI_ATTR_GET(ATTR_PM_FIRINIT_DONE_ONCE_FLAG, &i_target, attr_pm_firinit_done_once_flag);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_FIRINIT_DONE_ONCE_FLAG failed.");
+ break;
+ }
+ if (attr_pm_firinit_done_once_flag) {
+ rc = FAPI_ATTR_GET(ATTR_PM_PMC_LFIR_MASK, &i_target, attr_pm_pmc_lfir_mask);
+ if (!rc.ok()) {
+ FAPI_ERR("fapiGetAttribute of ATTR_PM_PMC_LFIR_MASK failed.");
+ break;
+ }
+ e_rc |= data.setDoubleWord(0, attr_pm_pmc_lfir_mask);
+ e_rc |= mask.setOr(data, 0, 64);
+ if (e_rc)
+ {
+ rc.setEcmdError(e_rc);
+ break;
+ }
+ }
+
//--******************************************************************************
//-- PMC_FIR_MASK (W0_OR_45) (WR_43) (WO_AND_44)
//--******************************************************************************
diff --git a/src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml b/src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml
index 082f5e425..1c9eab424 100644
--- a/src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml
+++ b/src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml
@@ -20,7 +20,7 @@
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
-<!-- $Id: pm_hwp_attributes.xml,v 1.11 2014/02/06 19:08:22 stillgs Exp $ -->
+<!-- $Id: pm_hwp_attributes.xml,v 1.13 2014/07/09 15:25:15 dcrowell Exp $ -->
<!--
XML file specifying Power Management HWPF attributes.
These attributes are initialized to zero by the platform and set to a
@@ -838,5 +838,61 @@ Divider for the 1us PBAX hang pulse. A hang is detected after two divided hang
<writeable/>
</attribute>
+<attribute>
+ <id>ATTR_PM_PFET_WORKAROUND_RUN_FLAG</id>
+ <targetType>TARGET_TYPE_SYSTEM</targetType>
+ <description>
+ Flag to store that the work-around for HW250017 as been run so that during any resets it is skipped.
+ </description>
+ <valueType>uint8</valueType>
+ <writeable/>
+</attribute>
+
+<attribute>
+ <id>ATTR_PM_OCC_LFIR_MASK</id>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ <description>
+ Upon an UE event, PRD may update some fir masks in occ domain. To avoid this update getting lost during occ reset, which could eventually cause multiple occ resets, this attribute is added to be the storage to remember the OCC_LFIR_MASK in the RESET phase so that reset procedures can later overlay this updated settings with the default instalation in INIT phase. See details in SW260003.
+ Producer/Consumer: p8_pm_occ_firinit.C
+ </description>
+ <valueType>uint64</valueType>
+ <writeable/>
+</attribute>
+
+<attribute>
+ <id>ATTR_PM_PBA_FIR_MASK</id>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ <description>
+ Upon an UE event, PRD may update some fir masks in occ domain. To avoid this update getting lost during occ reset, which could eventually cause multiple occ resets, this attribute is added to be the storage to remember the PBA_FIR_MASK in the RESET phase so that reset procedures can later overlay this updated settings with the default instalation in INIT phase. See details in SW260003.
+ Producer/Consumer: p8_pm_pba_firinit.C
+ </description>
+ <valueType>uint64</valueType>
+ <writeable/>
+</attribute>
+
+<attribute>
+ <id>ATTR_PM_PMC_LFIR_MASK</id>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ <description>
+ Upon an UE event, PRD may update some fir masks in occ domain. To avoid this update getting lost during occ reset, which could eventually cause multiple occ resets, this attribute is added to be the storage to remember the PMC_LFIR_MASK in the RESET phase so that reset procedures can later overlay this updated settings with the default instalation in INIT phase. See details in SW260003.
+ Producer/Consumer: p8_pm_pmc_firinit.C
+ </description>
+ <valueType>uint64</valueType>
+ <writeable/>
+</attribute>
+
+<attribute>
+ <id>ATTR_PM_FIRINIT_DONE_ONCE_FLAG</id>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ <description>
+ 0 = OCC has never been loaded and FIR Masks have never been initialized,
+ 1 = FIR masks have been initialized and the hardware should reflect correct values,
+ 2 = FIR masks have been initialized but the current hardware state is the reset value
+ Producer/Consumer: p8_pm_firinit.C
+ </description>
+ <valueType>uint8</valueType>
+ <writeable/>
+</attribute>
+
</attributes>
OpenPOWER on IntegriCloud