diff options
Diffstat (limited to 'src/include/usr/fapi2')
| -rw-r--r-- | src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H | 6 | ||||
| -rw-r--r-- | src/include/usr/fapi2/plat_vpd_access.H | 55 | ||||
| -rw-r--r-- | src/include/usr/fapi2/vpd_access.H | 52 |
3 files changed, 112 insertions, 1 deletions
diff --git a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H index 9c76cc0e6..a6ffce5ba 100644 --- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H +++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H @@ -54,6 +54,7 @@ namespace fapi2 MOD_FAPI2_PLAT_GET_CHILDREN_FILTER_TEST = 0x0B, MOD_FAPI2_GET_TARGETING_ATTR = 0x0C, MOD_FAPI2_SET_TARGETING_ATTR = 0x0D, + MOD_FAPI2_PLAT_GET_VPD = 0x0E, }; /** @@ -106,7 +107,10 @@ namespace fapi2 RC_INCORRECT_OTHER_END = FAPI2_COMP_ID | 0x24, RC_FOUND_TOO_MANY_PEERS = FAPI2_COMP_ID | 0x25, RC_FOUND_NO_PEERS = FAPI2_COMP_ID | 0x26, - RC_INVALID_ATTRIBUTE = FAPI2_COMP_ID | 0x27, + RC_BUFFER_TOO_SMALL = FAPI2_COMP_ID | 0x27, + RC_INVALID_TYPE = FAPI2_COMP_ID | 0x28, + RC_RETURNED_VPD_TOO_SMALL = FAPI2_COMP_ID | 0x29, + RC_INVALID_ATTRIBUTE = FAPI2_COMP_ID | 0x2A, // HWP generated errors RC_HWP_GENERATED_ERROR = HWPF_COMP_ID | 0x0f, diff --git a/src/include/usr/fapi2/plat_vpd_access.H b/src/include/usr/fapi2/plat_vpd_access.H new file mode 100644 index 000000000..715ddc875 --- /dev/null +++ b/src/include/usr/fapi2/plat_vpd_access.H @@ -0,0 +1,55 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/fapi2/plat_vpd_access.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/// @file plat_vpd_access.H +/// +/// @brief Platform vpd-access definitions +/// + +#ifndef _FAPI2_PLAT_VPDACCESS_H_ +#define _FAPI2_PLAT_VPDACCESS_H_ + +#include <fapi2_vpd_access.H> + +namespace fapi2 +{ + +/// @brief Return a blob of memory VPD data associated with the input target +/// +/// Platform specific getVPD implmentation for MCS target type +/// +/// @param[in] i_target, a valid fapi2 MCS target +/// @param[in] io_vpd_info, fapi2::VPDInfo class that specifies which piece +/// of data to return. Types MR and MT supported. +/// @param[out] o_blob, the blob of raw data from the vpd +/// @return FAPI2_RC_SUCCESS if there's no problem +/// @note passing nullptr for o_blob will return the size of the keyword + +fapi2::ReturnCode platGetVPD( + const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, + VPDInfo<fapi2::TARGET_TYPE_MCS>& io_vpd_info, + uint8_t* o_blob); + +}; +#endif // _FAPI2_PLAT_VPDACCESS_H_ diff --git a/src/include/usr/fapi2/vpd_access.H b/src/include/usr/fapi2/vpd_access.H new file mode 100644 index 000000000..3586f6148 --- /dev/null +++ b/src/include/usr/fapi2/vpd_access.H @@ -0,0 +1,52 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/fapi2/vpd_access.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/// @file vpd_access.H +/// +/// @brief VPD access functions that need to be specialized for +/// platform implementation. +/// + +#ifndef __VPDACCESS_H_ +#define __VPDACCESS_H_ + +#include <target.H> +#include <return_code.H> +#include <plat_vpd_access.H> + +namespace fapi2 +{ + +// platform specialization for MCS target +template<> fapi2::ReturnCode getVPD( + const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target, + VPDInfo<fapi2::TARGET_TYPE_MCS>& io_vpd_info, + uint8_t* o_blob) +{ + return platGetVPD( i_target, io_vpd_info, o_blob ); +} + +}; + +#endif // __VPDACCESS_H_ |

