summaryrefslogtreecommitdiffstats
path: root/src/usr/ipmi/ipmimsg.C
diff options
context:
space:
mode:
authorAndrew Jeffery <andrewrj@au1.ibm.com>2018-09-17 17:23:07 +0930
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-10-02 14:42:41 -0500
commit102225f4e3e23c51665bb45c79eb0a578666fffc (patch)
tree56ca62db1712b8967663307246dc4e24f078edfe /src/usr/ipmi/ipmimsg.C
parent797f6fc918229a8a12fe3d45605fa8e7050e636f (diff)
downloadblackbird-hostboot-102225f4e3e23c51665bb45c79eb0a578666fffc.tar.gz
blackbird-hostboot-102225f4e3e23c51665bb45c79eb0a578666fffc.zip
ipmi: Break circular dependency between ipmimsg and ipmibt
Implement the message factory in the back-end implementation for which it is producing messages. The linker will resolve the right implementation based on the build configuration. Change-Id: I407f51e239b3dd3795502942cc24d80fbf0ffac6 Signed-off-by: Andrew Jeffery <andrewrj@au1.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65934 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: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi/ipmimsg.C')
-rw-r--r--src/usr/ipmi/ipmimsg.C41
1 files changed, 2 insertions, 39 deletions
diff --git a/src/usr/ipmi/ipmimsg.C b/src/usr/ipmi/ipmimsg.C
index 24673e043..4d00d1922 100644
--- a/src/usr/ipmi/ipmimsg.C
+++ b/src/usr/ipmi/ipmimsg.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2016 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -31,9 +31,6 @@
#include "ipmimsg.H"
-// This is because the factory lives in here.
-#include "ipmibt.H"
-
#include <kernel/console.H>
#include <config.h>
@@ -44,6 +41,7 @@ extern trace_desc_t * g_trac_ipmi;
namespace IPMI
{
+
///
/// @brief msg ctor
/// @param[in] i_cmd, the network function & command
@@ -68,39 +66,4 @@ namespace IPMI
iv_timeout.tv_nsec = 0;
}
- ///
- /// @brief static factory
- /// @param[in] i_cmd, the network function & command
- /// @param[in] i_len, the length of the data
- /// @param[in] i_data, the data (allocated space)
- /// @param[in] i_type, synchronous or async
- ///
- /// @return a pointer to a new'd Message object
- ///
- Message* Message::factory(const command_t& i_cmd, const uint8_t i_len,
- uint8_t* i_data, const message_type i_type)
- {
- Message* new_message = NULL;
-
- // CHECK: Put an ifdef here for the config'd transport type.
- switch(i_type)
- {
- case TYPE_SYNC:
- new_message = new BTSyncMessage(i_cmd, i_len, i_data);
- break;
- case TYPE_ASYNC:
- new_message = new BTAsyncMessage(i_cmd, i_len, i_data);
- break;
- case TYPE_EVENT:
- new_message = new BTAsyncReadEventMessage(i_cmd, i_len, i_data);
- break;
- default:
- // We have ourselves a bug
- assert(false, "ipmi message factory: unk type %d\n", i_type);
- break;
- }
-
- return new_message;
- }
-
};
OpenPOWER on IntegriCloud