diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2013-01-09 12:48:13 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-02-06 14:18:33 -0600 |
commit | 7696bed6681d260f46d6878b5201560ed78715af (patch) | |
tree | 1731e489e444856d0644b17c0b39946988c3f512 /src/usr/vpd/mvpd.H | |
parent | 1ee9befb99004f26dcc81af879ce14907d405ad8 (diff) | |
download | talos-hostboot-7696bed6681d260f46d6878b5201560ed78715af.tar.gz talos-hostboot-7696bed6681d260f46d6878b5201560ed78715af.zip |
Enable MVPD Writes
Add support for writing MVPD keywords to both PNOR and out to
the EEPROM (via FSP mailbox). Also enabled a few more test
cases related to MVPD.
Added MER0 record to the standalone procmvpd.dat file and
enabled the support in the code.
Change-Id: If16c2863a11daaac3363fcf30bb2c92ad3e92b41
RTC: 39177
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2962
Tested-by: Jenkins Server
Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/vpd/mvpd.H')
-rwxr-xr-x | src/usr/vpd/mvpd.H | 67 |
1 files changed, 64 insertions, 3 deletions
diff --git a/src/usr/vpd/mvpd.H b/src/usr/vpd/mvpd.H index 680119fcd..26aba4c49 100755 --- a/src/usr/vpd/mvpd.H +++ b/src/usr/vpd/mvpd.H @@ -70,7 +70,7 @@ typedef struct typedef struct { mvpdRecord record; - char recordName[MVPD_LAST_RECORD]; + char recordName[RECORD_BYTE_SIZE+1]; } mvpdRecordInfo; /** @@ -78,7 +78,7 @@ typedef struct typedef struct { mvpdKeyword keyword; - char keywordName[MVPD_LAST_KEYWORD]; + char keywordName[KEYWORD_BYTE_SIZE+1]; } mvpdKeywordInfo; @@ -127,6 +127,7 @@ const mvpdRecordInfo mvpdRecords[] = { LWPD, "LWPD" }, { LWPE, "LWPE" }, { VWML, "VWML" }, + { MER0, "MER0" }, // ------------------------------------------------------------------- // DO NOT USE!! This is for test purposes ONLY! { MVPD_TEST_RECORD, "TEST" }, @@ -181,7 +182,7 @@ const mvpdKeywordInfo mvpdKeywords[] = { CH, "CH" }, // ------------------------------------------------------------------- // DO NOT USE!! This is for test purposes ONLY! - { MVPD_TEST_KEYWORD, "TEST" }, + { MVPD_TEST_KEYWORD, "XX" }, // ------------------------------------------------------------------- }; @@ -374,6 +375,66 @@ errlHndl_t mvpdRetrieveKeyword ( const char * i_keywordName, size_t & io_buflen, input_args_t i_args ); +/** + * @brief This function will write the required keyword into the MVPD data. + * + * @param[in] i_keywordName - String representation of the keyword. + * + * @param[in] i_recordName - String representation of the record. + * + * @param[in] i_offset - The offset to start writing. + * + * @param[in] i_target - The target to write data for. + * + * @param[in] i_buffer - The buffer to pull the data from. + * + * @param[in] i_buflen - Length of the buffer to be written + * to the target's VPD area. This value should indicate the size of the + * io_buffer parameter that has been allocated. + * + * @param[in] i_args - The input arguments. + * + * @return errHndl_t - NULL if successful, otherwise a pointer to the + * error log. + */ +errlHndl_t mvpdWriteKeyword ( const char * i_keywordName, + const char * i_recordName, + uint16_t i_offset, + TARGETING::Target * i_target, + void * i_buffer, + size_t & i_buflen, + input_args_t i_args ); + +/** + * @brief This function will locate the byte address of a keyword + * within its VPD section. + * + * @param[in] i_keywordName - String representation of the keyword. + * + * @param[in] i_recordName - String representation of the record. + * + * @param[in] i_offset - The offset to start writing. + * + * @param[in] i_target - The target to write data for. + * + * @param[out] o_keywordSize - Size of keyword in bytes. + * + * @param[out] o_byteAddr - Address of keyword, relative to this target's + * section. + * + * @param[in] i_args - The original input arguments. + * + * @return errHndl_t - NULL if successful, otherwise a pointer to the + * error log. + */ +errlHndl_t mvpdFindKeywordAddr ( const char * i_keywordName, + const char * i_recordName, + uint16_t i_offset, + TARGETING::Target * i_target, + size_t& o_keywordSize, + uint64_t& o_byteAddr, + input_args_t i_args ); + }; // end MVPD namespace |