diff options
| author | Marty Gloff <mgloff@us.ibm.com> | 2018-01-04 13:10:25 -0600 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-01-16 12:23:56 -0500 |
| commit | 6c769aede36330e33939870110b274fb78461d10 (patch) | |
| tree | 8b959c803464cc76ef8206a6bae342e6be6af12e /src/usr/util/runtime | |
| parent | 5343e0808f17b7c3d93bf3b18e211c73970fa9ff (diff) | |
| download | talos-hostboot-6c769aede36330e33939870110b274fb78461d10.tar.gz talos-hostboot-6c769aede36330e33939870110b274fb78461d10.zip | |
Concurrent code update of HBRT - Enable Interface for Host
Includes changes to enable the host interface for HBRT concurrent update.
Also includes some changes for fixing prior review comments, for fixing
bugs found in end-to-end testing, and for removing temporary code used
when the LID was unavailable.
Change-Id: I221bbd299567c8b0dad058cae4620b94f7bff7c8
RTC: 181285
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51498
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian E. Bakke <bbakke@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/util/runtime')
| -rw-r--r-- | src/usr/util/runtime/rt_cmds.C | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/src/usr/util/runtime/rt_cmds.C b/src/usr/util/runtime/rt_cmds.C index b9c0e4324..af49e71e9 100644 --- a/src/usr/util/runtime/rt_cmds.C +++ b/src/usr/util/runtime/rt_cmds.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -954,6 +954,41 @@ void cmd_readHBRTversion( char*& o_output ) /** + * @brief Execute function to prepare targeting data for an HBRT update + * @param[out] o_output Output display buffer, memory allocated here + */ +void cmd_hbrt_update(char*& o_output) +{ + UTIL_FT( "cmd_hbrt_update>"); + 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->prepare_hbrt_update(); + if(0 != rc) + { + sprintf( o_output, "Unexpected return from RT prepare HBRT update. " + "Return code: 0x%.8X", rc); + return; + } + }while (0); + + sprintf( o_output, "Prepare HBRT update command returned rc 0x%.8X", rc ); +} + + +/** * @brief Execute an arbitrary command inside Hostboot Runtime * @param[in] Number of arguments (standard C args) * @param[in] Array of argument values (standard C args) @@ -1185,6 +1220,20 @@ int hbrtCommand( int argc, "ERROR: readHBRTversion\n" ); } } + else if( !strcmp( argv[0], "hbrt_update" ) ) + { + // hbrt_update + if( argc == 1 ) + { + cmd_hbrt_update( *l_output ); + } + else + { + *l_output = new char[100]; + sprintf( *l_output, + "ERROR: hbrt_update\n" ); + } + } else { *l_output = new char[50+100*10]; @@ -1212,6 +1261,8 @@ int hbrtCommand( int argc, strcat( *l_output, l_tmpstr ); sprintf( l_tmpstr, "readHBRTversion\n"); strcat( *l_output, l_tmpstr ); + sprintf( l_tmpstr, "hbrt_update\n"); + strcat( *l_output, l_tmpstr ); } if( l_traceOut && (*l_output != NULL) ) @@ -1236,3 +1287,4 @@ struct registerCmds registerCmds g_registerCmds; + |

