diff options
author | Bill Schwartz <whs@us.ibm.com> | 2014-01-14 18:38:19 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-06 17:07:20 -0600 |
commit | d84e39b30122c48e7525c22aa8e6c9388c0a5305 (patch) | |
tree | 5ad7393c89d743354b0352377f7a52a6737e4a58 /src/include | |
parent | 71f717173b09ba470ca6d2364c9e2d78a04735d0 (diff) | |
download | talos-hostboot-d84e39b30122c48e7525c22aa8e6c9388c0a5305.tar.gz talos-hostboot-d84e39b30122c48e7525c22aa8e6c9388c0a5305.zip |
hwp accessor for ATTR_PCI_OSCSWITCH_CONFIG
add hwp accessor for ATTR_PCI_OSCSWITCH_CONFIG
Change-Id: I96960f34bef3d0c0426b1f6b16f470d4d60ce1c9
RTC: 95133
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8067
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/hwpf/hwp/chip_accessors/getPciOscswitchConfig.H | 63 | ||||
-rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatAttributeService.H | 19 |
2 files changed, 82 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/hwp/chip_accessors/getPciOscswitchConfig.H b/src/include/usr/hwpf/hwp/chip_accessors/getPciOscswitchConfig.H new file mode 100644 index 000000000..2ac313235 --- /dev/null +++ b/src/include/usr/hwpf/hwp/chip_accessors/getPciOscswitchConfig.H @@ -0,0 +1,63 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/getPciOscswitchConfig.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* */ +/* 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: getPciOscswitchConfig.H,v 1.2 2014/01/15 20:03:21 whs Exp $ +/** + * @file getPciOscswitchConfig.H + * + * @brief Accessor for providing the ATTR_PCI_OSCSWITCH_CONFIG attribute + */ + +#ifndef _HWP_GETPCIOSCSWITCHCONFIG_ +#define _HWP_GETPCIOSCSWITCHCONFIG_ + +#include <fapi.H> + +// configuration values +enum PciOscswitchConfigValues +{ + MURANO_DD1X = 0x03, + MURANO_DD2X = 0x0C, + VENICE_P0P2 = 0x09, // position 0 and 2 + VENICE_P1P3 = 0x06, // position 1 and 3 +}; + +// function pointer typedef definition for HWP call support +typedef fapi::ReturnCode (*getPciOscswitchConfig_FP_t) + (const fapi::Target &, uint8_t &); + +extern "C" +{ +/** + * @brief Get the ATTR_PCI_OSCSWITCH_CONFIG FAPI attribute + * + * @param[in] i_procTarget - Reference to processor chip target + * @param[out] o_val - Filled in with pci oscswitch config + * + * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code + */ +fapi::ReturnCode getPciOscswitchConfig( + const fapi::Target & i_procTarget, + uint8_t & o_val); +} + +#endif diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index 8deb64e68..a06510ebf 100644 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -667,6 +667,17 @@ fapi::ReturnCode fapiPlatGetSpdAttrAccessor ( */ fapi::ReturnCode fapiPlatGetL3DDAttr(const fapi::Target * i_pProcTarget, uint32_t (&o_data)[DELTA_DATA_SIZE]); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting the + * ATTR_PCI_OSCSWITCH_CONFIG attribute. It should not be called + * directly. + * + * @param[in] i_pProcTarget Processor Chip Target pointer + * @param[out] o_data Reference to output data + */ +fapi::ReturnCode fapiPlatGetPciOscswitchConfig + (const fapi::Target * i_pProcTarget, + uint8_t &o_val); } // namespace platAttrSvc @@ -1738,4 +1749,12 @@ fapi::ReturnCode fapiPlatGetL3DDAttr(const fapi::Target * i_pProcTarget, fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ fapi::platAttrSvc::fapiPlatGetL3DDAttr(PTARGET, VAL) +//------------------------------------------------------------------------------ +// MACRO to support pci osc switch config +//------------------------------------------------------------------------------ +#define ATTR_PCI_OSCSWITCH_CONFIG_GETMACRO(ID, PTARGET, VAL) \ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : \ + fapi::platAttrSvc::fapiPlatGetPciOscswitchConfig(PTARGET, VAL) + #endif // FAPIPLATATTRIBUTESERVICE_H_ |