summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C2
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.C12
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/exp_draminit_utils.H6
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
OpenPOWER on IntegriCloud