diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2018-04-12 07:10:38 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2018-04-12 15:55:25 -0400 |
commit | e84f5604125d704d098efbea74f8368060be593d (patch) | |
tree | fd8a2bfaf87a1134953f08fdb9916a035f2e5fde /src | |
parent | 0e51b65982a38ae8387e384df8608f864bc96f74 (diff) | |
download | talos-hostboot-e84f5604125d704d098efbea74f8368060be593d.tar.gz talos-hostboot-e84f5604125d704d098efbea74f8368060be593d.zip |
Ensure runtime lib is loaded for IPC_POPULATE_TPM_INFO_BY_NODE
Need to load the runtime lib before making calls to it in IPC
otherwise slave nodes will see segfault and boot "hang"
Only impacts multinode systems
Change-Id: I292096256a33c35b1ddb03a6adf540b6e171abe1
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57097
CI-Ready: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@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: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/mbox/ipcSp.C | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/src/usr/mbox/ipcSp.C b/src/usr/mbox/ipcSp.C index 86d5e4532..91ec6ce30 100644 --- a/src/usr/mbox/ipcSp.C +++ b/src/usr/mbox/ipcSp.C @@ -99,21 +99,55 @@ void IpcSp::msgHandler() { case IPC_POPULATE_TPM_INFO_BY_NODE: { - // msg->extra_data contains PAYLOAD Base - RUNTIME::setPayloadBaseAddress( - reinterpret_cast<uint64_t>(msg->extra_data)); + // make sure runtime module is loaded + if ( !VFS::module_is_loaded( "libruntime.so" ) ) + { + err = VFS::module_load( "libruntime.so" ); - // msg->data[0] contains the HDAT TPM info instance to populate - err = RUNTIME::populate_TpmInfoByNode(msg->data[0]); + if ( err ) + { + TRACFCOMP( g_trac_ipc, + "Could not load runtime module - must shutdown now!!!" ); + } + else + { + mod_loaded = true; + } + } + + if(!err) + { + // msg->extra_data contains PAYLOAD Base + RUNTIME::setPayloadBaseAddress( + reinterpret_cast<uint64_t>(msg->extra_data)); + + // msg->data[0] contains the HDAT TPM info instance + // to populate + err = RUNTIME::populate_TpmInfoByNode(msg->data[0]); + if(err) + { + TRACFCOMP( g_trac_ipc, ERR_MRK"IpcSp::msgHandler: populate_TpmInfoByNode errored - must shutdown now!!!"); + } + } if (err) { - TRACFCOMP( g_trac_ipc, ERR_MRK"IpcSp::msgHandler: populate_TpmInfoByNode errored - must shutdown now!!!"); const auto l_errPlid = err->plid(); errlCommit(err, IPC_COMP_ID); INITSERVICE::doShutdown(l_errPlid, true); } + if(mod_loaded) + { + err = VFS::module_unload( "libruntime.so" ); + + if (err) + { + errlCommit(err, IPC_COMP_ID); + } + mod_loaded = false; + } + // give a response back to the sender err = MBOX::send(MBOX::HB_POP_TPM_INFO_MSGQ, msg, msg->data[1]); if (err) |