summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-06-26 14:26:15 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-07-15 15:42:03 -0500
commitf475331d15eca45a75c53784c3c0425c46f5f221 (patch)
tree811e82fd4773a35f60393953c30d15417e40e057 /src
parent0b5085685b2d672e207c260d5dfaed9b3d9ead03 (diff)
downloadtalos-hostboot-f475331d15eca45a75c53784c3c0425c46f5f221.tar.gz
talos-hostboot-f475331d15eca45a75c53784c3c0425c46f5f221.zip
SPless support of PLD detection
Change-Id: If7e0ae4a0befbcbbb9f9c6cb9b130beab0c0f1df RTC: 37740 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5224 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/hwas/common/deconfigGard.H5
-rw-r--r--src/include/usr/hwas/hwasPlat.H12
-rw-r--r--src/usr/errl/test/errltest.H2
-rw-r--r--src/usr/errl/test/errluserdetailtest.H2
-rw-r--r--src/usr/hwas/common/deconfigGard.C2
-rw-r--r--src/usr/hwas/hwasPlat.C29
-rw-r--r--src/usr/hwas/hwasPlatCallout.C99
-rw-r--r--src/usr/hwas/test/hwasGardTest.H2
-rw-r--r--src/usr/initservice/istepdispatcher/istepWorker.C18
-rwxr-xr-xsrc/usr/targeting/common/genHwsvMrwXml.pl1
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml12
-rw-r--r--src/usr/targeting/common/xmltohb/simics_MURANO.system.xml1
-rw-r--r--src/usr/targeting/common/xmltohb/simics_VENICE.system.xml1
-rw-r--r--src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml1
-rw-r--r--src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml1
15 files changed, 131 insertions, 57 deletions
diff --git a/src/include/usr/hwas/common/deconfigGard.H b/src/include/usr/hwas/common/deconfigGard.H
index 0a462aa43..f04bff553 100644
--- a/src/include/usr/hwas/common/deconfigGard.H
+++ b/src/include/usr/hwas/common/deconfigGard.H
@@ -380,14 +380,11 @@ public:
/**
* @brief Clears the specified Deconfigure Records.
*
- * @note Provided for unit test only. Production code should not be
- * clearing Deconfigure Records.
- *
* @param[in] i_pTargetId Pointer to the Target ID to clear Deconfigure
* Records for. If NULL then all Deconfigure Records
* are cleared.
*/
- void _clearDeconfigureRecords(const TARGETING::Target * i_pTarget);
+ void clearDeconfigureRecords(const TARGETING::Target * i_pTarget);
/**
diff --git a/src/include/usr/hwas/hwasPlat.H b/src/include/usr/hwas/hwasPlat.H
index 644613a41..ad6da4abf 100644
--- a/src/include/usr/hwas/hwasPlat.H
+++ b/src/include/usr/hwas/hwasPlat.H
@@ -44,6 +44,18 @@ namespace HWAS
*/
errlHndl_t hwasChangeDetection();
+/**
+ * @brief hwasPLDDetection hostboot function
+ *
+ * This routine will do 'what is needed' to see if there were any
+ * Power Line Disturbance (PLD) issues
+ *
+ * @param none
+ *
+ * @return bool true if there were PLD issues, false otherwise
+ */
+bool hwasPLDDetection();
+
}
#endif // __HWAS_PLAT_H
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 4fe8beffb..5b74f1dcd 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -480,7 +480,7 @@ public:
}
// delete these deconfigure and gard records
- HWAS::theDeconfigGard()._clearDeconfigureRecords(NULL);
+ HWAS::theDeconfigGard().clearDeconfigureRecords(NULL);
gard_errl = HWAS::theDeconfigGard().clearGardRecords(0);
if (gard_errl)
{
diff --git a/src/usr/errl/test/errluserdetailtest.H b/src/usr/errl/test/errluserdetailtest.H
index 8f7e3124f..c595a33cd 100644
--- a/src/usr/errl/test/errluserdetailtest.H
+++ b/src/usr/errl/test/errluserdetailtest.H
@@ -631,7 +631,7 @@ public:
}
// delete these deconfigure and gard records
- HWAS::theDeconfigGard()._clearDeconfigureRecords(NULL);
+ HWAS::theDeconfigGard().clearDeconfigureRecords(NULL);
gard_errl = HWAS::theDeconfigGard().clearGardRecords(0);
if (gard_errl)
{
diff --git a/src/usr/hwas/common/deconfigGard.C b/src/usr/hwas/common/deconfigGard.C
index 8a97ad09d..6d194e2d7 100644
--- a/src/usr/hwas/common/deconfigGard.C
+++ b/src/usr/hwas/common/deconfigGard.C
@@ -756,7 +756,7 @@ void DeconfigGard::_createDeconfigureRecord(
}
//******************************************************************************
-void DeconfigGard::_clearDeconfigureRecords(
+void DeconfigGard::clearDeconfigureRecords(
const TARGETING::Target * i_pTarget)
{
if (i_pTarget == NULL)
diff --git a/src/usr/hwas/hwasPlat.C b/src/usr/hwas/hwasPlat.C
index 3adc589a4..7896bcec0 100644
--- a/src/usr/hwas/hwasPlat.C
+++ b/src/usr/hwas/hwasPlat.C
@@ -373,6 +373,35 @@ errlHndl_t platPresenceDetect(TargetHandleList &io_targets)
} // platPresenceDetect
//******************************************************************************
+// hwasPLDDetection function
+//******************************************************************************
+bool hwasPLDDetection()
+{
+ bool rc = false;
+
+ // TODO: RTC: 76459
+ HWAS_INF("hwasPLDDetection");
+
+ Target *l_pTopLevel = NULL;
+ targetService().getTopLevelTarget( l_pTopLevel );
+
+ // check if SP doesn't support this,
+ if (l_pTopLevel->getAttr<ATTR_SP_FUNCTIONS>().powerLineDisturbance)
+ {
+ // SP supports this - return false as this will get handled later.
+ rc = false;
+ }
+ else
+ {
+ // TBD - detect power fault
+ rc = false;
+ }
+
+ return rc;
+} // hwasPLDDetection
+
+
+//******************************************************************************
// hwasChangeDetection function
//******************************************************************************
errlHndl_t hwasChangeDetection()
diff --git a/src/usr/hwas/hwasPlatCallout.C b/src/usr/hwas/hwasPlatCallout.C
index 3cae206a4..146b697f6 100644
--- a/src/usr/hwas/hwasPlatCallout.C
+++ b/src/usr/hwas/hwasPlatCallout.C
@@ -30,6 +30,7 @@
#include <hwas/common/hwasCommon.H>
#include <hwas/common/hwasCallout.H>
#include <hwas/common/deconfigGard.H>
+#include <hwas/hwasPlat.H>
#include <initservice/initserviceif.H>
namespace HWAS
@@ -63,58 +64,66 @@ errlHndl_t platHandleHWCallout(
HWAS_INF("HW callout; pTarget %p gardErrorType %x deconfigState %x",
i_pTarget, i_gardErrorType, i_deconfigState);
- switch (i_gardErrorType)
- {
- case (GARD_NULL):
- { // means no GARD operations
- break;
- }
- default:
- {
- errl = HWAS::theDeconfigGard().createGardRecord(*i_pTarget,
- i_errl->plid(),
- i_gardErrorType);
- break;
- }
- } // switch i_gardErrorType
- switch (i_deconfigState)
+ if (hwasPLDDetection())
{
- case (NO_DECONFIG):
- {
- break;
- }
- case (DECONFIG):
+ HWAS_INF("hwasPLDDetection return true - skipping callouts");
+ }
+ else
+ {
+ switch (i_gardErrorType)
{
- // call HWAS common function
- errl = HWAS::theDeconfigGard().deconfigureTarget(*i_pTarget,
- i_errl->plid());
- break;
- }
- case (DELAYED_DECONFIG):
+ case (GARD_NULL):
+ { // means no GARD operations
+ break;
+ }
+ default:
+ {
+ errl = HWAS::theDeconfigGard().createGardRecord(*i_pTarget,
+ i_errl->plid(),
+ i_gardErrorType);
+ break;
+ }
+ } // switch i_gardErrorType
+
+ switch (i_deconfigState)
{
- // do nothing -- the deconfig information was already
- // put on a queue and will be processed separately,
- // when the time is right.
- break;
- }
- } // switch i_deconfigState
+ case (NO_DECONFIG):
+ {
+ break;
+ }
+ case (DECONFIG):
+ {
+ // call HWAS common function
+ errl = HWAS::theDeconfigGard().deconfigureTarget(*i_pTarget,
+ i_errl->plid());
+ break;
+ }
+ case (DELAYED_DECONFIG):
+ {
+ // do nothing -- the deconfig information was already
+ // put on a queue and will be processed separately,
+ // when the time is right.
+ break;
+ }
+ } // switch i_deconfigState
- // check to see if this target is the master processor
- // and if it's been deconfigured.
- TARGETING::Target *l_masterProc;
- TARGETING::targetService().masterProcChipTargetHandle(l_masterProc);
- if (i_pTarget == l_masterProc)
- {
- const TARGETING::HwasState hwasState =
- l_masterProc->getAttr<TARGETING::ATTR_HWAS_STATE>();
- if (!hwasState.functional)
+ // check to see if this target is the master processor
+ // and if it's been deconfigured.
+ TARGETING::Target *l_masterProc;
+ TARGETING::targetService().masterProcChipTargetHandle(l_masterProc);
+ if (i_pTarget == l_masterProc)
{
- HWAS_ERR("master proc deconfigured - Shutdown due to plid 0x%X",
- i_errl->plid());
- INITSERVICE::doShutdown(i_errl->plid());
+ const TARGETING::HwasState hwasState =
+ l_masterProc->getAttr<TARGETING::ATTR_HWAS_STATE>();
+ if (!hwasState.functional)
+ {
+ HWAS_ERR("master proc deconfigured - Shutdown due to plid 0x%X",
+ i_errl->plid());
+ INITSERVICE::doShutdown(i_errl->plid());
+ }
}
- }
+ } // PLD
return errl;
}
diff --git a/src/usr/hwas/test/hwasGardTest.H b/src/usr/hwas/test/hwasGardTest.H
index cbb8d1f88..74162c6ad 100644
--- a/src/usr/hwas/test/hwasGardTest.H
+++ b/src/usr/hwas/test/hwasGardTest.H
@@ -121,7 +121,7 @@ public:
l_records.size());
// now delete it.
- theDeconfigGard()._clearDeconfigureRecords(l_pTarget);
+ theDeconfigGard().clearDeconfigureRecords(l_pTarget);
// confirm that there aren't any deconfigure records - if so exit
l_pErr = theDeconfigGard().
diff --git a/src/usr/initservice/istepdispatcher/istepWorker.C b/src/usr/initservice/istepdispatcher/istepWorker.C
index dca9a6106..f14651e41 100644
--- a/src/usr/initservice/istepdispatcher/istepWorker.C
+++ b/src/usr/initservice/istepdispatcher/istepWorker.C
@@ -41,7 +41,8 @@
#include <isteps/istepmasterlist.H>
#include <hwpf/istepreasoncodes.H>
-#include <hwas/common/deconfigGard.H>
+#include <hwas/common/deconfigGard.H>
+#include <hwas/hwasPlat.H>
#include "../baseinitsvc/initservice.H"
@@ -210,9 +211,20 @@ void iStepWorkerThread ( void * i_msgQ )
}
}
+ bool callouts = false;
// check to see if there were any deferred deconfigure callouts
- // call HWAS to have this processed
- bool callouts = HWAS::processDeferredDeconfig();
+ // IF there wasn't a PLD detected.
+ if (HWAS::hwasPLDDetection())
+ {
+ TRACFCOMP(g_trac_initsvc,
+ "hwasPLDDetection return true - clear deconfig records");
+ HWAS::theDeconfigGard().clearDeconfigureRecords(NULL);
+ }
+ else
+ {
+ // call HWAS to have this processed
+ callouts = HWAS::processDeferredDeconfig();
+ }
// force a TI if there were callouts
if (callouts)
diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl
index b88c4f304..eacd9e73f 100755
--- a/src/usr/targeting/common/genHwsvMrwXml.pl
+++ b/src/usr/targeting/common/genHwsvMrwXml.pl
@@ -1428,6 +1428,7 @@ sub generate_sys
<field><id>mailboxEnabled</id><value>1</value></field>
<field><id>fsiMasterInit</id><value>1</value></field>
<field><id>hardwareChangeDetection</id><value>1</value></field>
+ <field><id>powerLineDisturbance</id><value>1</value></field>
<field><id>reserved</id><value>0</value></field>
</default>
</attribute>
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index 91dfc84d5..a5b62dd95 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -1807,10 +1807,20 @@
<default>1</default>
</field>
<field>
+ <name>powerLineDisturbance</name>
+ <description>
+ 0b0: SP does not perform Power Line Disturbance (PLD) detection, Hostboot must;
+ 0b1: SP does perform Power Line Disturbance (PLD) detection so Hostboot should not
+ </description>
+ <type>uint8_t</type>
+ <bits>1</bits>
+ <default>1</default>
+ </field>
+ <field>
<name>reserved</name>
<description>Reserved for future use</description>
<type>uint8_t</type>
- <bits>4</bits>
+ <bits>3</bits>
<default>0</default>
</field>
</complexType>
diff --git a/src/usr/targeting/common/xmltohb/simics_MURANO.system.xml b/src/usr/targeting/common/xmltohb/simics_MURANO.system.xml
index 750d09238..ab189c50b 100644
--- a/src/usr/targeting/common/xmltohb/simics_MURANO.system.xml
+++ b/src/usr/targeting/common/xmltohb/simics_MURANO.system.xml
@@ -124,6 +124,7 @@
<field><id>mailboxEnabled</id><value>0</value></field>
<field><id>fsiMasterInit</id><value>0</value></field>
<field><id>hardwareChangeDetection</id><value>0</value></field>
+ <field><id>powerLineDisturbance</id><value>0</value></field>
<field><id>reserved</id><value>0</value></field>
</default>
</attribute>
diff --git a/src/usr/targeting/common/xmltohb/simics_VENICE.system.xml b/src/usr/targeting/common/xmltohb/simics_VENICE.system.xml
index c7b25f77e..4d9022841 100644
--- a/src/usr/targeting/common/xmltohb/simics_VENICE.system.xml
+++ b/src/usr/targeting/common/xmltohb/simics_VENICE.system.xml
@@ -100,6 +100,7 @@
<field><id>mailboxEnabled</id><value>0</value></field>
<field><id>fsiMasterInit</id><value>0</value></field>
<field><id>hardwareChangeDetection</id><value>0</value></field>
+ <field><id>powerLineDisturbance</id><value>0</value></field>
<field><id>reserved</id><value>0</value></field>
</default>
</attribute>
diff --git a/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml b/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml
index b37d7e521..e681cb844 100644
--- a/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml
+++ b/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml
@@ -117,6 +117,7 @@
<field><id>mailboxEnabled</id><value>0</value></field>
<field><id>fsiMasterInit</id><value>0</value></field>
<field><id>hardwareChangeDetection</id><value>0</value></field>
+ <field><id>powerLineDisturbance</id><value>0</value></field>
<field><id>reserved</id><value>0</value></field>
</default>
</attribute>
diff --git a/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml b/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml
index a267feac7..000fa3af5 100644
--- a/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml
+++ b/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml
@@ -115,6 +115,7 @@
<field><id>mailboxEnabled</id><value>0</value></field>
<field><id>fsiMasterInit</id><value>0</value></field>
<field><id>hardwareChangeDetection</id><value>0</value></field>
+ <field><id>powerLineDisturbance</id><value>0</value></field>
<field><id>reserved</id><value>0</value></field>
</default>
</attribute>
OpenPOWER on IntegriCloud