summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt/htmgt.C
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2015-01-14 09:23:57 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-01-22 17:40:08 -0600
commitd84c27a1ba1c915e0fdcb2b638d729fe1bdff4fe (patch)
tree2135aa332fc89e1275934d8e2948cb2168a35dff /src/usr/htmgt/htmgt.C
parent38cfbf78f1b0393131bb6d7772d7e9948b03096e (diff)
downloadtalos-hostboot-d84c27a1ba1c915e0fdcb2b638d729fe1bdff4fe.tar.gz
talos-hostboot-d84c27a1ba1c915e0fdcb2b638d729fe1bdff4fe.zip
Add support for linux command to set OCC state.
Change-Id: I1ac4d810e0f4509dc89c645bef183f5cb2179b1c RTC: 115213 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15154 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Matt Spinler <spinler@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/htmgt.C')
-rw-r--r--src/usr/htmgt/htmgt.C40
1 files changed, 35 insertions, 5 deletions
diff --git a/src/usr/htmgt/htmgt.C b/src/usr/htmgt/htmgt.C
index 53a01be10..d38c1df27 100644
--- a/src/usr/htmgt/htmgt.C
+++ b/src/usr/htmgt/htmgt.C
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/htmgt/tmgtutility.C $ */
+/* $Source: src/usr/htmgt/htmgt.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -35,6 +35,7 @@
#include "htmgt_poll.H"
#include <devicefw/userif.H>
#include <config.h>
+#include <console/consoleif.H>
// Targeting support
#include <targeting/common/commontargeting.H>
@@ -74,6 +75,7 @@ namespace HTMGT
{
do
{
+ // TODO: RTC 119831 - remove hardcoded delay
// Delay before communication with OCCs to make sure
// they are ready (since there is no initial attention)
nanosleep(HTMGT_DELAY_BEFORE_COMM, 0);
@@ -98,7 +100,7 @@ namespace HTMGT
// Send poll to establish comm
TMGT_INF("Send initial poll to all OCCs to"
" establish comm");
- errlHndl_t l_err = sendOccPoll();
+ l_err = sendOccPoll();
if (l_err)
{
// Continue even if failed (poll will be retried)
@@ -109,8 +111,8 @@ namespace HTMGT
// Send ALL config data
sendOccConfigData();
- // Wait for all OCCs to go active
- l_err = waitForOccsActive();
+ // Wait for all OCCs to go to the target state
+ l_err = waitForOccState();
if ( l_err )
{
break;
@@ -196,6 +198,11 @@ namespace HTMGT
if (NULL != l_err)
{
TMGT_ERR("OCCs not all active. System will stay in safe mode");
+#ifndef __HOSTBOOT_RUNTIME
+ CONSOLE::displayf(HTMGT_COMP_NAME, "OCCs are not active "
+ "(rc=0x%04X). System will remain in safe mode",
+ l_err->reasonCode());
+#endif
// TODO: RTC 109066
//stopAllOccs();
@@ -250,5 +257,28 @@ namespace HTMGT
} // end processOccReset()
+
+ // Set the OCC state
+ errlHndl_t enableOccActuation(bool i_occActivation)
+ {
+ occStateId targetState = OCC_STATE_ACTIVE;
+ if (false == i_occActivation)
+ {
+ targetState = OCC_STATE_OBSERVATION;
+ }
+
+ // Set state for all OCCs
+ errlHndl_t l_err = occMgr::instance().setOccState(targetState);
+ if (NULL == l_err)
+ {
+ TMGT_INF("enableOccActuation: OCC states updated to 0x%02X",
+ targetState);
+ }
+
+ return l_err;
+
+ } // end enableOccActuation()
+
+
}
OpenPOWER on IntegriCloud