diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2017-04-28 14:52:29 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-05-10 15:19:52 -0400 |
commit | 17969937b73f10ffe25ba6b4ac22e5d64a2e1f4c (patch) | |
tree | b0c34d7b6d87728323494d19f26257ad4938db8b /src | |
parent | 1f4dfe8eb4042b590d9e948591a6c285823fa548 (diff) | |
download | talos-hostboot-17969937b73f10ffe25ba6b4ac22e5d64a2e1f4c.tar.gz talos-hostboot-17969937b73f10ffe25ba6b4ac22e5d64a2e1f4c.zip |
Full Path of SBE message passing Design updates
Several design changes have been made and need to be reflected in the HBRT code.
Increase size of SBE Communication buffer
Changes to definition of Command Class / Command
Add a wrapper for existing HTMGT function
Set Generic HTMGT Message to be processed via wrapper
Add erase of process command function entry from map
Also address minor review comments from prior reviews.
Change-Id: Ibe450507233a39dc976042296ce5ea0314a4af78
RTC:173486
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39894
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/sbeio/runtime/sbe_msg_passing.H | 24 | ||||
-rw-r--r-- | src/include/usr/sbeio/sbeioreasoncodes.H | 3 | ||||
-rw-r--r-- | src/usr/sbeio/runtime/rt_sbeio.C | 172 | ||||
-rw-r--r-- | src/usr/sbeio/runtime/test/sbeiotestRt.H | 176 | ||||
-rw-r--r-- | src/usr/testcore/rtloader/loader.H | 2 |
5 files changed, 311 insertions, 66 deletions
diff --git a/src/include/usr/sbeio/runtime/sbe_msg_passing.H b/src/include/usr/sbeio/runtime/sbe_msg_passing.H index 48d3331ce..035047a28 100644 --- a/src/include/usr/sbeio/runtime/sbe_msg_passing.H +++ b/src/include/usr/sbeio/runtime/sbe_msg_passing.H @@ -37,7 +37,7 @@ namespace SBE_MSG /** * @brief SBE Communication package size in number of pages */ - const uint8_t SBE_COMM_PKG_SIZE = 1; + const uint8_t SBE_COMM_PKG_SIZE = 2; /** * @brief SBE Communication buffer size @@ -77,13 +77,11 @@ namespace SBE_MSG // Pass-Through Command enums for Command Header command field enum passThruCmds { - PASSTHRU_SET_OCC_STATE = 0x00E00001, // Set OCC State - PASSTHRU_GET_OCC_SENSOR = 0x00E00002, // Get OCC Sensor Readings - PASSTHRU_SET_HYPER_ENV = 0x00E00003, // Set Hypervisor Environment - PASSTHRU_QRY_MD_FN = 0x00E00004, // Query Mode and Function - PASSTHRU_RST_PM_COMPLEX = 0x00E00005, // Reset PM Complex - PASSTHRU_CTL_AUTOSLEW = 0x00E00006, // Control Autoslew - PASSTHRU_GET_PSTATE = 0x00E00007, // Get PState Table + // Command Class 0xE0 - HTMGT Messages + PASSTHRU_HTMGT_GENERIC = 0x00E00001, // HTMGT Generic Message + PASSTHRU_HTMGT_GET_PSTATE = 0x00E00002, // HTMGT Get PState Table + // Command Class 0xE1 - HBRT Messages + PASSTHRU_HBRT_GET_PSTATE = 0x00E10001, // HBRT Get PState Table }; @@ -153,6 +151,16 @@ namespace SBE_MSG */ int setProcessCmdFunction(enum passThruCmds i_command, processCmdFunction_t i_function); + + /** + * @brief Erase process pass-through command function in Process Command Map + * + * @param[in] i_command Process pass-through command + * + * @return int Return code. + */ + int eraseProcessCmdFunction(enum passThruCmds i_command); } // namespace SBE_MSG + #endif diff --git a/src/include/usr/sbeio/sbeioreasoncodes.H b/src/include/usr/sbeio/sbeioreasoncodes.H index 9b845096f..d7eb94ac8 100644 --- a/src/include/usr/sbeio/sbeioreasoncodes.H +++ b/src/include/usr/sbeio/sbeioreasoncodes.H @@ -95,6 +95,9 @@ enum sbeioReasonCode SBEIO_RT_DATA_TOO_LARGE = SBEIO_COMP_ID | 0x36, SBEIO_RT_RSP_FIELD_ALTERED = SBEIO_COMP_ID | 0x37, SBEIO_RT_NO_SBE_COMM_BUFFER = SBEIO_COMP_ID | 0x38, + SBEIO_RT_FUNCTION_NOT_FOUND = SBEIO_COMP_ID | 0x39, + SBEIO_RT_NO_INTERFACE_POINTER = SBEIO_COMP_ID | 0x3A, + SBEIO_RT_NO_INTERFACE_FUNCTION = SBEIO_COMP_ID | 0x3B, // Remove once we collect the FFDC ourselves - @todo-RTC:144313 //termination_rc diff --git a/src/usr/sbeio/runtime/rt_sbeio.C b/src/usr/sbeio/runtime/rt_sbeio.C index 949b3c5d8..dca1dabf3 100644 --- a/src/usr/sbeio/runtime/rt_sbeio.C +++ b/src/usr/sbeio/runtime/rt_sbeio.C @@ -34,6 +34,7 @@ #include <errl/errlmanager.H> #include <errl/errlreasoncodes.H> #include <devicefw/userif.H> +#include <occ/occ_common.H> // targeting support #include <targeting/common/target.H> @@ -353,6 +354,43 @@ namespace RT_SBEIO /*@ * @errortype * @moduleid SBEIO::SBEIO_RUNTIME + * @reasoncode SBEIO::SBEIO_RT_FUNCTION_NOT_FOUND + * @userdata1[0:31] Processor HUID + * @userdata1[32:63] Request Command + * @userdata2 Sequence ID + * + * @devdesc SBEIO RT Process Pass-through command function not + * found. + * @custdesc Firmware error communicating with boot device + */ + errl = new ErrlEntry(ERRL_SEV_UNRECOVERABLE, + SBEIO::SBEIO_RUNTIME, + SBEIO::SBEIO_RT_FUNCTION_NOT_FOUND, + TWO_UINT32_TO_UINT64( + get_huid(i_proc), + l_command), + i_request.sbeHdr.seqId); + + errl->addFFDC( SBE_COMP_ID, + &(i_request), + sizeof(sbeHeader_t) + sizeof(cmdHeader_t), + 0, // Version + ERRL_UDT_NOFORMAT, // parser ignores data + // ^^^ @TODO RTC:172362 + false ); // merge + errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH); + errl->collectTrace(SBEIO_COMP_NAME); + } + else if(g_processCmdMap[l_command] == nullptr) + { + TRACFCOMP(g_trac_sbeio, ERR_MRK"process_sbe_msg: process " + "command, function pointer not set for command 0x%08x", + l_command); + + /*@ + * @errortype + * @moduleid SBEIO::SBEIO_RUNTIME * @reasoncode SBEIO::SBEIO_RT_FUNCTION_NOT_SET * @userdata1[0:31] Processor HUID * @userdata1[32:63] Request Command @@ -686,6 +724,101 @@ namespace RT_SBEIO //------------------------------------------------------------------------ +#ifdef CONFIG_HTMGT + /** + * @brief Function to process pass-through command from SBE message + * + * @param[in] i_procTgt HB processor target + * @param[in] i_reqDataSize Pass-through command request data size + * @param[in] i_reqData Pass-through command request data + * @param[out] o_rspStatus Pass-through command response status + * @param[out] o_rspDataSize Pass-through command response data size + * @param[out] o_rspData Pass-through command response data + * + * @return errlHndl_t Error log handle on failure. + */ + errlHndl_t htmgt_pass_thru_wrapper(TARGETING::TargetHandle_t i_procTgt, + uint32_t i_reqDataSize, + uint8_t* i_reqData, + uint32_t* o_rspStatus, + uint32_t* o_rspDataSize, + uint8_t* o_rspData) + { + errlHndl_t errl = nullptr; + uint16_t l_rspDataSize = 0; + + runtimeInterfaces_t *rt_intf = getRuntimeInterfaces(); + + // Check runtime interface pointer + if(nullptr == rt_intf) + { + TRACFCOMP(g_trac_sbeio, ERR_MRK"htmgt_pass_thru_wrapper: NULL " + "runtime interface pointer from getRuntimeInterfaces"); + + /*@ + * @errortype + * @moduleid SBEIO::SBEIO_RUNTIME + * @reasoncode SBEIO::SBEIO_RT_NO_INTERFACE_POINTER + * @userdata1 Processor HUID + * @userdata2 Reserved + * + * @devdesc SBEIO RT Process Pass-through command Runtime + * Interface pointer not set. + * @custdesc Firmware error communicating with boot device + */ + errl = new ErrlEntry(ERRL_SEV_INFORMATIONAL, + SBEIO::SBEIO_RUNTIME, + SBEIO::SBEIO_RT_NO_INTERFACE_POINTER, + get_huid(i_procTgt), + 0); + + errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH); + errl->collectTrace(SBEIO_COMP_NAME); + } + // Check runtime interface function pointer + else if(nullptr == rt_intf->mfg_htmgt_pass_thru) + { + TRACFCOMP(g_trac_sbeio, ERR_MRK"htmgt_pass_thru_wrapper: function " + "pointer for mfg_htmgt_pass_thru not set"); + + /*@ + * @errortype + * @moduleid SBEIO::SBEIO_RUNTIME + * @reasoncode SBEIO::SBEIO_RT_NO_INTERFACE_FUNCTION + * @userdata1 Processor HUID + * @userdata2 Reserved + * + * @devdesc SBEIO RT Process Pass-through command Runtime + * Interface function pointer not set. + * @custdesc Firmware error communicating with boot device + */ + errl = new ErrlEntry(ERRL_SEV_INFORMATIONAL, + SBEIO::SBEIO_RUNTIME, + SBEIO::SBEIO_RT_NO_INTERFACE_FUNCTION, + get_huid(i_procTgt), + 0); + + errl->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH); + errl->collectTrace(SBEIO_COMP_NAME); + } + else + { + *o_rspStatus = rt_intf->mfg_htmgt_pass_thru(i_reqDataSize, + i_reqData, + &l_rspDataSize, + o_rspData); + } + + *o_rspDataSize = l_rspDataSize; + + return errl; + } +#endif + + //------------------------------------------------------------------------ + struct registerSbeio { registerSbeio() @@ -698,11 +831,16 @@ namespace RT_SBEIO for (const auto & l_procChip: procChips) { uint64_t l_instance = l_procChip->getAttr<ATTR_POSITION>(); - uint64_t l_sbeCommAddr = - g_hostInterfaces->get_reserved_mem("ibm,sbe-comm", - l_instance); + uint64_t l_sbeCommAddr = g_hostInterfaces->get_reserved_mem( + HBRT_RSVD_MEM__SBE_COMM, + l_instance); l_procChip->setAttr<ATTR_SBE_COMM_ADDR>(l_sbeCommAddr); } + +#ifdef CONFIG_HTMGT + SBE_MSG::setProcessCmdFunction(PASSTHRU_HTMGT_GENERIC, + htmgt_pass_thru_wrapper); +#endif } }; @@ -712,7 +850,7 @@ namespace RT_SBEIO namespace SBE_MSG { - // Set an entry in list of process command functions + // Set an entry in map of process command functions int setProcessCmdFunction(enum passThruCmds i_command, processCmdFunction_t i_function) { @@ -736,4 +874,30 @@ namespace SBE_MSG return rc; } + + // Erase an entry in map of process command functions + int eraseProcessCmdFunction(enum passThruCmds i_command) + { + int rc = 0; + + do + { + RT_SBEIO::g_processCmdMap.erase(i_command); + + if(RT_SBEIO::g_processCmdMap.find(i_command) != + RT_SBEIO::g_processCmdMap.end()) + { + TRACFCOMP(g_trac_sbeio, ERR_MRK"eraseProcessCmdFunction: " + "process command function not erased for command " + "0x%08x", + i_command); + + rc = -1; + + break; + } + } while(0); + + return rc; + } } // namespace SBE_MSG diff --git a/src/usr/sbeio/runtime/test/sbeiotestRt.H b/src/usr/sbeio/runtime/test/sbeiotestRt.H index dcb5ddfeb..970edfdbc 100644 --- a/src/usr/sbeio/runtime/test/sbeiotestRt.H +++ b/src/usr/sbeio/runtime/test/sbeiotestRt.H @@ -40,6 +40,7 @@ #include <errl/errlmanager.H> #include <devicefw/userif.H> + //trace extern trace_desc_t* g_trac_sbeio; @@ -98,7 +99,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite int rc = 0; - const uint32_t l_req_dataSize = 0xC; + const uint32_t l_req_dataSize = 0x00000001; o_request.sbeHdr.version = SBEHDRVER_LATEST; o_request.sbeHdr.msgSize = sizeof(sbeHeader_t) + sizeof(cmdHeader_t) + l_req_dataSize; @@ -109,19 +110,11 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite reinterpret_cast<uint64_t>(&(o_request.data)) - reinterpret_cast<uint64_t>(&(o_request.cmdHdr)); o_request.cmdHdr.dataSize = l_req_dataSize; - o_request.cmdHdr.command = PASSTHRU_SET_OCC_STATE; - // Set pointer to request data as words - uint32_t *o_req_data = - reinterpret_cast<uint32_t*>(&o_request.data[0]); - o_request.data[0] = 0; - o_request.data[1] = 0xE0; // Command class = HTMGT Messages - o_request.data[2] = 0; - o_request.data[3] = 0x01; // Command = Generic HTMGT Message - o_req_data[1] = iv_seqId; - o_req_data[2] = 0; - - - const uint32_t l_rsp_dataSize = 0; + o_request.cmdHdr.command = PASSTHRU_HTMGT_GENERIC; + o_request.data[0] = 0x01; // Get OCC State + + + const uint32_t l_rsp_dataSize = 0x00000001; o_expected_response.sbeHdr.version = o_request.sbeHdr.version; o_expected_response.sbeHdr.msgSize = sizeof(sbeHeader_t) + sizeof(cmdHeader_t) + l_rsp_dataSize; @@ -133,6 +126,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite - reinterpret_cast<uint64_t>(&(o_expected_response.cmdHdr)); o_expected_response.cmdHdr.dataSize = l_rsp_dataSize; o_expected_response.cmdHdr.command = o_request.cmdHdr.command; + o_expected_response.data[0] = 0x03; // Active do { @@ -196,7 +190,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite } /** - * @brief Function to process Set OCC State pass-through command + * @brief Function to process Generic HTMGT Message pass-through command * * @param[in] i_procTgt HB processor target * @param[in] i_reqDataSize Pass-through command request data size @@ -208,12 +202,12 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite * @return errlHndl_t Error log handle on failure. */ static - errlHndl_t processSetOCCState(TARGETING::TargetHandle_t i_procTgt, - uint32_t i_reqDataSize, - uint8_t *i_reqData, - uint32_t *o_rspStatus, - uint32_t *o_rspDataSize, - uint8_t *o_rspData) + errlHndl_t processGenericHtmgt(TARGETING::TargetHandle_t i_procTgt, + uint32_t i_reqDataSize, + uint8_t *i_reqData, + uint32_t *o_rspStatus, + uint32_t *o_rspDataSize, + uint8_t *o_rspData) { errlHndl_t l_errl = nullptr; @@ -230,19 +224,21 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite if(l_testOption) { TRACDCOMP(g_trac_sbeio, - "processSetOCCState: l_testOption %d", + "processGenericHtmgt: l_testOption %d", l_testOption); TRACDBIN( g_trac_sbeio, - "processSetOCCState: request", + "processGenericHtmgt: request", l_request, l_request->sbeHdr.msgSize); } // Set default returns *o_rspStatus = 0; - *o_rspDataSize = 0; + *o_rspDataSize = 1; + o_rspData[0] = 0x03; + // Do special processing based on test option supplied switch(l_testOption) { // Return with excess response data size @@ -282,7 +278,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Return with altered Command Header command case 7: - l_response->cmdHdr.command = PASSTHRU_GET_PSTATE; + l_response->cmdHdr.command = PASSTHRU_HTMGT_GET_PSTATE; break; // Normal processing @@ -295,11 +291,11 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite if(l_testOption) { TRACDCOMP(g_trac_sbeio, - "processSetOCCState: response %p", + "processGenericHtmgt: response %p", l_response); TRACDBIN( g_trac_sbeio, - "processSetOCCState: response", + "processGenericHtmgt: response", l_response, l_response->sbeHdr.msgSize); } @@ -340,6 +336,14 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite errl = RT_TARG::getHbTarget(i_procChipId, l_proc); + if(errl) + { + TS_FAIL("Not able to get TARGETING::Target for runtime " + "chip_id"); + + break; + } + // Read SCOM_ADDR_5003B for target proc errl = deviceRead(l_proc, &l_read_reg, @@ -421,7 +425,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -451,13 +455,13 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Increment Total Tests g_TotalTests++; - // Change SBE Header version + // Change CMD Header version l_request.cmdHdr.version -= 1; // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -514,13 +518,16 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite l_sbeCommAddr, &rt_intf); + // Save size of message to copy + uint32_t l_sbeMsgSize = l_request.sbeHdr.msgSize; + // Change SBE Header message size l_request.sbeHdr.msgSize = SBE_MSG_SIZE + 128; // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_sbeMsgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -584,7 +591,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -617,7 +624,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -653,7 +660,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -683,13 +690,16 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Increment Total Tests g_TotalTests++; + // Save size of message to copy + uint32_t l_sbeMsgSize = l_request.sbeHdr.msgSize; + // Change SBE Header message size l_request.sbeHdr.msgSize -= 1; // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_sbeMsgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -740,6 +750,18 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite do { + // Clear mapping for Generic HTMGT Message command + rc = setProcessCmdFunction(PASSTHRU_HTMGT_GENERIC, + nullptr); + if(0 != rc) + { + TS_FAIL("Unexpected error during RT SBE message passing. " + "chipID: 0x%08X, rc: 0x%08x, but expected 0 for " + "setProcessCmdFunction", + chipId, rc); + break; + } + // Do initializations for SBE Message passing rc = initSbeMessagePassing(l_request, l_expected_response, @@ -750,7 +772,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -762,6 +784,54 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite break; } + // Increment Total Tests + g_TotalTests++; + + // Check setting of bits in CFAM register + rc = checkResetSbeMessagePassingCFAM(chipId, + 0x40000000); + if(0 != rc) + { + TS_FAIL("Unexpected error during RT SBE message passing. " + "chipID: 0x%08X, rc: 0x%08x, but expected 0 for " + "CFAM register checking", + chipId, rc); + break; + } + + // Erase mapping for Generic HTMGT Message command + rc = eraseProcessCmdFunction(PASSTHRU_HTMGT_GENERIC); + if(0 != rc) + { + TS_FAIL("Unexpected error during RT SBE message passing. " + "chipID: 0x%08X, rc: 0x%08x, but expected 0 for " + "eraseProcessCmdFunction", + chipId, rc); + break; + } + + // Do initializations for SBE Message passing + rc = initSbeMessagePassing(l_request, + l_expected_response, + chipId, + l_sbeCommAddr, + &rt_intf); + + // Copy test request into SBE Communication area + memcpy(reinterpret_cast<void*>(l_sbeCommAddr), + reinterpret_cast<void*>(&l_request), + l_request.sbeHdr.msgSize); + + // Call the SBE message passing code + rc = rt_intf->sbe_message_passing(chipId); + if(0x2839 != rc) + { + TS_FAIL("Unexpected error during RT SBE message passing. " + "Testing function not found for chipID: 0x%08X", + chipId); + break; + } + // Check setting of bits in CFAM register rc = checkResetSbeMessagePassingCFAM(chipId, SBE_MSG_IN_PROGRESS); @@ -795,8 +865,8 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite do { // Call Set Process Command Function - rc = setProcessCmdFunction(PASSTHRU_SET_OCC_STATE, - processSetOCCState); + rc = setProcessCmdFunction(PASSTHRU_HTMGT_GENERIC, + processGenericHtmgt); if(0 != rc) { TS_FAIL("Unexpected return during RT SBE message passing. " @@ -846,11 +916,11 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call Set Process Command Function - rc = setProcessCmdFunction(PASSTHRU_SET_OCC_STATE, - processSetOCCState); + rc = setProcessCmdFunction(PASSTHRU_HTMGT_GENERIC, + processGenericHtmgt); if(0 != rc) { TS_FAIL("Unexpected return during RT SBE message passing. " @@ -918,7 +988,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -1009,11 +1079,11 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call Set Process Command Function - rc = setProcessCmdFunction(PASSTHRU_SET_OCC_STATE, - processSetOCCState); + rc = setProcessCmdFunction(PASSTHRU_HTMGT_GENERIC, + processGenericHtmgt); if(0 != rc) { TS_FAIL("Unexpected return during RT SBE message passing. " @@ -1071,13 +1141,13 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite l_request.cmdHdr.status = 0x2; // Change back sizes in expected response - l_expected_response.sbeHdr.msgSize = l_hdrsSize; - l_expected_response.cmdHdr.dataSize = 0; + l_expected_response.sbeHdr.msgSize = l_hdrsSize + 1; + l_expected_response.cmdHdr.dataSize = 1; // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -1113,7 +1183,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -1167,7 +1237,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -1201,7 +1271,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -1238,7 +1308,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); @@ -1272,7 +1342,7 @@ class SbeMessagePassingRtTest : public CxxTest::TestSuite // Copy test request into SBE Communication area memcpy(reinterpret_cast<void*>(l_sbeCommAddr), reinterpret_cast<void*>(&l_request), - sizeof(l_request)); + l_request.sbeHdr.msgSize); // Call the SBE message passing code rc = rt_intf->sbe_message_passing(chipId); diff --git a/src/usr/testcore/rtloader/loader.H b/src/usr/testcore/rtloader/loader.H index 98b055f74..1870754a5 100644 --- a/src/usr/testcore/rtloader/loader.H +++ b/src/usr/testcore/rtloader/loader.H @@ -643,7 +643,7 @@ class RuntimeLoaderTest : public CxxTest::TestSuite cv_comm_phys_addr = TARGETING::get_top_mem_addr(); assert (cv_comm_phys_addr != 0, - "bld_devtree: Top of memory was 0!"); + "rt_get_comm: Top of memory was 0!"); cv_comm_phys_addr -= (VMM_RT_VPD_OFFSET + 64*KILOBYTE); |