Skip to content

Commit

Permalink
Add exp_draminit and fix data_structs constants
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aamarin authored and crgeddes committed Nov 21, 2018
1 parent 3f1f218 commit e2e0e04
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 17 deletions.
25 changes: 16 additions & 9 deletions src/import/chips/ocmb/explorer/common/include/exp_data_structs.H
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -223,15 +225,17 @@ 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
// [3] - Impedance in Ohm for P3
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
Expand Down Expand Up @@ -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;
Expand All @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

///
Expand Down

0 comments on commit e2e0e04

Please sign in to comment.