diff options
| author | whs <whs@us.ibm.com> | 2016-04-04 10:19:37 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-06-30 23:52:31 -0400 |
| commit | c9219373d4320bf513046e69903ce33243e84be6 (patch) | |
| tree | 93494842bf5a673b00910edc756f19d3e1e1a026 /src/include/usr/fapi2 | |
| parent | f07603a9f2eab60e8e524ff487787086b9a5304e (diff) | |
| download | blackbird-hostboot-c9219373d4320bf513046e69903ce33243e84be6.tar.gz blackbird-hostboot-c9219373d4320bf513046e69903ce33243e84be6.zip | |
Changes related to packaging of memory vpd on Nimbus - part 2
Add the "upper" half of the NIMBUS direct memory support.
Add ATTR_MEMVPD_FREQS_MHZ and ATTR_MEMVPD_POS attributes.
Implement plat_vpd_access to call p9_getmem_vpd_keyword which decodes which
vpd keyword to read for MR and MT.
Update dvpd DD with record and keyword list.
Update dvpd.dat simics vpd file to include MR and MT that map to J0 and X0.
Change-Id: Ife00aa4266a7c16dcff2f0f72837f4d547988b82
RTC: 144519
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23245
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
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_ |

