summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland Veloz <rveloz@us.ibm.com>2017-08-23 10:29:57 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-10-06 14:22:35 -0400
commit2a1cc4f4045ddfb247a7be1a18593a9836db8412 (patch)
tree880c73ec0af9e7ffb14df3686a8a5502cdfad8cd /src
parent7e787acb321e220f9ba0f4a17a408e06b5b4cef0 (diff)
downloadtalos-hostboot-2a1cc4f4045ddfb247a7be1a18593a9836db8412.tar.gz
talos-hostboot-2a1cc4f4045ddfb247a7be1a18593a9836db8412.zip
Updated VPD from HBRT on FSP systems
Created a generic message type that is used as a mailbox message that is passed from HBRT to FSP. The new generic message type is used to make a VPD write call. Change-Id: I21240d19909f786d525e2a98878000af4aea6e9f RTC:171488 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45048 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> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/runtime/generic_hbrt_fsp_message.H73
-rw-r--r--src/include/runtime/interface.h16
-rw-r--r--src/include/usr/vpd/vpdreasoncodes.H5
-rw-r--r--src/usr/isteps/pm/runtime/test/firmwareRequestTest.H91
-rw-r--r--src/usr/testcore/rtloader/loader.H65
-rw-r--r--src/usr/vpd/ipvpd.C6
-rw-r--r--src/usr/vpd/runtime/rt_vpd.C171
-rwxr-xr-xsrc/usr/vpd/test/mvpdtest.H16
8 files changed, 377 insertions, 66 deletions
diff --git a/src/include/runtime/generic_hbrt_fsp_message.H b/src/include/runtime/generic_hbrt_fsp_message.H
new file mode 100644
index 000000000..742270e66
--- /dev/null
+++ b/src/include/runtime/generic_hbrt_fsp_message.H
@@ -0,0 +1,73 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/runtime/generic_hbrt_fsp_message.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* [+] 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifndef __RUNTIME__GENERIC_HBRT_FSP_MESSAGE_H
+#define __RUNTIME__GENERIC_HBRT_FSP_MESSAGE_H
+
+#include <builtins.h>
+
+/** @file generic_hbrt_fsp_message.H
+ * @brief A generic structure for passing data
+ *
+ * This file has a generic struct to be used by the
+ * FSP/HWSV team to send and receive data.
+ */
+
+/**
+ * This struct sends an MBox message to the FSP
+ */
+struct GenericFspMboxMessage_t
+{
+ uint32_t msgq; // Example: MBOX::FSP_VPD_MSGQ
+ uint32_t msgType; // Example: VPD_MSG_TYPE:VPD_WRITE_PROC
+ struct // flags
+ {
+ uint32_t __reserved__async:1;
+ uint32_t __reserved__pseudosync:1;
+ uint32_t __reserved__unused:30;
+ };
+ uint64_t data; // generic member that can be used
+ // to do casting to other types:
+ // MyDataType_t* mydatatype =
+ // (MyDataType_t*)&(l_generic_msg.data);
+} PACKED ;
+
+/**
+ * This struct receives the response message from the FSP
+ */
+struct GenericFspRspMessage_t
+{
+ uint32_t msgq; // Example: MBOX::FSP_VPD_MSGQ
+ uint32_t msgType; // Example: VPD_MSG_TYPE:VPD_WRITE_PROC
+ struct // flags
+ {
+ uint32_t __reserved__async:1;
+ uint32_t __reserved__pseudosync:1;
+ uint32_t __reserved__unused:30;
+ };
+ uint32_t errPlid; // error log id
+} PACKED ;
+
+
+#endif // __RUNTIME__GENERIC_HBRT_FSP_MESSAGE_H
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h
index 7fe940a99..e436cc699 100644
--- a/src/include/runtime/interface.h
+++ b/src/include/runtime/interface.h
@@ -46,6 +46,7 @@
#include <stdint.h>
#include <time.h>
#include <limits.h>
+#include "generic_hbrt_fsp_message.H"
/** Memory error types defined for memory_error() interface. */
enum MemoryError_t
@@ -504,6 +505,7 @@ typedef struct hostInterfaces
HBRT_FW_MSG_TYPE_REQ_HCODE_UPDATE = 3,
HBRT_FW_MSG_HBRT_FSP = 4,
HBRT_FW_MSG_TYPE_ERROR_LOG = 5,
+ HBRT_FW_MSG_HBRT_FSP_RESP = 6,
};
struct hbrt_fw_msg // define struct hbrt_fw_msg
@@ -546,9 +548,19 @@ typedef struct hostInterfaces
// uint8_t *myData =
// (uint8_t*)&l_req_fw_msg->error_log.i_data;
} __attribute__ ((packed)) error_log;
- };
- };
+ // This struct is sent from HBRT with
+ // io_type set to HBRT_FW_MSG_HBRT_FSP
+ // This struct sends an MBox message to the FSP
+ struct GenericFspMboxMessage_t generic_message;
+
+ // This struct is sent from FSP with
+ // io_type set to HBRT_FW_MSG_HBRT_FSP_RESP
+ // This struct receives a message from the FSP
+ struct GenericFspRspMessage_t generic_message_resp;
+
+ }; // end union
+ }; // end struct hbrt_fw_msg
// Created a static constexpr to return the base size of hbrt_fw_msg
// Can't do #define - sizeof not allowed to be used in #defines
diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H
index ca1f34872..8007d0a7b 100644
--- a/src/include/usr/vpd/vpdreasoncodes.H
+++ b/src/include/usr/vpd/vpdreasoncodes.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2016 */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -92,6 +92,7 @@ enum vpdModuleId
VPD_RT_WRITE_PNOR = 0x81,
VPD_BLD_RT_IMAGE = 0x82,
VPD_SEND_MBOX_WRITE_MESSAGE = 0x83,
+ VPD_RT_FIRMWARE_REQUEST = 0x84,
};
@@ -139,6 +140,8 @@ enum vpdReasonCode
VPD_WRITE_DEST_UNRESOLVED = VPD_COMP_ID | 0x34,
VPD_CACHE_SIZE_EXCEEDED = VPD_COMP_ID | 0x35,
VPD_INVALID_LENGTH = VPD_COMP_ID | 0x36,
+ VPD_RT_NULL_FIRMWARE_REQUEST_PTR = VPD_COMP_ID | 0x37,
+ VPD_RT_WRITE_MSG_ERR = VPD_COMP_ID | 0x38,
};
diff --git a/src/usr/isteps/pm/runtime/test/firmwareRequestTest.H b/src/usr/isteps/pm/runtime/test/firmwareRequestTest.H
index 73ae4b0a2..231197ec3 100644
--- a/src/usr/isteps/pm/runtime/test/firmwareRequestTest.H
+++ b/src/usr/isteps/pm/runtime/test/firmwareRequestTest.H
@@ -162,4 +162,95 @@ class FirmwareRequestTest : public CxxTest::TestSuite
"FirmwareRequestTest::testFirmwareRequestErrLogToFsp");
} // end testFirmwareRequestErrLogToFsp
+
+ /**
+ * @brief: testFirmwareRequestHbrtToFsp
+ * test the firmware_request's HBRT to FSP call
+ */
+ void testFirmwareRequestHbrtToFsp (void)
+ {
+ TRACFCOMP(g_trac_pnor, ENTER_MRK
+ "FirmwareRequestTest::testFirmwareRequestHbrtToFsp");
+
+ if (g_hostInterfaces == NULL ||
+ g_hostInterfaces->firmware_request == NULL)
+ {
+ TS_FAIL("FirmwareRequestTest::testFirmwareRequestHbrtToFsp: "
+ "Hypervisor firmware_request interface not linked");
+ }
+ else
+ {
+ // Test HBRT to FSP
+ // populate the firmware_request structure with arbitrary data
+ hostInterfaces::hbrt_fw_msg l_req_fw_msg;
+ l_req_fw_msg.io_type = hostInterfaces::HBRT_FW_MSG_HBRT_FSP;
+ l_req_fw_msg.generic_message.msgq = 0x300;
+ l_req_fw_msg.generic_message.msgType = 0x400;
+ l_req_fw_msg.generic_message.data = 0xDEADBEEF;
+
+ TRACFCOMP(g_trac_pnor,
+ "FirmwareRequestTest::testFirmwareRequestHbrtToFsp req: "
+ "type:%d, msgq:0x%.8X, msgType:0x%.8X, data:0x%.8X",
+ l_req_fw_msg.io_type,
+ l_req_fw_msg.generic_message.msgq,
+ l_req_fw_msg.generic_message.msgType,
+ l_req_fw_msg.generic_message.data);
+
+ hostInterfaces::hbrt_fw_msg l_resp_fw_msg;
+ uint64_t l_resp_fw_msg_size = sizeof(l_resp_fw_msg);
+ size_t rc = g_hostInterfaces->firmware_request(
+ sizeof(l_req_fw_msg), &l_req_fw_msg,
+ &l_resp_fw_msg_size, &l_resp_fw_msg);
+
+ TRACFCOMP(g_trac_pnor,
+ "FirmwareRequestTest::testFirmwareRequestHbrtToFsp resp: "
+ "type:0x%.8X, msgq:0x%.8X, msgType:0x%.8X,"
+ " errPlid:0x%X, rc=%d",
+ l_resp_fw_msg.io_type,
+ l_resp_fw_msg.generic_message_resp.msgq,
+ l_resp_fw_msg.generic_message_resp.msgType,
+ l_resp_fw_msg.generic_message_resp.errPlid,
+ rc);
+
+ if (rc != 0)
+ {
+ TS_FAIL("FirmwareRequestTest::testFirmwareRequestHbrtToFsp: "
+ "firmware_request - HBRT to FSP failed - "
+ "returned wrong value");
+ }
+
+ if (l_resp_fw_msg.io_type !=
+ hostInterfaces::HBRT_FW_MSG_HBRT_FSP_RESP)
+ {
+ TS_FAIL("FirmwareRequestTest::testFirmwareRequestHbrtToFsp: "
+ "firmware_request - HBRT to FSP failed - "
+ "received incorrect msg_type");
+ }
+
+ if (l_resp_fw_msg.generic_message_resp.msgq != 0x800)
+ {
+ TS_FAIL("FirmwareRequestTest::testFirmwareRequestHbrtToFsp: "
+ "firware_request - HBRT to FSP failed - "
+ "received incorrect msgq");
+ }
+
+ if (l_resp_fw_msg.generic_message_resp.msgType != 0x900)
+ {
+ TS_FAIL("FirmwareRequestTest::testFirmwareRequestHbrtToFsp: "
+ "firware_request - HBRT to FSP failed - "
+ "received incorrect msgType");
+ }
+
+ if (l_resp_fw_msg.generic_message_resp.errPlid != 0xA00)
+ {
+ TS_FAIL("FirmwareRequestTest::testFirmwareRequestHbrtToFsp: "
+ "firware_request - HBRT to FSP failed - "
+ "received incorrect errPlid");
+ }
+ }
+ TRACFCOMP(g_trac_pnor, EXIT_MRK
+ "FirmwareRequestTest::testFirmwareRequestHbrtToFsp");
+
+ } // end testFirmwareRequestHbrtToFsp
+
}; // end class FirmwareRequestTest
diff --git a/src/usr/testcore/rtloader/loader.H b/src/usr/testcore/rtloader/loader.H
index 97efc782f..60056c633 100644
--- a/src/usr/testcore/rtloader/loader.H
+++ b/src/usr/testcore/rtloader/loader.H
@@ -724,7 +724,6 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
hostInterfaces::hbrt_fw_msg* l_resp_fw_msg =
(hostInterfaces::hbrt_fw_msg*) o_resp;
-
if (*o_respLen < (hostInterfaces::HBRT_FW_MSG_BASE_SIZE +
sizeof(l_resp_fw_msg->resp_generic)))
{
@@ -742,7 +741,7 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
break;
}
- TRACFCOMP(g_trac_hbrt, ENTER_MRK
+ TRACFCOMP(g_trac_hbrt,
"rt_firmware_request for HCODE SCOM update: "
"type:%d, chipId:0x%X, section:%d, "
"operation:%d, scomAddr:0x%X scomData:0x%X",
@@ -753,14 +752,13 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
l_req_fw_msg->req_hcode_update.i_scomAddr,
l_req_fw_msg->req_hcode_update.i_scomData);
- l_resp_fw_msg->io_type =
- hostInterfaces::HBRT_FW_MSG_TYPE_RESP_GENERIC;
+ l_resp_fw_msg->io_type =
+ hostInterfaces::HBRT_FW_MSG_TYPE_RESP_GENERIC;
- // dummy return value for testing
- l_resp_fw_msg->resp_generic.o_status = 264;
+ // dummy return value for testing
+ l_resp_fw_msg->resp_generic.o_status = 264;
- TRACFCOMP(g_trac_hbrt, EXIT_MRK"rt_firmware_request");
- retVal = 1; // just return 1 for testing
+ retVal = 1; // just return 1 for testing
}
else if (hostInterfaces::HBRT_FW_MSG_TYPE_ERROR_LOG
== l_req_fw_msg->io_type)
@@ -781,7 +779,7 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
}
- TRACFCOMP(g_trac_hbrt, ENTER_MRK
+ TRACFCOMP(g_trac_hbrt,
"rt_firmware_request for error log: "
"type:%d, plid:0x%08x, size:%d, data:0x%02x",
l_req_fw_msg->io_type,
@@ -789,22 +787,59 @@ class RuntimeLoaderTest : public CxxTest::TestSuite
l_req_fw_msg->error_log.i_errlSize,
l_req_fw_msg->error_log.i_data);
- l_resp_fw_msg->io_type =
+ l_resp_fw_msg->io_type =
hostInterfaces::HBRT_FW_MSG_TYPE_RESP_GENERIC;
- // dummy return value for testing
- l_resp_fw_msg->resp_generic.o_status = 20;
+ // dummy return value for testing
+ l_resp_fw_msg->resp_generic.o_status = 20;
+
+ retVal = 0; // just return 0 for testing
+ }
+ else if (hostInterfaces::HBRT_FW_MSG_HBRT_FSP
+ == l_req_fw_msg->io_type)
+ {
+ if (i_reqLen < (hostInterfaces::HBRT_FW_MSG_BASE_SIZE +
+ sizeof(l_req_fw_msg->generic_message)))
+ {
+ retVal = -EINVAL;
+ break;
+ }
- TRACFCOMP(g_trac_hbrt, EXIT_MRK"rt_firmware_request");
- retVal = 0; // just return 0 for testing
+ TRACFCOMP(g_trac_hbrt,
+ "rt_firmware_request for VPD Write Msg: "
+ "type:0x%.8X, msgq:0x%.8X, VPD type:0x%.8X, data:0x%X",
+ l_req_fw_msg->io_type,
+ l_req_fw_msg->generic_message.msgq,
+ l_req_fw_msg->generic_message.msgType,
+ l_req_fw_msg->generic_message.data);
+
+ l_resp_fw_msg->io_type =
+ hostInterfaces::HBRT_FW_MSG_HBRT_FSP_RESP;
+
+ // random testing data
+ l_resp_fw_msg->generic_message_resp.msgq = 0x800;
+ l_resp_fw_msg->generic_message_resp.msgType = 0x900;
+ l_resp_fw_msg->generic_message_resp.errPlid = 0xA00;
+ retVal = 0;
+
+ TRACFCOMP(g_trac_hbrt,
+ "rt_firmware_request for VPD Write Msg response: "
+ "type:0x%.8X, msgq:0x%.8X, msgType:0x%.8X,"
+ " errPlid:0x%X, retVal=%d",
+ l_resp_fw_msg->io_type,
+ l_resp_fw_msg->generic_message_resp.msgq,
+ l_resp_fw_msg->generic_message_resp.msgType,
+ l_resp_fw_msg->generic_message_resp.errPlid,
+ retVal);
}
else
{
- TRACFCOMP(g_trac_hbrt, ENTER_MRK
+ TRACFCOMP(g_trac_hbrt,
"rt_firmware_request an unrecognized request: "
"type:%d", l_req_fw_msg->io_type);
}
} while (0) ;
+
return retVal;
}
diff --git a/src/usr/vpd/ipvpd.C b/src/usr/vpd/ipvpd.C
index 4cd1449c9..53a1ae552 100644
--- a/src/usr/vpd/ipvpd.C
+++ b/src/usr/vpd/ipvpd.C
@@ -2063,12 +2063,6 @@ errlHndl_t IpVpdFacade::writeKeyword ( const char * i_keywordName,
break;
}
- // If we are writing both we don't have an FSP, skip the mbox msg
- if ( iv_configInfo.vpdWriteHW )
- {
- break;
- }
-
VPD::VpdWriteMsg_t msgdata;
// Quick double-check that our constants agree with the values
diff --git a/src/usr/vpd/runtime/rt_vpd.C b/src/usr/vpd/runtime/rt_vpd.C
index 2d07a4fb8..7d7b03e2d 100644
--- a/src/usr/vpd/runtime/rt_vpd.C
+++ b/src/usr/vpd/runtime/rt_vpd.C
@@ -33,6 +33,7 @@
#include <runtime/interface.h>
#include <targeting/common/util.H>
#include <util/runtime/util_rt.H>
+#include <runtime/interface.h>
#include "vpd.H"
#include "mvpd.H"
#include "cvpd.H"
@@ -387,8 +388,7 @@ errlHndl_t writePNOR ( uint64_t i_byteAddr,
}
// ------------------------------------------------------------------
-// sendMboxWriteMsg - not supported at runtime
-// Treat the same way HB does if mbox is not available
+// sendMboxWriteMsg
// ------------------------------------------------------------------
errlHndl_t sendMboxWriteMsg ( size_t i_numBytes,
void * i_data,
@@ -396,7 +396,8 @@ errlHndl_t sendMboxWriteMsg ( size_t i_numBytes,
VPD_MSG_TYPE i_type,
VpdWriteMsg_t& i_record )
{
- errlHndl_t err = NULL;
+ errlHndl_t l_err = nullptr;
+
TRACFCOMP( g_trac_vpd, INFO_MRK
"sendMboxWriteMsg: Send msg to FSP to write VPD type %.8X, "
"record %d, offset 0x%X",
@@ -404,31 +405,147 @@ errlHndl_t sendMboxWriteMsg ( size_t i_numBytes,
i_record.rec_num,
i_record.offset );
- // mimic the behavior of hostboot when mbox is not available.
- TRACFCOMP( g_trac_vpd, ERR_MRK
- "No SP Base Services available at runtime.");
-
- /*@
- * @errortype
- * @reasoncode VPD::VPD_MBOX_NOT_SUPPORTED_RT
- * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
- * @moduleid VPD::VPD_SEND_MBOX_WRITE_MESSAGE
- * @userdata1 VPD message type
- * @userdata2 0
- * @devdesc MBOX send not supported in HBRT
- */
- err = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- VPD::VPD_SEND_MBOX_WRITE_MESSAGE,
- VPD::VPD_MBOX_NOT_SUPPORTED_RT,
- i_type,
- 0);
-
- err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE,
- HWAS::SRCI_PRIORITY_HIGH);
-
- err->collectTrace( "VPD", 256);
+ do
+ {
+ if ((nullptr == g_hostInterfaces) ||
+ (nullptr == g_hostInterfaces->firmware_request))
+ {
+ /*@
+ * @errortype
+ * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL
+ * @moduleid VPD::VPD_SEND_MBOX_WRITE_MESSAGE
+ * @reasoncode VPD::VPD_RT_NULL_FIRMWARE_REQUEST_PTR
+ * @userdata1 HUID of target
+ * @userdata2 VPD message type
+ * @devdesc MBOX send not supported in HBRT
+ */
+ l_err= new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_INFORMATIONAL,
+ VPD::VPD_SEND_MBOX_WRITE_MESSAGE,
+ VPD::VPD_RT_NULL_FIRMWARE_REQUEST_PTR,
+ TARGETING::get_huid(i_target),
+ i_type);
+ break;
+ }
+
+ // Get an accurate size of memory actually needed to transport the data
+ size_t l_req_fw_msg_size = hostInterfaces::HBRT_FW_MSG_BASE_SIZE +
+ sizeof(hostInterfaces::hbrt_fw_msg::generic_message) +
+ i_numBytes;
+
+ //create the firmware_request structure to carry the vpd write msg data
+ hostInterfaces::hbrt_fw_msg *l_req_fw_msg =
+ (hostInterfaces::hbrt_fw_msg *)malloc(l_req_fw_msg_size) ;
+ memset(l_req_fw_msg, 0, l_req_fw_msg_size);
+
+ // populate the firmware_request structure with given data
+ l_req_fw_msg->io_type = hostInterfaces::HBRT_FW_MSG_HBRT_FSP;
+ l_req_fw_msg->generic_message.msgq = MBOX::FSP_VPD_MSGQ;
+ l_req_fw_msg->generic_message.msgType = i_type;
+ memcpy(&l_req_fw_msg->generic_message.data, i_data, i_numBytes);
+
+ // set up the response struct
+ hostInterfaces::hbrt_fw_msg l_resp_fw_msg;
+ uint64_t l_resp_fw_msg_size = sizeof(l_resp_fw_msg);
+
+ // make the firmware request
+ size_t rc = g_hostInterfaces->firmware_request(l_req_fw_msg_size,
+ l_req_fw_msg,
+ &l_resp_fw_msg_size,
+ &l_resp_fw_msg);
+ uint64_t l_userData1(0), l_userData2(0);
+
+ // Capture the err log id if any
+ // The return code (rc) may return OK, but there still may be an issue
+ // with the HWSV code on the FSP.
+ if ((l_resp_fw_msg_size >= (hostInterfaces::HBRT_FW_MSG_BASE_SIZE +
+ sizeof(l_resp_fw_msg.generic_message_resp))) &&
+ (hostInterfaces::HBRT_FW_MSG_HBRT_FSP_RESP
+ == l_resp_fw_msg.io_type) &&
+ (0 != l_resp_fw_msg.generic_message_resp.errPlid) )
+ {
+ l_userData2 = l_resp_fw_msg.generic_message_resp.errPlid;
+ }
- return err;
+ // gather up the error data and create an err log out of it
+ if (rc || l_userData2)
+ {
+ TRACFCOMP(g_trac_vpd,
+ ERR_MRK"firmware request: "
+ "firmware request for FSP VPD write message rc 0x%X, "
+ "target 0x%llX, VPD type %.8X, record %d, offset 0x%X",
+ rc, get_huid(i_target), i_type, i_record.rec_num,
+ i_record.offset );
+
+ /*@
+ * @errortype
+ * @moduleid VPD::VPD_RT_FIRMWARE_REQUEST
+ * @reasoncode VPD::VPD_RT_WRITE_MSG_ERR
+ * @userdata1[0:31] Firmware Request return code (if any)
+ * @userdata1[32:63] HUID of target
+ * @userdata2 HWSV error log id (if any)
+ * @devdesc Firmware Request for
+ * VPD Write Msg error
+ */
+
+ // Capture the return code (rc), if any
+ // this will indicate an issue with actually sending the msg
+ if (rc)
+ {
+ l_userData1 = TWO_UINT32_TO_UINT64(rc,
+ TARGETING::get_huid(i_target));
+ }
+ else
+ {
+ l_userData1 = TARGETING::get_huid(i_target);
+ }
+
+ l_err = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_PREDICTIVE,
+ VPD::VPD_RT_FIRMWARE_REQUEST,
+ VPD::VPD_RT_WRITE_MSG_ERR,
+ l_userData1,
+ l_userData2);
+
+ if (l_resp_fw_msg_size > 0)
+ {
+ l_err->addFFDC( MBOX_COMP_ID,
+ &l_resp_fw_msg,
+ l_resp_fw_msg_size,
+ 0, 0, false );
+ }
+
+ if (sizeof(l_req_fw_msg) > 0)
+ {
+ l_err->addFFDC( MBOX_COMP_ID,
+ &l_req_fw_msg,
+ sizeof(l_req_fw_msg),
+ 0, 0, false );
+ }
+
+ l_err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE,
+ HWAS::SRCI_PRIORITY_HIGH);
+
+ if (l_userData2)
+ {
+ l_err->plid(l_userData2);
+ }
+
+ l_err->collectTrace( "VPD", 256);
+ } // end (rc || l_userData2)
+
+ // release the memory created
+ free(l_req_fw_msg);
+ }
+ while (0);
+
+ if (l_err)
+ {
+ // @fixme-RTC:180490 - Temporarily commit until FSP code is implemented
+ // Just commit the log for now until FSP code is implemented
+ l_err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
+ errlCommit( l_err, VPD_COMP_ID );
+ }
+
+ return l_err;
}
diff --git a/src/usr/vpd/test/mvpdtest.H b/src/usr/vpd/test/mvpdtest.H
index 36dffe093..95941b076 100755
--- a/src/usr/vpd/test/mvpdtest.H
+++ b/src/usr/vpd/test/mvpdtest.H
@@ -549,7 +549,7 @@ class MVPDTest: public CxxTest::TestSuite
testData,
theSize,
DEVICE_MVPD_ADDRESS(MVPD::VWML,MVPD::pdI) );
-#ifndef __HOSTBOOT_RUNTIME
+
if( err )
{
fails++;
@@ -611,20 +611,6 @@ class MVPDTest: public CxxTest::TestSuite
VPD_COMP_ID );
continue;
}
-#else
- if(!err)
- {
- fails++;
- TRACFCOMP( g_trac_vpd, ERR_MRK
- "testMvpdWrite() at runtime did not fail");
- TS_FAIL( "testMvpdWrite() - VPD write did not fail at runtime");
- }
- else
- {
- delete err;
- }
-#endif
-
} while( 0 );
if( NULL != testData )
OpenPOWER on IntegriCloud