summaryrefslogtreecommitdiffstats
path: root/src/usr/util
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2017-05-01 14:25:09 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-06-02 12:19:26 -0400
commit183439ec11d82aec6f9adb1e618b7019393c6631 (patch)
treeccf2b5385b26afb0844e98a95aee7d4c65e6d631 /src/usr/util
parentf3dd0b07a4c57d2d7bb7fe1fda734c5caa69cf2e (diff)
downloadtalos-hostboot-183439ec11d82aec6f9adb1e618b7019393c6631.tar.gz
talos-hostboot-183439ec11d82aec6f9adb1e618b7019393c6631.zip
Full Path of SBE message passing Add support in rt_cmds.C
Provide a runtime testing path for verification of the HBRT code and underlying code that processes the pass-through commands by supporting SBE Message passing in rt_cmds.C. Change-Id: I1f13fcd7644e5cbe22e6fcdd47611148b301db7a RTC:173539 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39908 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/util')
-rw-r--r--src/usr/util/runtime/rt_cmds.C56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/usr/util/runtime/rt_cmds.C b/src/usr/util/runtime/rt_cmds.C
index 6c2fe2dc3..88ade7ac1 100644
--- a/src/usr/util/runtime/rt_cmds.C
+++ b/src/usr/util/runtime/rt_cmds.C
@@ -350,6 +350,46 @@ void cmd_errorlog( char*& o_output,
sprintf( o_output, "Committed plid 0x%.8X", l_plid );
}
+
+/**
+ * @brief Process an SBE Message with a pass-through request
+ * @param[out] o_output Output display buffer, memory allocated here
+ * @param[in] i_chipId Processor chip ID
+ */
+void cmd_sbemsg( char*& o_output,
+ uint32_t i_chipId)
+{
+ UTIL_FT( "cmd_sbemsg> chipId=%.8X",
+ i_chipId);
+ o_output = new char[100];
+
+ int rc = 0;
+
+ do
+ {
+ // Get the runtime interface object
+ runtimeInterfaces_t *l_rt_intf = getRuntimeInterfaces();
+ if(nullptr == l_rt_intf)
+ {
+ rc = -2;
+ sprintf( o_output, "Not able to get run time interface object");
+ return;
+ }
+
+ rc = l_rt_intf->sbe_message_passing(i_chipId);
+ if(0 != rc)
+ {
+ sprintf( o_output, "Unexpected return from RT SBE message passing. "
+ "Return code: 0x%.8X for chipID: 0x%.8X", rc, i_chipId);
+ return;
+ }
+ }while (0);
+
+ sprintf( o_output, "SBE message passing command for chipID 0x%.8X returned "
+ "rc 0x%.8X", i_chipId, rc );
+}
+
+
/**
* @brief Execute an arbitrary command inside Hostboot Runtime
* @param[in] Number of arguments (standard C args)
@@ -485,6 +525,20 @@ int hbrtCommand( int argc,
sprintf( *l_output, "ERROR: errorlog <word1> <word2>\n" );
}
}
+ else if( !strcmp( argv[0], "sbemsg" ) )
+ {
+ // sbemsg <chipid>
+ if( argc == 2 )
+ {
+ cmd_sbemsg( *l_output,
+ strtou64( argv[1], NULL, 16 ) );
+ }
+ else
+ {
+ *l_output = new char[100];
+ sprintf( *l_output, "ERROR: sbemsg <chipid>\n" );
+ }
+ }
else
{
*l_output = new char[50+100*6];
@@ -502,6 +556,8 @@ int hbrtCommand( int argc,
strcat( *l_output, l_tmpstr );
sprintf( l_tmpstr, "errorlog <word1> <word2> [<huid to callout>]\n" );
strcat( *l_output, l_tmpstr );
+ sprintf( l_tmpstr, "sbemsg <chipid>\n" );
+ strcat( *l_output, l_tmpstr );
}
if( l_traceOut && (*l_output != NULL) )
OpenPOWER on IntegriCloud