diff options
Diffstat (limited to 'src/include/usr/hwpf/fapi/fapiMBvpdAccess.H')
| -rw-r--r-- | src/include/usr/hwpf/fapi/fapiMBvpdAccess.H | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H new file mode 100644 index 000000000..f53c89a8e --- /dev/null +++ b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H @@ -0,0 +1,113 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/fapi/fapiMBvpdAccess.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +// $Id: fapiMBvpdAccess.H,v 1.2 2012/10/09 21:32:55 mjjones Exp $ +/** + * @file fapiMBvpdAccess.H + * + * @brief Defines the Memory Bus (Centaur) VPD functions that platform + * must implement + * + */ + + +/* + * Change Log ****************************************************************** + * Flag Defect/Feature User Date Description + * ------ -------------- ---------- ----------- ---------------------------- + * whs 01/24/2013 Added fapiGetMBvpdField + */ + +#ifndef _FAPI_FAPIMBVPDACCESS_H_ +#define _FAPI_FAPIMBVPDACCESS_H_ + +#include <stdint.h> +#include <stddef.h> +#include <fapiReturnCode.H> +#include <fapiTarget.H> + +namespace fapi +{ + enum MBvpdRecord + { + MBVPD_RECORD_VEIR = 0x00, + MBVPD_RECORD_VER0 = 0x01, + MBVPD_RECORD_MER0 = 0x02, + }; + + enum MBvpdKeyword + { + MBVPD_KEYWORD_PDI = 0x00, + }; +} + +extern "C" +{ + +/** + * @brief Get Memory Buffer (Centaur) VPD field. + * + * A Memory Buffer VPD field is specified using a record and keyword enumerator + * + * Suggested way to call this routine is to call it once with a NULL buffer + * pointer to to retrieve the size of the record, then allocate the proper + * size of the buffer and call again. + * + * @param[in] i_record Record enumerator + * @param[in] i_keyword Keyword enumerator + * @param[in] i_memBufTarget Reference to memory buffer chip target for + * the record + * @param[in] i_pBuffer Pointer to buffer where record will be stored. If + * NULL then the size of record will be stored in + * io_fieldSize + * @param[io] io_fieldSize Size of i_pBuffer in bytes + * + * @return fapi::ReturnCode. FAPI_RC_SUCCESS, or failure value. + */ +fapi::ReturnCode fapiGetMBvpdField(const fapi::MBvpdRecord i_record, + const fapi::MBvpdKeyword i_keyword, + const fapi::Target &i_memBufTarget, + uint8_t * const i_pBuffer, + uint32_t &io_fieldSize); + +/** + * @brief Set Memory Buffer (Centaur) VPD field. + * + * A Memory Buffer VPD field is specified using a record and keyword enumerator + * + * @param[in] i_record Record enumerator + * @param[in] i_keyword Keyword enumerator + * @param[in] i_memBufTarget Reference to memory buffer chip target for + * the record + * @param[in] i_pBuffer Pointer to buffer where data to set is stored + * @param[io] i_fieldSize Size of i_pBuffer in bytes + * + * @return fapi::ReturnCode. FAPI_RC_SUCCESS, or failure value. + */ +fapi::ReturnCode fapiSetMBvpdField(const fapi::MBvpdRecord i_record, + const fapi::MBvpdKeyword i_keyword, + const fapi::Target &i_memBufTarget, + const uint8_t * const i_pBuffer, + const uint32_t i_fieldSize); +} + +#endif |

