From 76f1c48130a060fbe83c851fce2474c17b2df9b2 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Fri, 8 Apr 2016 21:03:51 -0500 Subject: Removing some more old fapi1 and hwp code Deleted all of the old fapi1 code Moved potentially reuseable occ code to a new dir Deleted a variety of p8 hwp files Change-Id: I8b6ab72fef3f1413d919bdd21bc88f2c4f59c5c3 RTC: 146345 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23075 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Matt Derksen Reviewed-by: Christian R. Geddes Reviewed-by: William G. Hoffa --- src/include/usr/hwpf/fapi/fapi.H | 65 - src/include/usr/hwpf/fapi/fapiAttributeService.H | 160 - src/include/usr/hwpf/fapi/fapiChipEcFeature.H | 72 - src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H | 95 - src/include/usr/hwpf/fapi/fapiErrorInfo.H | 631 ---- src/include/usr/hwpf/fapi/fapiHwAccess.H | 504 ---- src/include/usr/hwpf/fapi/fapiHwpExecutor.H | 56 - src/include/usr/hwpf/fapi/fapiMBvpdAccess.H | 191 -- src/include/usr/hwpf/fapi/fapiMvpdAccess.H | 221 -- src/include/usr/hwpf/fapi/fapiPlatHwAccess.H | 370 --- src/include/usr/hwpf/fapi/fapiReturnCode.H | 633 ---- src/include/usr/hwpf/fapi/fapiReturnCodeDataRef.H | 179 -- src/include/usr/hwpf/fapi/fapiReturnCodes.H | 108 - src/include/usr/hwpf/fapi/fapiSystemConfig.H | 121 - src/include/usr/hwpf/fapi/fapiTarget.H | 326 --- src/include/usr/hwpf/fapi/fapiUtil.H | 293 -- src/include/usr/hwpf/hwp/occ/occ.H | 57 - src/include/usr/hwpf/hwp/occ/occAccess.H | 72 - src/include/usr/hwpf/hwp/occ/occ_common.H | 180 -- .../usr/hwpf/plat/fapiPlatAttrOverrideSync.H | 261 -- .../usr/hwpf/plat/fapiPlatAttributeService.H | 3071 -------------------- src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H | 54 - src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H | 73 - src/include/usr/hwpf/plat/fapiPlatRegAddresses.H | 39 - src/include/usr/hwpf/plat/fapiPlatTrace.H | 93 - src/include/usr/hwpf/plat/fapiPlatUtil.H | 78 - src/include/usr/occ/occ.H | 57 + src/include/usr/occ/occAccess.H | 72 + src/include/usr/occ/occ_common.H | 180 ++ 29 files changed, 309 insertions(+), 8003 deletions(-) delete mode 100644 src/include/usr/hwpf/fapi/fapi.H delete mode 100644 src/include/usr/hwpf/fapi/fapiAttributeService.H delete mode 100644 src/include/usr/hwpf/fapi/fapiChipEcFeature.H delete mode 100644 src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H delete mode 100755 src/include/usr/hwpf/fapi/fapiErrorInfo.H delete mode 100644 src/include/usr/hwpf/fapi/fapiHwAccess.H delete mode 100644 src/include/usr/hwpf/fapi/fapiHwpExecutor.H delete mode 100644 src/include/usr/hwpf/fapi/fapiMBvpdAccess.H delete mode 100644 src/include/usr/hwpf/fapi/fapiMvpdAccess.H delete mode 100644 src/include/usr/hwpf/fapi/fapiPlatHwAccess.H delete mode 100644 src/include/usr/hwpf/fapi/fapiReturnCode.H delete mode 100644 src/include/usr/hwpf/fapi/fapiReturnCodeDataRef.H delete mode 100644 src/include/usr/hwpf/fapi/fapiReturnCodes.H delete mode 100644 src/include/usr/hwpf/fapi/fapiSystemConfig.H delete mode 100644 src/include/usr/hwpf/fapi/fapiTarget.H delete mode 100644 src/include/usr/hwpf/fapi/fapiUtil.H delete mode 100644 src/include/usr/hwpf/hwp/occ/occ.H delete mode 100644 src/include/usr/hwpf/hwp/occ/occAccess.H delete mode 100644 src/include/usr/hwpf/hwp/occ/occ_common.H delete mode 100755 src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H delete mode 100644 src/include/usr/hwpf/plat/fapiPlatAttributeService.H delete mode 100644 src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H delete mode 100644 src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H delete mode 100644 src/include/usr/hwpf/plat/fapiPlatRegAddresses.H delete mode 100644 src/include/usr/hwpf/plat/fapiPlatTrace.H delete mode 100644 src/include/usr/hwpf/plat/fapiPlatUtil.H create mode 100644 src/include/usr/occ/occ.H create mode 100644 src/include/usr/occ/occAccess.H create mode 100644 src/include/usr/occ/occ_common.H (limited to 'src/include') diff --git a/src/include/usr/hwpf/fapi/fapi.H b/src/include/usr/hwpf/fapi/fapi.H deleted file mode 100644 index c9cde57a5..000000000 --- a/src/include/usr/hwpf/fapi/fapi.H +++ /dev/null @@ -1,65 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapi.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapi.H,v 1.9 2013/10/15 13:13:28 dcrowell Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapi.H,v $ - -/** - * @file fapi.H - * - * @brief Includes all the header files necessary for the FAPI interface. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/13/2011 Created. - * mjjones 06/07/2011 Added new includes. - * mjjones 08/08/2011 Updated Executor include - * mjjones 09/23/2011 Added fapiHwpErrorInfo.H - * mjjones 11/10/2011 Use ecmdDataBufferBase - * mjjones 04/16/2012 Added fapiChipEcFeature.H - * mjjones 11/14/2012 Added fapiSetSbeError.H - */ - -#ifndef FAPI_H_ -#define FAPI_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // Generated file -#include // Generated file -#include // Generated file -#include // Generated file -#include -#include -#include - -#endif // FAPI_H_ diff --git a/src/include/usr/hwpf/fapi/fapiAttributeService.H b/src/include/usr/hwpf/fapi/fapiAttributeService.H deleted file mode 100644 index 4fa86cf5d..000000000 --- a/src/include/usr/hwpf/fapi/fapiAttributeService.H +++ /dev/null @@ -1,160 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiAttributeService.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapiAttributeService.H,v 1.12 2013/10/15 13:11:08 dcrowell Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiAttributeService.H,v $ - -/** - * @file fapiAttributeService.H - * - * @brief Defines the FAPI_ATTR_GET and FAPI_ATTR_SET macros that a user calls - * to get/set attributes and a check function that the macros use to - * verify correct usage - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 06/06/2011 Created. - * mjjones 06/22/2011 Major updates - * mjjones 09/06/2011 Remove support for strings - * mjjones 09/22/2011 Fixed example - * mjjones 10/13/2011 Added fapiGetInitFileAttr - * camvanng 10/20/2011 Changed i_pTarget to "const" - * ptr - * mjjones 04/10/2012 Support for privileged atts - * mjjones 06/07/2012 Add attr override support - * mjjones 03/13/2013 Move attr override code to plat - */ - -#ifndef FAPIATTRIBUTESERVICE_H_ -#define FAPIATTRIBUTESERVICE_H_ -#include -#include -#include - -/** - * @brief Macros called by user to get/set attributes - * - * Code must have a pointer to a Target and an attribute ID (from XML file): - * fapi::ReturnCode l_rc; - * fapi::Target * l_pTarget = ????; - * - * To get a copy of an integer attribute and set the attribute - * uint64_t l_val = 0; - * l_rc = FAPI_ATTR_GET(, l_pTarget, l_val); - * l_rc = FAPI_ATTR_SET(, l_pTarget, l_val); - * - * To get a copy of an integer array attribute and set the attribute - * uint32_t l_pVal[4] = {0}; - * l_rc = FAPI_ATTR_GET(, l_pTarget, l_pVal); - * l_rc = FAPI_ATTR_SET(, l_pTarget, l_pVal); - * - * A priveleged attribute is one that a HWP should not generally access, - * examples include ATTR_NAME and ATTR_EC, where usage can lead to a non - * data-driven design. A privileged attribute can be accessed with - * FAPI_ATTR_GET_PRIVILEGED and FAPI_ATTR_SET_PRIVILEGED - * - * The non-PRIVILEGED macros first call a template function (compiler will - * optimize out) that will cause a compile failure if the attribute is - * privileged, they then call a PRIVILEGED macro to get/set the attribute - * - * The PRIVILEGED macros call a template function (compiler will optimize out) - * that will cause a compile failure if the ID is not valid or VAL is not the - * correct type. - */ -#define FAPI_ATTR_GET(ID, PTARGET, VAL) \ - (fapi::fapiFailIfPrivileged(), \ - fapi::fapiCheckIdType(fapi::ID, VAL), \ - ID##_GETMACRO(ID, PTARGET, VAL)) - -#define FAPI_ATTR_SET(ID, PTARGET, VAL) \ - (fapi::fapiFailIfPrivileged(), \ - fapi::fapiCheckIdType(fapi::ID, VAL), \ - ID##_SETMACRO(ID, PTARGET, VAL)) - -#define FAPI_ATTR_GET_PRIVILEGED(ID, PTARGET, VAL) \ - (fapi::fapiCheckIdType(fapi::ID, VAL), \ - ID##_GETMACRO(ID, PTARGET, VAL)) - -#define FAPI_ATTR_SET_PRIVILEGED(ID, PTARGET, VAL) \ - (fapi::fapiCheckIdType(fapi::ID, VAL), \ - ID##_SETMACRO(ID, PTARGET, VAL)) - -namespace fapi -{ - -/** - * @brief Get an InitFile attribute - * - * This function gets a copy of an attribute. In the case of an array attribute, - * The value in the specified index is retrieved. This should be used by the - * InitFile HWP only, that HWP processes a binary InitFile and therefore needs - * to read a variable ID of a variable data type. Standard HWPs should use the - * FAPI_ATTR_GET macro which automatically checks the type for correct usage. - * - * If there are ever attributes with more than 4 dimensions then this function - * will need to be updated. - * - * @param[in] i_id AttributeID - * @param[in] i_pTarget Pointer to fapi::Target (can be NULL for system) - * @param[out] o_val Reference to uint64_t where attribute value is set - * @param[in] i_arrayIndex1 If array attribute then index1 - * @param[in] i_arrayIndex2 If at least 2D array attribute then index2 - * @param[in] i_arrayIndex3 If at least 3D array attribute then index3 - * @param[in] i_arrayIndex4 If at least 4D array attribute then index4 - * - * @return ReturnCode. Zero if success - */ -ReturnCode fapiGetInitFileAttr(const AttributeId i_id, - const Target * i_pTarget, - uint64_t & o_val, - const uint32_t i_arrayIndex1 = 0, - const uint32_t i_arrayIndex2 = 0, - const uint32_t i_arrayIndex3 = 0, - const uint32_t i_arrayIndex4 = 0); - -/** - * @brief Check the ID and TYPE - * - * This is called by FAPI code to check at compile time that a FAPI attribute - * access is using the correct data type and a valid AttributeId - */ -template inline void fapiCheckIdType(AttributeId, T &) {} - -/** - * @brief Fail if attribute privileged - * - * This is called by FAPI code to check at compile time that a standard FAPI - * attribute access (FAPI_ATTR_GET) is not accessing a privileged attribute - */ -class ErrorAccessingPrivilegedAttribute; -template void fapiFailIfPrivileged() -{ - ErrorAccessingPrivilegedAttribute(); -} -template <> inline void fapiFailIfPrivileged() {} - -} - -#endif // FAPIATTRIBUTESERVICE_H_ diff --git a/src/include/usr/hwpf/fapi/fapiChipEcFeature.H b/src/include/usr/hwpf/fapi/fapiChipEcFeature.H deleted file mode 100644 index 71cfc7386..000000000 --- a/src/include/usr/hwpf/fapi/fapiChipEcFeature.H +++ /dev/null @@ -1,72 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiChipEcFeature.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ -/* */ -/* 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 */ -// $Id: fapiChipEcFeature.H,v 1.4 2013/10/15 13:13:23 dcrowell Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiChipEcFeature.H,v $ - -/** - * @file fapiChipEcFeature.H - * - * @brief Defines the fapiQueryChipEcFeature function that allows HWPs to - * query if a particular chip has a feature determined by its EC level. - * Chip EC features are specified in attribute XML files and the - * fapiQueryChipEcFeature function implementation is auto-generated. - * HWPs should not call this function directly, but should access the - * corresponding HWPF attribute using FAPI_ATTR_GET - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 03/26/2012 Created. - */ - -#ifndef FAPICHIPECFEATURE_H_ -#define FAPICHIPECFEATURE_H_ - -#include -#include -#include - -namespace fapi -{ - -class Target; - -/** - * @brief Queries if a Chip has a particular feature - * - * This should only be called by FAPI during the processing of a FAPI_ATTR_GET - * for a Chip EC Feature attribute - * - * @param[in] i_id Attribute ID of the Chip EC Feature - * @param[in] i_pTarget Pointer to chip target - * @param[out] o_hasFeature Set to 1 if chip has feature else 0 - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiQueryChipEcFeature(fapi::AttributeId i_id, - const fapi::Target * i_pTarget, - uint8_t & o_hasFeature); -} - -#endif diff --git a/src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H b/src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H deleted file mode 100644 index bb1be98a5..000000000 --- a/src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H +++ /dev/null @@ -1,95 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiCollectRegFfdc.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ -/* */ -/* 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 */ -// $Id: fapiCollectRegFfdc.H,v 1.4 2013/10/31 19:48:22 dedahle Exp $ -/** - * @file fapiCollectRegFfdc.H - * - * @brief Defines the fapiCollectRegFfdc function that collects chip or - * chiplet register FFDC data. This is called automatically by - * FAPI_SET_HWP_ERROR (when a HWP creates an error) and - * FAPI_ADD_INFO_TO_HWP_ERROR (when an FFDC HWP adds error information - * to an existing error) if the error XML contains a - * element. This function should not be called - * directly by any user code. The function implementation is - * automatically generated from FAPI Error XML files. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 09/19/2012 Created. - * dedahle 09/30/2013 Add i_child parameter for - * chiplet register FFDC - * dedahle 10/15/13 Added i_presChild and - * i_childOffsetMult - * parameters for register FFDC - * collection based on present - * child chiplets - */ - -#ifndef FAPICOLLECTREGFFDC_H_ -#define FAPICOLLECTREGFFDC_H_ - -#include -#include -namespace fapi -{ - -class Target; -class ReturnCode; - -/** - * @brief Collects Register FFDC from a chip or chiplet - * - * This should only be called by FAPI during FAPI_SET_HWP_ERROR or - * FAPI_ADD_INFO_TO_HWP_ERROR - * - * @param[in] i_target Reference to Target to collect FFDC from - * @param[in] i_ffdcId FFDC Identifier - * @param[out] o_rc Reference to ReturnCode that FFDC is added to - * @param[in] i_child Specifies type of i_target's chiplet to collect - * FFDC from. If this parameter is TARGET_TYPE_NONE - * (default value), then register FFDC is collected - * from i_target, else, register FFDC is collected - * from all functional child chiplets i_target of - * the specified type - * @param[in] i_presChild When specified, register FFDC will be collected - * from i_target's registers based on present chiplets - * of this type. - * @param[in] i_childOffsetMult Specifies the chiplet position offset multiplier. - * This is used in calculating the scom register - * addresses when collecting register FFDC based on - * present child chiplets. - */ -void fapiCollectRegFfdc(const fapi::Target & i_target, - const fapi::HwpFfdcId i_ffdcId, - fapi::ReturnCode & o_rc, - const fapi::TargetType i_child = - fapi::TARGET_TYPE_NONE, - const fapi::TargetType i_presChild = - fapi::TARGET_TYPE_NONE, - const uint32_t i_childOffsetMult = 0); -} - -#endif diff --git a/src/include/usr/hwpf/fapi/fapiErrorInfo.H b/src/include/usr/hwpf/fapi/fapiErrorInfo.H deleted file mode 100755 index c92484372..000000000 --- a/src/include/usr/hwpf/fapi/fapiErrorInfo.H +++ /dev/null @@ -1,631 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiErrorInfo.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2011,2015 */ -/* [+] 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 */ -// $Id: fapiErrorInfo.H,v 1.18 2015/03/19 15:46:14 pragupta Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiErrorInfo.H,v $ - -/** - * @file fapiErrorInfo.H - * - * @brief Defines the Error Information structures and classes - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 08/09/2011 Created. - * mjjones 08/24/2011 Added ErrorInfoGard. - * mjjones 09/22/2011 Major updates - * mjjones 03/16/2012 Add FfdcType. Remove copy - * ctor and assignment operator - * mjjones 08/14/2012 Merge Callout/Deconfig/Gard - * structures into one - * mjjones 09/19/2012 Replace FFDC type with ID - * mjjones 03/22/2013 Support Procedure Callouts - * mjjones 05/20/2013 Support Bus Callouts - * mjjones 06/24/2013 Support Children CDGs - * mjjones 08/26/2013 Support HW Callouts - * rjknight 09/19/2013 Allow callout/deconfigure - * /gard of DIMM(s) related - * to MBA - * whs 03/11/2014 Add FW traces to error logs - * sangeet2 01/16/2015 Modify ErrorInfoHwCallout - */ - -#ifndef FAPIERRORINFO_H_ -#define FAPIERRORINFO_H_ - -#include -#include -#include - -namespace fapi -{ - -// The type that will hold the position of clock -typedef int8_t targetPos_t; - -// Used incase a valid clock position is not specified -const targetPos_t INVALID_CLOCK_POS = (-1); - -/** - * @enum HwCallout - * - * This enumeration defines the possible Hardware Callouts that are not - * represented by fapi::Targets - * - * Note that platform code may depend on the enum values starting at 0 and - * incrementing in order to efficiently convert to a platform callout value - * so do not reorder without consulting all platforms - */ -namespace HwCallouts -{ -enum HwCallout -{ - // Where indicated, a HW Callout in FAPI Error XML must include a reference - // target that is used to identify the HW. e.g. for TOD_CLOCK, the proc chip - // that the clock is attached to must be specified - TOD_CLOCK = 0, // Include proc-chip ref (or child chiplet) - MEM_REF_CLOCK = 1, // Include membuf-chip ref (or child chiplet) - PROC_REF_CLOCK = 2, // Include proc-chip ref (or child chiplet) - PCI_REF_CLOCK = 3, // Include proc-chip ref (or child chiplet) - FLASH_CONTROLLER_PART = 4, - PNOR_PART = 5, - SBE_SEEPROM_PART = 6, - VPD_PART = 7, - LPC_SLAVE_PART = 8, - GPIO_EXPANDER_PART = 9, - SPIVID_SLAVE_PART = 10, -}; -} - -/** - * @enum ProcedureCallout - * - * This enumeration defines the possible Procedure Callouts - * These instruct the customer/customer-engineer what to do - * - * Note that platform code may depend on the enum values starting at 0 and - * incrementing in order to efficiently convert to a platform callout value - * so do not reorder without consulting all platforms - */ -namespace ProcedureCallouts -{ -enum ProcedureCallout -{ - CODE = 0, // Code problem - LVL_SUPPORT = 1, // Call next level of support - MEMORY_PLUGGING_ERROR = 2, // DIMM Plugging error - BUS_CALLOUT = 3, // Bus Called Out -}; -} - -/** - * @enum CalloutPriority - * - * This enumeration defines the possible Procedure and Target callout priorities - * - * Note that platform code may depend on the enum values starting at 0 and - * incrementing in order to efficiently convert to a platform priority value - * so do not reorder without consulting all platforms - */ -namespace CalloutPriorities -{ -enum CalloutPriority -{ - LOW = 0, - MEDIUM = 1, - HIGH = 2, -}; -} - -/** - * @enum Enumeration of firmware traces - * - * This enumeration defines the possible firmware traces to collect - */ -namespace CollectTraces -{ -const uint32_t TRACE_SIZE = 256; // limit collected trace size -enum CollectTrace -{ - FSI = 1, - SCOM = 2, - SCAN = 3, - MBOX = 4, -}; -} - -/** - * @class ErrorInfoFfdc - * - * This class contains a copy of some FFDC data - */ -class ErrorInfoFfdc -{ -public: - /** - * @brief Constructor - * - * @param[in] i_ffdcId FFDC Identifier (used to decode FFDC) - * @param[in] i_pFfdc Pointer to the FFDC to copy - * @param[in] i_size Size of the FFDC to copy - */ - ErrorInfoFfdc(const uint32_t i_ffdcId, - const void * i_pFfdc, - const uint32_t i_size); - - /** - * @brief Destructor - */ - ~ErrorInfoFfdc(); - - /** - * @brief Get a pointer to the FfdcData - * - * @param[out] o_size Reference to uint32_t that is filled in with the FFDC - * size - * - * @return void *. Pointer to the FFDC - */ - const void * getData(uint32_t & o_size) const; - - /** - * @brief Get the FFDC Identifier - * - * @return uint32_t The FFDC Identifier - */ - uint32_t getFfdcId() {return iv_ffdcId;} - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - -private: - - // FFDC Identifier - uint32_t iv_ffdcId; - - // Pointer to the FFDC - uint8_t * iv_pFfdc; - - // Size of the FFDC - uint32_t iv_size; - - // Disabled - ErrorInfoFfdc(const ErrorInfoFfdc &); - ErrorInfoFfdc & operator=(const ErrorInfoFfdc &); -}; - -/** - * @struct ErrorInfoHwCallout - * - * This struct contains hardware to callout - */ -struct ErrorInfoHwCallout -{ - /** - * @brief Constructor. - * - * @param[in] i_hw Hardware to callout - * @param[in] i_calloutPriority Priority of callout - * @param[in] i_refTarget Reference to reference target - * @param[in] i_position Incase of a clock callout; - * the position of the clock to be called out - */ - ErrorInfoHwCallout( - const HwCallouts::HwCallout i_hw, - const CalloutPriorities::CalloutPriority i_calloutPriority, - const Target & i_refTarget, - const targetPos_t i_position = INVALID_CLOCK_POS); - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - - // The hw to callout - HwCallouts::HwCallout iv_hw; - - // The callout priority - CalloutPriorities::CalloutPriority iv_calloutPriority; - - // The reference target (needed for some HW callouts to identify what to - // callout). The target handle is NULL if there is no reference target. - Target iv_refTarget; - - // Incase of a clock callout; the position of the clock to be called out - targetPos_t iv_position; -}; - -/** - * @struct ErrorInfoProcedureCallout - * - * This struct contains a procedure to callout - */ -struct ErrorInfoProcedureCallout -{ - /** - * @brief Constructor. - * - * @param[in] i_procedure Procedure to callout - * @param[in] i_calloutPriority Priority of callout - */ - ErrorInfoProcedureCallout( - const ProcedureCallouts::ProcedureCallout i_procedure, - const CalloutPriorities::CalloutPriority i_calloutPriority); - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - - // The procedure to callout - ProcedureCallouts::ProcedureCallout iv_procedure; - - // The callout priority - CalloutPriorities::CalloutPriority iv_calloutPriority; -}; - -/** - * @struct ErrorInfoBusCallout - * - * This struct contains a bus to callout - */ -struct ErrorInfoBusCallout -{ - /** - * @brief Constructor. - * - * @param[in] i_target1 Reference to target on one end of the bus - * @param[in] i_target2 Reference to target on other end of the bus - * @param[in] i_calloutPriority Priority of callout - */ - ErrorInfoBusCallout( - const Target & i_target1, - const Target & i_target2, - const CalloutPriorities::CalloutPriority i_calloutPriority); - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - - // The targets on each end of the bus to callout - Target iv_target1; - Target iv_target2; - - // The callout priority - CalloutPriorities::CalloutPriority iv_calloutPriority; -}; - -/** - * @struct ErrorInfoCDG - * - * This struct contains a target to callout/deconfigure/GARD - */ -struct ErrorInfoCDG -{ - /** - * @brief Constructor. - * - * @param[in] i_target Reference to the target to c/d/g - * @param[in] i_callout True if Target should be called out - * @param[in] i_deconfigure True if Target should be deconfigured - * @param[in] i_gard True if Target should be GARDed - * @param[in] i_priority The priority of any callout - */ - ErrorInfoCDG(const Target & i_target, - const bool i_callout, - const bool i_deconfigure, - const bool i_gard, - const CalloutPriorities::CalloutPriority i_priority); - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - - // The target to callout/deconfigure/GARD - Target iv_target; - - // Callout Information - bool iv_callout; - CalloutPriorities::CalloutPriority iv_calloutPriority; - - // Deconfigure Information - bool iv_deconfigure; - - // GARD Information - bool iv_gard; -}; - -/** - * @struct ErrorInfoChildrenCDG - * - * This struct contains children targets to callout/deconfigure/GARD - * - * Children by containment can be CDG (chiplets belonging to a parent chip) e.g. - * - PROC_CHIP -> EX_CHIPLET - * - MEMBUF_CHIP -> MBA_CHIPLET - * Children by affinity can be CDG. - * Any from PROC_CHIP->MCS_CHIPLET->MEMBUF_CHIP->MBA_CHIPLET->DIMM e.g. - * - PROC_CHIP->MEMBUF_CHIP - * - MEMBUF_CHIP->DIMM - * - MBA_CHIPLET->DIMM - * Port and Number criteria can be applied to the child target as - * detailed in the constructor - */ -struct ErrorInfoChildrenCDG -{ - /** - * @brief Constructor. - * - * @param[in] i_parent Reference to the parent target - * @oaram[in] i_childType Child target type to c/d/g - * @param[in] i_callout True if Target should be called out - * @param[in] i_deconfigure True if Target should be deconfigured - * @param[in] i_gard True if Target should be GARDed - * @param[in] i_priority The priority of any callout - * @param[in] i_childPort Child Port - * For DIMM children, the MBA port number - * @param[in] i_childNum Child Number - * For DIMM children, the dimm socket number - * For Chip children, the chip position - * For Chiplet children, the chiplet unit pos - */ - ErrorInfoChildrenCDG(const Target & i_parentChip, - const TargetType i_childType, - const bool i_callout, - const bool i_deconfigure, - const bool i_gard, - const CalloutPriorities::CalloutPriority i_priority, - const uint8_t i_childPort, const uint8_t i_childNum); - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - - // The parent chip - Target iv_parent; - - // The child target types to c/d/g - TargetType iv_childType; - - // Callout Information - bool iv_callout; - CalloutPriorities::CalloutPriority iv_calloutPriority; - - // Deconfigure Information - bool iv_deconfigure; - - // GARD Information - bool iv_gard; - - // Child Port - static const uint8_t ALL_CHILD_PORTS = 0xff; - uint8_t iv_childPort; - - // Child Number - static const uint8_t ALL_CHILD_NUMBERS = 0xff; - uint8_t iv_childNumber; -}; - -/** - * @struct ErrorInfoCollectTrace - * - * This struct contains trace ID to add to the error log - */ -struct ErrorInfoCollectTrace -{ - /** - * @brief Constructor. - * - * @param[in] i_trace - */ - ErrorInfoCollectTrace(CollectTraces::CollectTrace i_traceId); - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - - // trace - CollectTraces::CollectTrace iv_eiTraceId; -}; - -/** - * @struct ErrorInfo - * - * This struct defines the error information associated with a fapi::ReturnCode - * Users are allowed to access the data directly - */ -struct ErrorInfo -{ - /** - * @brief Destructor. - */ - ~ErrorInfo(); - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - - // Vector of FFDC Data - std::vector iv_ffdcs; - typedef std::vector::iterator ErrorInfoFfdcItr_t; - typedef std::vector::const_iterator ErrorInfoFfdcCItr_t; - - // Vector of Hardware to callout - std::vector iv_hwCallouts; - typedef std::vector::iterator - ErrorInfoHwCalloutItr_t; - typedef std::vector::const_iterator - ErrorInfoHwCalloutCItr_t; - - // Vector of procedures to callout - std::vector iv_procedureCallouts; - typedef std::vector::iterator - ErrorInfoProcedureCalloutItr_t; - typedef std::vector::const_iterator - ErrorInfoProcedureCalloutCItr_t; - - // Vector of buses to callout - std::vector iv_busCallouts; - typedef std::vector::iterator - ErrorInfoBusCalloutItr_t; - typedef std::vector::const_iterator - ErrorInfoBusCalloutCItr_t; - - // Vector of targets to callout/deconfigure/GARD - std::vector iv_CDGs; - typedef std::vector::iterator ErrorInfoCDGItr_t; - typedef std::vector::const_iterator ErrorInfoCDGCItr_t; - - // Vector of children targets to callout/deconfigure/GARD - std::vector iv_childrenCDGs; - typedef std::vector::iterator - ErrorInfoChildrenCDGItr_t; - typedef std::vector::const_iterator - ErrorInfoChildrenCDGCItr_t; - - // Vector of traces to collect - std::vector iv_traces; - typedef std::vector::iterator - ErrorInfoCollectTraceItr_t; - typedef std::vector::const_iterator - ErrorInfoCollectTraceCItr_t; -}; - -} - -#endif // FAPIERRORINFO_H_ diff --git a/src/include/usr/hwpf/fapi/fapiHwAccess.H b/src/include/usr/hwpf/fapi/fapiHwAccess.H deleted file mode 100644 index 0950abd12..000000000 --- a/src/include/usr/hwpf/fapi/fapiHwAccess.H +++ /dev/null @@ -1,504 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiHwAccess.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapiHwAccess.H,v 1.13 2014/01/20 22:37:49 mklight Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiHwAccess.H,v $ - -/** - * @file fapiHwAccess.H - * - * @brief Defines the hardware access functions that platform code must - * implement. It is a HWP requirement that these be "C" functions - * because it simplifies language bindings for non-C languages, - * such as perl - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/13/2011 Created. Copied from Hlava's code. - * mjjones 06/02/2011 Scom addresses should be uint64_t - * use ecmdDataBufferBase - * mjjones 06/30/2011 Updated comment - * mjjones 09/14/2011 Prepended fapi to functions - * mjjones 11/10/2011 Use ecmdDataBufferBase - * 836579 thi May 22,2012 Spy/Ring supports - * mjjones 07/12/2012 Add mode options to Ring funcs - * rjknight 09/20/2012 Update fapiSpy interfaces to - * F876964 jknight Apr, 02,2013 fapi get/setSpyImage - * F873646 srimeesa Mar 10,2013 64Bit SPYID and - * ClockDomain ID support - * F883863 atendolk 05/06/2013 Add MultiScom support - */ - -#ifndef FAPIHWACCESS_H_ -#define FAPIHWACCESS_H_ - -#ifdef FAPI_SUPPORT_SPY_AS_ENUM -#include -#endif - -#include -#include -#include -#include - -#ifdef FAPI_SUPPORT_MULTI_SCOM -#include -#endif - - -namespace fapi -{ - /** - * @brief Enumeration of modify modes used in modify operations - */ - enum ChipOpModifyMode - { - CHIP_OP_MODIFY_MODE_OR = 1, - CHIP_OP_MODIFY_MODE_AND = 2, - CHIP_OP_MODIFY_MODE_XOR = 3, - }; - - /** - * @brief Enumeration of Ring operation modes - * - * This is a bitmap to allow the user to specify multiple modes - */ - enum RingMode - { - RING_MODE_SET_PULSE = 0x00000001, - RING_MODE_NO_HEADER_CHECK = 0x00000002, - // FUTURE_MODE = 0x00000004, - // FUTURE_MODE = 0x00000008, - }; -} - -extern "C" -{ - -typedef uint64_t spyId_t; -typedef uint64_t scanRingId_t; - -//------------------------------------------------------------------------------ -// HW Communication Functions -//------------------------------------------------------------------------------ - -/** - * @brief Reads a SCOM register from a Chip - * @param[in] i_target Target to operate on - * @param[in] i_address Scom address to read from - * @param[out] o_data ecmdDataBufferBase object that holds data read from - * address - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiGetScom(const fapi::Target& i_target, - const uint64_t i_address, - ecmdDataBufferBase & o_data); - -/** - * @brief Writes a SCOM register on a Chip - * @param[in] i_target Target to operate on - * @param[in] i_address Scom address to write to - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPutScom(const fapi::Target& i_target, - const uint64_t i_address, - ecmdDataBufferBase & i_data); - -/** - * @brief Writes a SCOM register under mask to a chip - * @param[in] i_target Target to operate on - * @param[in] i_address Scom address to write to - * @param[in] i_data ecmdDataBufferBase object that holds the data - * @param[in] i_mask ecmdDataBufferBase object that holds the mask (i_data to - * write) - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPutScomUnderMask(const fapi::Target& i_target, - const uint64_t i_address, - ecmdDataBufferBase & i_data, - ecmdDataBufferBase & i_mask); - - -/** - * @brief Reads a CFAM register from a chip - * @param[in] i_target Target to operate on - * @param[in] i_address CFAM address to read from - * @param[out] o_data ecmdDataBufferBase object that holds data read from - * address - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiGetCfamRegister(const fapi::Target& i_target, - const uint32_t i_address, - ecmdDataBufferBase & o_data); - -/** - * @brief Writes a CFAM register to a chip - * @param[in] i_target Target to operate on - * @param[in] i_address CFAM address to write to - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPutCfamRegister(const fapi::Target& i_target, - const uint32_t i_address, - ecmdDataBufferBase & i_data); - -/** - * @brief Read-modify-write a CFAM register on a chip - * @param[in] i_target Target to operate on - * @param[in] i_address CFAM address to write to - * @param[in] i_data ecmdDataBufferBase object that holds the modifying data - * @param[in] i_modifyMode The modify mode (or/and/xor) - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiModifyCfamRegister(const fapi::Target& i_target, - const uint32_t i_address, - ecmdDataBufferBase & i_data, - const fapi::ChipOpModifyMode i_modifyMode); - -/** - * @brief Reads a ring from a target - * @param[in] i_target Target to operate on - * @param[in] i_address Ring address to read from - * @param[out] o_data ecmdDataBufferBase object that holds data read from - * address - * @param[in] i_ringMode Any number of mode options from fapi::RingMode ORed - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiGetRing(const fapi::Target& i_target, - const scanRingId_t i_address, - ecmdDataBufferBase & o_data, - const uint32_t i_ringMode = 0); - -/** - * @brief Writes a ring register on a target - * @param[in] i_target Target to operate on - * @param[in] i_address Ring address to write to - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * @param[in] i_ringMode Any number of mode options from fapi::RingMode ORed - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPutRing(const fapi::Target& i_target, - const scanRingId_t i_address, - ecmdDataBufferBase & i_data, - const uint32_t i_ringMode = 0); - - -/** - * @brief Modifies a ring register on a target - * @param[in] i_target Target to operate on - * @param[in] i_address Ring address to modify - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * @param[in] i_modifyMode The modify mode (or/and/xor) - * @param[in] i_ringMode Any number of mode options from fapi::RingMode ORed - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiModifyRing(const fapi::Target& i_target, - const scanRingId_t i_address, - ecmdDataBufferBase & i_data, - const fapi::ChipOpModifyMode i_modifyMode, - const uint32_t i_ringMode = 0); - -// -------------------------------------------------------------------------- -// NOTE: -// These spy access interfaces are only used in FSP and cronus -// HB does not allow spy access - -#if defined(FAPI_SUPPORT_SPY_AS_ENUM) || defined(FAPI_SUPPORT_SPY_AS_STRING) -/** - * @brief Reads a Spy from a target - * @param[in] i_target Target to read spy from - * @param[in] i_spyId The spy's id - * @param[out] o_data Storage for output data - * - * @return ReturnCode. Zero on success, else platform specified error - * - * @note: The string version is only supported for cronus. - * - * The fapi design to support both FSP and cronus use of get and - * put spy functions is dependant on the SPY names being expanded - * to resemble a valid C identifier. This design places some - * restrictions on the SPY names which can be used. - * - * 1. if the spy name contains a # procedure writers should replace it - * with an __P__ for example - - * - * ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS - * becomes - * ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS - * - * 2. if the spy name has a number following a "." it must have an - * underscore prepended to the number. - * - * EH.TPCHIP.2KX100_ARY_CLK_EDGES_DLY - * becomes - * EH.TPCHIP._2KX100_ARY_CLK_EDGES_DLY - * - * Example SPY name: - * The hardware procedure should call the function like: - * - * ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS - * - * fapi::ReturnCode rc = fapiGetSpy( targ, - * ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS, data ); - * - * NOTE: the ID is not in quotes the fapi code will handle adding the - * quotes for the cronus environment - * -*/ -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_ENUM - -#ifndef DOCUMENTATION -#define fapiGetSpy(TARGET, ID, DATA) _fapiGetSpy(TARGET, FAPI_SPY_NAMES::ID.value, DATA ) -#endif -fapi::ReturnCode _fapiGetSpy(const fapi::Target& i_target, - const spyId_t i_spyId, - ecmdDataBufferBase & o_data); -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_STRING - -#ifndef DOCUMENTATION -#define fapiGetSpy(TARGET, ID, DATA) _fapiGetSpy(TARGET, #ID, DATA) -#endif -fapi::ReturnCode _fapiGetSpy(const fapi::Target& i_target, - const char * const i_spyId, - ecmdDataBufferBase & o_data); -#endif - -#if defined(FAPI_SUPPORT_SPY_AS_ENUM) || defined(FAPI_SUPPORT_SPY_AS_STRING) -/** - * @brief Writes a spy on a target - * @param[in] i_target Target to operate on - * @param[in] i_spyId The spy's id - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * - * @return ReturnCode. Zero on success, else platform specified error - * - * @note: The string version is only supported for cronus. - * - * The fapi design to support both FSP and cronus use of get and - * put spy functions is dependent on the SPY names being expanded - * to resemble a valid C identifier. This design places some - * restrictions on the SPY names which can be used. - * - * 1. if the spy name contains a # procedure writers should replace it - * with an __P__ for example - - * - * ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS - * becomes - * ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS - * - * 2. if the spy name has a number following a "." it must have an - * underscore prepended to the number. - * - * EH.TPCHIP.2KX100_ARY_CLK_EDGES_DLY - * becomes - * EH.TPCHIP._2KX100_ARY_CLK_EDGES_DLY - * - * Example SPY name: - * The hardware procedure should call the function like: - * - * ABUS.RX0.RXPACKS#0.RXPACK.RD.LC.LC.ACT_DIS - * - * fapi::ReturnCode rc = fapiPutSpy( targ, - * ABUS.RX0.RXPACKS__P__0.RXPACK.RD.LC.LC.ACT_DIS, data ); - * - * NOTE: the ID is not in quotes the fapi code will handle adding the - * quotes for the cronus environment - * -*/ -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_ENUM -#ifndef DOCUMENTATION -#define fapiPutSpy(TARGET, ID, DATA) _fapiPutSpy(TARGET, FAPI_SPY_NAMES::ID.value, DATA) -#endif -fapi::ReturnCode _fapiPutSpy(const fapi::Target& i_target, - const spyId_t i_spyId, - ecmdDataBufferBase & i_data); -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_STRING -#ifndef DOCUMENTATION -#define fapiPutSpy(TARGET, ID, DATA) _fapiPutSpy(TARGET, #ID, DATA) -#endif -fapi::ReturnCode _fapiPutSpy(const fapi::Target& i_target, - const char* const i_spyId, - ecmdDataBufferBase & i_data); - -#endif - -#if defined(FAPI_SUPPORT_SPY_AS_ENUM) || defined(FAPI_SUPPORT_SPY_AS_STRING) -/** - * @brief Writes data into a ring image - * @param[in] i_target Target to operate on - * @param[in] i_spyId The spy's id - * @param[in] i_data ecmdDataBufferBase object that holds data to - * be written - * @param[out] o_imageData ecmdDataBufferBase object that holds data to - * write into - * @return ReturnCode. Zero on success, else platform specified error - * - * @note: The string version is only supported for cronus. - * - * The fapi design to support both FSP and cronus use of get and - * put spy functions is dependent on the SPY names being expanded - * to resemble a valid C identifier. This design places some - * restrictions on the SPY names which can be used. - * - * See fapiPutSpy for details on spy id specifics. - */ -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_ENUM -#ifndef DOCUMENTATION -#define fapiPutSpyImage(TARGET, ID, DATA1, DATA2) _fapiPutSpyImage(TARGET, \ - FAPI_SPY_NAMES::ID.value, \ - DATA1, DATA2) -#endif -fapi::ReturnCode _fapiPutSpyImage(const fapi::Target& i_target, - const spyId_t i_spyId, - const ecmdDataBufferBase & i_data, - ecmdDataBufferBase & o_imageData); -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_STRING -// fapiPutSpyImage function Cronus version -#ifndef DOCUMENTATION -#define fapiPutSpyImage(TARGET, ID, DATA1, DATA2) _fapiPutSpyImage(TARGET, #ID,\ - DATA1,DATA2) -#endif - -fapi::ReturnCode _fapiPutSpyImage(const fapi::Target& i_target, - const char* const i_spyId, - const ecmdDataBufferBase & i_data, - ecmdDataBufferBase & o_imageData); -#endif - -#if defined(FAPI_SUPPORT_SPY_AS_ENUM) || defined(FAPI_SUPPORT_SPY_AS_STRING) -/** - * @brief Reads data from a ring image - * @param[in] i_target Target to operate on - * @param[in] i_spyId The spy's id - * @param[out] o_data ecmdDataBufferBase object where data is - * returned - * @param[in] i_imageData ecmdDataBufferBase object that holds ring image - * to read data from - * @return ReturnCode. Zero on success, else platform specified error - * - * @note: The string version is only supported for cronus. - * - * The fapi design to support both FSP and cronus use of get and - * put spy functions is dependent on the SPY names being expanded - * to resemble a valid C identifier. This design places some - * restrictions on the SPY names which can be used. - * - * See fapiPutSpy for details on spy id specifics. - */ -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_ENUM -#ifndef DOCUMENTATION -#define fapiGetSpyImage(TARGET, ID, DATA1, DATA2) _fapiGetSpyImage(TARGET, \ - FAPI_SPY_NAMES::ID.value, \ - DATA1, DATA2) -#endif -fapi::ReturnCode _fapiGetSpyImage(const fapi::Target& i_target, - const spyId_t i_spyId, - ecmdDataBufferBase & o_data, - const ecmdDataBufferBase & i_imageData); -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_STRING -// fapiGetSpyImage function Cronus version -#ifndef DOCUMENTATION -#define fapiGetSpyImage(TARGET, ID, DATA1, DATA2) _fapiGetSpyImage(TARGET,\ - #ID, DATA1,DATA2) -#endif - -fapi::ReturnCode _fapiGetSpyImage(const fapi::Target& i_target, - const char* const i_spyId, - ecmdDataBufferBase & o_data, - const ecmdDataBufferBase & i_imageData); -#endif - -#ifdef FAPI_SUPPORT_MULTI_SCOM -/** - * @brief Performs a multiple SCOM operation - * - * @par Description: - * This interface performs multiple SCOM operations on a chip or chiplet, - * in the order specified by the input MultiScom object. See fapiMultiScom.H - * for details of how to populate the MultiScom object with SCOM operations - * - * @param[in] i_target Chip/Chiplet target to do MultiScom on - * @param[in,out] io_multiScomObj Reference to a MultiScom object, - * pre-populated with SingleScomInfo entries - * to perform multiple SCOMs on input target - * @return ReturnCode Zero on success, else platform specified - * error - * - * @note This is a synchronous interface and would return after all the SCOM - * operations are completed or on the first failed SCOM operation - * - * @note SCOMs will be performed in the order they were added to the input - * MultiScom object - * - * @note In case of errors, the platform code is responsible to collect and - * add all the required error info and FFDC into the error data for - * debugging - * - * @note If the SCOM operations added are specific to a processor chip, - * then the FSI Shift Engine configured in scatter-gather DMA mode - * extension would be used to execute the SCOM operations in a - * performance optimize mode. In this mode, the special - * SCOM_BULK_READ_MODE and SCOM_BULK_WRITE_MODE operations are - * supported that allow a large bulk of SCOM access (in multiple of 64 - * bits) for targets that support auto-increment. The - * SCOM_WRITE_UNDER_MASK operation is not supported in this mode - * - * @note If the SCOM operations added are specific to a memory buffer chip, - * then the regular SCOM engine is used to execute the SCOM operations. - * SCOM_WRITE_UNDER_MASK operation is supported in this mode, but the - * special SCOM_BULK_READ_MODE and SCOM_BULK_WRITE_MODE operations are - * not supported due to hardware limitations. - */ -fapi::ReturnCode fapiMultiScom ( - const fapi::Target& i_target, - fapi::MultiScom& io_multiScomObj); -#endif // FAPI_SUPPORT_MULTI_SCOM - - -} // extern "C" - -#endif // FAPIHWACCESS_H_ diff --git a/src/include/usr/hwpf/fapi/fapiHwpExecutor.H b/src/include/usr/hwpf/fapi/fapiHwpExecutor.H deleted file mode 100644 index c02aae5cb..000000000 --- a/src/include/usr/hwpf/fapi/fapiHwpExecutor.H +++ /dev/null @@ -1,56 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiHwpExecutor.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapiHwpExecutor.H,v 1.5 2013/10/15 13:13:31 dcrowell Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiHwpExecutor.H,v $ - -/** - * @file fapiHwpExecutor.H - * - * @brief Defines the FAPI HWP Executor Macro. - * - * The FAPI HWP Executor macro is called when a PLAT invoker function or a HWP - * wants to execute a HWP. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 09/22/2011 Removed mandatory target - * parameter from FAPI_EXEC_HWP - */ -#ifndef FAPIHWPEXECUTOR_H_ -#define FAPIHWPEXECUTOR_H_ - -#include - -/** - * @brief HWP Executor macro - * - * This macro calls a PLAT macro which will do any platform specific work to - * execute the HWP (e.g. dlopening a shared library) - */ -#define FAPI_EXEC_HWP(RC, FUNC, _args_...) \ - FAPI_PLAT_EXEC_HWP(RC, FUNC, ##_args_) - -#endif // FAPIHWPEXECUTOR_H_ diff --git a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H deleted file mode 100644 index 3f50ec389..000000000 --- a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H +++ /dev/null @@ -1,191 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiMBvpdAccess.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2013,2015 */ -/* [+] 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 */ -// $Id: fapiMBvpdAccess.H,v 1.12 2015/09/29 15:59:29 dcrowell 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 - * whs 04/29/2013 Added VSPD record, keywords - */ - -#ifndef _FAPI_FAPIMBVPDACCESS_H_ -#define _FAPI_FAPIMBVPDACCESS_H_ - -#include -#include -#include -#include - -namespace fapi -{ - enum MBvpdRecord - { - MBVPD_RECORD_VEIR = 0x00, - MBVPD_RECORD_VER0 = 0x01, - MBVPD_RECORD_MER0 = 0x02, - MBVPD_RECORD_VSPD = 0x03, - MBVPD_RECORD_VINI = 0x04, - MBVPD_RECORD_OPFR = 0x05, - MBVPD_RECORD_VNDR = 0x06, - MBVPD_RECORD_SPDX = 0x07, - }; - - enum MBvpdKeyword - { - MBVPD_KEYWORD_PDI = 0x00, - MBVPD_KEYWORD_PF = 0x01, - MBVPD_KEYWORD_MT = 0x02, - MBVPD_KEYWORD_MR = 0x03, - MBVPD_KEYWORD_PDA = 0x04, - MBVPD_KEYWORD_EL = 0x05, - MBVPD_KEYWORD_LM = 0x06, - MBVPD_KEYWORD_MW = 0x07, - MBVPD_KEYWORD_MV = 0x08, - MBVPD_KEYWORD_AM = 0x09, - MBVPD_KEYWORD_VZ = 0x0a, - MBVPD_KEYWORD_PDD = 0x0b, - MBVPD_KEYWORD_MX = 0x0c, - MBVPD_KEYWORD_DW = 0x0d, - MBVPD_KEYWORD_PN = 0x0e, - MBVPD_KEYWORD_SN = 0x0f, - MBVPD_KEYWORD_DR = 0x10, - MBVPD_KEYWORD_CE = 0x11, - MBVPD_KEYWORD_FN = 0x12, - MBVPD_KEYWORD_CC = 0x13, - MBVPD_KEYWORD_HE = 0x14, - MBVPD_KEYWORD_CT = 0x15, - MBVPD_KEYWORD_HW = 0x16, - MBVPD_KEYWORD_VD = 0x17, - MBVPD_KEYWORD_VN = 0x18, - MBVPD_KEYWORD_VP = 0x19, - MBVPD_KEYWORD_SV = 0x1a, - MBVPD_KEYWORD_M0 = 0x1b, - MBVPD_KEYWORD_M1 = 0x1c, - MBVPD_KEYWORD_M2 = 0x1d, - MBVPD_KEYWORD_M3 = 0x1e, - MBVPD_KEYWORD_M4 = 0x1f, - MBVPD_KEYWORD_M5 = 0x20, - MBVPD_KEYWORD_M6 = 0x21, - MBVPD_KEYWORD_M7 = 0x22, - MBVPD_KEYWORD_M8 = 0x23, - MBVPD_KEYWORD_T1 = 0x24, - MBVPD_KEYWORD_T2 = 0x25, - MBVPD_KEYWORD_T4 = 0x26, - MBVPD_KEYWORD_T5 = 0x27, - MBVPD_KEYWORD_T6 = 0x28, - MBVPD_KEYWORD_T8 = 0x29, - MBVPD_KEYWORD_Q0 = 0x2a, - MBVPD_KEYWORD_Q1 = 0x2b, - MBVPD_KEYWORD_Q2 = 0x2c, - MBVPD_KEYWORD_Q3 = 0x2d, - MBVPD_KEYWORD_Q4 = 0x2e, - MBVPD_KEYWORD_Q5 = 0x2f, - MBVPD_KEYWORD_Q6 = 0x30, - MBVPD_KEYWORD_Q7 = 0x31, - MBVPD_KEYWORD_Q8 = 0x32, - MBVPD_KEYWORD_K0 = 0x33, - MBVPD_KEYWORD_K1 = 0x34, - MBVPD_KEYWORD_K2 = 0x35, - MBVPD_KEYWORD_K3 = 0x36, - MBVPD_KEYWORD_K4 = 0x37, - MBVPD_KEYWORD_K5 = 0x38, - MBVPD_KEYWORD_K6 = 0x39, - MBVPD_KEYWORD_K7 = 0x3a, - MBVPD_KEYWORD_K8 = 0x3b, - MBVPD_KEYWORD_MM = 0x3c, - MBVPD_KEYWORD_SS = 0x3d, - MBVPD_KEYWORD_ET = 0x3e, - MBVPD_KEYWORD_VM = 0x3f, - MBVPD_KEYWORD_PD1 = 0x40, //#1 - MBVPD_KEYWORD_PDZ = 0x41, //#Z - MBVPD_KEYWORD_PD4 = 0x42, //#4 - MBVPD_KEYWORD_PD5 = 0x43, //#5 - MBVPD_KEYWORD_PD6 = 0x44, //#6 - MBVPD_KEYWORD_PD8 = 0x45, //#8 - MBVPD_KEYWORD_PDY = 0x46, //#Y - }; - -} - -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 diff --git a/src/include/usr/hwpf/fapi/fapiMvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMvpdAccess.H deleted file mode 100644 index 3d12666bc..000000000 --- a/src/include/usr/hwpf/fapi/fapiMvpdAccess.H +++ /dev/null @@ -1,221 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiMvpdAccess.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ -/* [+] 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 */ -// $Id: fapiMvpdAccess.H,v 1.10 2015/04/23 19:42:38 whs Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiMvpdAccess.H,v $ - -/** - * @file fapiMvpdAccess.H - * - * @brief Defines the Module VPD functions that platform must implement - * - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 10/09/2012 Added fapiGetMvpdField - */ - -#ifndef _FAPI_FAPIMVPDACCESS_H_ -#define _FAPI_FAPIMVPDACCESS_H_ - -#include -#include -#include -#include - -namespace fapi -{ - enum MvpdRecord - { - MVPD_RECORD_CRP0 = 0x00, - MVPD_RECORD_CP00 = 0x01, - MVPD_RECORD_VINI = 0x02, - MVPD_RECORD_LRP0 = 0x03, - MVPD_RECORD_LRP1 = 0x04, - MVPD_RECORD_LRP2 = 0x05, - MVPD_RECORD_LRP3 = 0x06, - MVPD_RECORD_LRP4 = 0x07, - MVPD_RECORD_LRP5 = 0x08, - MVPD_RECORD_LWP0 = 0x09, - MVPD_RECORD_LWP1 = 0x0a, - MVPD_RECORD_LWP2 = 0x0b, - MVPD_RECORD_LWP3 = 0x0c, - MVPD_RECORD_LWP4 = 0x0d, - MVPD_RECORD_LWP5 = 0x0e, - MVPD_RECORD_VRML = 0x0f, - MVPD_RECORD_VWML = 0x10, - MVPD_RECORD_VER0 = 0x11, - MVPD_RECORD_MER0 = 0x12, - MVPD_RECORD_VMSC = 0x13, - }; - - enum MvpdKeyword - { - MVPD_KEYWORD_VD = 0x00, - MVPD_KEYWORD_ED = 0x01, - MVPD_KEYWORD_TE = 0x02, - MVPD_KEYWORD_DD = 0x03, - MVPD_KEYWORD_DN = 0x04, - MVPD_KEYWORD_PG = 0x05, - MVPD_KEYWORD_PK = 0x06, - MVPD_KEYWORD_PDR = 0x07, - MVPD_KEYWORD_PDV = 0x08, - MVPD_KEYWORD_PDH = 0x09, - MVPD_KEYWORD_SB = 0x0a, - MVPD_KEYWORD_DR = 0x0b, - MVPD_KEYWORD_VZ = 0x0c, - MVPD_KEYWORD_CC = 0x0d, - MVPD_KEYWORD_CE = 0x0e, - MVPD_KEYWORD_FN = 0x0f, - MVPD_KEYWORD_PN = 0x10, - MVPD_KEYWORD_SN = 0x11, - MVPD_KEYWORD_PR = 0x12, - MVPD_KEYWORD_HE = 0x13, - MVPD_KEYWORD_CT = 0x14, - MVPD_KEYWORD_HW = 0x15, - MVPD_KEYWORD_PDM = 0x16, - MVPD_KEYWORD_IN = 0x17, - MVPD_KEYWORD_PDI = 0x18, - MVPD_KEYWORD_PDG = 0x19, - MVPD_KEYWORD_PB = 0x1a, - MVPD_KEYWORD_CH = 0x1b, - MVPD_KEYWORD_IQ = 0x1c, - MVPD_KEYWORD_PM = 0x1d, - MVPD_KEYWORD_PZ = 0x1e, - MVPD_KEYWORD_N20 = 0x1f, - MVPD_KEYWORD_N21 = 0x20, - MVPD_KEYWORD_N30 = 0x21, - MVPD_KEYWORD_N31 = 0x22, - }; - - typedef struct voltageBucketData - { - // bucket Id - uint8_t bucketId; - // Nominal - uint16_t nomFreq; - uint16_t VnestNomVltg; - uint16_t InestNomCurr; - uint16_t VcsNomVltg; - uint16_t IcsNomCurr; - // PowerSave - uint16_t PSFreq; - uint16_t VnestPSVltg; - uint16_t InestPSCurr; - uint16_t VcsPSVltg; - uint16_t IcsPSCurr; - // Turbo - uint16_t turboFreq; - uint16_t VnestTurboVltg; - uint16_t InestTurboCurr; - uint16_t VcsTurboVltg; - uint16_t IcsTurboCurr; - //Fvmin - uint16_t fvminFreq; - uint16_t VnestFvminVltg; - uint16_t InestFvminCurr; - uint16_t VcsFvminVltg; - uint16_t IcsFvminCurr; - //Lab - uint16_t labFreq; - uint16_t VnestLabVltg; - uint16_t InestLabCurr; - uint16_t VcsLabVltg; - uint16_t IcsLabCurr; - }voltageBucketData_t; - -} - -extern "C" -{ - -/** - * @brief Get Module VPD field. - * - * A Module 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_procTarget Reference to processor 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[in,out] io_fieldSize Size of i_pBuffer in bytes - * - * @return fapi::ReturnCode. FAPI_RC_SUCCESS, or failure value. - */ -fapi::ReturnCode fapiGetMvpdField(const fapi::MvpdRecord i_record, - const fapi::MvpdKeyword i_keyword, - const fapi::Target &i_procTarget, - uint8_t * const i_pBuffer, - uint32_t &io_fieldSize); - -/** - * @brief Set Module VPD field. - * - * A Module 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_procTarget Reference to processor chip target for the record - * @param[in] i_pBuffer Pointer to buffer where data to set is stored - * @param[in] i_fieldSize Size of i_pBuffer in bytes - * - * @return fapi::ReturnCode. FAPI_RC_SUCCESS, or failure value. - */ -fapi::ReturnCode fapiSetMvpdField(const fapi::MvpdRecord i_record, - const fapi::MvpdKeyword i_keyword, - const fapi::Target &i_procTarget, - const uint8_t * const i_pBuffer, - const uint32_t i_fieldSize); - -/** - * @brief Get #V bucket data from VPD - * - * @par Detailed Description: - * This function reads PR keyword from the VPD, parses PR keyword - * to get voltage bucket id, reads #V keyword (Voltage data) from VPD, - * parses #V keyword to get voltage data corresponding to the bucket id - * indicated by the PR keyword and returns data to the caller. - * - * @param[in] i_pTarget Pointer to proc chip target. - * @param[in] i_record VPD record number to read #V bucket data - * @param[out] o_data On success, structure with #V bucket data from VPD - * - * @return fapi::ReturnCode. FAPI_RC_SUCCESS, or failure value. - */ -fapi::ReturnCode fapiGetPoundVBucketData(const fapi::Target &i_procTarget, - const uint32_t i_record, - fapi::voltageBucketData_t & o_data); - -} - -#endif diff --git a/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H b/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H deleted file mode 100644 index d7bf534b9..000000000 --- a/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H +++ /dev/null @@ -1,370 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiPlatHwAccess.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapiPlatHwAccess.H,v 1.10 2014/01/20 20:58:47 mjjones Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiPlatHwAccess.H,v $ - -/** - * @file fapiPlatHwAccess.H - * - * @brief Defines hardware-access functions for the platform layer. - * Hardware procedure writers will not call these functions. - * - * Implementors of platform code will provide worker routines - * for these functions in file hwpf/plat/fapiPlatHwAccess.C. - * fapi.H will not include this file, so platform implementors - * will have to include this file explicitly. - * - * These platform entry points are called by fapi functions from - * hwpf/fapi/fapiHwAccess.C which are wrapper functions that - * output scand traces common to all platforms. - * - * These functions have the same argument signatures as the - * fapi-level functions, but the function names her start with - * "plat." - * - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * monte 8sep2011 new - * mjjones 11/10/2011 Use ecmdDataBufferBase - * 836579 thi May 22,2012 Spy/Ring supports - * mjjones 07/12/2012 Add Pulse mode option to - * Ring funcs - * F876964 jknight Apr, 02,2013 fapi get/setSpyImage - * F873646 srimeesa Mar 10,2013 64Bit SPYID and - * ClockDomain ID support - * F883863 atendolk May 16,2013 fapi MultiScom support - */ - -#ifndef FAPIPLATHWACCESS_H_ -#define FAPIPLATHWACCESS_H_ - -#include -#include -#include -#include -#ifdef FAPI_SUPPORT_MULTI_SCOM -#include -#endif - -extern "C" -{ - -//------------------------------------------------------------------------------ -// HW Communication Functions to be implemented at the platform layer. -//------------------------------------------------------------------------------ - - -/** - * @brief Platform-level implementation called by GetScom() - * Hardware procedures writers will not call this function. - * - * - * @param[in] i_target Target to operate on - * @param[in] i_address Scom address to read from - * @param[out] o_data ecmdDataBufferBase object that holds data read from - * address - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platGetScom(const fapi::Target& i_target, - const uint64_t i_address, - ecmdDataBufferBase & o_data); - - -/** - * @brief Platform-level implementation called by PutScom(). - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_address Scom address to write to - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platPutScom(const fapi::Target& i_target, - const uint64_t i_address, - ecmdDataBufferBase & i_data); - - -/** - * @brief Platform-level implementation called by PutScomUnderMask() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_address Scom address to write to - * @param[in] i_data ecmdDataBufferBase object that holds the data - * @param[in] i_mask ecmdDataBufferBase object that holds the mask (i_data to - * write) - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platPutScomUnderMask(const fapi::Target& i_target, - const uint64_t i_address, - ecmdDataBufferBase & i_data, - ecmdDataBufferBase & i_mask); - -#ifdef FAPI_SUPPORT_MULTI_SCOM -/** - * @brief Platform-level implementation called by fapiMultiScom() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[inout] io_multiScomList MultiScom object pre-populated with SCOMs to - * be performed on i_target - * @return ReturnCode Zero on success, else platform specified error - */ -fapi::ReturnCode platMultiScom (const fapi::Target& i_target, - fapi::MultiScom& io_multiScomList); -#endif - -/** - * @brief Platorm-level implementation called by GetCfamRegister() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_address CFAM address to read from - * @param[out] o_data ecmdDataBufferBase object that holds data read from - * address - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platGetCfamRegister(const fapi::Target& i_target, - const uint32_t i_address, - ecmdDataBufferBase & o_data); - - -/** - * @brief Platform-level implementation called by PutCfamRegister() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_address CFAM address to write to - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platPutCfamRegister(const fapi::Target& i_target, - const uint32_t i_address, - ecmdDataBufferBase & i_data); - - -/** - * @brief Platform-level implementation of ModifyCfamRegister() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_address CFAM address to write to - * @param[in] i_data ecmdDataBufferBase object that holds the modifying data - * @param[in] i_modifyMode The modify mode (or/and/xor) - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platModifyCfamRegister(const fapi::Target& i_target, - const uint32_t i_address, - ecmdDataBufferBase & i_data, - const fapi::ChipOpModifyMode i_modifyMode); - - -/** - * @brief Platform-level implementation called by fapiGetRing() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_address Ring address to read from - * @param[out] o_data ecmdDataBufferBase object that holds data read from - * address - * @param[in] i_ringMode Any number of mode options from fapi::RingMode ORed - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platGetRing(const fapi::Target& i_target, - const scanRingId_t i_address, - ecmdDataBufferBase & o_data, - const uint32_t i_ringMode); - - -/** - * @brief Platform-level implementation called by fapiPutRing() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_address Ring address to write to - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * @param[in] i_ringMode Any number of mode options from fapi::RingMode ORed - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platPutRing(const fapi::Target& i_target, - const scanRingId_t i_address, - ecmdDataBufferBase & i_data, - const uint32_t i_ringMode); - - -/** - * @brief Platform-level implementation called by fapiModifyRing() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_address Ring address to modify - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * @param[in] i_ringMode Any number of mode options from fapi::RingMode ORed - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platModifyRing(const fapi::Target& i_target, - const scanRingId_t i_address, - ecmdDataBufferBase & i_data, - const fapi::ChipOpModifyMode i_modifyMode, - const uint32_t i_ringMode); - -// -------------------------------------------------------------------------- -// NOTE: -// These spy access interfaces are only used in FSP. -// HB does not allow spy access - -/** - * @brief Platform-level implementation called by fapiGetSpy() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to read spy from - * @param[in] i_spyId The spy's id - * @param[out] o_data Storage for output data - * - * @return ReturnCode. Zero on success, else platform specified error - */ -#ifdef FAPI_SUPPORT_SPY_AS_ENUM -fapi::ReturnCode platGetSpy(const fapi::Target& i_target, - const spyId_t i_spyId, - ecmdDataBufferBase & o_data); -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_STRING -/** - * @brief Reads a Spy from a target - * @param[in] i_target Target to read spy from - * @param[in] i_spyId The spy's id - * @param[out] o_data Storage for output data - * - * @return ReturnCode. Zero on success, else platform specified error - * - * @note: This is only supported in the cronus environment - * it will not compile in FSP code - */ -fapi::ReturnCode platGetSpy(const fapi::Target& i_target, - const char * const i_spyId, - ecmdDataBufferBase & o_data); -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_ENUM -/** - * @brief Platform-level implementation called by fapiPutSpy() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to operate on - * @param[in] i_spyId The spy's id - * @param[in] i_data ecmdDataBufferBase object that holds data to write into - * address - * - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platPutSpy(const fapi::Target& i_target, - const spyId_t i_spyId, - ecmdDataBufferBase & i_data); -#endif - -#ifdef FAPI_SUPPORT_SPY_AS_STRING -fapi::ReturnCode platPutSpy(const fapi::Target& i_target, - const char * const i_spyId, - ecmdDataBufferBase & i_data); -#endif -#ifdef FAPI_SUPPORT_SPY_AS_ENUM -/** - * @brief Platform-level implementation called by fapiGetSpyImage() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to read spy from - * @param[in] i_spyId The spy's id - * @param[out] o_data Storage for output data - * @param[in] i_imageData Input ring data - * - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platGetSpyImage(const fapi::Target& i_target, - const spyId_t i_spyId, - ecmdDataBufferBase & o_data, - const ecmdDataBufferBase & i_imageData); -#endif -#ifdef FAPI_SUPPORT_SPY_AS_STRING -/** - * @brief Platform-level implementation called by fapiGetSpyImage() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to read spy from - * @param[in] i_spyId The spy's id - * @param[out] o_data Storage for output data - * @param[in] i_imageData Input ring data - * - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platGetSpyImage(const fapi::Target& i_target, - const char * const i_spyId, - ecmdDataBufferBase & o_data, - const ecmdDataBufferBase & i_imageData); -#endif -#ifdef FAPI_SUPPORT_SPY_AS_ENUM -/** - * @brief Platform-level implementation called by fapiPutSpyImage() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to read spy from - * @param[in] i_spyId The spy's id - * @param[in] i_data Data to be written into the image - * @param[out] io_imageData Holds ring image to write data into - * - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platPutSpyImage(const fapi::Target& i_target, - const spyId_t i_spyId, - const ecmdDataBufferBase & i_data, - ecmdDataBufferBase & io_imageData); -#endif -#ifdef FAPI_SUPPORT_SPY_AS_STRING -/** - * @brief Platform-level implementation called by fapiPutSpyImage() - * Hardware procedures writers will not call this function. - * - * @param[in] i_target Target to read spy from - * @param[in] i_spyId The spy's id - * @param[in] i_data Data to be written into the image - * @param[out] io_imageData Holds ring image to write data into - * - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode platPutSpyImage(const fapi::Target& i_target, - const char* const i_spyId, - const ecmdDataBufferBase & i_data, - ecmdDataBufferBase & io_imageData); - -#endif -} // extern "C" - -#endif // FAPIPLATHWACCESS_H_ diff --git a/src/include/usr/hwpf/fapi/fapiReturnCode.H b/src/include/usr/hwpf/fapi/fapiReturnCode.H deleted file mode 100644 index 83c3b045d..000000000 --- a/src/include/usr/hwpf/fapi/fapiReturnCode.H +++ /dev/null @@ -1,633 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiReturnCode.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2011,2015 */ -/* [+] 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 */ -// $Id: fapiReturnCode.H,v 1.21 2015/01/16 11:30:02 sangeet2 Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCode.H,v $ - -/** - * @file fapiReturnCode.H - * - * @brief Defines the ReturnCode class that is a generic return code. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/13/2011 Created. - * mjjones 07/05/2011 Removed const from data - * mjjones 07/25/2011 Added support for FFDC and - * Error Target - * camvanng 09/06/2011 Added function template for - * setHwpFfdc - * mjjones 09/22/2011 Added ErrorInfo Support - * mjjones 11/10/2011 Use ecmdDataBufferBase - * mjjones 01/12/2012 Enforce correct usage - * mjjones 02/22/2012 Allow user to add Target FFDC - * mjjones 03/16/2012 Add type to FFDC data - * mjjones 03/16/2012 Allow different PLAT errors - * mjjones 04/20/2012 Remove deprecated int assign - * brianh 07/31/2012 performance/size optimizations - * mjjones 08/14/2012 Created getCreateReturnCodeDataRef - * mjjones 09/19/2012 Add FFDC ID to error info - * mjjones 03/22/2013 Support Procedure Callouts - * mjjones 05/20/2013 Support Bus Callouts - * mjjones 06/06/2013 Check FFDC size at compile time - * mjjones 06/24/2013 Support Children CDGs - * mjjones 08/26/2013 Support Hw Callout - * rjknight 09/10/2013 Support DIMM callout from - * MBA port and dimm number - * mjjones 11/08/2013 Do not define struct in union - * whs 03/11/2014 Add FW traces to error logs - * sangeet2 01/16/2015 Modify ErrorInfoEntryHwCallout - */ - -#ifndef FAPIRETURNCODE_H_ -#define FAPIRETURNCODE_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/** - * @brief Set HWP Error macro - * - * This macro should be used by a HWP to create an error. The ReturnCode's - * internal return code is set and any error information in the Error XML file - * is added to the ReturnCode - */ -#define FAPI_SET_HWP_ERROR(RC, ERROR) \ - RC._setHwpError(fapi::ERROR); \ - ERROR##_CALL_FUNCS_TO_COLLECT_FFDC(RC); \ - ERROR##_CALL_FUNCS_TO_COLLECT_REG_FFDC(RC); \ - ERROR##_ADD_ERROR_INFO(RC) - -/** - * @brief Add info to HWP Error macro - * - * This macro should be used by an FFDC HWP to add error information from an - * Error XML file to an existing error. - */ -#define FAPI_ADD_INFO_TO_HWP_ERROR(RC, ERROR) \ - ERROR##_CALL_FUNCS_TO_COLLECT_FFDC(RC); \ - ERROR##_CALL_FUNCS_TO_COLLECT_REG_FFDC(RC); \ - ERROR##_ADD_ERROR_INFO(RC) - -namespace fapi -{ - -// Forward declarations -class ReturnCodeDataRef; - -/** - * @class ReturnCode - * - * This class provides a generic return code. It contains the rcValue (return - * code value) which is of type uint32_t. - * - * FAPI can set an error in the ReturnCode by calling setFapiError. - * PLAT can set an error in the ReturnCode by calling setPlatError, this - * function associates heap based PlatData to the ReturnCode (use-case is - * an error log). - * HWP can set an error in the ReturnCode by calling FAPI_SET_HWP_ERROR, this - * macro adds any error information specified in the error XML file to the - * ReturnCode - * HWP can add error information to a ReturnCode that already contains an - * error by calling FAPI_ADD_INFO_TO_HWP_ERROR, this is called by HWPs - * that are specifically written to collect FFDC. This macro adds any error - * information specified in the error XML file to the ReturnCode - * FAPI/PLAT/HWP can set an ecmdDataBufferBase error in the ReturnCode by - * calling setEcmdError - * - * A ReturnCode is copyable and assignable. Therefore, it cannot be subclassed. - * - * When a ReturnCode is copied, any PlatData or ErrorInfo is not copied - * because it may be heavyweight. Both ReturnCodes will refer to the same data. - * this is achieved with the ReturnCodeDataRef class. - * - * A ReturnCode object is not thread safe, multiple threads must not use the - * same ReturnCode object concurrently. - */ -class ReturnCode -{ -public: - - /** - * @brief Default constructor. Sets rcValue to success - */ - ReturnCode() : iv_rcValue(FAPI_RC_SUCCESS), iv_pDataRef(NULL) { } - - /** - * @brief Constructor. Sets rcValue to the specified value - * - * @note This allows an implicit conversion from a value from the - * ReturnCodes enumeration and a ReturnCode. This is provided so that - * a function can do "return FAPI_RC_SUCCESS;" - * - * @param[in] i_rcValue The rcValue to set - */ - ReturnCode(const ReturnCodes i_rcValue); - - /** - * @brief Copy Constructor - * - * @param[in] i_right Reference to ReturnCode to copy - */ - ReturnCode(const ReturnCode & i_right); - - /** - * @brief Destructor - */ - ~ReturnCode(); - - /** - * @brief Assignment Operator. - * - * @param[in] i_right Reference to ReturnCode to assign from. - * - * @return Reference to 'this' ReturnCode - */ - ReturnCode & operator=(const ReturnCode & i_right); - - /** - * @brief Returns if the return code indicates success - * - * @return bool. True if ok, else false - */ - bool ok() const { return (iv_rcValue == FAPI_RC_SUCCESS); } - - /** - * @brief uint32_t conversion function. Returns the rcValue - * - * @note This allows a user to directly compare: - * 1/ ReturnCode to uint32_t (ReturnCode converted to uint32_t) - * 2/ ReturnCode to ReturnCode (Both ReturnCode converted to uint32_t) - * This allows a user to test if a ReturnCode is bad (if (l_rc){}) - */ - operator uint32_t() const { return iv_rcValue; } - - /** - * @brief Sets a FAPI error. Sets the rcValue to the supplied value (from - * the ReturnCodes enumeration) and deletes any associated data. - * - * This is called by FAPI code to generate an error. - * - * @param[in] i_rcValue Error value to set - */ - void setFapiError(const ReturnCodes i_rcValue); - - /** - * @brief Sets an ecmd error. Sets the rcValue to the supplied value and - * deletes any associated data. - * - * This is called by FAPI/PLAT/HWP code to generate an error when an - * ecmdDataBufferBase call returns non zero. This can also be used by PLAT - * code that reports errors with ecmd return codes. - * - * @param[in] i_rcValue ecmdDataBufferBase error value to set - */ - void setEcmdError(const uint32_t i_rcValue); - - /** - * @brief Sets a PLAT error. Sets the rcValue to the supplied value, deletes - * any associated data and associates the supplied heap based - * PlatData with the ReturnCode. The ReturnCode object takes - * responsibility for deleting the data (platform code implements the - * delete function and must know the type and how to delete it). - * - * This is called by PLAT code to generate an error. The expected use-case - * is to associate a platform error log with the ReturnCode. If the error is - * one that a HWP can look for (e.g. the HWP may want to retry in a specific - * error) then one of the specific FAPI_RC_PLAT errors in fapiReturnCodes.H - * can be used else it defaults to FAPI_RC_PLAT_ERR_SEE_DATA which means - * that there is a platform error that the HWP cannot decode. - * - * @param[in] i_pData Pointer to PlatData (on the heap). Can be NULL if - * the platform does not attach data - * @param[in] i_rcValue Error value to set - */ - void setPlatError(void * i_pData, - const ReturnCodes i_rcValue = FAPI_RC_PLAT_ERR_SEE_DATA); - - /** - * @brief Sets a HWP error. Sets the rcValue to the supplied value (from - * the HwpReturnCode enumeration) and deletes any associated data. - * - * HWP code must call the FAPI_SET_HWP_ERROR macro rather than this function - * directly to generate an error so that any error information is - * automatically added to the ReturnCode - * - * @param[in] i_rcValue Error value to set - */ - void _setHwpError(const HwpReturnCode i_rcValue); - - /** - * @brief Get a pointer to any PlatData. ReturnCode is still responsible for - * deletion of the data. The caller must not delete - * - * This is called by PLAT. The expected use-case is to get a pointer to a - * platform error log. The data pointer should be used immediately in the - * same thread. - * - * @return void *. Pointer to any PlatData. If NULL then no data - */ - void * getPlatData() const; - - /** - * @brief Get a pointer to any PlatData and release ownership from - * ReturnCode. The caller is responsible for deletion. - * - * This is called by PLAT. The expected use-case is to retrieve a platform - * error log. - * - * @return void *. Pointer to any PlatData. If NULL then no data - */ - void * releasePlatData(); - - /** - * @brief Enumeration of ErrorInfo types - */ - enum ErrorInfoType - { - EI_TYPE_FFDC = 1, - EI_TYPE_HW_CALLOUT = 2, - EI_TYPE_PROCEDURE_CALLOUT = 3, - EI_TYPE_BUS_CALLOUT = 4, - EI_TYPE_CDG = 5, // Target Callout/Deconfig/GARD - EI_TYPE_CHILDREN_CDG = 6, // Children Callout/Deconfig/GARD - EI_TYPE_COLLECT_TRACE = 7, - }; - - /** - * @brief Structure representing a single ErrorInfo entry. - * - * An array of these is passed to the addErrorInfo function when a HWP - * generates an error by calling the FAPI_SET_HWP_ERROR macro - */ - struct ErrorInfoEntryFfdc - { - uint8_t iv_ffdcObjIndex; - uint16_t iv_ffdcSize; - uint32_t iv_ffdcId; - }; - - struct ErrorInfoEntryHwCallout - { - uint8_t iv_hw; - uint8_t iv_calloutPriority; - uint8_t iv_refObjIndex; - //For a HW callout (clock) the position of the clock - uint8_t iv_objPosIndex; - }; - - struct ErrorInfoEntryProcCallout - { - uint8_t iv_procedure; - uint8_t iv_calloutPriority; - }; - - struct ErrorInfoEntryBusCallout - { - uint8_t iv_endpoint1ObjIndex; - uint8_t iv_endpoint2ObjIndex; - uint8_t iv_calloutPriority; - }; - - struct ErrorInfoEntryTargetCDG - { - uint8_t iv_targetObjIndex; - uint8_t iv_callout; - uint8_t iv_deconfigure; - uint8_t iv_gard; - uint8_t iv_calloutPriority; - }; - - struct ErrorInfoEntryChildrenCDG - { - uint8_t iv_parentObjIndex; - uint8_t iv_callout; - uint8_t iv_deconfigure; - uint32_t iv_childType; - uint8_t iv_childPort; - uint8_t iv_childNumber; - uint8_t iv_gard; - uint8_t iv_calloutPriority; - }; - - struct ErrorInfoEntryCollectTrace - { - uint32_t iv_eieTraceId; - }; - - struct ErrorInfoEntry - { - uint8_t iv_type; // Value from ErrorInfoType - union - { - ErrorInfoEntryFfdc ffdc; - ErrorInfoEntryHwCallout hw_callout; - ErrorInfoEntryProcCallout proc_callout; - ErrorInfoEntryBusCallout bus_callout; - ErrorInfoEntryTargetCDG target_cdg; - ErrorInfoEntryChildrenCDG children_cdg; - ErrorInfoEntryCollectTrace collect_trace; - }; - }; - - /** - * @brief Add ErrorInfo - * - * This is called by the FAPI_SET_HWP_ERROR and macro to add ErrorInfo to the - * ReturnCode when a HWP generates an error. The function is designed to add - * all the ErrorInfo at once rather than the FAPI_SET_HWP_ERROR macro making - * multiple function calls to add each piece of ErrorInfo individually in - * order to minimize code size - * - * @param[in] i_pObjects Pointer to array of const pointers to const objects - * that are referred to by ErrorInfoEntry objects - * @param[in] i_pEntries Pointer to array of ErrorInfoEntry objects defining - * the ErrorInfo that needs to be added - * @param[in] i_count Number of ErrorInfoEntry entries - */ - void addErrorInfo(const void * const * i_pObjects, - const ErrorInfoEntry * i_pEntries, - const uint8_t i_count); - - /** - * @brief Add a copy of FFDC to the ErrorInfo - * - * This is called by addErrorInfo - * - * @param[in] i_ffdcId FFDC Identifier - used for decoding - * @param[in] i_pFfdc Pointer to the FFDC to copy - * @param[in] i_size Size of the FFDC to copy - */ - void addEIFfdc(const uint32_t i_ffdcId, - const void * i_pFfdc, - const uint32_t i_size); - - /** - * @brief Get a pointer to any ErrorInfo - * - * This is called by PLAT to find information about an error - * - * @return ErrorInfo *. Pointer to any ErrorInfo. If NULL then no info - */ - const ErrorInfo * getErrorInfo() const; - - /** - * @brief Enumeration of return code creators - */ - enum returnCodeCreator - { - CREATOR_FAPI = 1, - CREATOR_PLAT = 2, - CREATOR_HWP = 3, - }; - - /** - * @brief Gets the creator of the return code - * - * @return ReturnCodeCreator - */ - returnCodeCreator getCreator() const; - -private: - - /** - * @brief Get a reference to the ReturnCodeDataRef, if it doesn't exist - * then one is created and returned - * - * @return ReturnCodeDataRef &. Reference to ReturnCodeDataRef - */ - ReturnCodeDataRef & getCreateReturnCodeDataRef(); - - /** - * @brief Forgets about any associated data (PlatData and ErrorInfo) - * - * If this is the only ReturnCode pointing to the data then the data is - * deleted - */ - void forgetData(); - - /** - * @brief Add a HW callout to the ErrorInfo - * - * This is called by addErrorInfo - * - * @param[in] i_hw The hardware to callout - * @param[in] i_priority The priority of the callout - * @param[in] i_refTarget Reference to reference Target - * @param[in] i_position Incase of a clock callout; - * position of the clock target - */ - void addEIHwCallout( - const HwCallouts::HwCallout i_hw, - const CalloutPriorities::CalloutPriority i_priority, - const Target & i_refTarget, - const targetPos_t i_position = INVALID_CLOCK_POS); - - /** - * @brief Add a procedure callout to the ErrorInfo - * - * This is called by addErrorInfo - * - * @param[in] i_procedure The procedure to callout - * @param[in] i_priority The priority of the callout - */ - void addEIProcedureCallout( - const ProcedureCallouts::ProcedureCallout i_procedure, - const CalloutPriorities::CalloutPriority i_priority); - - /** - * @brief Add a bus callout to the ErrorInfo - * - * This is called by addErrorInfo - * - * @param[in] i_target1 Reference to endpoint1 Target - * @param[in] i_target2 Reference to endpoint2 Target - * @param[in] i_priority The priority of the callout - */ - void addEIBusCallout( - const Target & i_target1, - const Target & i_target2, - const CalloutPriorities::CalloutPriority i_priority); - - /** - * @brief Add a target callout/deconfigure/GARD to the ErrorInfo - * - * This is called by addErrorInfo - * - * @param[in] i_target Reference to the target to cdg - * @param[in] i_callout True if Target should be called out - * @param[in] i_deconfigure True if Target should be deconfigured - * @param[in] i_gard True if Target should be GARDed - * @param[in] i_priority The priority of any callout - */ - void addEICdg( - const Target & i_target, - const bool i_callout, - const bool i_deconfigure, - const bool i_gard, - const CalloutPriorities::CalloutPriority i_priority); - - /** - * @brief Add children target callout/deconfigure/GARDs to the ErrorInfo - * - * This is called by addErrorInfo to c/d/g all child Targets of a specified - * type. The function can take a chip/unit pair or an MBA/DIMM pair. For - * the MBA/DIMM pair two additional parameters are used to identify which - * dimms should be called out. - * - * @param[in] i_parent Reference to the parent chip - * @param[in] i_childType Child target types to c/d/g - * @param[in] i_callout True if Target should be called out - * @param[in] i_deconfigure True if Target should be deconfigured - * @param[in] i_gard True if Target should be GARDed - * @param[in] i_priority The priority of any callout - * @param[in] i_childPort MBA port where error was detected - * @param[in] i_childNum MBA dimm number of failing chip - */ - void addEIChildrenCdg( - const Target & i_parent, - const TargetType i_childType, - const bool i_callout, - const bool i_deconfigure, - const bool i_gard, - const CalloutPriorities::CalloutPriority i_priority, - const uint8_t i_childPort, const uint8_t i_childNum); - - /** - * @brief Add traces to collect to the ErrorInfo - * - * @param[in] i_trace - */ - void addEICollectTrace( - const CollectTraces::CollectTrace i_traceId); - - // The rcValue - uint32_t iv_rcValue; - - // Pointer to ReturnCodeDataRef (manages associated data) - ReturnCodeDataRef * iv_pDataRef; -}; - -/** - * @namespace ReturnCodeFfdc - * - * This namespace contains template functions used for adding FFDC data to a - * ReturnCode. They cannot be a ReturnCode member functions because a function - * template cannot be specialized within a class - */ -namespace ReturnCodeFfdc -{ - /** - * @brief Enumeration of ErrorInfo FFDC sizes that are used to indicate a - * special type that cannot simply be memcopied - */ - enum ErrorInfoFfdcSize - { - EI_FFDC_SIZE_ECMDDB = 0xffff, // ecmdDataBufferBase - EI_FFDC_SIZE_TARGET = 0xfffe, // fapi::Target - EI_FFDC_MAX_SIZE = 0x1000, // Limit regular FFDC capture to 4kb - }; - - /** - * @brief Compile error if caller tries to add too much FFDC to a ReturnCode - * - * If the unspecialized function template is instantiated, the compile will - * fail due to the construction of an undefined class. If the specialized - * function template is instantiated (done if the FFDC size is not too big), - * the function does nothing and is optimized out - */ - class Error_FfdcTooLargeToCapture; - template void checkFfdcSize() - { - Error_FfdcTooLargeToCapture(); - } - template <> inline void checkFfdcSize() {} - - /** - * @brief Get FFDC Size - * - * This is called by the FAPI_SET_HWP_ERROR macro to find out the size of - * FFDC data. If the data is of a special type that is handled differently - * than types that are simply memcopied then it is handled by a template - * specialization - * - * @return uint16_t. Size of the FFDC data - */ - template - inline uint16_t getErrorInfoFfdcSize(const T &) - { - checkFfdcSize<(sizeof(T) > EI_FFDC_MAX_SIZE)>(); - return sizeof(T); - } - - /** - * @brief Get FFDC Size specialization for ecmdDataBufferBase - */ - template<> - inline uint16_t getErrorInfoFfdcSize( - const ecmdDataBufferBase &) - { - return EI_FFDC_SIZE_ECMDDB; - } - - /** - * @brief Get FFDC Size specialization for fapi::Target - */ - template<> - inline uint16_t getErrorInfoFfdcSize( - const fapi::Target &) - { - return EI_FFDC_SIZE_TARGET; - } - - /** - * @brief Compile error if caller tries to get the FFDC size of a pointer - * - * If this function template is instantiated, the compile will fail due to - * the construction of an undefined class. - */ - class Error_PtrPassedToGetErrorInfoFfdcSize; - template - inline int16_t getErrorInfoFfdcSize(const T *) - { - Error_PtrPassedToGetErrorInfoFfdcSize(); - return 0; - } -} - -} - -#endif // FAPIRETURNCODE_H_ diff --git a/src/include/usr/hwpf/fapi/fapiReturnCodeDataRef.H b/src/include/usr/hwpf/fapi/fapiReturnCodeDataRef.H deleted file mode 100644 index 3f814c0a9..000000000 --- a/src/include/usr/hwpf/fapi/fapiReturnCodeDataRef.H +++ /dev/null @@ -1,179 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiReturnCodeDataRef.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapiReturnCodeDataRef.H,v 1.7 2013/10/15 13:13:38 dcrowell Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCodeDataRef.H,v $ - -/** - * @file fapiReturnCodeDataRef.H - * - * @brief Defines the ReturnCodeDataRef class that manages the data associated - * with a ReturnCode - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/13/2011 Created. - * mjjones 07/05/2011. Removed const from data - * mjjones 07/25/2011 Added support for FFDC - * mjjones 09/22/2100 Added support for Error Info - */ - -#ifndef FAPIRETURNCODEDATAREF_H_ -#define FAPIRETURNCODEDATAREF_H_ - -#include -#include -#include - -namespace fapi -{ - -/** - * @class ReturnCodeDataRef - * - * This class manages the data associated with a ReturnCode. A ReturnCode - * contains a pointer to a ReturnCodeDataRef. When a ReturnCode is copied or - * assigned, both ReturnCodes point to the same ReturnCodeDataRef (the data is - * not copied) and the ReturnCodeDataRef reference count is incremented. When a - * ReturnCode is destructed, the ReturnCodeDataRef reference count is - * decremented and if zero, the ReturnCodeDataRef is deleted which deletes the - * the data - * - * A ReturnCodeDataRef object is not thread safe, multiple threads must not use - * the same ReturnCodeDataRef object concurrently. - */ -class ReturnCodeDataRef -{ -public: - - /** - * @brief Constructor - */ - ReturnCodeDataRef(); - - /** - * @brief Destructor - */ - virtual ~ReturnCodeDataRef(); - - /** - * @brief Increments the ref count - */ - void incRefCount(); - - /** - * @brief Decrements the ref count - * - * @return bool True if zero reached - */ - bool decRefCountCheckZero(); - - /** - * @brief Associate heap based PlatData (use-case is platform error log) - * - * Any existing PlatData is deleted - * - * @param[in] i_pPlatData Pointer to PlatData to associate - */ - void setPlatData(void * i_pPlatData); - - /** - * @brief Get a pointer to any PlatData. ReturnCodeDataRef is still - * responsible for deletion of the data. The caller must not delete - * - * The pointer is only meaningful to platform code. - * - * @return void *. Pointer to PlatData. If NULL then no data - */ - void * getPlatData() const; - - /** - * @brief Get a pointer to any PlatData and release ownership from - * ReturnCodeDataRef. The caller is responsible for deletion. - * - * The pointer is only meaningful to platform code. - * - * @return void *. Pointer to PlatData. If NULL then no data - */ - void * releasePlatData(); - - /** - * @brief Get a pointer to any ErrorInfo - * - * @return ErrorInfo *. Pointer to ErrorInfo. If NULL then no info - */ - ErrorInfo * getErrorInfo(); - - /** - * @brief Get a reference to the ErrorInfo. If there is no info then - * it is created (empty) - * - * @return ErrorInfo &. Reference to ErrorInfo. - */ - ErrorInfo & getCreateErrorInfo(); - -#ifdef FAPI_CUSTOM_MALLOC - /** - * @brief Overload new operator to use platform-specific allocator - * - * @param[in] i_sz Size of memory to allocate in bytes - * - * @return Pointer to allocated memory - */ - static void * operator new(size_t i_sz); - - /** - * @brief Overload delete operator to use platform-specific deallocator - * - * @param[in] i_ptr Pointer to memory previously allocated with new - */ - static void operator delete(void * i_ptr); -#endif - -private: - - /** - * @brief Delete any associated PlatData. Implemented by platform code - * because only platform code knows the type of the data. - */ - void deletePlatData(); - - // Copy constructor and assignment operator disabled - ReturnCodeDataRef(const ReturnCodeDataRef & i_right); - ReturnCodeDataRef & operator=(const ReturnCodeDataRef & i_right); - - // The reference count (how many ReturnCodes are pointing to this object) - uint32_t iv_refCount; - - // Pointer to associated PlatData - void * iv_pPlatData; - - // Pointer to HWP Error Information - ErrorInfo * iv_pErrorInfo; -}; - -} - -#endif // FAPIRETURNCODEDATAREF_H_ diff --git a/src/include/usr/hwpf/fapi/fapiReturnCodes.H b/src/include/usr/hwpf/fapi/fapiReturnCodes.H deleted file mode 100644 index 4b3107efc..000000000 --- a/src/include/usr/hwpf/fapi/fapiReturnCodes.H +++ /dev/null @@ -1,108 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiReturnCodes.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapiReturnCodes.H,v 1.17 2014/04/15 17:50:40 whs Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiReturnCodes.H,v $ - -/** - * @file fapiReturnCodes.H - * - * @brief Defines the returns codes generated by HWPF code. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/13/2011 Created. - * mjjones 06/07/2011 Add FAPI_RC_NOT_IMPLEMENTED - * mjjones 06/30/2011 Add FAPI_RC_ATTR_UNIT_TEST_FAIL - * mjjones 08/10/2011 Add FAPI_RC_FFDC_HWP_NOT_FOUND - * mjjones 09/23/2011 Remove FAPI_RC_FFDC_HWP_NOT_FOUND - * mjjones 10/07/2011 Add FAPI_RC_INVALID_ATTR_GET - * mjjones 10/28/2011 Trim FAPI/PLAT errors - * mjjones 11/10/2011 Use ecmdDataBufferBase - * mjjones 01/13/2012 Name enumeration - * mjjones 04/16/2012 Add FAPI_RC_INVALID_CHIP_EC_FEATURE_GET - * mjjones 05/02/2012 Add FAPI_RC_PLAT_ERR_ADU_LOCKED - * mjjones 11/14/2012 Add FAPI_RC_UNRECOGNIZED_SBE_ERROR - * mjjones 03/26/2014 Remove FAPI_RC_UNRECOGNIZED_SBE_ERROR - * whs 04/14/2014 Remove FAPI_RC_INVALID_PARAM - */ - -#ifndef FAPIRETURNCODES_H_ -#define FAPIRETURNCODES_H_ - -#include - -namespace fapi -{ - -/** - * @brief Enumeration of return codes - * - * @note HWP return codes are in the HwpReturnCode enumeration in the - * generated fapiHwpReturnCodes.H file - */ -enum ReturnCodes -{ - FAPI_RC_SUCCESS = 0, - - //-------------------------------------------------------------------------- - // Flag bits indicating which code generated the error If no flag set then - // it is generated by HWP - //-------------------------------------------------------------------------- - FAPI_RC_FAPI_MASK = 0x04000000, // FAPI generated error - FAPI_RC_PLAT_MASK = 0x02000000, // PLAT generated error - FAPI_RC_ECMD_MASK = ECMD_ERR_ECMD, // ECMD generated error (0x01000000) - - //-------------------------------------------------------------------------- - // FAPI generated return codes - //-------------------------------------------------------------------------- - - // Initfile requested an attribute with an invalid attribute ID - FAPI_RC_INVALID_ATTR_GET = FAPI_RC_FAPI_MASK | 0x01, - - // HWP requested a chip EC feature with an invalid attribute ID - FAPI_RC_INVALID_CHIP_EC_FEATURE_GET = FAPI_RC_FAPI_MASK | 0x02, - - // Invalid multiscom parameters - FAPI_RC_INVALID_MULTISCOM_LENGTH = FAPI_RC_FAPI_MASK | 0x03, - - //-------------------------------------------------------------------------- - // PLAT generated return codes. Additional details may be contained in - // ReturnCode platData (this can only be looked at by PLAT code) - //-------------------------------------------------------------------------- - - // Generic platform error - FAPI_RC_PLAT_ERR_SEE_DATA = FAPI_RC_PLAT_MASK | 0x01, - - // Operation to AlterDisplay unit failed because it is locked - FAPI_RC_PLAT_ERR_ADU_LOCKED = FAPI_RC_PLAT_MASK | 0x02, - - // Operation not supported by HB runtime - FAPI_RC_PLAT_NOT_SUPPORTED_AT_RUNTIME = FAPI_RC_PLAT_MASK | 0x03, -}; - -} - -#endif // FAPIRETURNCODES_H_ diff --git a/src/include/usr/hwpf/fapi/fapiSystemConfig.H b/src/include/usr/hwpf/fapi/fapiSystemConfig.H deleted file mode 100644 index cc9d01621..000000000 --- a/src/include/usr/hwpf/fapi/fapiSystemConfig.H +++ /dev/null @@ -1,121 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiSystemConfig.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapiSystemConfig.H,v 1.6 2013/10/15 13:13:41 dcrowell Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiSystemConfig.H,v $ - -/** - * @file fapiSystemConfig.H - * - * @brief Defines the System Config query functions that platform code must - * implement. It is an eCMD requirement that these be "C" functions. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 09/12/2011 Updated with new functions. - * mjjones 02/17/2012 Updated fapiGetAssociatedDimms - * description to only allow MBA - * - */ - -#ifndef FAPISYSTEMCONFIG_H_ -#define FAPISYSTEMCONFIG_H_ - -#include -#include -#include -#include - -extern "C" -{ - -/** -* @brief Gets the Target on the other side of the memory channel -* - Input MEMBUF_CHIP, Output MCS_CHIPLET -* - Input MCS_CHIPLET, Output MEMBUF_CHIP -* -* @param[in] i_target Input MCS_CHIPLET or MEMBUF_CHIP Target -* @param[out] o_target Reference to Target that is set to the Target on -* the other side of the memory channel, if there is no such -* Target in the specified state then an error is returned -* @param[in] i_state Only return a target in the specified state. Either -* present or functional (default) -* -* @return ReturnCode. Zero on success, else error -*/ -fapi::ReturnCode fapiGetOtherSideOfMemChannel( - const fapi::Target& i_target, - fapi::Target & o_target, - const fapi::TargetState i_state = fapi::TARGET_STATE_FUNCTIONAL); - -/** - * @brief Gets the chiplets that are children of the input chip - * - * @param[in] i_chip Input chip - * @param[in] i_chipletType Type of chiplet required - * @param[out] o_chiplets Reference to vector that is cleared then filled in - * with the children chiplet Targets - * @param[in] i_state Only return targets of the specified state. Either - * present or functional (default) - * - * @return ReturnCode. Zero on success, else error - */ -fapi::ReturnCode fapiGetChildChiplets( - const fapi::Target & i_chip, - const fapi::TargetType i_chipletType, - std::vector & o_chiplets, - const fapi::TargetState i_state = fapi::TARGET_STATE_FUNCTIONAL); - -/** - * @brief Gets the DIMMs that are logically associated with the input MBA target - * - * @param[in] i_target Input MBA chiplet target - * @param[out] o_dimms Reference to vector that is cleared then filled in with - * the associated DIMM Targets - * @param[in] i_state Only return targets of the specified state. Either - * present or functional (default) - * - * @return ReturnCode. Zero on success, else error - */ -fapi::ReturnCode fapiGetAssociatedDimms( - const fapi::Target& i_target, - std::vector & o_dimms, - const fapi::TargetState i_state = fapi::TARGET_STATE_FUNCTIONAL); - -/** - * @brief Gets the parent chip of the input chiplet - * - * @param[in] i_chiplet Input chiplet - * @param[out] o_chip Reference to Target that is set to the parent chip - * - * @return ReturnCode. Zero on success, else error - */ -fapi::ReturnCode fapiGetParentChip( - const fapi::Target& i_chiplet, - fapi::Target & o_chip); - -} // extern "C" - -#endif // FAPISYSTEMCONFIG_H_ diff --git a/src/include/usr/hwpf/fapi/fapiTarget.H b/src/include/usr/hwpf/fapi/fapiTarget.H deleted file mode 100644 index 4cb126381..000000000 --- a/src/include/usr/hwpf/fapi/fapiTarget.H +++ /dev/null @@ -1,326 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiTarget.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 */ -// $Id: fapiTarget.H,v 1.9 2014/02/26 14:51:05 mjjones Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiTarget.H,v $ - -/** - * @file fapiTarget.H - * - * @brief Defines the Target class that is a generic target of a Hardware - * Procedure operation. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/13/2011 Created. Based on Hlava prototype - * mjjones 06/29/2011 Removed incorrect MSB from 2 enums - * mjjones 07/05/2011 Removed const from handle - * mjjones 08/29/2011 Updated toString function - * mjjones 09/12/2011 Added isChip and isChiplet - * mjjones 02/07/2012 Remove MBS_CHIPLET - * Add XBUS_ENDPOINT ABUS_ENDPOINT - * mjjones 02/21/2012 Add high performance toEcmdString - * mjjones 02/24/2014 Add isChip/Chiplet using types - * Add isPhysParentChild - */ - -#ifndef FAPITARGET_H_ -#define FAPITARGET_H_ - -#include -#include - -namespace fapi -{ - -/** - * @brief Enumeration of target types values (bitmask values) - */ -enum TargetType -{ - TARGET_TYPE_NONE = 0x00000000, - TARGET_TYPE_SYSTEM = 0x00000001, - TARGET_TYPE_DIMM = 0x00000002, - TARGET_TYPE_PROC_CHIP = 0x00000004, - TARGET_TYPE_MEMBUF_CHIP = 0x00000008, - TARGET_TYPE_EX_CHIPLET = 0x00000010, - TARGET_TYPE_MBA_CHIPLET = 0x00000020, - TARGET_TYPE_MCS_CHIPLET = 0x00000040, - TARGET_TYPE_XBUS_ENDPOINT = 0x00000080, - TARGET_TYPE_ABUS_ENDPOINT = 0x00000100, - TARGET_TYPE_L4 = 0x00000200, -}; - -/** - * @brief Typedef used when passing multiple TargetType values - */ -typedef uint32_t TargetTypes_t; - -/** - * @brief Enumeration of target state values (bitmask values) - */ -enum TargetState -{ - TARGET_STATE_PRESENT = 0x00000001, - TARGET_STATE_FUNCTIONAL = 0x00000002, -}; - -/** - * @brief Typedef used when passing multiple TargetState values - */ -typedef uint32_t TargetStates_t; - -/** - * @brief ECMD constants - */ -const uint32_t MAX_ECMD_STRING_LEN = 64; - -/** - * @class Target - * - * This class provides a generic Target of a Hardware Procedure Operation. - * - * A Target contains a void * pointer to a handle which is only meaningful to - * platform code. - * - * A Target object is copyable and assignable. Therefore, it cannot be - * subclassed. - * - * A Target object is not thread safe, multiple threads must not use the same - * Target object concurrently. - */ -class Target -{ -public: - - /** - * @brief Default constructor - */ - Target(); - - /** - * @brief Constructor - * - * @param[in] i_type Target type - * @param[in] i_pHandle Pointer to platform specific Target handle - */ - Target(const TargetType i_type, - void * i_pHandle); - - /** - * @brief Copy Constructor - * - * @param[in] i_right Reference to Target to copy - */ - Target(const Target & i_right); - - /** - * @brief Destructor - */ - ~Target(); - - /** - * @brief Assignment Operator. - * - * @param[in] i_right Reference to Target to assign from. - * - * @return Reference to 'this' Target - */ - Target & operator=(const Target & i_right); - - /** - * @brief Equality Comparison Operator - * - * @param[in] i_right Reference to Target to compare. - * - * @return bool. True if equal. - */ - bool operator==(const Target & i_right) const; - - /** - * @brief Inequality Comparison Operator - * - * @param[in] i_right Reference to Target to compare. - * - * @return bool. True if not equal. - */ - bool operator!=(const Target & i_right) const; - - /** - * @brief Get the handle pointer. - * - * The handle is only meaningful to platform code. - * - * @return Handle_t. The handle. - */ - void * get() const { return iv_pHandle; } - - /** - * @brief Set the handle. Platform using Handle_t as handle - * - * The handle is only meaningful to platform code. - * - * @param[in] i_pHandle Pointer to platform specific handle - */ - void set(void * i_pHandle); - - /** - * @brief Get the target type - * - * @return The type of target represented by this target - */ - TargetType getType() const { return iv_type; } - - /** - * @brief Set the target type - * - * @param[in] i_type The type of target represented by this target - */ - void setType(const TargetType i_type) { iv_type = i_type; } - - /** - * @brief Returns if a target type is a chip - * - * @param[in] i_type Target Type - * - * @return boolean. true if chip else false - */ - static bool isChip(const TargetType i_type); - - /** - * @brief Returns if the target is a chip - * - * @return boolean. true if chip else false - */ - bool isChip() const - { - return isChip(iv_type); - } - - /** - * @brief Returns if a target type is a chiplet - * - * @param[in] i_type Target Type - * - * @return boolean. true if chip else false - */ - static bool isChiplet(const TargetType i_type); - - /** - * @brief Returns if the target is a chiplet - * - * This includes all chip units (e.g. XBUS, ABUS) - * - * @return boolean. true if chiplet else false - */ - bool isChiplet() const - { - return isChiplet(iv_type); - } - - /** - * @brief Returns if a pair of target types is a physical parent/child - * - * This is true if the parent type is a chip and the child type is a - * chiplet that belongs to the chip (e.g. PROC_CHIP->EX_CHIPLET) - * - * @param[in] i_parentType Parent Target Type - * @param[in] i_childType Child Target Type - * - * @return boolean. - */ - static bool isPhysParentChild(const TargetType i_parentType, - const TargetType i_childType); - - /** - * @brief Convert a target to an ecmd-format target string - * - * This is used by HWP/FAPI code to trace the target. - * - * @return Pointer to NULL terminated character string. The caller must use - * the string before the Target object is destructed. - */ - const char * toEcmdString() const; - -private: - - /** - * @brief Convert a target to an ecmd-format target string - * - * This is a private function called by toEcmdString to load the ecmd-format - * string into the Target object. Subsequent calls of toEcmdString are high - * performance and just return a pointer to the internal string. - * - * @note Implemented by platform code - * - * @param[out] o_ecmdString. Reference to a character array of length - * MAX_ECMD_STRING_LEN. This is filled in with the - * null terminated ECMD string. - */ - void toString(char (&o_ecmdString)[MAX_ECMD_STRING_LEN]) const; - - /** - * @brief Compare the handle - * - * @note Implemented by platform code because only platform code knows the - * type pointed to by iv_pHandle to compare - * - * @param[in] i_right Reference to Target to compare handle to - * - * @return bool. True if the same - */ - bool compareHandle(const Target & i_right) const; - - /** - * @brief Copy the handle - * - * @note Implemented by platform code because only platform code knows the - * type pointed to by iv_pHandle to copy - * - * @param[in] i_right Reference to Target to copy handle from - */ - void copyHandle(const Target & i_right); - - /** - * @brief Delete the handle - * - * @note Implemented by platform code because only platform code knows the - * type to delete and if it should actually be deleted - */ - void deleteHandle(); - - // Type of target - TargetType iv_type; - - // Pointer to platform specific Target Handle - void * iv_pHandle; - - // Pointer to the ecmd-format string representing the Target - mutable char * iv_pEcmdString; -}; - -} - -#endif // FAPITARGET_H_ diff --git a/src/include/usr/hwpf/fapi/fapiUtil.H b/src/include/usr/hwpf/fapi/fapiUtil.H deleted file mode 100644 index 470d78fec..000000000 --- a/src/include/usr/hwpf/fapi/fapiUtil.H +++ /dev/null @@ -1,293 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/fapi/fapiUtil.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ -/* [+] 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 */ -// $Id: fapiUtil.H,v 1.21 2014/09/16 14:47:23 pragupta Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/hwpf/working/fapi/fapiUtil.H,v $ - -/** - * @file fapiUtil.H - * - * @brief Defines utility functions that the platform code must implement. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/13/2011 Created. - * camvanng 05/31/2011 Removed fapiOutputx macros - * mjjones 06/30/2011 Removed #include - * mjjones 07/05/2011 Removed rogue tab - * camvanng 09/06/2011 Added fapiLogError - * mjjones 09/14/2011 Prepended fapi to delay - * mjjones 10/05/2011 Added fapiCheckType - * mjjones 10/13/2011 Added extern "C" to functions - * camvanng 10/14/2011 Added fapiLoadInitFile & - * fapiUnloadInitFile - * camvanng 11/15/2011 Pass target to fapiLoadInitFile - * and doxygen changes; - * needed by cronus - * mjjones 08/13/2012 Add fapiSpecialWakeup - * mjjones 09/24/2013 Update fapiLogError to - * accept another parameter - * dcrowell 10/14/2013 Add explicit inline - * pragupta 09/16/2014 Add fapi gen hash function - */ - -#ifndef FAPIUTIL_H_ -#define FAPIUTIL_H_ - -#include -#include -#include - -namespace fapi -{ - namespace hash - { - enum validHashes { CRC32 }; - } -}; - -#include - -// Defines for endian convertion -#define FAPI_BE16TOH(x) FAPI_PLAT_BE16TOH(x) -#define FAPI_LE16TOH(x) FAPI_PLAT_LE16TOH(x) -#define FAPI_HTOBE16(x) FAPI_PLAT_HTOBE16(x) -#define FAPI_HTOLE16(x) FAPI_PLAT_HTOLE16(x) - -#define FAPI_BE32TOH(x) FAPI_PLAT_BE32TOH(x) -#define FAPI_LE32TOH(x) FAPI_PLAT_LE32TOH(x) -#define FAPI_HTOBE32(x) FAPI_PLAT_HTOBE32(x) -#define FAPI_HTOLE32(x) FAPI_PLAT_HTOLE32(x) - -#define FAPI_BE64TOH(x) FAPI_PLAT_BE64TOH(x) -#define FAPI_LE64TOH(x) FAPI_PLAT_LE64TOH(x) -#define FAPI_HTOBE64(x) FAPI_PLAT_HTOBE64(x) -#define FAPI_HTOLE64(x) FAPI_PLAT_HTOLE64(x) - -// Defines for platform-specific memory allocation -#define fapiMalloc(s) fapiPlatMalloc(s) -#define fapiFree(p) fapiPlatFree(p) - -#define FAPI_GEN_HASH(type, data, size) FAPI_PLAT_GEN_HASH(type,data,size) -// It is an eCMD requirement that these functions have a "C" symbol -// because they may be used from a dynamically linked shared library -extern "C" -{ - -/** - * @brief Assert that an expression is true. Aborting the process if false. - * - * @note Implemented by platform code - * - * @param[in] i_expression If not true then process should be aborted - */ -void fapiAssert(bool i_expression); - -/** - * @brief Delay this thread. Hostboot will use the nanoseconds parameter - * and make a syscall to nanosleep. While in the syscall, the hostboot - * kernel will continue to consume CPU cycles as it looks for a runnable - * task. When the delay time expires, the task becomes runnable and will soon - * return from the syscall. Callers of delay() in the hostboot environment - * will likely have to know the mHz clock speed they are running on and - * compute a non-zero value for i_nanoSeconds. - * - * On the FSP, it was sometimes acceptable to just provide zero for the - * sleep delay time, causing the task to yield its time slice. By the - * time the calling task could run again, it was pretty certain enough - * host cycles had past. This is probably not acceptable in - * the hostboot environment. Callers should calculate and provide a - * sleep value in nanoseconds relative to host clock speed. - * - * On FSP when VBU is the target, then the i_simCycles parameter will be - * used instead. The FSP needs to use the simdispatcher client/server - * API and issue a command to the awan to advance the simulation the - * specified number of cycles. - * - * @param[in] i_nanoSeconds nanoseconds to sleep - * @param[in] i_simCycles count of Awan cycles to advance - * - * @return ReturnCode. Zero on success, else platform specified error. - */ -fapi::ReturnCode fapiDelay(uint64_t i_nanoSeconds, uint64_t i_simCycles); - -namespace fapi -{ -/** - * @brief Enumeration of error log severity. - */ -enum fapiErrlSeverity_t -{ - FAPI_ERRL_SEV_RECOVERED = 0x10, //Not seen by customer - FAPI_ERRL_SEV_PREDICTIVE = 0x20, //Error recovered but customer will see - FAPI_ERRL_SEV_UNRECOVERABLE = 0x40 //Unrecoverable, general -}; - -} - -/** - * @brief Log an error. - * - * This function can be called by HWP to log an error. - * - * @note Implemented by platform code - * - * @param[in,out] io_rc Reference to ReturnCode (Any references to data and error - * target are removed and rc value is set to success after - * function ends.) - * @param[in] i_sev Fapi error log severity defaulted to unrecoverable - * @param[in] i_unitTestError - flag to log error which does not cause a unit - * test to fail. - * - * Example usage:
- * fapi::ReturnCode l_rc;
- * fapi::fapiErrlSeverity_t l_sev = fapi::FAPI_ERRL_SEV_UNRECOVERABLE;
- * FAPI_EXEC_HWP(l_rc, function1, i_target);
- * if (!l_rc)
- * {
- * fapiLogError(l_rc, l_sev);
- * }
- * - * FAPI_EXEC_HWP(l_rc, function2, i_target)
- * return rc;
- */ -void fapiLogError(fapi::ReturnCode & io_rc, - fapi::fapiErrlSeverity_t i_sev = - fapi::FAPI_ERRL_SEV_UNRECOVERABLE, - bool i_unitTestError=false); - -/** @brief This function answers the question, is scand tracing turned on? - * The implementation of this function is specific to the platform. - * - * @returns Boolean indication - */ -bool platIsScanTraceEnabled(); - -/** @brief Alter the state of scand tracing. - * The implementation of this function is specific to the platform. - * - * @param[in] i_enable True to enable or false to disable scan trace. - * @return void - */ -void platSetScanTrace(bool i_enable); - -/** @brief Load the initfile - * - * This function can be called by a HWP to load an initfile. - * - * @note Implemented by platform code. Platform code is - * responsible for allocating any memory needed to load - * the initfile. - * - * @param[in] i_Target reference to the target - * @param[in] i_file the .if filename: \.if - * @param[out] o_addr address in memory where initfile is loaded - * @param[out] o_size size of memory allocated for initfile - * - * @return ReturnCode. Zero on success, else platform specified error. - */ -fapi::ReturnCode fapiLoadInitFile(const fapi::Target & i_Target, - const char * i_file, const char *& o_addr, size_t & o_size); - -/** @brief Unload the initfile - * - * This function can be called by a HWP to unload an initfile. - * - * @note Implemented by platform code. Platform code is - * responsible for deleting any allocated memory. - * - * @param[in] i_file the .if filename: \.if - * @param[in,out] io_addr address in memory where initfile is loaded - * set to NULL on exit - * @param[in,out] io_size size of memory allocated for initfile - * set to 0 on exit - * - * @return ReturnCode. Zero on success, else platform specified error. - */ -fapi::ReturnCode fapiUnloadInitFile(const char * i_file, const char *& io_addr, - size_t & io_size); - -/** @brief Set a break point in the current procedure - * - * This function will suspend the calling istep/procedure. - * The procedure can be signaled to resume via a cmd through the - * istep dispatcher. - * @param[in] i_info Tag to send when at breakpoint - */ - -void fapiBreakPoint(uint32_t i_info); - -/** - * @brief Enable/Disable special wakeup on processor chip core(s) - * - * Special Wakeup Enable must be done when a HWP is doing an operation that - * requires core(s) to be awake (e.g. modifying the Sleep-Winkle image). For - * each Special Wakeup Enable call, there must be a subsequent Special Wakeup - * Disable call. - * - * This does not apply to SCOM operations, platforms must handle Special Wakeup - * for SCOM operations internally. - * - * If Special Wakeup is enabled, a core will not go to sleep (if already - * sleeping, it is woken up). If Special Wakeup is disabled, if there are no - * other active Enables, the core is allowed to sleep. - * - * @note Implemented by platform code calling the proc_cpu_special_wakeup HWP. - * This is a FAPI function because each platform may do different things - * Hostboot: Does nothing (cores cannot sleep while Hostboot running) - * FSP: Uses an algorithm to decide when to disable special wakeup - * Cronus: Does Special Wakeup enable/disable as requested - * - * @param[in] i_target - * TARGET_TYPE_PROC_CHIP: Enables/Disables Special Wakeup on all - * cores (EX chiplets) of the specified chip - * TARGET_TYPE_EX_CHIPLET: Enables/Disables Special Wakeup on the - * specified core (EX chiplet) - * @param[in] i_enable true = enable. false = disable. - * - * @return ReturnCode. Zero on success, else platform specified error. - */ -fapi::ReturnCode fapiSpecialWakeup(const fapi::Target & i_target, - const bool i_enable); - -} - -namespace fapi -{ - -/** - * @brief Check the type of a variable - * - * This function can be called to check that a variable type is as expected - */ -template -inline -void fapiCheckType(const T &) {} - -} - -#endif // FAPIUTIL_H_ diff --git a/src/include/usr/hwpf/hwp/occ/occ.H b/src/include/usr/hwpf/hwp/occ/occ.H deleted file mode 100644 index f81d4f73b..000000000 --- a/src/include/usr/hwpf/hwp/occ/occ.H +++ /dev/null @@ -1,57 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/occ/occ.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2013,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 */ -#ifndef OCC_H_ -#define OCC_H_ - -#include -#include - -namespace HBOCC { - /** - * @brief Starts OCCs on all Processors in the node - * This is intended to be used for AVP testing. - * - * @param[out] o_failedOccTarget: Pointer to the target failing - * loadnStartAllOccs - * @param[in] i_useSRAM: bool - use SRAM for OCC image, ie during IPL - * true if during IPL, false if at end of IPL (default) - * @return errlHndl_t Error log if OCC load failed - */ - errlHndl_t loadnStartAllOccs(TARGETING::Target *& o_failedOccTarget, - bool i_useSRAM = false); - - /** - * @brief Starts OCCs on all Processors in the node - * This is intended to be used for Open Power. - * - * @param[in] i_useSRAM: bool - use SRAM for OCC image, ie during IPL - * true if during IPL, false if at end of IPL (default) - * @return errlHndl_t Error log if OCC load failed - */ - errlHndl_t activateOCCs(bool i_useSRAM = false); - -} //end OCC namespace - -#endif diff --git a/src/include/usr/hwpf/hwp/occ/occAccess.H b/src/include/usr/hwpf/hwp/occ/occAccess.H deleted file mode 100644 index 4846330d5..000000000 --- a/src/include/usr/hwpf/hwp/occ/occAccess.H +++ /dev/null @@ -1,72 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/occ/occAccess.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2014,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 */ -#ifndef OCCACCESS_H_ -#define OCCACCESS_H_ - -#include -#include -#include -#include - -namespace HBOCC -{ - - /** - * @brief Read OCC SRAM - * - * @param[in] i_pTarget PROC or OCC target pointer - * @param[in] i_addr OCI Address to be used for the operation - * @param[in,out] io_dataBuf Reference to data buffer - * @return errlHndl_t Error log if operation failed - */ - errlHndl_t readSRAM(const TARGETING::Target*i_pTarget, - const uint32_t i_addr, - ecmdDataBufferBase & io_dataBuf); - - /** - * @brief Write OCC SRAM - * - * @param[in] i_pTarget PROC or OCC target pointer - * @param[in] i_addr OCI Address to be used for the operation - * @param[in] i_dataBuf Reference to data buffer - * @return errlHndl_t Error log if operation failed - */ - errlHndl_t writeSRAM(const TARGETING::Target*i_pTarget, - const uint32_t i_addr, - ecmdDataBufferBase & io_dataBuf); - - /** - * @brief Write OCC Circular Buffer - * - * @param[in] i_pTarget PROC or OCC target pointer - * @param[in] i_dataBuf Reference to data buffer - * @return errlHndl_t Error log if operation failed - */ - errlHndl_t writeCircularBuffer(const TARGETING::Target*i_pTarget, - ecmdDataBufferBase & i_dataBuf); - -} //end OCC namespace - -#endif diff --git a/src/include/usr/hwpf/hwp/occ/occ_common.H b/src/include/usr/hwpf/hwp/occ/occ_common.H deleted file mode 100644 index 48dbd1142..000000000 --- a/src/include/usr/hwpf/hwp/occ/occ_common.H +++ /dev/null @@ -1,180 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/occ/occ_common.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2014,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 */ -#ifndef OCC_COMMON_H -#define OCC_COMMON_H - -#include -#include -#include - -namespace HBOCC -{ - /* - * @brief Host config data consumed by OCC - */ - struct occHostConfigDataArea_t - { - uint32_t version; - - //For computation of timebase frequency - uint32_t nestFrequency; - - // For determining the interrupt type to Host - // 0x00000000 = Use FSI2HOST Mailbox - // 0x00000001 = Use OCC interrupt line through PSIHB complex - uint32_t interruptType; - - // For informing OCC if it is the FIR master: - // 0x00000000 = Default - // 0x00000001 = FIR Master - uint32_t firMaster; - - // FIR collection configuration data needed by FIR Master - // OCC in the event of a checkstop - uint8_t firdataConfig[3072]; - }; - - enum - { - OccHostDataVersion = 3, - PRE_FIR_MASTER_VERSION = 2, - - OCC_LIDID = 0x81e00430, - OCC_IBSCOM_RANGE_IN_MB = MEGABYTE, - - // Interrupt Types - USE_FSI2HOST_MAILBOX = 0x00000000, - USE_PSIHB_COMPLEX = 0x00000001, - - // FIR Master - NOT_FIR_MASTER = 0x00000000, - IS_FIR_MASTER = 0x00000001, - - // SRAM Address for OCC Main App - OCC_SRAM_ADDRESS = 0xFFF80000, - - // SRAM Address and length for FIR HOMER data - OCC_SRAM_FIR_DATA = 0xFFFF5000, - OCC_SRAM_FIR_LENGTH = 0x1000, - - // offsets for OCC loading during IPL - OCC_OFFSET_LENGTH = 0x48, - OCC_OFFSET_IPL_FLAG = 0x82, - OCC_OFFSET_FREQ = 0x84, - - }; - - enum occAction_t - { - OCC_START, - OCC_STOP, - }; - /** - * @brief Sets up OCC Host data in Homer - * - * @param[in] i_proc: target processor to load - * @param[in] i_occHostDataVirtAddr Virtual - * address of current - * proc's Host data area. - * - * @return errlHndl_t Error log Host data setup failed - */ - errlHndl_t loadHostDataToHomer(TARGETING::Target* i_proc, - void* i_occHostDataVirtAddr); - -#ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS - /** - * @brief Sets up OCC Host data in SRAM - * - * @param[in] i_proc: target processor to load - * @param[in] i_curHW: enum indicating which HW is currently known - * - * @return errlHndl_t Error log Host data setup failed - */ - errlHndl_t loadHostDataToSRAM(TARGETING::Target* i_proc, - const PRDF::HwInitialized_t i_curHw = PRDF::ALL_HARDWARE); -#endif - - /** - * @brief Execute procedures and steps required to load - * OCC data in a specified processor - * - * @param[in] i_target: Target processor - * @param[in] i_occImgPaddr: Physical address of current - * proc's OCC image in the homer - * @param[in] i_occImgVaddr: Virtual address of current - * proc's OCC image int the homer - * @param[in] i_commonPhysAddr: Physical address of common - * OCC region - * @param[in] i_useSRAM: bool - use SRAM for OCC image, ie during IPL - * true if duringIPL, false if at end of IPL (default) - * @return errlHndl_t Error log if loadOCC failed - */ - errlHndl_t loadOCC(TARGETING::Target* i_target, - uint64_t i_occImgPaddr, - uint64_t i_occImgVaddr, - uint64_t i_commonPhysAddr, - bool i_useSRAM = false); - - /** - * @brief Start OCC for specified DCM pair of processors. - * If 2nd input is NULL, OCC will be setup on just - * one target. - * - * @param[in] i_target0: target of first processor in DCM pair - * @param[in] i_target1: target of second processor in DCM pair - * @param[out] o_failedTarget failed target in case of an error - * - * @return errlHndl_t Error log of startOCC failed - */ - errlHndl_t startOCC (TARGETING::Target* i_target0, - TARGETING::Target* i_target1, - TARGETING::Target *& o_failedTarget); - /** - * @brief Stop OCC for specified DCM pair of processors. - * If 2nd input is NULL, OCC will be setup on just - * one target. - * - * @param[in] i_target0: target of first processor in DCM pair - * @param[in] i_target1: target of second processor in DCM pair - * - * @return errlHndl_t Error log of stopOCC failed - */ - errlHndl_t stopOCC(TARGETING::Target * i_target0, - TARGETING::Target * i_target1); - - /** - * @brief Stops OCCs on all Processors in the node - * Function will attempt to stop all OCCs and commit - * logs inline. An error will only be returned for - * very unexpected software fails. - * - * @return errlHndl_t Error log if OCC load failed - */ - errlHndl_t stopAllOCCs(); - -} //namespace HBOCC ends - -#endif diff --git a/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H b/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H deleted file mode 100755 index 88c7d47ef..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H +++ /dev/null @@ -1,261 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ -/* [+] 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 fapiPlatAttrOverrideSync.H - * - * @brief Defines the AttrOverrideSync class that contains functions for - * Attribute Override and Sync - */ - -#ifndef FAPIPLATATTROVERRIDESYNC_H_ -#define FAPIPLATATTROVERRIDESYNC_H_ - -//****************************************************************************** -// Includes -//****************************************************************************** -#include -#include -#include -#include -#include -#include - -//****************************************************************************** -// Interface -//****************************************************************************** -namespace TARGETING -{ - errlHndl_t getAttrOverrides(PNOR::SectionInfo_t &i_sectionInfo, - AttributeTank* io_tanks[AttributeTank::TANK_LAYER_LAST]); -} -namespace RT_TARG -{ - int apply_attr_override(uint8_t* i_data, - size_t i_size ); -} - -namespace fapi -{ - -// Forward references -class AttrOverrideSync; -class Target; - -/** - * @brief Return the AttrOverrideSync Singleton. Other modules must call this - * rather than using Singleton<> - * - * @return Reference to the AttrOverrideSync Singleton - */ -AttrOverrideSync & theAttrOverrideSync(); - -/** - * @class AttrOverrideSync - * - * This class contains the FAPI Attribute Override and Sync tanks. It provides - * functions to: - * - Monitor for incoming attribute override/sync messages from the FSP - * - Send attribute override/syncs to the FSP - * - Return any attribute override on an attribute get - * - Cancel any non-const attribute override and save the attribute in the sync - * tank on an attribute set - */ -class AttrOverrideSync -{ -public: - /** - * @brief Allow a debug tool to directly access the override tank - */ - friend void directOverride(); - - /** - * @brief Allow a attribute override to directly access the override tank - */ - friend errlHndl_t TARGETING::getAttrOverrides( - PNOR::SectionInfo_t &i_sectionInfo, - TARGETING::AttributeTank* - io_tanks[TARGETING::AttributeTank::TANK_LAYER_LAST]); - friend int RT_TARG::apply_attr_override(uint8_t* i_data, - size_t i_size ); - - /** - * @brief Maximum size of a direct attribute override - */ - static const size_t MAX_DIRECT_OVERRIDE_ATTR_SIZE_BYTES = 64; - - /** - * @brief Attribute Override/Sync Mailbox Message Type Constants - * These must be kept in sync with FSP firmware - */ - enum MAILBOX_MSG_TYPE - { - MSG_SET_OVERRIDES = MBOX::FIRST_UNSECURE_MSG + 0x10, // FSP<->Hb - MSG_CLEAR_ALL_OVERRIDES = MBOX::FIRST_UNSECURE_MSG + 0x11, // FSP<->Hb - MSG_SET_SYNC_ATTS = MBOX::FIRST_UNSECURE_MSG + 0x12, // FSP<--Hb - MSG_GET_OVERRIDES = MBOX::FIRST_UNSECURE_MSG + 0x13, // FSP<--Hb - }; - - /** - * @brief Default constructor - */ - AttrOverrideSync(); - - /** - * @brief Destructor - */ - ~AttrOverrideSync(); - - /** - * @brief Monitors for incoming attribute override messages from the FSP. - * This function never returns and must be called by a task - * specifically started to monitor for these messages - */ - void monitorForFspMessages(); - - /** - * @brief Sends Attribute Overrides and Syncs to the FSP - * - * This is called at the end of an IStep. For both FAPI/TARG tanks it: - * - Clears the FSP Attribute Overrides - * - Sends the Hostboot Attribute Overrides to the FSP - * - Sends the Hostboot Attribute Syncs to the FSP - */ - void sendAttrOverridesAndSyncsToFsp(); - - /** - * @brief Gets Attribute Overrides and Syncs from the FSP - * - * This is called at the start of a normal (non-istep) IPL if an attribute - * is set indicating that the FSP has attribute overrides in place - */ - void getAttrOverridesFromFsp(); - - /** - * @brief This function gets any Attribute Override on an attribute get - * - * This is called for those FAPI Attributes that do not map to Targeting - * attributes - their overrides live in the FAPI Attribute tanks. - * - * @param[in] i_attrId FAPI Attribute ID - * @param[in] i_pTarget Pointer to FAPI Target - * @param[in] o_pVal Pointer to attribute value - * - * @return true if an override exists and was written to o_pVal - */ - bool getAttrOverride(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - void * o_pVal) const; - - /** - * @brief This function gets any Attribute Override on an attribute get - * - * This is a wrapper that calls getAttrOverride on the AttrOverrideSync - * singleton, it should be called by external modules to avoid the - * performance penalty of calling theAttrOverrideSync() then getAttrOverride - * - * @param[in] i_attrId FAPI Attribute ID - * @param[in] i_pTarget Pointer to FAPI Target - * @param[in] o_pVal Pointer to attribute value - * - * @return true if an override exists and was written to o_pVal - */ - static bool getAttrOverrideFunc(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - void * o_pVal); - - /** - * @brief This function performs the actions required on an attribute set - * - * This is called for those FAPI Attributes that do not map to Targeting - * attributes - their overrides/syncs live in the FAPI Attribute tanks. - * - * - Any non-const attribute override is cleared - * - The attribute is saved to be synced to Cronus (if Cronus Sync enabled) - * - * @param[in] i_attrId FAPI Attribute ID - * @param[in] i_pTarget Pointer to FAPI Target - * @param[in] i_size Size of attribute value - * @param[in] i_pVal Pointer to attribute value - */ - void setAttrActions(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - const uint32_t i_size, - const void * i_pVal); - - /** - * @brief This function performs the actions required on an attribute set - * - * This is a wrapper that calls setAttrActions on the AttrOverrideSync - * singleton, it should be called by external modules to avoid the - * performance penalty of calling theAttrOverrideSync() then setAttrActions - * - * @param[in] i_attrId FAPI Attribute ID - * @param[in] i_pTarget Pointer to FAPI Target - * @param[in] i_size Size of attribute value - * @param[in] i_pVal Pointer to attribute value - */ - static void setAttrActionsFunc(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pTarget, - const uint32_t i_size, - const void * i_pVal); - -private: - - /** - * @brief Utility function that sends attributes to the FSP - * - * This function frees the allocated memory in the input vector of chunks - * and empties the vector - * - * @param[in] i_msgType Message type (ID) to send - * @param[in] i_tankLayer Tank Layer to send attribute to - * @param[io] io_attributes Attributes to send. - * - * @return error log handle - */ - static errlHndl_t sendAttrsToFsp( - const MAILBOX_MSG_TYPE i_msgType, - const TARGETING::AttributeTank::TankLayer i_tankLayer, - std::vector & - io_attributes); - - /** - * @brief Utility function that gets the target type of a FAPI Target as - * used in an attribute tank - * - * @param[in] i_pTarget Pointer to FAPI Target (NULL = system) - * - * @return Target Type - */ - static uint32_t getTargetType(const fapi::Target * const i_pTarget); - - // The FAPI Attribute Tanks - TARGETING::AttributeTank iv_overrideTank; - TARGETING::AttributeTank iv_syncTank; -}; - -} // namespace fapi - -#endif // FAPIPLATATTROVERRIDESYNC_H_ diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H deleted file mode 100644 index cfadb2cca..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ /dev/null @@ -1,3071 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatAttributeService.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2011,2015 */ -/* [+] Google Inc. */ -/* [+] 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 fapiPlatAttributeService.H - * - * @brief Defines the PLAT attribute access macros and the functions that - * access attributes - * - * Note that platform code must provide the code. - */ - -#ifndef FAPIPLATATTRIBUTESERVICE_H_ -#define FAPIPLATATTRIBUTESERVICE_H_ - -//****************************************************************************** -// Includes -//****************************************************************************** - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//****************************************************************************** -// Interface -//****************************************************************************** - -namespace fapi -{ - -namespace platAttrSvc -{ - -/** - * @brief Compile time check that a variable is the same type as a Targeting - * attribute. - * - * Used when mapping a FAPI Attribute to a Targeting attribute to ensure that - * the type is correct, if not correct then this function will not be found - * and a compile error will result - * - * @param[in] T Type of Targeting attribute - * @param[in] Reference to user's FAPI Attribute variable that must be of - * type T - */ -template void failIfTargTypeMismatch(T &) { } - -/** - * @brief Gets a Targeting attribute, this is called by the macro that maps a - * FAPI Attribute get to a TARGETING attribute and should not be called - * directly - * - * @param[in] i_pFapiTarget Pointer to FAPI Target - * @param[in] i_targAttrId TARGETING Attribute ID - * @param[in] i_attrSize Size of attribute in bytes - * @param[in] o_pAttr Pointer to attribute where value is copied to - * - * @return ReturnCode - */ -fapi::ReturnCode getTargetingAttr(const fapi::Target * i_pFapiTarget, - const TARGETING::ATTRIBUTE_ID i_targAttrId, - const uint32_t i_attrSize, - void * o_pAttr); - -/** - * @brief Sets a Targeting attribute, this is called by the macro that maps a - * FAPI Attribute set to a TARGETING attribute and should not be called - * directly - * - * @param[in] i_pFapiTarget Pointer to FAPI Target - * @param[in] i_targAttrId TARGETING Attribute ID - * @param[in] i_attrSize Size of attribute in bytes - * @param[in] i_pAttr Pointer to attribute where value is retrieved from - * - * @return ReturnCode - */ -fapi::ReturnCode setTargetingAttr(const fapi::Target * i_pFapiTarget, - const TARGETING::ATTRIBUTE_ID i_targAttrId, - const uint32_t i_attrSize, - void * i_pAttr); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when accessing - * an attribute where zero needs to be returned. The use-case is for attributes - * that exist solely for overriding - * - * @param[out] o_data Pointer to user's attribute variable - * @param[in] i_len Size of o_data - * @return ReturnCode. Zero on success, else platform specified error - */ -inline fapi::ReturnCode fapiPlatGetZeroAttrData(void * o_data, - size_t i_len) -{ - memset(o_data, 0, i_len); - return fapi::FAPI_RC_SUCCESS; -} - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when accessing - * SPD ATTR. It should not be called directly - * - * @param[in] i_pFapiTarget Target pointer to operate on - * @param[in] i_keyword SPD keyword - * @param[out] o_data Address of Storage for saving the attribute value - * @param[in] i_len Size of storage - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetSpdAttr(const fapi::Target * i_pFapiTarget, - const uint16_t i_keyword, - void * o_data, - size_t i_len ); - -/** - * @brief This function is called by the FAPI_ATTR_SET macro when accessing - * SPD ATTR. It should not be called directly - * - * @param[in] i_pFapiTarget Target pointer to operate on - * @param[in] i_keyword SPD keyword - * @param[in] i_data Pointer to data - * @param[in] i_len Size of data - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatSetSpdAttr(const fapi::Target * i_pFapiTarget, - const uint16_t i_keyword, - void * i_data, - size_t i_len ); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_CEN_DQ_TO_DIMM_CONN_DQ. It should not be called directly - * - * @param[in] i_pDimmFapiTarget DIMM target pointer - * @param[out] o_data Output data - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetDqMapping(const fapi::Target * i_pDimmFapiTarget, - uint8_t (&o_data)[DIMM_DQ_NUM_DQS]); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_NAME. It should not be called directly - * - * @param[in] i_pFapiTarget Target pointer - * @param[out] o_name Output Name (from enum ATTR_NAME_Enum) - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetTargetName(const fapi::Target * i_pFapiTarget, - uint8_t & o_name); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_MODULE_TYPE. It should not be called directly - * - * @param[in] i_pFapiTarget Target pointer - * @param[out] o_name Output Name (from enum ATTR_MODULE_TYPE_Enum) - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetModuleType(const fapi::Target * i_pFapiTarget, - 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_pFapiTarget 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_pFapiTarget, - uint8_t & o_functional); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_POS. It should not be called directly - * - * This is needed because the HWPF attribute is a uint32_t and the Hostboot - * attribute is a uint16_t so a direct map will not work - * - * @param[in] i_pFapiTarget Target pointer - * @param[out] o_pos Output Posititon - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetTargetPos(const fapi::Target * i_pFapiTarget, - uint32_t & o_pos); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_NX_ENABLE, ATTR_PROC_PCIE_ENABLE, ATTR_PROC_L3_ENABLE, - * ATTR_PROC_A_ENABLE, and ATTR_PROC_X_ENABLE. - * It should not be called directly - * - * @param[in] i_id Fapi Attribute Id - * @param[in] i_pFapiTarget Target pointer - * @param[out] o_enable Output enable state - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetEnableAttr( fapi::AttributeId i_id, - const fapi::Target * i_pFapiTarget, uint8_t & o_enable ); - -//------------------------------------------------------------------------------ -// Prototypes to support proc_setup_bars_memory_attributes -// See proc_setup_bars_memory_attributes.xml for detailed descriptions -//------------------------------------------------------------------------------ -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_FOREIGN_NEAR_BASE . - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_foreignNearBase Foreign (near) address region base address - * @note: the array size of 2 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcForeignNearBase ( - const fapi::Target * i_pTarget, - uint64_t (&o_foreignNearBase)[ 2 ] ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_FOREIGN_NEAR_SIZE . - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_foreignNearSize Size of foreign (near) region - * @note: the array size of 2 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcForeignNearSize ( - const fapi::Target * i_pTarget, - uint64_t (&o_foreignNearSize)[ 2 ] ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_FOREIGN_FAR_BASE . - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_foreignFarBase Foreign (far) address region base address - * @note: the array size of 2 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcForeignFarBase ( - const fapi::Target * i_pTarget, - uint64_t (&o_foreignFarBase)[ 2 ] ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_FOREIGN_FAR_SIZE . - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_foreignFarSize Size of foreign (far) region - * @note: the array size of 2 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcForeignFarSize ( - const fapi::Target * i_pTarget, - uint64_t (&o_foreignFarSize)[ 2 ] ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_HA_BASE . - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_haBase HA logging base address - * @note: the array size of 8 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcHaBase ( - const fapi::Target * i_pTarget, - uint64_t (&o_haBase)[ 8 ] ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_HA_SIZE . - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_haSize Size of HA memory region - * @note: the array size of 8 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcHaSize ( - const fapi::Target * i_pTarget, - uint64_t (&o_haBase)[ 8 ] ); -//------------------------------------------------------------------------------ -// Prototypes to support proc_setup_bars_mmio_attributes -// see proc_setup_bars_mmio_attributes for detailed descriptions -//------------------------------------------------------------------------------ -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_PSI_BRIDGE_BAR_ENABLE - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_psiBridgeBarEnable PSI Bridge BAR enable - * @return ReturnCode. Zero on success, else platform specified error - */ - -fapi::ReturnCode fapiPlatGetProcPsiBridgeBarEnable ( - const fapi::Target * i_pTarget, - uint8_t &o_psiBridgeBarEnable ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_FSP_BAR_ENABLE - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_fspBarEnable FSP BAR enable - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcFspBarEnable ( - const fapi::Target * i_pTarget, - uint8_t &o_fspBarEnable ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_INTP_BAR_ENABLE - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_intpBarEnable INTP BAR enable - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcIntpBarEnable ( - const fapi::Target * i_pTarget, - uint8_t &o_intpBarEnable ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_NX_MMIO_BAR_ENABLE - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_nxMmioBarEnable NX MMIO BAR enable - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcNxMmioBarEnable( - const fapi::Target * i_pTarget, - uint8_t &o_nxMmioBarEnable ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_NX_MMIO_BAR_SIZE - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_nxMmioBarSize NX MMIO BAR size value - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcNxMmioBarSize ( - const fapi::Target * i_pTarget, - uint64_t &o_nxMmioBarSize ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_PCIE_BAR_ENABLE - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_pcieBarEnable PCIE BAR enable - * @note: the array size of 3,3 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcPcieBarEnable ( - const fapi::Target * i_pTarget, - uint8_t (&o_pcieBarEnable) [4][3] ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_PCIE_BAR_BASE_ADDR_ - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_pcieBarBase PCIE BAR base address value - * @note: the array size of 3,3 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcPcieBarBaseAddr ( - const fapi::Target * i_pTarget, - uint64_t (&o_pcieBarBase) [4][3] ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_PROC_PCIE_BAR_SIZE - * It should not be called directly. - * - * @param[in] i_pTarget Target pointer - * @param[out] o_pcieBarSize PCIE BAR size value - * @note: the array size of 3,3 was pulled from - * the xml file and is not expected to change. - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetProcPcieBarSize ( - const fapi::Target * i_pTarget, - uint64_t (&o_pcieBarSize) [4][3] ); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * ATTR_EX_L2_SINGLE_MEMBER_ENABLE. It should not be called directly. - * - * @param[in] i_pTarget Target MB pointer - * @param[out] o_val ATTR_EX_L2_SINGLE_MEMBER_ENABLE value - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetSingleMemberEnableAttr( - const fapi::Target * i_pTarget, - uint32_t & o_val); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the Address Mirroring Data attributes - * It should not be called directly. - * - * @param[in] i_pTarget Target mba pointer - * @param[out] o_val Address Mirroring Data for mba - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetAddrMirrorData ( - const fapi::Target * i_pTarget, - uint8_t (&o_val) [2][2] ); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the vpd attributes - * It should not be called directly. - * - * @param[in] i_pTarget Target MB pointer - * @param[in] i_attr Attribute Id - * @param[out] o_pVal Pointer to variable typed output values - * @param[in] i_valSize Size of output variable - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetAttrData ( - const fapi::Target * i_pTarget, - const fapi::AttributeId i_attr, - void * o_pVal, - const size_t i_valSize); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the Slope Intercept Data attributes - * It should not be called directly. - * - * @param[in] i_pTarget Target MB pointer - * @param[in] i_attr Slope Intercept Data attribute enumerator - * @param[out] o_Val Slope Intercept Data - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetSlopeInterceptData ( - const fapi::Target * i_pTarget, - const fapi::MBvpdSlopeIntercept i_attr, - uint32_t & o_val); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the sensor map attributes - * It should not be called directly. - * - * @param[in] i_pTarget Target MB pointer - * @param[in] i_attr Sensor map attribute enumerator - * @param[out] o_Val Sensor map data - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetSensorMap ( - const fapi::Target * i_pTarget, - const fapi::MBvpdSensorMap i_attr, - uint8_t & o_val); - -//------------------------------------------------------------------------------ -// Prototypes to support BAD_DQ_BITMAP attribute -// See dimm_spd_attributes.xml for detailed descriptions -//------------------------------------------------------------------------------ - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the Bad DQ Bitmap attribute - * It should not be called directly. - * - * @param[in] i_pTarget DIMM target pointer - * @param[out] o_data Bad DIMM DQ Bitmap - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatDimmGetBadDqBitmap ( - const fapi::Target * i_pTarget, - uint8_t (&o_data)[DIMM_DQ_MAX_DIMM_RANKS] - [DIMM_DQ_RANK_BITMAP_SIZE]); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the memory data version - * It should not be called directly. - * - * @param[in] i_pTarget Target DIMM pointer - * @param[out] o_val Memory Data version - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetMBvpdMemoryDataVersion( - const fapi::Target * i_pTarget, - uint32_t & o_val ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the SPDX/VSPD Record version - * It should not be called directly. - * - * @param[in] i_pTarget Target DIMM pointer - * @param[out] o_val SPDX/VSPD version - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetMBvpdSPDXRecordVersion ( - const fapi::Target * i_pTarget, - uint32_t & o_val ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the Voltage setting Data - * It should not be called directly. - * - * @param[in] i_pTarget Target DIMM pointer - * @param[out] o_val Voltage setting Data - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetMBvpdVoltageSettingData ( - const fapi::Target * i_pTarget, - uint32_t & o_val ); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the vpd version - * It should not be called directly. - * - * @param[in] i_pTarget Target DIMM pointer - * @param[out] o_val vpd version - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetVpdVersion ( - const fapi::Target * i_pTarget, - uint32_t & o_val ); - - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the Dram 2N Mode Enabled attribute - * It should not be called directly. - * - * @param[in] i_pTarget Target mba pointer - * @param[out] o_val Dram 2N Mode Enabled attr enumeration value - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetDram2NModeEnabled ( - const fapi::Target * i_pTarget, - uint8_t & o_val ); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro and - * FAPI_ATTR_SET macro when getting or setting the L4 Bank Delete - * record VSPD keyword MX vpd value - * It should not be called directly. - * - * @param[in] i_pTarget Target MB pointer - * @param[in,out] io_val Retrieved or value to set - * @param[in] i_mode Get or Set mode - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatL4BankDelete ( - const fapi::Target * i_pTarget, - uint32_t & io_val, - const fapi::MBvpdL4BankDeleteMode i_mode ); -/** - * @brief This function is called by the FAPI_ATTR_SET macro when setting - * the Bad DQ Bitmap attribute - * It should not be called directly. - * - * @param[in] i_pTarget DIMM target pointer - * @param[in] i_data Bad DIMM DQ Bitmap - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatDimmSetBadDqBitmap ( - const fapi::Target * i_pTarget, - uint8_t (&i_data)[DIMM_DQ_MAX_DIMM_RANKS] - [DIMM_DQ_RANK_BITMAP_SIZE]); - -//------------------------------------------------------------------------------ -// Prototype to support VPD_DIMM_SPARE attribute -// See dimm_spd_attributes.xml for detailed description -//------------------------------------------------------------------------------ - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the VPD DIMM Spare attribute - * It should not be called directly. - * - * @param[in] i_pTarget MBA target pointer - * @param[out] o_data Spare DRAM availability for all DIMMs on MBA - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatDimmGetSpareDram ( - const fapi::Target * i_pTarget, - uint8_t (&o_data)[DIMM_DQ_MAX_MBA_PORTS] - [DIMM_DQ_MAX_MBAPORT_DIMMS] - [DIMM_DQ_MAX_DIMM_RANKS]); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * PLL ring attributes. It should not be called directly. - * - * @param[in] i_targAttrId fapi attribute ID - * @param[in] i_target Target pointer to operate on - * @param[in] o_data Pointer to ring data (or flush data) - */ -fapi::ReturnCode fapiPlatGetPllAttr(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pChipTarget, - uint8_t *o_data); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * PLL ring attributes. It should not be called directly. - * - * @param[in] i_targAttrId fapi attribute ID - * @param[in] i_target Target pointer to operate on - * @param[in] o_pllRingLength PLL ring length - */ -fapi::ReturnCode fapiPlatGetPllAttr(const fapi::AttributeId i_attrId, - const fapi::Target * const i_pChipTarget, - uint32_t (&o_pllRingLength)); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * PLL ring info attributes. It should not be called directly. - * - * @param[in] i_pProcChip Pointer to Processor Chip fapi target - * @param[in] i_attr The Attribute to get - * @param[out] o_pVal Pointer to data buffer filled in with attribute data - * @param[in] i_len Size of o_pVal - */ -fapi::ReturnCode fapiPlatGetPllInfoAttr( - const fapi::Target * i_pProcChip, - const fapi::getPllRingInfo::Attr i_attr, - void * o_pVal, - const size_t i_len); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * DIMM SPD Attributes that are handled by an Accessor HWP - * It should not be called directly. - * - * @param[in] i_pDimm DIMM target pointer - * @param[in] i_attr Attribute ID - * @param[out] o_pVal Pointer to output variable - * @param[in] i_len Size of o_pVal - * @return ReturnCode. Zero on success, else error - */ -fapi::ReturnCode fapiPlatGetSpdAttrAccessor ( - const fapi::Target * i_pDimm, - const fapi::getSpdAttr::Attr i_attr, - void * o_pVal, - size_t i_len); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_PROC_EX_FUNC_L3_DELTA_DATA 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 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_PROC_EX_FUNC_L3_LENGTH attribute. It should not be called - * directly. - * - * @param[in] i_pProcTarget Processor Chip Target pointer - * @param[out] o_ringLength length of decompressed ring - */ -fapi::ReturnCode fapiPlatGetL3Length(const fapi::Target * i_pProcTarget, - uint32_t (&o_ringLength)); -/** - * @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); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_TDP_RDP_CURRENT_FACTOR 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 fapiPlatGetTdpRdpCurrentFactor - (const fapi::Target * i_pProcTarget, - uint32_t &o_val); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_SPD_MODSPEC_COM_REF_RAW_CARD attribute. - * It should not be called directly. - * - * @param[in] i_pDimmTarget Dimm Target pointer - * @param[out] o_data Reference to output data - */ -fapi::ReturnCode fapiPlatGetSpdModspecComRefRawCard - (const fapi::Target * i_pDimmTarget, - uint8_t &o_val); -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_SPD_MODSPEC_COM_REF_RAW_CARD attribute. - * ATTR_OSCSWITCH_CNTL0,1,2 attributes. It should not be called - * directly. - * - * @param[in] i_pProcTarget Processor Chip Target pointer - * @param[in] i_attr Attribute selection - * @param[out] o_pVal Pointer to output variable - * @param[in] i_len Size of o_pVal - */ -fapi::ReturnCode fapiPlatGetOscswitchCtl - (const fapi::Target * i_pProcTarget, - const fapi::getOscswitchCtl::Attr i_attr, - void * o_pVal, - const size_t i_len); - -/** - * @brief This function supports a new memory attribute. Called by the - * FAPI_ATTR_GET macro when getting the ATTR_VPD_POWER_CONTROL_CAPABLE - * attribute. - * It should not be called directly. - * - * @param[in] i_pTarget Mem Buf Target pointer - * @param[out] o_val Pointer to output variable - * - */ -fapi::ReturnCode fapiPlatGetControlCapable(const fapi::Target * i_pTarget, - uint8_t & o_val); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_VPD_ISDIMMTOC4DQ attribute. - * It should not be called directly - * - * @param[in] i_pTarget MBA Target pointer - * @param[out] o_val Pointer to output array - */ -fapi::ReturnCode getIsDimmToC4DQ - (const fapi::Target * i_pTarget, - uint8_t (&o_val) [DIMM_TO_C4_PORTS][DIMM_TO_C4_DQ_ENTRIES]); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_VPD_ISDIMMTOC4DQS attribute. - * It should not be called directly. - * - * @param[in] i_pTarget MBA Target pointer - * @param[out] o_val Pointer to the output array - */ -fapi::ReturnCode getIsDimmToC4DQS - (const fapi::Target * i_pTarget, - uint8_t (&o_val) [DIMM_TO_C4_PORTS][DIMM_TO_C4_DQS_ENTRIES]); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * the ATTR_SPD_DIMM_RCD_CNTL_WORD_0_15 attribute. - * It should not be called directly. - * - * @param[in] i_pTarget Mem Buf Target pointer - * @param[out] o_val Pointer to output variable - * - */ -fapi::ReturnCode fapiPlatGetRCDCntlWord015 (const fapi::Target * i_pTarget, - uint64_t & o_val); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_PROC_PERV_VITL_LENGTH attribute. It should not be called - * directly. - * - * @param[in] i_pProcTarget Processor Chip Target pointer - * @param[out] o_ringLength length of decompressed ring - */ -fapi::ReturnCode fapiPlatGetPervVitlRingLengthAttr( - const fapi::Target * i_pProcTarget, - uint32_t (&o_ringLength)); - - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_PROC_TP_VITL_SPY_LENGTH attribute. It should not be called - * directly. - * - * @param[in] i_pProcTarget Processor Chip Target pointer - * @param[out] o_spyLength length of the spy - */ -fapi::ReturnCode fapiPlatGetTpVitlSpyLengthAttr( - const fapi::Target * i_pProcTarget, - uint32_t (&o_spyLength)); - -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * ATTR_PROC_TP_VITL_SPY_OFFSETS attribute. It should not be called - * directly. - * - * @param[in] i_pProcTarget Processor Chip Target pointer - * @param[out] o_offsets Reference to output spy offsets - */ -fapi::ReturnCode fapiPlatGetTpVitlSpyOffsetAttr( - const fapi::Target * i_pProcTarget, - uint32_t (&o_data)[SPY_OFFSET_SIZE]); -/* - * @brief This function is called by the FAPI_ATTR_GET macro when getting - * certain memory attributes at node level - * It should not be called directly. - * - * @param[in] i_pTarget Target Centaur pointer - * @param[in] i_attr Attribute Id - * @param[out] o_val Attribute Value - * @return ReturnCode. Zero on success, else platform specified error - */ -fapi::ReturnCode fapiPlatGetNodeMemAttrData ( - const fapi::Target * i_pTarget, - const TARGETING::ATTRIBUTE_ID i_attr, - uint32_t & o_val); - -} // namespace platAttrSvc - -} // namespace fapi - -/** - * @brief Macro that directly maps a FAPI_ATTR_GET to a Targeting attr get - * - * Firstly there is a compile time check that the user's VAL variable matches - * the Targeting attribute type, this is optimized out, then there is a - * single function call - */ -#define FAPI_PLAT_ATTR_SVC_GETMACRO_DIRECT(ID, PTARGET, VAL) \ - (fapi::platAttrSvc::failIfTargTypeMismatch \ - ::Type>(VAL), \ - fapi::platAttrSvc::getTargetingAttr(PTARGET, \ - FAPI_PLAT_ATTR_SVC_MACRO_DIRECT_FAPI_##ID, sizeof(VAL), &(VAL))) - -/** - * @brief Macro that directly maps a FAPI_ATTR_SET to a Targeting attr set - * - * Firstly there is a compile time check that the user's VAL variable matches - * the Targeting attribute type, this is optimized out, then there is a - * single function call - */ -#define FAPI_PLAT_ATTR_SVC_SETMACRO_DIRECT(ID, PTARGET, VAL) \ - (fapi::platAttrSvc::failIfTargTypeMismatch \ - ::Type>(VAL), \ - fapi::platAttrSvc::setTargetingAttr(PTARGET, \ - FAPI_PLAT_ATTR_SVC_MACRO_DIRECT_FAPI_##ID, sizeof(VAL), &(VAL))) - -//------------------------------------------------------------------------------ -// MACRO to support the overriding of Chip EC Feature Attributes -//------------------------------------------------------------------------------ -#define PLAT_GET_CHIP_EC_FEATURE_OVERRIDE(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) - -//------------------------------------------------------------------------------ -// MACRO to support the RCD Control Word attribute -//------------------------------------------------------------------------------ -#define ATTR_SPD_DIMM_RCD_CNTL_WORD_0_15_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetRCDCntlWord015(PTARGET,VAL) -#define ATTR_VPD_DIMM_RCD_CNTL_WORD_0_15_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetRCDCntlWord015(PTARGET,VAL) - - -//------------------------------------------------------------------------------ -// MACRO to support the power control capable memory attribute -//------------------------------------------------------------------------------ -#define ATTR_VPD_POWER_CONTROL_CAPABLE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetControlCapable(PTARGET,VAL) - -//------------------------------------------------------------------------------ -// MACRO to support the DQ and DQS attributes. -//------------------------------------------------------------------------------ -#define ATTR_VPD_ISDIMMTOC4DQ_GETMACRO(ID,PTARGET,VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID,PTARGET,&VAL)?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::getIsDimmToC4DQ(PTARGET,VAL) - -#define ATTR_VPD_ISDIMMTOC4DQS_GETMACRO(ID,PTARGET,VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID,PTARGET,&VAL)?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::getIsDimmToC4DQS(PTARGET,VAL) - -//------------------------------------------------------------------------------ -// MACRO to support the MODULE TYPE attributes. -//------------------------------------------------------------------------------ - -#define ATTR_SPD_MODULE_TYPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL)?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetModuleType( PTARGET,VAL) - -//------------------------------------------------------------------------------ -// MACROs to route each ATTR_SPD access to the Hostboot SPD function -//------------------------------------------------------------------------------ -#define ATTR_SPD_DRAM_DEVICE_TYPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::BASIC_MEMORY_TYPE, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_DENSITY_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::DENSITY, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_ROWS_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::ROW_ADDRESS, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_COLUMNS_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::COL_ADDRESS, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_NUM_RANKS_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_RANKS, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_DRAM_WIDTH_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_DRAM_WIDTH, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_MEMORY_BUS_WIDTH_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_MEMORY_BUS_WIDTH, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FTB_DIVIDEND_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::FTB_DIVIDEND, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FTB_DIVISOR_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::FTB_DIVISOR, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MTB_DIVIDEND_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MTB_DIVIDEND, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MTB_DIVISOR_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MTB_DIVISOR, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TCKMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TCK_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TAAMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MIN_CAS_LATENCY, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TWRMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TWR_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRCDMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRCD_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRRDMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRRD_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRPMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRP_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRASMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRAS_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRCMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRC_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRFCMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRFC_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TWTRMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TWTR_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRTPMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRTP_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TFAWMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TFAW_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_OPTIONAL_FEATURES_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::SDRAM_OPTIONAL_FEATURES, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_THERMAL_AND_REFRESH_OPTIONS_GETMACRO(ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::SDRAM_THERMAL_REFRESH_OPTIONS, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_THERMAL_SENSOR_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_THERMAL_SENSOR, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_DEVICE_TYPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::SDRAM_DEVICE_TYPE, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_DEVICE_TYPE_SIGNAL_LOADING_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::SDRAM_DEVICE_TYPE_SIGNAL_LOADING, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_CUSTOM_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::CUSTOM, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_DIE_COUNT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::SDRAM_DIE_COUNT, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TCKMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TCKMIN_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TAAMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TAAMIN_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TRCDMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRCDMIN_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TRPMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRPMIN_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TRCMIN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRCMIN_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_NUM_OF_REGISTERS_USED_ON_RDIMM_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::RMM_REGS_RDIMM, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_SPECIFIC_SECTION_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_TYPE_SPECIFIC_SECTION, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_ID_MODULE_MANUFACTURERS_JEDEC_ID_CODE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_MANUFACTURER_ID, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_ID_MODULE_MANUFACTURING_LOCATION_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_MANUFACTURING_LOCATION, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_ID_MODULE_MANUFACTURING_DATE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_MANUFACTURING_DATE, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_ID_MODULE_SERIAL_NUMBER_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_SERIAL_NUMBER, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_CYCLICAL_REDUNDANCY_CODE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_CRC, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_PART_NUMBER_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_PART_NUMBER, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_DRAM_MANUFACTURER_JEDEC_ID_CODE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::DRAM_MANUFACTURER_ID, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_BAD_DQ_DATA_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::DIMM_BAD_DQ_DATA, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_BAD_DQ_DATA_SETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::setAttrActionsFunc(fapi::ID, PTARGET, sizeof(VAL), &(VAL)), \ - fapi::platAttrSvc::fapiPlatSetSpdAttr( PTARGET, SPD::DIMM_BAD_DQ_DATA, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_ADDR_MIRRORING_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_MIRRORING, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F0RC3_F0RC2_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F0RC3_F0RC2, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F0RC5_F0RC4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F0RC5_F0RC4, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F1RC11_F1RC8_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F1RC11_F1RC8, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F1RC13_F1RC12_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F1RC13_F1RC12, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F1RC15_F1RC14_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F1RC15_F1RC14, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F3RC9_F3RC8_FOR_800_1066_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F3RC9_F3RC8_800_1066, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F34RC11_F34RC10_FOR_800_1066_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F34RC11_F34RC10_800_1066, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F56RC11_F56RC10_FOR_800_1066_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F56RC11_F56RC10_800_1066, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F78RC11_F78RC10_FOR_800_1066_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F78RC11_F78RC10_800_1066, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F910RC11_F910RC10_FOR_800_1066_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F910RC11_F910RC10_800_1066, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_MR12_FOR_800_1066_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_MR12_800_1066, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F3RC9_F3RC8_FOR_1333_1600_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F3RC9_F3RC8_1333_1600, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F34RC11_F34RC10_FOR_1333_1600_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F34RC11_F34RC10_1333_1600, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F56RC11_F56RC10_FOR_1333_1600_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F56RC11_F56RC10_1333_1600, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F78RC11_F78RC10_FOR_1333_1600_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F78RC11_F78RC10_1333_1600, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F910RC11_F910RC10_FOR_1333_1600_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F910RC11_F910RC10_1333_1600, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_MR12_FOR_1333_1600_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_MR12_1333_1600, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F3RC9_F3RC8_FOR_1866_2133_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F3RC9_F3RC8_1866_2133, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F34RC11_F34RC10_FOR_1866_2133_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F34RC11_F34RC10_1866_2133, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F56RC11_F56RC10_FOR_1866_2133_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F56RC11_F56RC10_1866_2133, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F78RC11_F78RC10_FOR_1866_2133_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F78RC11_F78RC10_1866_2133, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_F910RC11_F910RC10_FOR_1866_2133_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_F910RC11_F910RC10_1866_2133, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_MR12_FOR_1866_2133_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_MR12_FOR_1866_2133, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_BANKS_DDR3_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::BANK_ADDRESS_BITS, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_CAS_LATENCIES_SUPPORTED_DDR3_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::CAS_LATENCIES_SUPPORTED, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_REVISION_CODE_DDR3_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_REVISION_CODE, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_NOMINAL_VOLTAGE_DDR3_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_NOMINAL_VOLTAGE, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_BANKGROUPS_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::BANK_GROUP_BITS, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_SDRAM_BANKS_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::BANK_ADDRESS_BITS_DDR4, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_NOMINAL_VOLTAGE_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_NOMINAL_VOLTAGE_DDR4, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TIMEBASE_MTB_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TIMEBASES_MTB, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TIMEBASE_FTB_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TIMEBASES_FTB, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TCKMAX_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TCK_MAX, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_CAS_LATENCIES_SUPPORTED_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::CAS_LATENCIES_SUPPORTED_DDR4, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRFC1MIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRFC1_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRFC2MIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRFC2_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRFC4MIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRFC4_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRRDSMIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRRDS_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TRRDLMIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRRDL_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_TCCDLMIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TCCDL_MIN, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TCCDLMIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TCCDL_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TRRDLMIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRRDL_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TRRDSMIN_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRRDS_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_FINE_OFFSET_TCKMAX_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TCKMAX_FINE_OFFSET, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_CRC_BASE_CONFIG_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::BASE_CONFIG_CRC, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODULE_REVISION_CODE_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_REVISION_CODE_DDR4, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_DRAM_STEPPING_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::DRAM_STEPPING, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_CRC_MNFG_SEC_DDR4_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MANUFACTURING_SECTION_CRC, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_REGISTER_MANF_ID_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODSPEC_MM_MFR_ID_CODE, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_DIMM_MODULE_ATTRIBUTES_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODSPEC_MM_ATTRIBS, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_ADDR_MAP_REG_TO_DRAM_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODSPEC_MM_ADDR_MAPPING, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_OUTPUT_DRV_STRENGTH_CNTL_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODSPEC_MM_DRV_STRENGTH_CNTL, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_REG_OUTPUT_DRV_STRENGTH_CK_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODSPEC_MM_DRV_STRENGTH_CK, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_VREF_DQ_RANK0_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_VREF_DQ_RANK0, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_VREF_DQ_RANK1_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_VREF_DQ_RANK1, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_VREF_DQ_RANK2_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_VREF_DQ_RANK2, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_VREF_DQ_RANK3_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_VREF_DQ_RANK3, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_BUF_VREF_DQ_FOR_DRAM_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_VREF_DQ_FOR_DRAM, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_BUF_MDQ_DRV_LESS_THAN_1866_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_MDQ_DRV_LT_1866, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_BUF_MDQ_DRV_1866_2400_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_MDQ_DRV_1866_2400, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_BUF_MDQ_DRV_2400_3200_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_MDQ_DRV_2400_3200, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_DRV_STRENGTH_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_DRV_STRENGTH, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_WR_LESS_THAN_1866_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_WR_LT_1866, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_NOM_LESS_THAN_1866_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_NOM_LT_1866, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_WR_1866_2400_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_WR_1866_2400, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_NOM_1866_2400_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_NOM_1866_2400, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_WR_2400_3200_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_WR_2400_3200, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_NOM_2400_3200_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_NOM_2400_3200, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_PARK_LESS_THAN_1866_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_PARK_LT_1866, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_PARK_1866_2400_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_PARK_1866_2400, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_LR_DRAM_ODT_RTT_PARK_2400_3200_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::LRMM_ODT_RTT_PARK_2400_3200, &(VAL), sizeof(VAL) ) - -//------------------------------------------------------------------------------ -// MACRO to route ATTR_CEN_DQ_TO_DIMM_CONN_DQ access to the correct Hostboot -// function -//------------------------------------------------------------------------------ -#define ATTR_CEN_DQ_TO_DIMM_CONN_DQ_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetDqMapping(PTARGET, VAL) - -//------------------------------------------------------------------------------ -// MACRO to route ATTR_NAME access to the correct Hostboot function -//------------------------------------------------------------------------------ -#define ATTR_NAME_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetTargetName(PTARGET, VAL) - -//------------------------------------------------------------------------------ -// MACRO to route ATTR_FUNCTIONAL access to the correct Hostboot function -//------------------------------------------------------------------------------ -#define ATTR_FUNCTIONAL_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetFunctional(PTARGET, VAL) - -//------------------------------------------------------------------------------ -// MACRO to route ATTR_POS access to the correct Hostboot function -//------------------------------------------------------------------------------ -#define ATTR_POS_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetTargetPos(PTARGET, VAL) - -//------------------------------------------------------------------------------ -// MACROS to support proc_setup_bars_memory_attributes.xml -//------------------------------------------------------------------------------ -#define ATTR_PROC_FOREIGN_NEAR_BASE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcForeignNearBase (PTARGET, VAL ) -#define ATTR_PROC_FOREIGN_NEAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcForeignNearSize (PTARGET, VAL ) -#define ATTR_PROC_FOREIGN_FAR_BASE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcForeignFarBase (PTARGET, VAL ) -#define ATTR_PROC_FOREIGN_FAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcForeignFarSize (PTARGET, VAL ) -#define ATTR_PROC_HA_BASE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcHaBase (PTARGET, VAL ) -#define ATTR_PROC_HA_SIZE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcHaSize (PTARGET, VAL ) - -//------------------------------------------------------------------------------ -// MACROS to support proc_setup_bars_mmio_attributes.xml -//------------------------------------------------------------------------------ -#define ATTR_PROC_PSI_BRIDGE_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcPsiBridgeBarEnable (PTARGET, VAL ) -#define ATTR_PROC_FSP_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcFspBarEnable (PTARGET, VAL ) -#define ATTR_PROC_INTP_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcIntpBarEnable (PTARGET, VAL ) -#define ATTR_PROC_NX_MMIO_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcNxMmioBarEnable(PTARGET, VAL ) -#define ATTR_PROC_NX_MMIO_BAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcNxMmioBarSize (PTARGET, VAL ) -#define ATTR_PROC_PCIE_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcPcieBarEnable (PTARGET, VAL ) -#define ATTR_PROC_PCIE_BAR_BASE_ADDR_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcPcieBarBaseAddr (PTARGET, VAL ) -#define ATTR_PROC_PCIE_BAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetProcPcieBarSize (PTARGET, VAL ) - -//------------------------------------------------------------------------------ -// MACROS to support enable attributes in p8_xip_customize_attributes.xml -//------------------------------------------------------------------------------ -#define ATTR_PROC_NX_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetEnableAttr ( fapi::ID, PTARGET, VAL ) -#define ATTR_PROC_PCIE_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetEnableAttr ( fapi::ID, PTARGET, VAL ) -#define ATTR_PROC_L3_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetEnableAttr ( fapi::ID, PTARGET, VAL ) -#define ATTR_PROC_A_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetEnableAttr ( fapi::ID, PTARGET, VAL ) -#define ATTR_PROC_X_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetEnableAttr ( fapi::ID, PTARGET, VAL ) - - -//------------------------------------------------------------------------------ -// MACROS to support MVPD attributes -//------------------------------------------------------------------------------ -#define ATTR_EX_L2_SINGLE_MEMBER_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::fapiPlatGetSingleMemberEnableAttr ( PTARGET, VAL ) - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD exclusive DDR4 attributes -//------------------------------------------------------------------------------ - - -#define ATTR_VPD_MR_VERSION_BYTE_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_MR_VERSION_BYTE, VAL, sizeof(VAL))) -#define ATTR_VPD_MR_DATA_CONTROL_BYTE_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_MR_DATA_CONTROL_BYTE, VAL, sizeof(VAL))) -#define ATTR_VPD_PERIODIC_MEMCAL_MODE_OPTIONS_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_PERIODIC_MEMCAL_MODE_OPTIONS, VAL, sizeof(VAL))) -#define ATTR_VPD_MT_VERSION_BYTE_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_MT_VERSION_BYTE, VAL, sizeof(VAL))) -#define ATTR_VPD_MT_DATA_CONTROL_BYTE_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_MT_DATA_CONTROL_BYTE, VAL, sizeof(VAL))) -#define ATTR_VPD_DRAM_RTT_PARK_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_DRAM_RTT_PARK, VAL, sizeof(VAL))) -#define ATTR_VPD_VM_KEYWORD_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetMBvpdMemoryDataVersion\ - (PTARGET, VAL)) -#define ATTR_VPD_VD_KEYWORD_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetMBvpdSPDXRecordVersion \ - (PTARGET, VAL)) -#define ATTR_VPD_DW_KEYWORD_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetMBvpdVoltageSettingData\ - (PTARGET, VAL, )) -#define ATTR_VPD_RD_CTR_WINDAGE_OFFSET_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_RD_CTR_WINDAGE_OFFSET, VAL, sizeof(VAL))) - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD Phase Rotator attributes -//------------------------------------------------------------------------------ -#ifndef CONFIG_VPD_GETMACRO_USE_EFF_ATTR - -#define ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A2, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A3, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A4_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A4, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A5_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A5, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A6_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A6, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A7_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A7, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A8_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A8, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A9_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A9, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A10_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A10, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A11_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A11, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A12_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A12, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A13_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A13, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A14_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A14, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A15_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A15, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA2, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_CASN_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_CASN, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_RASN_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_RASN, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_WEN_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_WEN, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_PAR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_PAR, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M_ACTN_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M_ACTN, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE2, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE3, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN2, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN3, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE2, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE3, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN1, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN2, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN3, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT0, VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT1, VAL, sizeof(VAL))) -#define ATTR_VPD_TSYS_ADR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_TSYS_ADR, VAL, sizeof(VAL))) -#define ATTR_VPD_TSYS_DP18_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_TSYS_DP18, VAL, sizeof(VAL))) - -#else -#define ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A4_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A4, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A5_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A5, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A6_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A6, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A7_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A7, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A8_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A8, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A9_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A9, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A10_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A10, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A11_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A11, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A12_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A12, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A13_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A13, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A14_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A14, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A15_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A15, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_CASN_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_CASN, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_RASN_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_RASN, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_WEN_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_WEN, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_PAR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_PAR, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_ACTN_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_ACTN, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN2_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN3_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT0_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT1_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT1, sizeof(VAL), &VAL) -#define ATTR_VPD_TSYS_ADR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_TSYS_ADR, sizeof(VAL), &VAL) -#define ATTR_VPD_TSYS_DP18_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_TSYS_DP18, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CLK_P1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CLK_P1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A2_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A3_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A4_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A4, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A5_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A5, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A6_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A6, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A7_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A7, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A8_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A8, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A9_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A9, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A10_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A10, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A11_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A11, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A12_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A12, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A13_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A13, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A14_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A14, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_A15_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_A15, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA2_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_CASN_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_CASN, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_RASN_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_RASN, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_WEN_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_WEN, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_PAR_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_PAR, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M_ACTN_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_ACTN, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE2_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE3_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CKE3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN2_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN3_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_CSN3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M0_CNTL_ODT1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE2_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE3_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CKE3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN1, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN2_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN2, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN3_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_CSN3, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT0, sizeof(VAL), &VAL) -#define ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT1_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M1_CNTL_ODT1, sizeof(VAL), &VAL) - -#endif // CONFIG_VPD_GETMACRO_USE_EFF_ATTR - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD Address Mirror attributes -//------------------------------------------------------------------------------ -#ifndef CONFIG_VPD_GETMACRO_USE_EFF_ATTR -#define ATTR_VPD_DRAM_ADDRESS_MIRRORING_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetAddrMirrorData\ - (PTARGET, VAL) -#else -#define ATTR_VPD_DRAM_ADDRESS_MIRRORING_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_ADDRESS_MIRRORING, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_ADDRESS_MIRRORING_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_ADDRESS_MIRRORING, sizeof(VAL), &VAL) - -#endif // CONFIG_VPD_GETMACRO_USE_EFF_ATTR - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD Termination Data attributes -//------------------------------------------------------------------------------ -#ifndef CONFIG_VPD_GETMACRO_USE_EFF_ATTR -#define ATTR_VPD_DRAM_RON_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_DRAM_RON , VAL, sizeof(VAL))) -#define ATTR_VPD_DRAM_RTT_NOM_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_DRAM_RTT_NOM , VAL, sizeof(VAL))) -#define ATTR_VPD_DRAM_RTT_WR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_DRAM_RTT_WR , VAL, sizeof(VAL))) -#define ATTR_VPD_ODT_RD_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_ODT_RD , VAL, sizeof(VAL))) -#define ATTR_VPD_ODT_WR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_ODT_WR , VAL, sizeof(VAL))) -#define ATTR_VPD_DIMM_RCD_IBT_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_DIMM_RCD_IBT , VAL, sizeof(VAL))) -#define ATTR_VPD_DIMM_RCD_OUTPUT_TIMING_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_DIMM_RCD_OUTPUT_TIMING , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_RD_VREF_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_RD_VREF , VAL, sizeof(VAL))) -#define ATTR_VPD_DRAM_WR_VREF_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_DRAM_WR_VREF , VAL, sizeof(VAL))) -#define ATTR_VPD_DRAM_WRDDR4_VREF_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_DRAM_WRDDR4_VREF , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_RCV_IMP_DQ_DQS_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_RCV_IMP_DQ_DQS , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_DRV_IMP_DQ_DQS_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_DRV_IMP_DQ_DQS , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_DRV_IMP_CNTL_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_DRV_IMP_CNTL , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_DRV_IMP_ADDR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_DRV_IMP_ADDR , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_DRV_IMP_CLK_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_DRV_IMP_CLK , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_DRV_IMP_SPCKE_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_DRV_IMP_SPCKE , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_SLEW_RATE_DQ_DQS_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_SLEW_RATE_DQ_DQS , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_SLEW_RATE_CNTL_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_SLEW_RATE_CNTL , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_SLEW_RATE_ADDR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_SLEW_RATE_ADDR , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_SLEW_RATE_CLK_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_SLEW_RATE_CLK , VAL, sizeof(VAL))) -#define ATTR_VPD_CEN_SLEW_RATE_SPCKE_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CEN_SLEW_RATE_SPCKE , VAL, sizeof(VAL))) -#define ATTR_VPD_CKE_PRI_MAP_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CKE_PRI_MAP , VAL, sizeof(VAL))) -#define ATTR_VPD_CKE_PWR_MAP_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_CKE_PWR_MAP , &VAL, sizeof(VAL))) -#define ATTR_VPD_RLO_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_RLO , VAL, sizeof(VAL))) -#define ATTR_VPD_WLO_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_WLO , VAL, sizeof(VAL))) -#define ATTR_VPD_GPO_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - (checkAttrDataType(VAL), \ - fapi::platAttrSvc::fapiPlatGetAttrData\ - (PTARGET, fapi::ATTR_VPD_GPO , VAL, sizeof(VAL))) -#else -#define ATTR_VPD_DRAM_RON_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_RON, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_RTT_NOM_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_RTT_NOM, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_RTT_WR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_RTT_WR, sizeof(VAL), &VAL) - -#define ATTR_VPD_ODT_RD_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_ODT_RD, sizeof(VAL), &VAL) - -#define ATTR_VPD_ODT_WR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_ODT_WR, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_RD_VREF_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_RD_VREF, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_WR_VREF_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_WR_VREF, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_WRDDR4_VREF_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_WRDDR4_VREF, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_RCV_IMP_DQ_DQS_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_RCV_IMP_DQ_DQS, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_DQ_DQS_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_DQ_DQS, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_CNTL_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_CNTL, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_ADDR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_ADDR, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_CLK_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_CLK, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_SPCKE_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_SPCKE, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_DQ_DQS_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_DQ_DQS, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_CNTL_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_CNTL, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_ADDR_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_ADDR, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_CLK_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_CLK, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_SPCKE_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_SPCKE, sizeof(VAL), &VAL) - -#define ATTR_VPD_RLO_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_RLO, sizeof(VAL), &VAL) - -#define ATTR_VPD_WLO_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_WLO, sizeof(VAL), &VAL) - -#define ATTR_VPD_GPO_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_GPO, sizeof(VAL), &VAL) - -#define ATTR_VPD_CKE_PRI_MAP_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CKE_PRI_MAP, sizeof(VAL), &VAL) - -#define ATTR_VPD_CKE_PWR_MAP_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CKE_PWR_MAP, sizeof(VAL), &VAL) - -#define ATTR_VPD_ODT_WR_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_ODT_WR, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_RON_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_RON, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_RTT_NOM_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_RTT_NOM, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_RTT_WR_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_RTT_WR, sizeof(VAL), &VAL) - -#define ATTR_VPD_CKE_PRI_MAP_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CKE_PRI_MAP, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_CNTL_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_CNTL, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA0_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_PHASE_ROT_M_CMD_BA0, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_CNTL_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_CNTL, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_ADDR_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_ADDR, sizeof(VAL), &VAL) - -#define ATTR_VPD_CKE_PWR_MAP_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CKE_PWR_MAP, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_CLK_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_CLK, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_SPCKE_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_SPCKE, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_RD_VREF_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_RD_VREF, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_CNTL_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_CNTL, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_ADDR_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_ADDR, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_CLK_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_CLK, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_SPCKE_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_SPCKE, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_WR_VREF_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_WR_VREF, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_WRDDR4_VREF_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_WRDDR4_VREF, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_RCV_IMP_DQ_DQS_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_RCV_IMP_DQ_DQS, sizeof(VAL), &VAL) - -#define ATTR_VPD_ODT_RD_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_ODT_RD, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_DRV_IMP_DQ_DQS_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_DRV_IMP_DQ_DQS, sizeof(VAL), &VAL) - -#define ATTR_VPD_CEN_SLEW_RATE_DQ_DQS_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_CEN_SLEW_RATE_DQ_DQS, sizeof(VAL), &VAL) - -#define ATTR_VPD_RLO_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_RLO, sizeof(VAL), &VAL) - -#define ATTR_VPD_WLO_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_WLO, sizeof(VAL), &VAL) - -#define ATTR_VPD_GPO_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_GPO, sizeof(VAL), &VAL) - -#endif // CONFIG_VPD_GETMACRO_USE_EFF_ATTR - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD Slope Intercept attributes -//------------------------------------------------------------------------------ -#define ATTR_CDIMM_VPD_MASTER_POWER_SLOPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSlopeInterceptData \ - (PTARGET, fapi::MASTER_POWER_SLOPE , VAL) -#define ATTR_CDIMM_VPD_MASTER_POWER_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSlopeInterceptData \ - (PTARGET, fapi::MASTER_POWER_INTERCEPT , VAL) -#define ATTR_CDIMM_VPD_SUPPLIER_POWER_SLOPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSlopeInterceptData \ - (PTARGET, fapi::SUPPLIER_POWER_SLOPE , VAL) -#define ATTR_CDIMM_VPD_SUPPLIER_POWER_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSlopeInterceptData \ - (PTARGET, fapi::SUPPLIER_POWER_INTERCEPT , VAL) -#define ATTR_CDIMM_VPD_MASTER_TOTAL_POWER_SLOPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSlopeInterceptData \ - (PTARGET, fapi::MASTER_TOTAL_POWER_SLOPE , VAL) -#define ATTR_CDIMM_VPD_MASTER_TOTAL_POWER_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSlopeInterceptData \ - (PTARGET, fapi::MASTER_TOTAL_POWER_INTERCEPT , VAL) -#define ATTR_CDIMM_VPD_SUPPLIER_TOTAL_POWER_SLOPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSlopeInterceptData \ - (PTARGET, fapi::SUPPLIER_TOTAL_POWER_SLOPE , VAL) -#define ATTR_CDIMM_VPD_SUPPLIER_TOTAL_POWER_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSlopeInterceptData \ - (PTARGET, fapi::SUPPLIER_TOTAL_POWER_INTERCEPT , VAL) - -// MACRO to support BAD_DQ_BITMAP Attribute -//------------------------------------------------------------------------------ -#define ATTR_BAD_DQ_BITMAP_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatDimmGetBadDqBitmap \ - (PTARGET, VAL) -#define ATTR_BAD_DQ_BITMAP_SETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::setAttrActionsFunc(fapi::ID, PTARGET, \ - sizeof(VAL), &VAL), \ - fapi::platAttrSvc::fapiPlatDimmSetBadDqBitmap(PTARGET, VAL) - -//------------------------------------------------------------------------------ -// MACRO to support VPD_DIMM_SPARE Attribute -//------------------------------------------------------------------------------ -#ifndef CONFIG_VPD_GETMACRO_USE_EFF_ATTR -#define ATTR_VPD_DIMM_SPARE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatDimmGetSpareDram \ - (PTARGET, VAL) -#else -#define ATTR_VPD_DIMM_SPARE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DIMM_SPARE, sizeof(VAL), &VAL) - -#define ATTR_VPD_DIMM_SPARE_SETMACRO(ID, PTARGET, VAL) \ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DIMM_SPARE, sizeof(VAL), &VAL) -#endif // CONFIG_VPD_GETMACRO_USE_EFF_ATTR - -//------------------------------------------------------------------------------ -// MACROs to route ATTR PLL Ring accesses to the correct HWSV function -//------------------------------------------------------------------------------ -// DATA accesses -#define PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - ( fapi::platAttrSvc::fapiPlatGetPllAttr( \ - fapi::ID, PTARGET, VAL )) - -#define ATTR_PROC_AB_BNDY_PLL_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_AB_BNDY_PLL_FOR_DCCAL_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PB_BNDY_DMIPLL_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PB_BNDY_DMIPLL_FOR_DCCAL_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PCI_BNDY_PLL_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PERV_BNDY_PLL_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_FOR_DCCAL_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4000_MEM1066_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4000_MEM1333_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4000_MEM1600_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4000_MEM1866_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1066_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1333_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1600_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1866_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_FOR_RUNTIME_DATA_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PB_BNDY_DMIPLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_AB_BNDY_PLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) - -// FLUSH accesses -#define ATTR_PROC_AB_BNDY_PLL_FLUSH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PB_BNDY_DMIPLL_FLUSH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PCI_BNDY_PLL_FLUSH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PERV_BNDY_PLL_FLUSH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_FLUSH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) - -// LENGTH accesses -#define ATTR_PROC_AB_BNDY_PLL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PB_BNDY_DMIPLL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PCI_BNDY_PLL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PERV_BNDY_PLL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4000_MEM1066_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4000_MEM1333_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4000_MEM1600_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4000_MEM1866_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1066_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1333_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1600_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1866_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_MEMB_TP_BNDY_PLL_FOR_RUNTIME_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_PB_BNDY_DMIPLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) -#define ATTR_PROC_AB_BNDY_PLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL) - -// INFO accesses -#define ATTR_PROC_DMI_CUPLL_PFD360_OFFSET_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::PROC_DMI_CUPLL_PFD360_OFFSET, &VAL, sizeof(VAL)) -#define ATTR_PROC_DMI_CUPLL_REFCLKSEL_OFFSET_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::PROC_DMI_CUPLL_REFCLKSEL_OFFSET, &VAL, sizeof(VAL)) -#define ATTR_PROC_ABUS_CUPLL_PFD360_OFFSET_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::PROC_ABUS_CUPLL_PFD360_OFFSET, &VAL, sizeof(VAL)) -#define ATTR_PROC_ABUS_CUPLL_REFCLKSEL_OFFSET_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::PROC_ABUS_CUPLL_REFCLKSEL_OFFSET, &VAL, sizeof(VAL)) -#define ATTR_MEMB_DMI_CUPLL_PFD360_OFFSET_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::MEMB_DMI_CUPLL_PFD360_OFFSET, &VAL, sizeof(VAL)) -#define ATTR_MEMB_DMI_CUPLL_REFCLKSEL_OFFSET_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::MEMB_DMI_CUPLL_REFCLKSEL_OFFSET, &VAL, sizeof(VAL)) -#define ATTR_MEMB_MEM_PLL_CFG_UPDATE_OFFSET_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET,\ - fapi::getPllRingInfo::MEMB_MEM_PLL_CFG_UPDATE_OFFSET, &VAL, sizeof(VAL)) - -//------------------------------------------------------------------------------ -// MACROs to support DIMM SPD Attributes that are handled by an Accessor HWP -//------------------------------------------------------------------------------ -#define ATTR_SPD_SDRAM_BANKS_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttrAccessor(PTARGET, fapi::getSpdAttr::SPD_SDRAM_BANKS, &VAL, sizeof(VAL)) -#define ATTR_SPD_MODULE_NOMINAL_VOLTAGE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttrAccessor(PTARGET, fapi::getSpdAttr::SPD_MODULE_NOMINAL_VOLTAGE, &VAL, sizeof(VAL)) -#define ATTR_SPD_CAS_LATENCIES_SUPPORTED_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttrAccessor(PTARGET, fapi::getSpdAttr::SPD_CAS_LATENCIES_SUPPORTED, &VAL, sizeof(VAL)) -#define ATTR_SPD_MODULE_REVISION_CODE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttrAccessor(PTARGET, fapi::getSpdAttr::SPD_MODULE_REVISION_CODE, &VAL, sizeof(VAL)) - -//------------------------------------------------------------------------------ -// MACROs to support PM Attributes that always get 0 (sole purpose is override) -//------------------------------------------------------------------------------ -#define ATTR_FREQ_EXT_BIAS_UP_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_FREQ_EXT_BIAS_DOWN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_VOLTAGE_EXT_VDD_BIAS_UP_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_VOLTAGE_EXT_VDD_BIAS_DOWN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_VOLTAGE_EXT_VCS_BIAS_UP_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_VOLTAGE_EXT_VCS_BIAS_DOWN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_VOLTAGE_INT_VDD_BIAS_UP_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_VOLTAGE_INT_VDD_BIAS_DOWN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_VOLTAGE_INT_VCS_BIAS_UP_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) -#define ATTR_VOLTAGE_INT_VCS_BIAS_DOWN_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL)) - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD Get vpd version attribute -//------------------------------------------------------------------------------ -#define ATTR_VPD_VERSION_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetVpdVersion\ - (PTARGET, VAL) - -#ifdef CONFIG_VPD_GETMACRO_USE_EFF_ATTR -#define ATTR_VPD_VERSION_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_MSS_EFF_VPD_VERSION, sizeof(VAL), &VAL) -#endif - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD Get Dram 2N Mode Enabled -//------------------------------------------------------------------------------ -#ifndef CONFIG_VPD_GETMACRO_USE_EFF_ATTR -#define ATTR_VPD_DRAM_2N_MODE_ENABLED_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetDram2NModeEnabled\ - (PTARGET, VAL) -#else -#define ATTR_VPD_DRAM_2N_MODE_ENABLED_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS :\ - fapi::platAttrSvc::getTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_2N_MODE_ENABLED, sizeof(VAL), &VAL) - -#define ATTR_VPD_DRAM_2N_MODE_ENABLED_SETMACRO(ID, PTARGET, VAL)\ - fapi::platAttrSvc::setTargetingAttr\ - (PTARGET, TARGETING::ATTR_EFF_DRAM_2N_MODE_ENABLED, sizeof(VAL), &VAL) - -#endif // CONFIG_VPD_GETMACRO_USE_EFF_ATTR - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD Get Sensor Map Data -//------------------------------------------------------------------------------ -#define ATTR_VPD_CDIMM_SENSOR_MAP_PRIMARY_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetSensorMap\ - (PTARGET, fapi::SENSOR_MAP_PRIMARY, VAL) -#define ATTR_VPD_CDIMM_SENSOR_MAP_SECONDARY_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetSensorMap\ - (PTARGET, fapi::SENSOR_MAP_SECONDARY, VAL) - -//------------------------------------------------------------------------------ -// MACROS to support MBVPD Get and Set L4 Bank Delete VPD -//------------------------------------------------------------------------------ -#define ATTR_L4_BANK_DELETE_VPD_GETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatL4BankDelete\ - (PTARGET, VAL, fapi::GET_L4_BANK_DELETE_MODE) - -#define ATTR_L4_BANK_DELETE_VPD_SETMACRO(ID, PTARGET, VAL)\ - fapi::AttrOverrideSync::setAttrActionsFunc(fapi::ID, PTARGET,\ - sizeof(VAL), &VAL),\ - fapi::platAttrSvc::fapiPlatL4BankDelete\ - (PTARGET, VAL, fapi::SET_L4_BANK_DELETE_MODE) - -//------------------------------------------------------------------------------ -// MACROS to support L3 DELTA DATA Ring Attributes -//------------------------------------------------------------------------------ -#define ATTR_PROC_EX_FUNC_L3_DELTA_DATA_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetL3DDAttr(PTARGET, VAL) -#define ATTR_PROC_EX_FUNC_L3_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetL3Length(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) - -//------------------------------------------------------------------------------ -// MACRO to support TDP RDP Current Factor -//------------------------------------------------------------------------------ -#define ATTR_TDP_RDP_CURRENT_FACTOR_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetTdpRdpCurrentFactor(PTARGET, VAL) - -//------------------------------------------------------------------------------ -// MACRO to support Modspec raw card info -//------------------------------------------------------------------------------ -#define ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_REV_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdAttr \ - (PTARGET, SPD::MODSPEC_COM_REF_RAW_CARD_REV, &(VAL), sizeof(VAL) ) -#define ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetSpdModspecComRefRawCard(PTARGET, VAL) - -//------------------------------------------------------------------------------ -// MACROS to support osc switch control -//------------------------------------------------------------------------------ -#define ATTR_OSCSWITCH_CTL0_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetOscswitchCtl \ - (PTARGET,fapi::getOscswitchCtl::CTL0,&VAL,sizeof(VAL)) -#define ATTR_OSCSWITCH_CTL1_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetOscswitchCtl \ - (PTARGET,fapi::getOscswitchCtl::CTL1,&VAL,sizeof(VAL)) -#define ATTR_OSCSWITCH_CTL2_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetOscswitchCtl \ - (PTARGET,fapi::getOscswitchCtl::CTL2,&VAL,sizeof(VAL)) - -//------------------------------------------------------------------------------ -// MACROS to support VITL ring/spy data attributes -//------------------------------------------------------------------------------ -#define ATTR_PROC_PERV_VITL_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetPervVitlRingLengthAttr(PTARGET, VAL) -#define ATTR_PROC_TP_VITL_SPY_LENGTH_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetTpVitlSpyLengthAttr(PTARGET, VAL) -#define ATTR_PROC_TP_VITL_SPY_OFFSETS_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetTpVitlSpyOffsetAttr(PTARGET, VAL) - -//------------------------------------------------------------------------------ -// MACROS to support Memory Attributes at node level -//------------------------------------------------------------------------------ -#define ATTR_MSS_VDD_SLOPE_ACTIVE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_CENT_VDD_SLOPE_ACTIVE, VAL) -#define ATTR_MSS_VDD_SLOPE_INACTIVE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_CENT_VDD_SLOPE_INACTIVE, VAL) -#define ATTR_MSS_VDD_SLOPE_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_CENT_VDD_INTERCEPT, VAL) -#define ATTR_MSS_VCS_SLOPE_ACTIVE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_CENT_VCS_SLOPE_ACTIVE, VAL) -#define ATTR_MSS_VCS_SLOPE_INACTIVE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_CENT_VCS_SLOPE_INACTIVE, VAL) -#define ATTR_MSS_VCS_SLOPE_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_CENT_VCS_INTERCEPT, VAL) -#define ATTR_MSS_VPP_SLOPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_VOLT_VPP_SLOPE_EFF_CONFIG, VAL) -#define ATTR_MSS_VPP_SLOPE_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_VOLT_VPP_INTERCEPT_EFF_CONFIG, VAL) -#define ATTR_MSS_DDR3_VDDR_SLOPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_VOLT_DDR3_VDDR_SLOPE_EFF_CONFIG, VAL) -#define ATTR_MSS_DDR3_VDDR_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(PTARGET,\ - TARGETING::ATTR_MSS_VOLT_DDR3_VDDR_INTERCEPT_EFF_CONFIG, VAL) -#define ATTR_MRW_DDR3_VDDR_MAX_LIMIT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MRW_DDR3_VDDR_MAX_LIMIT_EFF_CONFIG, VAL) -#define ATTR_MSS_DDR4_VDDR_SLOPE_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MSS_VOLT_DDR4_VDDR_SLOPE_EFF_CONFIG, VAL) -#define ATTR_MSS_DDR4_VDDR_INTERCEPT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(PTARGET,\ - TARGETING::ATTR_MSS_VOLT_DDR4_VDDR_INTERCEPT_EFF_CONFIG, VAL) -#define ATTR_MRW_DDR4_VDDR_MAX_LIMIT_GETMACRO(ID, PTARGET, VAL) \ - fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? \ - fapi::FAPI_RC_SUCCESS : \ - fapi::platAttrSvc::fapiPlatGetNodeMemAttrData(\ - PTARGET, TARGETING::ATTR_MRW_DDR4_VDDR_MAX_LIMIT_EFF_CONFIG, VAL) - -#endif // FAPIPLATATTRIBUTESERVICE_H_ diff --git a/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H b/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H deleted file mode 100644 index c848cebbe..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H +++ /dev/null @@ -1,54 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatHwpExecutor.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 fapiPlatHwpExecutor.H - * - * @brief Defines the FAPI PLAT HWP Executor Macro. - * - * The PLAT HWP Executor macro is called by the FAPI HWP Executor macro when a - * PLAT invoker function or a HWP wants to execute a HWP. Each platform can - * modify the macro to do any platform specific work to execute the HWP (e.g. - * dlopening a shared library) - */ - -#ifndef FAPIPLATHWPEXECUTOR_H_ -#define FAPIPLATHWPEXECUTOR_H_ - -#include -#include -#include -#include -#include -#include -#include -#include - -/** - * @brief HWP Executor macro - * - * Call the HWP directly. - */ -#define FAPI_PLAT_EXEC_HWP(RC, FUNC, _args_...) \ - RC = FUNC(_args_) - -#endif // FAPIPLATHWPEXECUTOR_H_ diff --git a/src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H b/src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H deleted file mode 100644 index 5f51bc7e3..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H +++ /dev/null @@ -1,73 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatHwpInvoker.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ -/* */ -/* 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 fapiPlatHwpInvoker.H - * - * @brief Defines the HostBoot HWP invoker macro and a function to convert a - * fapi::ReturnCode to an error log - */ - -#ifndef FAPIPLATHWPINVOKER_H_ -#define FAPIPLATHWPINVOKER_H_ - -#include -#include -#include - -/** - * @brief HWP Invoker macro - * - * This macro is called by HostBoot PLAT code to invoke a HW Procedure (HWP). - * The caller must create any necessary fapi::Targets and pass them as - * parameters. This macro simply calls the FAPI HWP executor macro and converts - * the returned fapi::Return code to a HostBoot error log - * - * ERRHNDL - errlHndl_t - * FUNC - HWP function name - * _args_... - Any additional arguments that the HWP requires - */ -#define FAPI_INVOKE_HWP(ERRHNDL, FUNC, _args_...) \ - {\ - fapi::ReturnCode l_rc; \ - FAPI_EXEC_HWP(l_rc, FUNC, ##_args_); \ - ERRHNDL = fapi::fapiRcToErrl(l_rc); \ - } - -namespace fapi -{ - -/** - * @brief Converts a fapi::ReturnCode to a HostBoot PLAT error log - * - * @param[io] io_rc Reference to ReturnCode (set to success after function ends) - * @param[in] i_sev Error log severity defaulted to unrecoverable - * - * @return errlHndl_t (NULL if Return Code contained success) - */ -errlHndl_t fapiRcToErrl(ReturnCode & io_rc, - ERRORLOG::errlSeverity_t i_sev = - ERRORLOG::ERRL_SEV_UNRECOVERABLE); - -} - -#endif // FAPIPLATHWPINVOKER_H_ diff --git a/src/include/usr/hwpf/plat/fapiPlatRegAddresses.H b/src/include/usr/hwpf/plat/fapiPlatRegAddresses.H deleted file mode 100644 index 2d101f315..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatRegAddresses.H +++ /dev/null @@ -1,39 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatRegAddresses.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ -/* */ -/* 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 fapiPlatRegAddresses.H - * - * @brief Includes files that define register addresses. - * - * This is included by the generated fapiCollectRegFfdc.C file in order to pick - * up constants used in registerFfdc Error XML to specify chip registers to - * collect for various errors. - */ - -#ifndef FAPIPLATHWPINVOKER_H_ -#define FAPIPLATHWPINVOKER_H_ - -#include -#include - -#endif diff --git a/src/include/usr/hwpf/plat/fapiPlatTrace.H b/src/include/usr/hwpf/plat/fapiPlatTrace.H deleted file mode 100644 index cd578fd28..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatTrace.H +++ /dev/null @@ -1,93 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatTrace.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2011,2015 */ -/* [+] 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 platTrace.H - * - * @brief Defines the FAPI trace macros. - * - * Note that platform code must provide the implementation. - * - * FAPI has provided a default implementation of printfs. Platform code must - * provide an alternate implementation if needed. - */ - -#ifndef PLATTRACE_H_ -#define PLATTRACE_H_ - -#include -#include -#include - -//****************************************************************************** -// Trace buffer names -//****************************************************************************** -const char * const FAPI_TRACE_NAME = "FAPI"; -const char * const FAPI_IMP_TRACE_NAME = "FAPI_I"; -const char * const FAPI_SCAN_TRACE_NAME = "SCAN"; -const char * const FAPI_MFG_TRACE_NAME = "FAPI_MFG"; - -//****************************************************************************** -// Trace descriptors that are defined in a C file -//****************************************************************************** -extern trace_desc_t* g_fapiTd; -extern trace_desc_t* g_fapiImpTd; -extern trace_desc_t* g_fapiScanTd; -extern trace_desc_t* g_fapiMfgTd; - -// Information traces (go into fast trace buffer that can wrap often) -#define FAPI_INF(_fmt_, _args_...) TRACFCOMP(g_fapiTd, TRACE_FILENAME _fmt_, ##_args_ ) - -// Important traces (go into slow trace buffer that should not wrap often) -#define FAPI_IMP(_fmt_, _args_...) TRACFCOMP(g_fapiImpTd, TRACE_FILENAME _fmt_, ##_args_ ) - -// Error traces (go into slow trace buffer that should not wrap often) -#define FAPI_ERR(_fmt_, _args_...) TRACFCOMP(g_fapiImpTd, TRACE_FILENAME _fmt_, ##_args_ ) - -// Debug traces (go into fast trace buffer that can wrap often) -#define FAPI_DBG(_fmt_, _args_...) TRACDCOMP(g_fapiTd, TRACE_FILENAME _fmt_, ##_args_) - -// Scan traces -#define FAPI_SCAN(_fmt_, _args_...) TRACSCOMP(g_fapiScanTd, _fmt_, ##_args_) - -// FAPI Mfg traces -#if defined(CONFIG_CONSOLE) && !defined(__HOSTBOOT_RUNTIME) && \ - !defined(CONFIG_CONSOLE_OUTPUT_TRACE) -#include -// Traces will go to console if attr override set for this -#define FAPI_MFG(_fmt_, _args_...) \ - { \ - if(TRACE::isDebugEnabled(g_fapiMfgTd)) \ - { \ - CONSOLE::displayf(FAPI_MFG_TRACE_NAME,_fmt_, ##_args_); \ - } \ - } -#else - // Just define to standard TRACS buffer -#define FAPI_MFG(_fmt_, _args_...) \ - TRACSCOMP(g_fapiMfgTd, _fmt_, ##_args_) -#endif - - -#endif // PLATTRACE_H_ diff --git a/src/include/usr/hwpf/plat/fapiPlatUtil.H b/src/include/usr/hwpf/plat/fapiPlatUtil.H deleted file mode 100644 index 2d2d5fbb7..000000000 --- a/src/include/usr/hwpf/plat/fapiPlatUtil.H +++ /dev/null @@ -1,78 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/plat/fapiPlatUtil.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2013,2015 */ -/* [+] 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 fapiPlatUtil.H - * - * @brief Defines miscellaneous utility functions for the platform layer. - * Hardware procedure writers will not call these functions. - * - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * whs 11/14/2012 new - */ - -#ifndef FAPIPLATUTIL_H_ -#define FAPIPLATUTIL_H_ - -#include -#include -#include - -#define FAPI_PLAT_GEN_HASH(type, data, size) fapiPlatGenHash(data,size) - -template uint32_t fapiPlatGenHash - (const void* i_data, size_t i_size); - -template <> inline uint32_t fapiPlatGenHash - (const void* i_data, size_t i_size) -{ - return Util::crc32_calc(i_data, i_size); -} - - -// defines for endian conversion -#define FAPI_PLAT_BE16TOH(x) be16toh(x) -#define FAPI_PLAT_LE16TOH(x) le16toh(x) -#define FAPI_PLAT_HTOBE16(x) htobe16(x) -#define FAPI_PLAT_HTOLE16(x) htole16(x) - -#define FAPI_PLAT_BE32TOH(x) be32toh(x) -#define FAPI_PLAT_LE32TOH(x) le32toh(x) -#define FAPI_PLAT_HTOBE32(x) htobe32(x) -#define FAPI_PLAT_HTOLE32(x) htole32(x) - -#define FAPI_PLAT_BE64TOH(x) be64toh(x) -#define FAPI_PLAT_LE64TOH(x) le64toh(x) -#define FAPI_PLAT_HTOBE64(x) htobe64(x) -#define FAPI_PLAT_HTOLE64(x) htole64(x) - -void* fapiPlatMalloc(size_t); -#define fapiPlatFree(p) free(p) - -#endif // FAPIPLATUTIL_H_ diff --git a/src/include/usr/occ/occ.H b/src/include/usr/occ/occ.H new file mode 100644 index 000000000..6708a8b67 --- /dev/null +++ b/src/include/usr/occ/occ.H @@ -0,0 +1,57 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/occ/occ.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2013,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 */ +#ifndef OCC_H_ +#define OCC_H_ + +#include +#include + +namespace HBOCC { + /** + * @brief Starts OCCs on all Processors in the node + * This is intended to be used for AVP testing. + * + * @param[out] o_failedOccTarget: Pointer to the target failing + * loadnStartAllOccs + * @param[in] i_useSRAM: bool - use SRAM for OCC image, ie during IPL + * true if during IPL, false if at end of IPL (default) + * @return errlHndl_t Error log if OCC load failed + */ + errlHndl_t loadnStartAllOccs(TARGETING::Target *& o_failedOccTarget, + bool i_useSRAM = false); + + /** + * @brief Starts OCCs on all Processors in the node + * This is intended to be used for Open Power. + * + * @param[in] i_useSRAM: bool - use SRAM for OCC image, ie during IPL + * true if during IPL, false if at end of IPL (default) + * @return errlHndl_t Error log if OCC load failed + */ + errlHndl_t activateOCCs(bool i_useSRAM = false); + +} //end OCC namespace + +#endif diff --git a/src/include/usr/occ/occAccess.H b/src/include/usr/occ/occAccess.H new file mode 100644 index 000000000..bed2d7559 --- /dev/null +++ b/src/include/usr/occ/occAccess.H @@ -0,0 +1,72 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/occ/occAccess.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014,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 */ +#ifndef OCCACCESS_H_ +#define OCCACCESS_H_ + +#include +#include +#include +#include + +namespace HBOCC +{ + + /** + * @brief Read OCC SRAM + * + * @param[in] i_pTarget PROC or OCC target pointer + * @param[in] i_addr OCI Address to be used for the operation + * @param[in,out] io_dataBuf Reference to data buffer + * @return errlHndl_t Error log if operation failed + */ + errlHndl_t readSRAM(const TARGETING::Target*i_pTarget, + const uint32_t i_addr, + ecmdDataBufferBase & io_dataBuf); + + /** + * @brief Write OCC SRAM + * + * @param[in] i_pTarget PROC or OCC target pointer + * @param[in] i_addr OCI Address to be used for the operation + * @param[in] i_dataBuf Reference to data buffer + * @return errlHndl_t Error log if operation failed + */ + errlHndl_t writeSRAM(const TARGETING::Target*i_pTarget, + const uint32_t i_addr, + ecmdDataBufferBase & io_dataBuf); + + /** + * @brief Write OCC Circular Buffer + * + * @param[in] i_pTarget PROC or OCC target pointer + * @param[in] i_dataBuf Reference to data buffer + * @return errlHndl_t Error log if operation failed + */ + errlHndl_t writeCircularBuffer(const TARGETING::Target*i_pTarget, + ecmdDataBufferBase & i_dataBuf); + +} //end OCC namespace + +#endif diff --git a/src/include/usr/occ/occ_common.H b/src/include/usr/occ/occ_common.H new file mode 100644 index 000000000..35d76039f --- /dev/null +++ b/src/include/usr/occ/occ_common.H @@ -0,0 +1,180 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/occ/occ_common.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014,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 */ +#ifndef OCC_COMMON_H +#define OCC_COMMON_H + +#include +#include +#include + +namespace HBOCC +{ + /* + * @brief Host config data consumed by OCC + */ + struct occHostConfigDataArea_t + { + uint32_t version; + + //For computation of timebase frequency + uint32_t nestFrequency; + + // For determining the interrupt type to Host + // 0x00000000 = Use FSI2HOST Mailbox + // 0x00000001 = Use OCC interrupt line through PSIHB complex + uint32_t interruptType; + + // For informing OCC if it is the FIR master: + // 0x00000000 = Default + // 0x00000001 = FIR Master + uint32_t firMaster; + + // FIR collection configuration data needed by FIR Master + // OCC in the event of a checkstop + uint8_t firdataConfig[3072]; + }; + + enum + { + OccHostDataVersion = 3, + PRE_FIR_MASTER_VERSION = 2, + + OCC_LIDID = 0x81e00430, + OCC_IBSCOM_RANGE_IN_MB = MEGABYTE, + + // Interrupt Types + USE_FSI2HOST_MAILBOX = 0x00000000, + USE_PSIHB_COMPLEX = 0x00000001, + + // FIR Master + NOT_FIR_MASTER = 0x00000000, + IS_FIR_MASTER = 0x00000001, + + // SRAM Address for OCC Main App + OCC_SRAM_ADDRESS = 0xFFF80000, + + // SRAM Address and length for FIR HOMER data + OCC_SRAM_FIR_DATA = 0xFFFF5000, + OCC_SRAM_FIR_LENGTH = 0x1000, + + // offsets for OCC loading during IPL + OCC_OFFSET_LENGTH = 0x48, + OCC_OFFSET_IPL_FLAG = 0x82, + OCC_OFFSET_FREQ = 0x84, + + }; + + enum occAction_t + { + OCC_START, + OCC_STOP, + }; + /** + * @brief Sets up OCC Host data in Homer + * + * @param[in] i_proc: target processor to load + * @param[in] i_occHostDataVirtAddr Virtual + * address of current + * proc's Host data area. + * + * @return errlHndl_t Error log Host data setup failed + */ + errlHndl_t loadHostDataToHomer(TARGETING::Target* i_proc, + void* i_occHostDataVirtAddr); + +#ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS + /** + * @brief Sets up OCC Host data in SRAM + * + * @param[in] i_proc: target processor to load + * @param[in] i_curHW: enum indicating which HW is currently known + * + * @return errlHndl_t Error log Host data setup failed + */ + errlHndl_t loadHostDataToSRAM(TARGETING::Target* i_proc, + const PRDF::HwInitialized_t i_curHw = PRDF::ALL_HARDWARE); +#endif + + /** + * @brief Execute procedures and steps required to load + * OCC data in a specified processor + * + * @param[in] i_target: Target processor + * @param[in] i_occImgPaddr: Physical address of current + * proc's OCC image in the homer + * @param[in] i_occImgVaddr: Virtual address of current + * proc's OCC image int the homer + * @param[in] i_commonPhysAddr: Physical address of common + * OCC region + * @param[in] i_useSRAM: bool - use SRAM for OCC image, ie during IPL + * true if duringIPL, false if at end of IPL (default) + * @return errlHndl_t Error log if loadOCC failed + */ + errlHndl_t loadOCC(TARGETING::Target* i_target, + uint64_t i_occImgPaddr, + uint64_t i_occImgVaddr, + uint64_t i_commonPhysAddr, + bool i_useSRAM = false); + + /** + * @brief Start OCC for specified DCM pair of processors. + * If 2nd input is NULL, OCC will be setup on just + * one target. + * + * @param[in] i_target0: target of first processor in DCM pair + * @param[in] i_target1: target of second processor in DCM pair + * @param[out] o_failedTarget failed target in case of an error + * + * @return errlHndl_t Error log of startOCC failed + */ + errlHndl_t startOCC (TARGETING::Target* i_target0, + TARGETING::Target* i_target1, + TARGETING::Target *& o_failedTarget); + /** + * @brief Stop OCC for specified DCM pair of processors. + * If 2nd input is NULL, OCC will be setup on just + * one target. + * + * @param[in] i_target0: target of first processor in DCM pair + * @param[in] i_target1: target of second processor in DCM pair + * + * @return errlHndl_t Error log of stopOCC failed + */ + errlHndl_t stopOCC(TARGETING::Target * i_target0, + TARGETING::Target * i_target1); + + /** + * @brief Stops OCCs on all Processors in the node + * Function will attempt to stop all OCCs and commit + * logs inline. An error will only be returned for + * very unexpected software fails. + * + * @return errlHndl_t Error log if OCC load failed + */ + errlHndl_t stopAllOCCs(); + +} //namespace HBOCC ends + +#endif -- cgit v1.2.1