summaryrefslogtreecommitdiffstats
path: root/src/usr/mbox
diff options
context:
space:
mode:
authorSwathi Madhuri Bhattiprolu <bhmadhur@in.ibm.com>2018-02-28 07:08:54 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-04-05 14:34:23 -0400
commit571e1d84dfe50aaa674aa7e33abb75868b432d78 (patch)
tree2ab7eb56240999e074be13138d7d2ac5e24802cc /src/usr/mbox
parentad4459feb84ab2a4ec9f512b220a9aa67be858c8 (diff)
downloadtalos-hostboot-571e1d84dfe50aaa674aa7e33abb75868b432d78.tar.gz
talos-hostboot-571e1d84dfe50aaa674aa7e33abb75868b432d78.zip
Verify frequency attributes across nodes
-Existing code ensures consistency of frequency data across all modules in istep6.12. -In a multi-drawer config this data needs to be consistent across all drawers. -Master drawer sends the frequency data to all the other via IPC mechanism. -This data is compared and error is returned if there is a mismatch. Change-Id: I922d32456c9d3c4e53dae528f088dbb013c3ded9 RTC:158036 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54825 CI-Ready: SWATHI M. BHATTIPROLU <bhmadhur@in.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Richard Ward <rward15@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/usr/mbox')
-rw-r--r--src/usr/mbox/ipcSp.C81
-rw-r--r--src/usr/mbox/ipcSp.H4
2 files changed, 80 insertions, 5 deletions
diff --git a/src/usr/mbox/ipcSp.C b/src/usr/mbox/ipcSp.C
index d2c824f03..f04dc81c8 100644
--- a/src/usr/mbox/ipcSp.C
+++ b/src/usr/mbox/ipcSp.C
@@ -40,13 +40,17 @@ namespace ISTEP_21
{
extern errlHndl_t callShutdown ( uint64_t i_hbInstance,
bool i_masterInstance );
+
+ extern errlHndl_t callCheckFreqAttrData(void *freq_data_obj_ptr);
};
+
trace_desc_t* g_trac_ipc = NULL;
TRAC_INIT(&g_trac_ipc, IPC_TRACE_NAME, KILOBYTE);
using namespace IPC;
using namespace ERRORLOG;
+using namespace TARGETING;
IpcSp::IpcSp()
:
@@ -263,7 +267,79 @@ void IpcSp::msgHandler()
}
break;
}
- case IPC_START_PAYLOAD:
+
+ case IPC_FREQ_ATTR_DATA:
+ {
+ TRACFCOMP( g_trac_ipc,
+ "IPC received the IPC_FREQ_ATTR_DATA msg - %d:%d",
+ msg->data[0], msg->data[1]);
+
+ const int NUM_MOD = 2;
+ const char * mods[NUM_MOD] =
+ { "libistep21.so","libruntime.so"};
+ bool loaded_mods[NUM_MOD] = {false, false};
+ for (auto cnt = 0; cnt < NUM_MOD; ++cnt)
+ {
+ if ( !VFS::module_is_loaded( mods[cnt] ) )
+ {
+ err = VFS::module_load( mods[cnt] );
+
+ if ( err )
+ {
+ TRACFCOMP( g_trac_ipc,
+ "Could not load %s module", mods[cnt] );
+ break;
+ }
+ else
+ {
+ loaded_mods[cnt] = true;
+ }
+ }
+ }
+
+ if(!err)
+ {
+
+ // Function will not return unless error
+ err = ISTEP_21::callCheckFreqAttrData((void *)msg->extra_data);
+ }
+
+ if (err)
+ {
+ uint32_t l_errPlid = err->plid();
+ errlCommit(err,IPC_COMP_ID);
+ INITSERVICE::doShutdown(l_errPlid, true);
+ }
+
+ //Send response back to the master HB to indicate set freq attr successful
+ err = MBOX::send(MBOX::HB_FREQ_ATTR_DATA_MSGQ, msg, msg->data[1] );
+
+ if (err)
+ {
+ uint32_t l_errPlid = err->plid();
+ errlCommit(err,IPC_COMP_ID);
+ INITSERVICE::doShutdown(l_errPlid, true);
+ }
+
+ for (auto cnt = 0; cnt < NUM_MOD; ++cnt)
+ {
+ if ( loaded_mods[cnt] )
+ {
+ err = VFS::module_unload( mods[cnt] );
+
+ if (err)
+ {
+ errlCommit(err, IPC_COMP_ID);
+ }
+ loaded_mods[cnt] = false;
+ }
+
+ }
+
+ break;
+
+ }
+ case IPC_START_PAYLOAD:
{
const int NUM_MOD = 3;
const char * mods[NUM_MOD] =
@@ -288,11 +364,8 @@ void IpcSp::msgHandler()
}
}
- if (err) break;
-
if(!err)
{
- // Function will not return unless error
err = ISTEP_21::callShutdown(msg->data[0],false);
}
diff --git a/src/usr/mbox/ipcSp.H b/src/usr/mbox/ipcSp.H
index 69e9f91e3..1a3ce0045 100644
--- a/src/usr/mbox/ipcSp.H
+++ b/src/usr/mbox/ipcSp.H
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
OpenPOWER on IntegriCloud