summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorAndre Marin <aamarin@us.ibm.com>2018-11-02 08:33:30 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2018-11-21 10:42:24 -0600
commite2e0e045605128f32c83299692f829686c0ea675 (patch)
tree3dfd0ca63b98c7292d042f75c4fa381a2b66cd2d /src/import
parent3f1f2186bb80322594a3cc81241c390119d69552 (diff)
downloadtalos-hostboot-e2e0e045605128f32c83299692f829686c0ea675.tar.gz
talos-hostboot-e2e0e045605128f32c83299692f829686c0ea675.zip
Add exp_draminit and fix data_structs constants
Change-Id: Ic8011ed9b6261ce2849b2c51f79c9533261222bf Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67837 Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68429 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: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/ocmb/explorer/common/include/exp_data_structs.H25
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C4
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H2
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H33
-rw-r--r--src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml22
-rw-r--r--src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H3
-rw-r--r--src/import/generic/memory/lib/utils/shared/mss_generic_consts.H3
7 files changed, 75 insertions, 17 deletions
diff --git a/src/import/chips/ocmb/explorer/common/include/exp_data_structs.H b/src/import/chips/ocmb/explorer/common/include/exp_data_structs.H
index c0eebbb22..c4cee19f9 100644
--- a/src/import/chips/ocmb/explorer/common/include/exp_data_structs.H
+++ b/src/import/chips/ocmb/explorer/common/include/exp_data_structs.H
@@ -50,7 +50,8 @@ enum exp_struct_sizes
// training settings of a different frequency.
// It was deemed the PSTATE feature was not useful to Explorer so we only have 1
MSDG_MAX_PSTATE = 1,
- PADDING_SIZE = 4,
+ CMD_PADDING_SIZE = 3,
+ RSP_PADDING_SIZE = 4,
ARGUMENT_SIZE = 28,
SENSOR_CACHE_PADDING_SIZE_0 = 3,
SENSOR_CACHE_PADDING_SIZE_1 = 15,
@@ -71,7 +72,7 @@ typedef struct
uint32_t cmd_crc; // CRC of command data buffer, if used
uint32_t host_work_area; // Scratchpad area for Host, FW returns this value as a reponse
uint32_t cmd_work_area; // Scratchpad area for Firmware, can be used for tracking command progress etc.
- uint32_t padding[PADDING_SIZE]; // Fill up to the size of one cache line
+ uint32_t padding[CMD_PADDING_SIZE]; // Fill up to the size of one cache line
uint8_t command_argument[ARGUMENT_SIZE]; // Additional parameters associated with the command
uint32_t cmd_header_crc; // CRC of 64 bytes of command header
} host_fw_command_struct;
@@ -90,7 +91,7 @@ typedef struct
uint32_t response_length; // Number of bytes following the response header
uint32_t response_crc; // CRC of response data buffer, if used
uint32_t host_work_area; // Scratchpad area for Host, FW returns this value as a reponse
- uint32_t padding[PADDING_SIZE]; // Fill up to the size of one cache line
+ uint32_t padding[RSP_PADDING_SIZE]; // Fill up to the size of one cache line
uint8_t response_argument[ARGUMENT_SIZE]; // Additional parameters associated with the response
uint32_t response_header_crc; // CRC of 64 bytes of reponse header
} host_fw_response_struct;
@@ -103,7 +104,8 @@ typedef struct
///
typedef struct user_input_msdg
{
- // Choose the Dimm type from one of below: // 0 = UDIMM
+ // Choose the Dimm type from one of below:
+ // 0 = UDIMM
// 1 = RDIMM
// 2 = LRDIMM
uint16_t DimmType;
@@ -223,7 +225,8 @@ typedef struct user_input_msdg
uint16_t PhyOdtImpedance[MSDG_MAX_PSTATE];
// Tx Pull-up Drive Impedance for DQ/DQS in ohm for each pstates
- // Valid values = 480,240,160,120, 96,80,68, 60,53,48,43,40, // 36,34,32,30,28
+ // Valid values = 480,240,160,120, 96,80,68, 60,53,48,43,40,
+ // 36,34,32,30,28
// [0] - Impedance in Ohm for P0
// [1] - Impedance in Ohm for P1
// [2] - Impedance in Ohm for P2
@@ -231,7 +234,8 @@ typedef struct user_input_msdg
uint16_t PhyDrvImpedancePU[MSDG_MAX_PSTATE];
// Tx Pull-up Drive Impedance for DQ/DQS in ohm for each pstates
- // Valid values = 480,240,160,120, 96,80,68, 60,53,48,43,40, // 36,34,32,30,28
+ // Valid values = 480,240,160,120, 96,80,68, 60,53,48,43,40,
+ // 36,34,32,30,28
// [0] - Impedance in Ohm for P0
// [1] - Impedance in Ohm for P1
// [2] - Impedance in Ohm for P2
@@ -458,7 +462,8 @@ typedef struct user_input_msdg
uint16_t Geardown[MSDG_MAX_PSTATE];
- // Value of RCD parity checking & Command Latency Adder // (F0RC0E, FORC0F)
+ // Value of RCD parity checking & Command Latency Adder
+ // (F0RC0E, FORC0F)
// 0 = 0nCK latency adder, parity disabled;
// 1 = 1nCK latency adder;
// 2 = 2nCK latency adder;
@@ -471,9 +476,11 @@ typedef struct user_input_msdg
uint16_t CALatencyAdder[MSDG_MAX_PSTATE];
- // Value of CS to CMD/ADDR Latency mode (MR4.CAL) for dfi_bist // (training runs with CALMode = 0)
+ // Value of CS to CMD/ADDR Latency mode (MR4.CAL) for dfi_bist
+ // (training runs with CALMode = 0)
// Valid value: 0,3,4,5,6,8
- // [0] - BistCALMode value for P0// [1] - BistCALMode value for P1
+ // [0] - BistCALMode value for P0
+ // [1] - BistCALMode value for P1
// [2] - BistCALMode value for P2
// [3] - BistCALMode value for P3
uint16_t BistCALMode[MSDG_MAX_PSTATE];
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
index 4bccb489b..4e86dcc40 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
@@ -239,7 +239,7 @@ std::vector<uint8_t> host_fw_command_struct_to_little_endian(const host_fw_comma
forceLE(i_input.cmd_crc, l_data);
forceLE(i_input.host_work_area, l_data);
forceLE(i_input.cmd_work_area, l_data);
- forceLEArray(i_input.padding, PADDING_SIZE, l_data);
+ forceLEArray(i_input.padding, CMD_PADDING_SIZE, l_data);
forceLEArray(i_input.command_argument, ARGUMENT_SIZE, l_data);
// Generates and adds on the CRC
@@ -403,7 +403,7 @@ bool host_fw_response_struct_from_little_endian(const std::vector<uint8_t>& i_da
l_rc &= readLE(i_data, l_idx, o_response.response_crc);
l_rc &= readLE(i_data, l_idx, o_response.host_work_area);
- l_rc &= readLEArray(i_data, PADDING_SIZE, l_idx, o_response.padding);
+ l_rc &= readLEArray(i_data, RSP_PADDING_SIZE, l_idx, o_response.padding);
l_rc &= readLEArray(i_data, ARGUMENT_SIZE, l_idx, o_response.response_argument);
o_crc = crc32_gen(i_data, l_idx);
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
index d90408df0..05cc3689e 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/i2c/exp_i2c.H
@@ -70,7 +70,7 @@ inline fapi2::ReturnCode status_code( const fapi2::Target<fapi2::TARGET_TYPE_OCM
// Technically many cmds have their own status code decoding..but SUCCESS is always 0.
// If it's anything else we can just look up the status code
FAPI_ASSERT( l_status == status_codes::SUCCESS,
- fapi2::MSS_EXP_STATUS_CODE_UNSUCCESSFUL().
+ fapi2::MSS_EXP_I2C_FW_STATUS_CODE_FAILED().
set_TARGET(i_target).
set_STATUS_CODE(l_status).
set_CMD_ID(i_cmd_id),
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H
index 223b97ca7..b317d683b 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/lib/shared/exp_consts.H
@@ -167,6 +167,39 @@ enum addrSide
}// i2c
+
+namespace omi
+{
+
+///
+/// @brief HOST-FW Commands and Responses
+///
+enum cmd_and_response_id
+{
+ FW_DDR_INTERFACE_INIT = 0x01,
+ FW_TEMP_SENSOR_INIT = 0x02,
+ FW_ERR_LOGGING_INTERFACE_INIT = 0x03,
+ FW_GO_COMMAND = 0x04,
+ FW_ADAPTER_PROPERTIES_GET = 0x05,
+ FW_STATUS_GET = 0x06,
+ FW_TEMPERATURE_GET = 0x07,
+ FW_ERROR_LOG_GET = 0x08,
+ FW_SPD_DATA_SET = 0x09,
+ FW_BINARY_UPGRADE = 0x0A,
+ FW_FLASH_LOADER_VERSION_INFO = 0x0B,
+};
+
+///
+/// @brief Response argument parameters
+///
+enum response_arg
+{
+ SUCCESS = 0,
+ ERROR_CODE = 1,
+};
+
+}// omi
+
}// exp
}// mss
diff --git a/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml b/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
index 42ed345e5..2163e8c57 100644
--- a/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
+++ b/src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml
@@ -40,7 +40,7 @@
</hwpError>
<hwpError>
- <rc>RC_MSS_EXP_STATUS_CODE_UNSUCCESSFUL</rc>
+ <rc>RC_MSS_EXP_I2C_FW_STATUS_CODE_FAILED</rc>
<description>
Explorer status code for command ID EXP_FW_STATUS
did not return SUCCESS
@@ -98,4 +98,24 @@
</deconfigure>
</hwpError>
+ <hwpError>
+ <rc>RC_MSS_EXP_RSP_ARG_FAILED</rc>
+ <description>
+ The response_argument field of the host_fw_response_struct returned a FAILURE
+ </description>
+ <ffdc>RSP_ID</ffdc>
+ <ffdc>ERROR_CODE</ffdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>MEDIUM</priority>
+ </callout>
+ <callout>
+ <target>TARGET</target>
+ <priority>HIGH</priority>
+ </callout>
+ <deconfigure>
+ <target>TARGET</target>
+ </deconfigure>
+ </hwpError>
+
</hwpErrors>
diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H b/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
index 3adb52f9e..7676d5f3f 100644
--- a/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
+++ b/src/import/chips/p9/procedures/hwp/memory/lib/shared/mss_const.H
@@ -112,9 +112,6 @@ enum sizes
// You can't get greater than ~0, so you'd never timeout
// TODO RTC:166340 - Clean up MCBIST polling
OVERLY_LARGE_NUMBER_OF_POLLS = 5000000000000,
-
- // Equal comparison value for memcmp
- MEMCMP_EQUAL = 0,
};
enum times
diff --git a/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H b/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
index 3a02f8165..9b4df69fc 100644
--- a/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
+++ b/src/import/generic/memory/lib/utils/shared/mss_generic_consts.H
@@ -47,7 +47,8 @@ namespace mss
///
enum common_consts
{
- DEFAULT_POLL_LIMIT = 50, ///< the number of poll attempts in the event we can't calculate another
+ DEFAULT_POLL_LIMIT = 50, ///< the number of poll attempts in the event we can't calculate another
+ MEMCMP_EQUAL = 0, ///< Equal comparison value for memcmp
};
///
OpenPOWER on IntegriCloud