diff options
author | Mike Jones <mjjones@us.ibm.com> | 2012-07-09 16:51:16 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-07-12 13:37:17 -0500 |
commit | 314fb004240afaf365d4a78e2e29ce1ae3f84081 (patch) | |
tree | 76e22a6eadce025227313d8767889f52e42a6259 /src/include/usr | |
parent | c71d22e87eea8c6bf0ac40e261784b2794195ba9 (diff) | |
download | talos-hostboot-314fb004240afaf365d4a78e2e29ce1ae3f84081.tar.gz talos-hostboot-314fb004240afaf365d4a78e2e29ce1ae3f84081.zip |
HWPF Attribute Support: ATTR_FUNCTIONAL
This HWPF attribute was requested by the HW team in order to query if a Target
is functional. The common_attributes.xml file will be checked into eKB. The
other code is Hostboot support.
Change-Id: I451344a2c68e5e799c3da50097f1826470c0f771
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1332
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
3 files changed, 42 insertions, 25 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index f72804885..834f2facf 100755 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -152,6 +152,17 @@ fapi::ReturnCode fapiPlatGetDqMapping(const fapi::Target * i_pDimmTarget, fapi::ReturnCode fapiPlatGetTargetName(const fapi::Target * i_pTarget, uint8_t & o_name); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_FUNCTIONAL. It should not be called directly + * + * @param[in] i_pTarget Target pointer + * @param[out] o_functional 1 = functional, else 0 + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetFunctional(const fapi::Target * i_pTarget, + uint8_t & o_functional); + } } @@ -298,4 +309,10 @@ fapi::ReturnCode fapiPlatGetTargetName(const fapi::Target * i_pTarget, #define ATTR_NAME_GETMACRO(ID, PTARGET, VAL) \ fapi::platAttrSvc::fapiPlatGetTargetName(PTARGET, VAL) +//------------------------------------------------------------------------------ +// MACRO to route ATTR_FUNCTIONAL access to the correct Hostboot function +//------------------------------------------------------------------------------ +#define ATTR_FUNCTIONAL_GETMACRO(ID, PTARGET, VAL) \ + fapi::platAttrSvc::fapiPlatGetFunctional(PTARGET, VAL) + #endif // FAPIPLATATTRIBUTESERVICE_H_ diff --git a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H b/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H index a3011431c..883ed2783 100644 --- a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H +++ b/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H @@ -52,6 +52,7 @@ namespace fapi MOD_FAPI_GET_ASSOCIATE_DIMMS = 0x0C, MOD_EDI_EI_IO_RUN_TRAINING = 0x0D, MOD_THREAD_ACTIVATE = 0x0E, //@fixme RTC:42816 + MOD_ATTR_GET_FUNCTIONAL = 0x0F, }; /** diff --git a/src/include/usr/targeting/common/predicates/predicateisfunctional.H b/src/include/usr/targeting/common/predicates/predicateisfunctional.H index b203ebd41..e826f19e7 100644 --- a/src/include/usr/targeting/common/predicates/predicateisfunctional.H +++ b/src/include/usr/targeting/common/predicates/predicateisfunctional.H @@ -1,26 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/targeting/predicates/predicateisfunctional.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2012 -// -// 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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END - +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/targeting/common/predicates/predicateisfunctional.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2012 + * + * 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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #ifndef __TARGETING_COMMON_PREDICATEISFUNCTIONAL_H #define __TARGETING_COMMON_PREDICATEISFUNCTIONAL_H /** @@ -93,8 +93,7 @@ public: * * @return bool indicating whether target it functional or not */ - inline bool operator()( - const TARGETING::Target* i_pTarget) const ; + bool operator()(const TARGETING::Target* i_pTarget) const ; private: |