diff options
Diffstat (limited to 'src/usr/vpd/spd.H')
-rwxr-xr-x | src/usr/vpd/spd.H | 107 |
1 files changed, 89 insertions, 18 deletions
diff --git a/src/usr/vpd/spd.H b/src/usr/vpd/spd.H index edf7d74c7..f0e1a157b 100755 --- a/src/usr/vpd/spd.H +++ b/src/usr/vpd/spd.H @@ -39,6 +39,8 @@ #include <errl/errlentry.H> #include <vpd/spdenums.H> #include "vpd.H" +#include <attributeenums.H> +#include <i2c/eeprom_const.H> namespace SPD { @@ -94,13 +96,13 @@ enum */ typedef enum { - NA = 0x00, - UMM = 0x01, // Unbuffered Memory Modules - RMM = 0x02, // Registered Memory Modules - CMM = 0x04, // Clocked Memory Modules - LRMM = 0x08, // Load Reduction Memory Modules - DDIMM = 0x0A, - ALL = 0xFFFF, + NA = 0x00, // Invalid Type + UMM = 0x01, // Unbuffered Memory Modules + RMM = 0x02, // Registered Memory Modules + CMM = 0x04, // Clocked Memory Modules + LRMM = 0x08, // Load Reduction Memory Modules + DDIMM = 0x10, // Differential DIMM + ALL = 0xFFFF, } modSpecTypes_t; @@ -202,14 +204,19 @@ errlHndl_t spdWriteKeywordValue ( DeviceFW::OperationType i_opType, * * @param[in] i_location - The SPD source (PNOR/SEEPROM). * + * @param[in] i_eepromSource Eeprom source (CACHE/HARDWARE). + * Default AUTOSELECT + * * @return errlHndl_t - NULL if successful, otherwise a pointer to the * error log. */ -errlHndl_t spdFetchData ( uint64_t i_byteAddr, - size_t i_numBytes, - void * o_data, - TARGETING::Target * i_target, - VPD::vpdCmdTarget i_location ); +errlHndl_t spdFetchData(uint64_t i_byteAddr, + size_t i_numBytes, + void * o_data, + TARGETING::Target * i_target, + VPD::vpdCmdTarget i_location, + EEPROM::EEPROM_SOURCE i_eepromSource = EEPROM::AUTOSELECT + ); /** * @brief This function is a wrapper for writing the correct keyword. @@ -254,15 +261,20 @@ errlHndl_t spdWriteData ( uint64_t i_offset, * * @param[in] i_location - The SPD source (PNOR/SEEPROM). * + * @param[in] i_eepromSource The eeprom source (CACHE/HARDWARE). + * Default AUTOSELECT + * * @return errlHndl_t - NULL if successful, otherwise a pointer to the * error log. */ -errlHndl_t spdGetValue ( VPD::vpdKeyword i_keyword, - void * io_buffer, - size_t & io_buflen, - TARGETING::Target * i_target, - uint64_t i_DDRRev, - VPD::vpdCmdTarget i_location ); +errlHndl_t spdGetValue(VPD::vpdKeyword i_keyword, + void * io_buffer, + size_t & io_buflen, + TARGETING::Target * i_target, + uint64_t i_DDRRev, + VPD::vpdCmdTarget i_location, + EEPROM::EEPROM_SOURCE i_eepromSource = EEPROM::AUTOSELECT + ); /** @@ -392,6 +404,45 @@ errlHndl_t dimmPresenceDetect( DeviceFW::OperationType i_opType, int64_t i_accessType, va_list i_args ); + +/** + * @brief This function will read the DIMM module type. + * + * @param[out] o_modType - The module type value to return. + * + * @param[in] i_target - The target to read data from. + * + * @param[in] i_memType - The memory type + * + * @param[in] i_location - The SPD source (PNOR/SEEPROM). + * + * @return errlHndl_t - NULL if successful, otherwise a pointer + * to the error log. + */ +errlHndl_t getModType ( modSpecTypes_t & o_modType, + TARGETING::Target * i_target, + uint64_t i_memType, + VPD::vpdCmdTarget i_location ); + +/** + * @brief This function will scan the table and return the entry + * corresponding to the keyword being requested. + * + * @param[in] i_keyword - The keyword being requested. + * + * @param[in] i_memType - The memory type of the target. + * + * @param[in] i_target - Target (only used for callouts) + * + * @param[out] o_entry - The table entry corresponding to the keyword. + * + * @return errlHndl_t - NULL if successful, otherwise a pointer to + * the error log. + */ +errlHndl_t getKeywordEntry(VPD::vpdKeyword i_keyword, + uint64_t i_memType, + TARGETING::Target* i_target, + const KeywordData* &o_entry ); /** * @brief This function is used to check the parameters in the SPD data that * indicate which module specific keywords are valid, and then check that @@ -457,6 +508,26 @@ errlHndl_t cmpPnorToSeeprom( TARGETING::Target * i_target, bool &o_match ); /** + * @brief This function compares value of the keyword in CACHE/HARDWARE + * and returns the result + * + * @param[in] i_target - Target device + * + * @param[in] i_eepromType - Eeprom content type of target device + * + * @param [in] i_keyword - Keyword to compare + * + * @param [in] o_match - Result of keyword compare + * + * @return errlHndl_t - NULL if successful, otherwise a pointer to the + * error log. A mismatch will not return an error. + */ +errlHndl_t cmpEecacheToEeprom(TARGETING::Target * i_target, + TARGETING::EEPROM_CONTENT_TYPE i_eepromType, + VPD::vpdKeyword i_keyword, + bool& o_match); + +/** * @brief This function loads the SPD data from the SEEPROM into the PNOR cache * * @param[in] i_target - Target device |