summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf
diff options
context:
space:
mode:
authorTerry J. Opie <opiet@us.ibm.com>2012-06-18 16:48:20 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-07-12 15:46:23 -0500
commitd40d08c719c845213844323ead282a748486d466 (patch)
tree15b2ec8cdcd9da21b11d1a4c373c10ea9de74c4a /src/usr/hwpf
parentec56bbb81f64a52ab2668befd33fef926a0170b6 (diff)
downloadtalos-hostboot-d40d08c719c845213844323ead282a748486d466.tar.gz
talos-hostboot-d40d08c719c845213844323ead282a748486d466.zip
Istep sync point message support
- Refactor IStepDispatcher for more robust msg handling - Modify sptask to act like real Fsp - Move all Istep Mbox Msg handling to Initservice - Add send sync point interface - Add wait on sync point interface - Modify start_payload istep to use new interfaces - Fix for Istep.pm Change-Id: Ib28b89cd916b9c0a0d15016996dbf1b88a8f79eb RTC: 43554 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1255 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf')
-rw-r--r--src/usr/hwpf/hwp/core_activate/core_activate.C145
-rw-r--r--src/usr/hwpf/hwp/start_payload/start_payload.C92
2 files changed, 94 insertions, 143 deletions
diff --git a/src/usr/hwpf/hwp/core_activate/core_activate.C b/src/usr/hwpf/hwp/core_activate/core_activate.C
index 879821424..c79e0a6d4 100644
--- a/src/usr/hwpf/hwp/core_activate/core_activate.C
+++ b/src/usr/hwpf/hwp/core_activate/core_activate.C
@@ -1,26 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/hwpf/hwp/core_activate/core_activate.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2012
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
-
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/hwpf/hwp/core_activate/core_activate.C $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
/**
* @file core_activate.C
*
@@ -43,6 +43,7 @@
#include <errl/errlentry.H>
#include <initservice/isteps_trace.H>
+#include <initservice/istepdispatcherif.H>
// targeting support
#include <targeting/common/commontargeting.H>
@@ -74,7 +75,7 @@ void call_host_activate_master( void *io_pArgs )
{
errlHndl_t l_errl = NULL;
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_activate_master entry" );
#if 0
@@ -98,22 +99,22 @@ void call_host_activate_master( void *io_pArgs )
FAPI_INVOKE_HWP( l_errl, host_activate_master, _args_...);
if ( l_errl )
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR : .........." );
errlCommit( l_errl, HWPF_COMP_ID );
}
else
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"SUCCESS : .........." );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
#endif
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_activate_master exit" );
- // end task, returning any errorlogs to IStepDisp
+ // end task, returning any errorlogs to IStepDisp
task_end2( l_errl );
}
@@ -127,7 +128,7 @@ void call_host_activate_slave_cores( void *io_pArgs )
{
errlHndl_t l_errl = NULL;
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_activate_slave_cores entry" );
#if 0
@@ -151,22 +152,22 @@ void call_host_activate_slave_cores( void *io_pArgs )
FAPI_INVOKE_HWP( l_errl, host_activate_slave_cores, _args_...);
if ( l_errl )
{
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR : .........." );
errlCommit( l_errl, HWPF_COMP_ID );
}
else
{
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"SUCCESS : .........." );
}
// @@@@@ END CUSTOM BLOCK: @@@@@
#endif
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_activate_slave_cores exit" );
- // end task, returning any errorlogs to IStepDisp
+ // end task, returning any errorlogs to IStepDisp
task_end2( l_errl );
}
@@ -180,46 +181,58 @@ void call_host_ipl_complete( void *io_pArgs )
{
errlHndl_t l_errl = NULL;
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_ipl_complete entry" );
+ do
+ {
#if 0
- // @@@@@ CUSTOM BLOCK: @@@@@
- // figure out what targets we need
- // customize any other inputs
- // set up loops to go through all targets (if parallel, spin off a task)
-
- // dump physical path to targets
- EntityPath l_path;
- l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>();
- l_path.dump();
-
- // cast OUR type of target to a FAPI type of target.
- const fapi::Target l_fapi_@targetN_target(
- TARGET_TYPE_MEMBUF_CHIP,
- reinterpret_cast<void *>
- (const_cast<TARGETING::Target*>(l_@targetN_target)) );
-
- // call the HWP with each fapi::Target
- FAPI_INVOKE_HWP( l_errl, host_ipl_complete, _args_...);
- if ( l_errl )
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : .........." );
- errlCommit( l_errl, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : .........." );
- }
- // @@@@@ END CUSTOM BLOCK: @@@@@
+ // @@@@@ CUSTOM BLOCK: @@@@@
+ // figure out what targets we need
+ // customize any other inputs
+ // set up loops to go through all targets (if parallel, spin off a task)
+
+ // dump physical path to targets
+ EntityPath l_path;
+ l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>();
+ l_path.dump();
+
+ // cast OUR type of target to a FAPI type of target.
+ const fapi::Target l_fapi_@targetN_target(
+ TARGET_TYPE_MEMBUF_CHIP,
+ reinterpret_cast<void *>
+ (const_cast<TARGETING::Target*>(l_@targetN_target)) );
+
+ // call the HWP with each fapi::Target
+ FAPI_INVOKE_HWP( l_errl, host_ipl_complete, _args_...);
+ if ( l_errl )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR : .........." );
+ errlCommit( l_errl, HWPF_COMP_ID );
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : .........." );
+ }
+ // @@@@@ END CUSTOM BLOCK: @@@@@
#endif
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ // Send Sync Point to Fsp
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ INFO_MRK"Send SYNC_POINT_REACHED msg to Fsp" );
+ l_errl = INITSERVICE::sendSyncPoint();
+ if( l_errl )
+ {
+ break;
+ }
+ } while( 0 );
+
+ TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_ipl_complete exit" );
- // end task, returning any errorlogs to IStepDisp
+ // end task, returning any errorlogs to IStepDisp
task_end2( l_errl );
}
diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C
index 15b514949..50de5afcf 100644
--- a/src/usr/hwpf/hwp/start_payload/start_payload.C
+++ b/src/usr/hwpf/hwp/start_payload/start_payload.C
@@ -108,6 +108,9 @@ void call_host_start_payload( void *io_pArgs )
do
{
+ // Need to wait here until Fsp tells us go
+ INITSERVICE::waitForSyncPoint();
+
// Host Start Payload procedure, per documentation from Patrick.
// - Verify target image
// - TODO - Done via call to Secure Boot ROM.
@@ -257,68 +260,18 @@ errlHndl_t notifyFsp ( bool i_istepModeFlag,
do
{
- // Get the Istep msgQ
- msg_q_t msgQ;
- INITSERVICE::getIstepMsgQ( msgQ );
-
- // Get the Istep Msg to respond to.
- msg_t * myMsg = NULL;
- INITSERVICE::getIstepMsg( myMsg );
-
- if( NULL == myMsg )
- {
- if( i_istepModeFlag )
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- ERR_MRK"Istep message was NULL in Istep Mode!" );
-
- /*@
- * @errortype
- * @reasoncode ISTEP_MBOX_MSG_NULL
- * @severity ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM
- * @moduleid ISTEP_START_PAYLOAD_NOTIFY_FSP
- * @userdata1 <UNUSED>
- * @userdata2 <UNUSED>
- * @devdesc Istep Mailbox Message returned was NULL!
- */
- err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM,
- ISTEP_START_PAYLOAD_NOTIFY_FSP,
- ISTEP_MBOX_MSG_NULL,
- 0x0,
- 0x0 );
-
- break;
- }
- else
- {
- myMsg = msg_allocate();
- }
- }
-
- // TODO - All of the following mailbox interactions really should be
- // done within the Istep Dispatcher. But, it needs to be reorganized
- // to do that. Issue 42491 should be used for this discussion and
- // when it is determined what needs to be reorganized, this should be
- // addressed.
- myMsg->data[1] = 0x0;
- myMsg->extra_data = NULL;
if( i_istepModeFlag )
{
// Istep Mode send istep complete
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
INFO_MRK"Isteps enabled, send istep complete msg" );
- // TODO - I cannot use this unless I completely mess around the
- // headers for the istepdispatcher. I have Issue 42491 open now
- // to discuss doing that. For now, I'm hard coding the msg type
- // to be equivalent to this value
-// myMsg->type = INITSERVICE::SINGLE_STEP_TYPE;
- myMsg->type = MBOX::FIRST_SECURE_MSG | 0x00;
- myMsg->data[0] = 0x0; // Fsp expects 0x0 (SUCCESS) in istep mode
-
- // Respond to the Msg
- msg_respond( msgQ,
- myMsg );
+ err = INITSERVICE::sendIstepCompleteMsg();
+
+ if( err )
+ {
+ break;
+ }
}
else
{
@@ -326,28 +279,13 @@ errlHndl_t notifyFsp ( bool i_istepModeFlag,
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
INFO_MRK"Isteps disabled, send SYNC_POINT_REACHED msg" );
- // TODO - This really needs to be in istep_mbox_msgs.H, but that
- // isn't in a place that I can use it right now, and it can't be
- // moved because its using Enums from a header (splesscommon.H)
- // that shouldn't be moved.
- // I've opened Issue 42491 to discuss changes.
- const uint64_t SYNC_POINT_REACHED = MBOX::FIRST_UNSECURE_MSG | 0x10;
- myMsg->type = SYNC_POINT_REACHED;
-
- // Hardcode steps in data[0] until issue 42491 is resolved.
- // Step 21, substep 1
- myMsg->data[0] = ((((uint64_t)21) << 32) | 1 );
-
- // Send the async msg.
- MBOX::send( MBOX::IPL_SERVICE_QUEUE,
- myMsg );
- }
+ err = INITSERVICE::sendSyncPoint();
- TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- INFO_MRK"Sent MBOX Msg (0x%08x), msg: 0x%016llx.%016llx",
- myMsg->type,
- myMsg->data[0],
- myMsg->data[1] );
+ if( err )
+ {
+ break;
+ }
+ }
} while( 0 );
TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
OpenPOWER on IntegriCloud