diff options
author | Mark Pizzutillo <Mark.Pizzutillo@ibm.com> | 2019-09-04 00:58:09 -0400 |
---|---|---|
committer | Nicholas E Bofferding <bofferdn@us.ibm.com> | 2019-09-10 12:18:52 -0500 |
commit | ae8c69b8061732b934f9bbdf43d0cc4fd87c62ff (patch) | |
tree | e3fa8724f0a11b47c4e2213d9ec893b19f060fd8 /src/import/chips/ocmb/explorer/procedures/hwp | |
parent | 75ac15f7103234eaafc2d7edc089e4b426a78f33 (diff) | |
download | talos-hostboot-ae8c69b8061732b934f9bbdf43d0cc4fd87c62ff.tar.gz talos-hostboot-ae8c69b8061732b934f9bbdf43d0cc4fd87c62ff.zip |
Zero out command argument field to fix exp_draminit issues
Change-Id: If861521ad997d890c82429d8ab71b6b94ce78258
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83223
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/83227
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
Diffstat (limited to 'src/import/chips/ocmb/explorer/procedures/hwp')
3 files changed, 14 insertions, 6 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C index 8583c96b6..1f0ae5c9e 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C @@ -67,7 +67,7 @@ extern "C" // Issue full boot mode cmd though EXP-FW REQ buffer { host_fw_command_struct l_cmd; - mss::exp::setup_cmd_params(l_crc, l_cmd); + mss::exp::setup_cmd_params(l_crc, sizeof(l_phy_params), l_cmd); FAPI_TRY( mss::exp::ib::putCMD(i_target, l_cmd), "Failed putCMD() for %s", mss::c_str(i_target) ); } diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C index c77c1c59a..e8e8ddb66 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C @@ -43,21 +43,25 @@ namespace exp /// /// @brief host_fw_command_struct structure setup /// @param[in] i_cmd_data_crc the command data CRC +/// @param[in] i_cmd_length the length of the command present in the data buffer (if any) /// @param[out] o_cmd the command parameters to set /// -void setup_cmd_params(const uint32_t i_cmd_data_crc, host_fw_command_struct& o_cmd) +void setup_cmd_params( + const uint32_t i_cmd_data_crc, + const uint8_t i_cmd_length, + host_fw_command_struct& o_cmd) { + memset(&o_cmd, 0, sizeof(host_fw_command_struct)); // Issue full boot mode cmd though EXP-FW REQ buffer + // Explicit with all of these (including 0 values) to avoid ambiguity o_cmd.cmd_id = mss::exp::omi::EXP_FW_DDR_PHY_INIT; o_cmd.cmd_flags = 0; - // TK - Fabricated value need to figure out if we'll be creating req_id tables o_cmd.request_identifier = 0xBB; - o_cmd.cmd_length = 0; + o_cmd.cmd_length = i_cmd_length; o_cmd.cmd_crc = i_cmd_data_crc; o_cmd.host_work_area = 0; o_cmd.cmd_work_area = 0; - memset(o_cmd.padding, 0, sizeof(o_cmd.padding)); } /// diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.H index e310ee220..ba9602b3b 100644 --- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.H +++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.H @@ -148,9 +148,13 @@ enum odt_fields /// /// @brief host_fw_command_struct structure setup /// @param[in] i_cmd_data_crc the command data CRC +/// @param[in] i_cmd_length the length of the command present in the data buffer (if any) /// @param[out] o_cmd the command parameters to set /// -void setup_cmd_params(const uint32_t i_cmd_data_crc, host_fw_command_struct& o_cmd); +void setup_cmd_params( + const uint32_t i_cmd_data_crc, + const uint8_t i_cmd_length, + host_fw_command_struct& o_cmd); /// /// @brief user_input_msdg structure setup |