summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2018-02-21 09:12:47 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-02-27 14:15:54 -0500
commitd6d402588868abe6a71b6078a52c99f83f6f7ffb (patch)
tree4c26eb5c9e26c8635a8d540a4cbd57998a2b0009
parent8f1ef46890d9d53df652cfa823f310adae39d47f (diff)
downloadtalos-hostboot-d6d402588868abe6a71b6078a52c99f83f6f7ffb.tar.gz
talos-hostboot-d6d402588868abe6a71b6078a52c99f83f6f7ffb.zip
Cleanup hbrt msg code to be easier to understand and update
Cleanup based on review comments on hbrt attribute update msg code. Change-Id: I10c957f1bf7b6cab77315af6c65f5e0f62b5c893 RTC:186991 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54494 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: Brian E. Bakke <bbakke@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/include/runtime/generic_hbrt_fsp_message.H9
-rw-r--r--src/usr/util/runtime/rt_fwnotify.C15
2 files changed, 17 insertions, 7 deletions
diff --git a/src/include/runtime/generic_hbrt_fsp_message.H b/src/include/runtime/generic_hbrt_fsp_message.H
index 9a3ecfdb4..01c972880 100644
--- a/src/include/runtime/generic_hbrt_fsp_message.H
+++ b/src/include/runtime/generic_hbrt_fsp_message.H
@@ -84,10 +84,18 @@ struct SbeRetryReqData_t
*/
struct HbrtAttrSyncData_t
{
+ // HUID of target on which we want to update the attribute
uint32_t huid;
+
+ // Attribute ID of attribute to update
TARGETING::ATTRIBUTE_ID attrID;
+
+ // size of attribute data in bytes
uint32_t sizeOfAttrData;
+
+ // first byte of <sizeOfAttrData> bytes of attribute data
uint8_t attrDataStart;
+
} PACKED ;
/**
@@ -172,6 +180,7 @@ struct GenericFspMboxMessage_t
// to do casting to other types:
// MyDataType_t* mydatatype =
// (MyDataType_t*)&(l_generic_msg.data);
+ // more than 8 bytes of data is possible
// A method to set the local vars to a default state
void initialize()
diff --git a/src/usr/util/runtime/rt_fwnotify.C b/src/usr/util/runtime/rt_fwnotify.C
index 612720edf..f8b8d6fe2 100644
--- a/src/usr/util/runtime/rt_fwnotify.C
+++ b/src/usr/util/runtime/rt_fwnotify.C
@@ -342,22 +342,23 @@ void firmware_notify( uint64_t i_len, void *i_data )
static_cast<hostInterfaces::hbrt_fw_msg*>(i_data);
switch (l_hbrt_fw_msg->io_type)
{
-
case hostInterfaces::HBRT_FW_MSG_HBRT_FSP_REQ:
{
// Distinguish based on msgType and msgq
- if (l_hbrt_fw_msg->generic_msg.msgType ==
- GenericFspMboxMessage_t::MSG_SBE_ERROR)
- {
- sbeAttemptRecovery(l_hbrt_fw_msg->generic_msg.data);
- }
- else if ( (l_hbrt_fw_msg->generic_msg.msgType ==
+ if ( (l_hbrt_fw_msg->generic_msg.msgType ==
GenericFspMboxMessage_t::MSG_ATTR_SYNC_REQUEST) &&
(l_hbrt_fw_msg->generic_msg.msgq ==
MBOX::HB_ATTR_SYNC_MSGQ) )
{
attrSyncRequest((void*)&(l_hbrt_fw_msg->generic_msg.data));
}
+ // Placing this at end as it does not have a msgq specified
+ // Want to match msgType & msgq combos first
+ else if (l_hbrt_fw_msg->generic_msg.msgType ==
+ GenericFspMboxMessage_t::MSG_SBE_ERROR)
+ {
+ sbeAttemptRecovery(l_hbrt_fw_msg->generic_msg.data);
+ }
else
{
l_badMessage = true;
OpenPOWER on IntegriCloud