summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps/pm
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/usr/isteps/pm
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/usr/isteps/pm')
-rw-r--r--src/usr/isteps/pm/runtime/test/firmwareRequestTest.H91
1 files changed, 91 insertions, 0 deletions
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
OpenPOWER on IntegriCloud