diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2016-02-08 11:06:44 -0600 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2016-04-04 09:09:04 -0400 |
commit | 4b4772ef8b18f2e9c80795c47b3a5f81b3521c1f (patch) | |
tree | 82653a7d7cba5d1b4988fdefb2ef5d9f307b178c /src/include/usr/hwpf/hwp | |
parent | feb51c34883347e80dd242266bd064a419cbdc88 (diff) | |
download | blackbird-hostboot-4b4772ef8b18f2e9c80795c47b3a5f81b3521c1f.tar.gz blackbird-hostboot-4b4772ef8b18f2e9c80795c47b3a5f81b3521c1f.zip |
Remove more old fapi1 stuff
Deleted src/include/usr/hwpf/hwp/ to ensure no old usage
Deleted a couple modules that have no P9 equivalent
Moved tod_init under istep18
Deleted old initfile related code
Deleted old pll related code
Change-Id: I9c1746609c7ca2a723241158b3958bb891b0629b
RTC: 146345
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/21888
Tested-by: Jenkins Server
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: FSP CI Jenkins
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf/hwp')
50 files changed, 3 insertions, 5417 deletions
diff --git a/src/include/usr/hwpf/hwp/chip_accessors/getOscswitchCtlAttr.H b/src/include/usr/hwpf/hwp/chip_accessors/getOscswitchCtlAttr.H deleted file mode 100644 index 9be5173ec..000000000 --- a/src/include/usr/hwpf/hwp/chip_accessors/getOscswitchCtlAttr.H +++ /dev/null @@ -1,105 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/chip_accessors/getOscswitchCtlAttr.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 */ -// $Id: getOscswitchCtlAttr.H,v 1.2 2014/06/19 14:35:43 whs Exp $ -/** - * @file getOscswitchCtlAttr.H - * - * @brief Accessor for providing the ATTR_OSCSWITCH_CTLx attributes - */ - -#ifndef _HWP_GETOSCSWITCHCNTL -#define _HWP_GETOSCSWITCHCNTL - -#include <fapi.H> - -namespace fapi -{ - namespace getOscswitchCtl - { - // Attributes supported - enum Attr - { - CTL0 = 0x00, // ATTR_OSCSWITCH_CTL0 - CTL1 = 0x01, // ATTR_OSCSWITCH_CTL1 - CTL2 = 0x02, // ATTR_OSCSWITCH_CTL2 - }; - - // Oscswitch control data - struct OSCSWITCH_CTL_DATA - { - ATTR_NAME_Enum l_CHIP_TYPE; -// uint8_t l_CHIP_EC; // can be added if needed - uint32_t l_CTL0; - uint8_t l_CTL1; - uint32_t l_CTL2; - }; - - // This structure could be generated from engineering data as - // there are more systems with redundant clocks or if values - // become EC specific - const OSCSWITCH_CTL_DATA OSCSWITCH_CTL_DATA_array []= - { - { // Entry if there are no redundant clocks - ENUM_ATTR_NAME_NONE, - 0x0080, - 0x00, - 0x00, - }, - { // Entry for Brazos - ENUM_ATTR_NAME_VENICE, - 0x0A02, - 0x2E, - 0x00400000, - } - }; - - } -} - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getOscswitchCtlAttr_FP_t) - (const fapi::Target &, - const fapi::getOscswitchCtl::Attr, - void *, - const size_t); - -extern "C" -{ -/** - * @brief This function is called by the FAPI_ATTR_GET macro when getting the - * 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 getOscswitchCtlAttr (const fapi::Target & i_pProcTarget, - const fapi::getOscswitchCtl::Attr i_attr, - void * o_pVal, - const size_t i_len); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/chip_accessors/getPciOscswitchConfig.H b/src/include/usr/hwpf/hwp/chip_accessors/getPciOscswitchConfig.H deleted file mode 100644 index 06b7db9d2..000000000 --- a/src/include/usr/hwpf/hwp/chip_accessors/getPciOscswitchConfig.H +++ /dev/null @@ -1,64 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/chip_accessors/getPciOscswitchConfig.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 */ -// $Id: getPciOscswitchConfig.H,v 1.2 2014/01/15 20:03:21 whs Exp $ -/** - * @file getPciOscswitchConfig.H - * - * @brief Accessor for providing the ATTR_PCI_OSCSWITCH_CONFIG attribute - */ - -#ifndef _HWP_GETPCIOSCSWITCHCONFIG_ -#define _HWP_GETPCIOSCSWITCHCONFIG_ - -#include <fapi.H> - -// configuration values -enum PciOscswitchConfigValues -{ - MURANO_DD1X = 0x03, - MURANO_DD2X = 0x0C, - VENICE_P0P2 = 0x09, // position 0 and 2 - VENICE_P1P3 = 0x06, // position 1 and 3 - NAPLES_DD1X = 0x0C, // TODO RTC: 109249, check; based on Murano DD2X -}; - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getPciOscswitchConfig_FP_t) - (const fapi::Target &, uint8_t &); - -extern "C" -{ -/** - * @brief Get the ATTR_PCI_OSCSWITCH_CONFIG FAPI attribute - * - * @param[in] i_procTarget - Reference to processor chip target - * @param[out] o_val - Filled in with pci oscswitch config - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getPciOscswitchConfig( - const fapi::Target & i_procTarget, - uint8_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/chip_accessors/getTdpRdpCurrentFactor.H b/src/include/usr/hwpf/hwp/chip_accessors/getTdpRdpCurrentFactor.H deleted file mode 100644 index 9d5aab46f..000000000 --- a/src/include/usr/hwpf/hwp/chip_accessors/getTdpRdpCurrentFactor.H +++ /dev/null @@ -1,56 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/chip_accessors/getTdpRdpCurrentFactor.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getTdpRdpCurrentFactor.H,v 1.1 2015/06/01 18:30:12 whs Exp $ -/** - * @file getTdpRdpCurrentFactor.H - * - * @brief Accessor for providing the ATTR_TDP_RDP_CURRENT_FACTOR attribute - */ - -#ifndef _HWP_GETTDPRDPCURRENTFACTOR_ -#define _HWP_GETTDPRDPCURRENTFACTOR_ - -#include <fapi.H> - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getTdpRdpCurrentFactor_FP_t) - (const fapi::Target &, uint32_t &); - -extern "C" -{ -/** - * @brief Get the ATTR_TDP_RDP_CURRENT_FACTOR FAPI attribute - * - * @param[in] i_procTarget - Reference to processor chip target - * @param[out] o_val - Filled in with TDP RDP Current Factor - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getTdpRdpCurrentFactor( - const fapi::Target & i_procTarget, - uint32_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.H b/src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.H deleted file mode 100644 index ab6aa280e..000000000 --- a/src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.H +++ /dev/null @@ -1,81 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/dimmBadDqBitmapAccessHwp.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: dimmBadDqBitmapAccessHwp.H,v 1.3 2013/10/03 20:40:52 dedahle Exp $ -/** - * @file dimmBadDqBitmapAccessHwp.H - * - * @brief FW Team HWP that accesses the Bad DQ Bitmap. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 02/17/2012 Created. - */ - -#ifndef DIMMBADDQBITMAPACCESSHWP_H_ -#define DIMMBADDQBITMAPACCESSHWP_H_ - -#include <fapi.H> -#include <dimmConsts.H> - -typedef fapi::ReturnCode (*dimmBadDqBitmapAccessHwp_FP_t)( - const fapi::Target &, - const fapi::Target &, - const uint8_t (&)[DIMM_DQ_MAX_DIMM_RANKS][DIMM_DQ_RANK_BITMAP_SIZE], - const bool); - -extern "C" -{ - -/** - * @brief FW Team HWP that accesses the Bad DQ Bitmap. It accesses the raw data - * from DIMM SPD and does any necessary processing to turn it into a - * bitmap from a Centaur DQ point of view. If the data in SPD is not - * valid then it has never been written and all zeroes are returned (no - * bad DQs). - * - * This HWP should be called by HWP/PLAT code to access the BAD DQ Bitmap - * - * Note that the MSB of each byte corresponds to the lowest DQ. - * if (data[1][0] == 0x80) then rank 1, Centaur DQ0 is bad - * if (data[1][0] == 0x40) then rank 1, Centaur DQ1 is bad - * if (data[1][1] == 0x20) then rank 1, Centaur DQ10 is bad - * - * @param[in] i_mba Reference to MBA Target - * @param[in] i_dimm Reference to DIMM Target - * @param[io] io_data Reference to bad DQ bitmap data for the DIMM. - * @param[in] i_get True if getting DQ Bitmap data. False if setting data. - * - * @return ReturnCode - */ -fapi::ReturnCode dimmBadDqBitmapAccessHwp( - const fapi::Target & i_mba, - const fapi::Target & i_dimm, - uint8_t (&io_data)[DIMM_DQ_MAX_DIMM_RANKS][DIMM_DQ_RANK_BITMAP_SIZE], - const bool i_get); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/dimmBadDqBitmapFuncs.H b/src/include/usr/hwpf/hwp/dimmBadDqBitmapFuncs.H deleted file mode 100644 index f90e15925..000000000 --- a/src/include/usr/hwpf/hwp/dimmBadDqBitmapFuncs.H +++ /dev/null @@ -1,95 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/dimmBadDqBitmapFuncs.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: dimmBadDqBitmapFuncs.H,v 1.2 2013/08/13 20:30:25 mjjones Exp $ -/** - * @file dimmBadDqBitmapFuncs.H - * - * @brief FW Team Utility functions that accesses the Bad DQ Bitmap. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 02/17/2012 Created. - */ - -#ifndef DIMMBADDQBITMAPFUNCS_H_ -#define DIMMBADDQBITMAPFUNCS_H_ - -#include <fapi.H> -#include <dimmConsts.H> - -extern "C" -{ - -/** - * @brief FW Team Utility function that gets the Bad DQ Bitmap. - * - * This utility functon should be called by a HWP needing to get the Bad DQ - * bitmap for a particular mba, port, dimm and rank. - * - * This function finds the corresponding DIMM Target, calls - * dimmBadDqBitmapAccessHwp to get the DQ bitmap and returns the data - * for the specified rank. - * - * @param[in] i_mba Reference to MBA Chiplet - * @param[in] i_port MBA port number (0-(DIMM_DQ_MAX_MBA_PORTS - 1)) - * @param[in] i_dimm MBA port DIMM number (0-(DIMM_DQ_MAX_MBAPORT_DIMMS - 1)) - * @param[in] i_rank DIMM rank number (0-(DIMM_DQ_MAX_DIMM_RANKS -1)) - * @param[out] o_data Reference to data where Bad DQ bitmap is copied to - * - * @return ReturnCode - */ -fapi::ReturnCode dimmGetBadDqBitmap(const fapi::Target & i_mba, - const uint8_t i_port, - const uint8_t i_dimm, - const uint8_t i_rank, - uint8_t (&o_data)[DIMM_DQ_RANK_BITMAP_SIZE]); - -/** - * @brief FW Team Utility function that sets the Bad DQ Bitmap. - * - * This utility functon should be called by a HWP needing to set the Bad DQ - * bitmap for a particular mba, port, dimm and rank. - * - * This utility function finds the corresponding DIMM Target, calls - * dimmBadDqBitmapAccessHwp to get the DQ bitmap, fills in the data for the - * specified rank and calls dimmBadDqBitmapAccessHwp to set the DQ bitmap - * - * @param[in] i_mba Reference to MBA Chiplet - * @param[in] i_port MBA port number (0-(DIMM_DQ_MAX_MBA_PORTS - 1)) - * @param[in] i_dimm MBA port DIMM number (0-(DIMM_DQ_MAX_MBAPORT_DIMMS - 1)) - * @param[in] i_rank DIMM rank number (0-(DIMM_DQ_MAX_DIMM_RANKS -1)) - * @param[in] i_data Reference to data where Bad DQ bitmap is copied from - * - * @return ReturnCode - */ -fapi::ReturnCode dimmSetBadDqBitmap(const fapi::Target & i_mba, - const uint8_t i_port, - const uint8_t i_dimm, - const uint8_t i_rank, - const uint8_t (&i_data)[DIMM_DQ_RANK_BITMAP_SIZE]); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/dimmConsts.H b/src/include/usr/hwpf/hwp/dimmConsts.H deleted file mode 100644 index 8a049f312..000000000 --- a/src/include/usr/hwpf/hwp/dimmConsts.H +++ /dev/null @@ -1,70 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/dimmConsts.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2012,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 */ -/** - * @file dimmConsts.H - * - * @brief DIMM Constants - */ -// $Id: dimmConsts.H,v 1.5 2014/11/03 17:16:17 eliner Exp $ -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 02/17/2012 Created. - */ - -#ifndef DIMMCONSTS_H_ -#define DIMMCONSTS_H_ - -// Maximum number of ports on an MBA -const uint8_t DIMM_DQ_MAX_MBA_PORTS = 2; - -// Maximum number of DIMMs attached to an MBA PORT -const uint8_t DIMM_DQ_MAX_MBAPORT_DIMMS = 2; - -// Maximum number of ranks on a DIMM -const uint8_t DIMM_DQ_MAX_DIMM_RANKS = 4; - -// Size in bytes of the Bad DQ bitmap for a rank. -const uint8_t DIMM_DQ_RANK_BITMAP_SIZE = 10; - -// Number of DQs (data query pins). -// This is the number of bits in DIMM_DQ_RANK_BITMAP_SIZE. -const uint8_t DIMM_DQ_NUM_DQS = DIMM_DQ_RANK_BITMAP_SIZE * 8; - -// Size in bytes of Bad DQ Data in DIMM SPD -// This must be big enough to contain the bitmap for each rank -// (DIMM_DQ_MAX_DIMM_RANKS * DIMM_DQ_RANK_BITMAP_SIZE), plus the header -const uint8_t DIMM_DQ_SPD_DATA_SIZE = 80; - -//ISDIMM to C4 DQ and DQS constant -//Number of Ports needed in the array -const uint8_t DIMM_TO_C4_PORTS = 4; -//Number of entries in the DQ attribute -const uint8_t DIMM_TO_C4_DQ_ENTRIES = 80; -//Number of entries in the DQS attribute -const uint8_t DIMM_TO_C4_DQS_ENTRIES = 20; - -#endif diff --git a/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H b/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H deleted file mode 100644 index b0899683e..000000000 --- a/src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.H +++ /dev/null @@ -1,218 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/erepairAccessorHwpFuncs.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: erepairAccessorHwpFuncs.H,v 1.2 2014/04/29 11:59:25 bilicon Exp $ -/** - * @file erepairAccessorHwpFuncs.H - * - * @brief FW Team Utility functions that accesses fabric and memory eRepair - * data. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * bilicon 10/24/2012 Created. - */ - -#ifndef EREPAIRACCESSORHWPFUNCS_H_ -#define EREPAIRACCESSORHWPFUNCS_H_ - -#include <fapi.H> -#include <algorithm> - -const uint8_t EREPAIR_MAX_CENTAUR_PER_MCS = 1; - -typedef fapi::ReturnCode (*getLanes_t)( - const fapi::Target &i_tgtHandle, - std::vector<uint8_t> &o_txFailLanes, - std::vector<uint8_t> &o_rxFailLanes); - -typedef fapi::ReturnCode (*setLanes_t)( - const fapi::Target &i_tgtHandle, - const std::vector<uint8_t> &i_txFailLanes, - const std::vector<uint8_t> &i_rxFailLanes); - -/** - * @brief FW Team Utility function that gets eRepair data from the VPD - * This function gets the eRepair data from both the Field VPD - * and the Manufacturing VPD. - * - * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target - * @param[out] o_txFailLanes Reference to a Vector that will contain the fail - * lanes read from the VPD for Drive side - * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail - * lanes read from the VPD for Receive side - * @return ReturnCode - * - */ -fapi::ReturnCode erepairGetFailedLanes(const fapi::Target &i_endp_target, - std::vector<uint8_t> &o_txFailLanes, - std::vector<uint8_t> &o_rxFailLanes); - -/** - * @brief FW Team Utility function that gets eRepair data - * - * This is a wrapper function for the Accessor HWP which reads failed lane - * numbers from the Field VPD - * - * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target - * @param[out] o_txFailLanes Reference to a Vector that will contain the fail - * lanes read from the Field VPD for Drive side - * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail - * lanes read from the Field VPD for Receive side - * @return ReturnCode - * - */ -fapi::ReturnCode erepairGetFieldFailedLanes(const fapi::Target &i_endp_target, - std::vector<uint8_t> &o_txFailLanes, - std::vector<uint8_t> &o_rxFailLanes); - -/** - * @brief FW Team Utility function that gets eRepair data - * - * This is a wrapper function for the Accessor HWP which reads failed lane - * numbers from the Manufacturing VPD - * - * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target - * @param[out] o_txFailLanes Reference to a Vector that will contain the fail - * lanes read from the Mnfg VPD for Drive side - * @param[out] o_rxFailLanes Reference to a Vector that will contain the fail - * lanes read from the Mnfg VPD for Receive side - * @return ReturnCode - * - */ -fapi::ReturnCode erepairGetMnfgFailedLanes(const fapi::Target &i_endp_target, - std::vector<uint8_t> &o_txFailLanes, - std::vector<uint8_t> &o_rxFailLanes); - -/** - * @brief FW Team Utility function that sets eRepair data in the VPD. - * This functions sets the eRepair data to either the Field VPD - * or the Manufacturing VPD depending on whether the IPL was done - * in normal mode or Manufacturing mode. - * It writes eRepair data to the VPD of both the endpoint targets - * passed as arguments. - * - * @param[in] i_txEndp_target Reference to X-Bus or A-Bus or MCS or memBuf - * Target. This is the peer target of - * i_rxEndp_target - * @param[in] i_rxEndp_target Reference to X-Bus or A-Bus or MCS or memBuf - * Target. This is the target on which the - * badlanes were found - * @param[in] i_rxFailLanes Vector that will contain the fail lanes - * to be written to VPD for Receive side - * @param[out] o_thresholdExceed If TRUE, indicates that the eRepair threshold - * has exceeded, FALSE otherwise. - * - * @return ReturnCode - */ -fapi::ReturnCode erepairSetFailedLanes( - const fapi::Target &i_txEndp_target, - const fapi::Target &i_rxEndp_target, - const std::vector<uint8_t> &i_rxFailLanes, - bool &o_thresholdExceed); - -/** - * @brief FW Team Utility function that sets eRepair data in Field VPD - * - * This is a wrapper function for the Accessor HWP which writes failed lane - * numbers to the Field VPD - * - * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target - * @param[in] i_txFailLanes Vector that will contain the fail lane - * to be written to Field VPD for Drive side - * @param[in] i_rxFailLanes Vector that will contain the fail lanes - * to be written to Field VPD for Receive side - * - * @return ReturnCode - */ -fapi::ReturnCode erepairSetFieldFailedLanes( - const fapi::Target &i_endp_target, - const std::vector<uint8_t> &i_txFailLanes, - const std::vector<uint8_t> &i_rxFailLanes); - -/** - * @brief FW Team Utility function that sets eRepair data in Manufacturing VPD - * - * This is a wrapper function for the Accessor HWP which writes failed lane - * numbers to the Manufacturing VPD - * - * @param[in] i_endp_target Reference to X-Bus or A-Bus or MCS or memBuf Target - * @param[in] i_txFailLanes Vector that will contain the fail lane - * to be written to Mnfg VPD for Drive side - * @param[in] i_rxFailLanes Vector that will contain the fail lanes - * to be written to Mnfg VPD for Receive side - * - * @return ReturnCode - */ -fapi::ReturnCode erepairSetMnfgFailedLanes( - const fapi::Target &i_endp_target, - const std::vector<uint8_t> &i_txFailLanes, - const std::vector<uint8_t> &i_rxFailLanes); - -/** - * @brief Function which retrieves the lanes that need to be restored for the - * given end point targets - * - * This function is called by the iStep dispatcher during the Restore Repair - * iStep for Fabric buses and DMI buses. The caller need to make sure that the - * first and fourth arguments are the endpoint targets of a Fabric bus or - * DMI bus. - * It calls the wrapper functions of Accessor HWP to read the fail lane data - * recorded in the VPD on both the ends and verifies that there are matching - * records on both the ends. If matching fail lanes are not found, the - * corresponding fail lane data is invalidated using the wrapper Accessor HWP - * that writes data to the VPD. - * - * @param [in] i_endp1_target Reference to X-Bus or A-Bus or MCS Target - * @param [out] o_endp1_txFaillanes Reference to vector that will have the - * fail lane numbers that need to be restored - * for the Tx side of the target passed - * as first param - * @param [out] o_endp1_rxFaillanes Reference to vector that will have the - * fail lane numbers that need to be restored - * for the Rx side of the target passed - * as first param - * @param [in] i_endp2_target Reference to X-Bus or A-Bus or MCS Target - * @param [out] o_endp2_txFaillanes Reference to vector that will have the - * fail lane numbers that need to be restored - * for the Tx side of the target passed - * as fourth param - * @param [out] o_endp2_rxFaillanes Reference to vector that will have the - * fail lane numbers that need to be restored - * for the Rx side of the target passed - * as fourth param - * - * @return ReturnCode - * - */ - -fapi::ReturnCode erepairGetRestoreLanes(const fapi::Target &i_endp1_target, - std::vector<uint8_t> &o_endp1_txFaillanes, - std::vector<uint8_t> &o_endp1_rxFaillanes, - const fapi::Target &i_endp2_target, - std::vector<uint8_t> &o_endp2_txFaillanes, - std::vector<uint8_t> &o_endp2_rxFaillanes); - -#endif diff --git a/src/include/usr/hwpf/hwp/erepairConsts.H b/src/include/usr/hwpf/hwp/erepairConsts.H deleted file mode 100644 index 0ad6684e9..000000000 --- a/src/include/usr/hwpf/hwp/erepairConsts.H +++ /dev/null @@ -1,184 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/erepairConsts.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: erepairConsts.H,v 1.3 2014/04/29 11:59:35 bilicon Exp $ -/** - * @file eRepairConsts.H - * - * @brief eRepair Constants - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * bilicon 09/14/2012 Created. - */ - -#ifndef EREPAIRCONSTS_H_ -#define EREPAIRCONSTS_H_ - - -/****************************************************************************** - * Erepair constants - *****************************************************************************/ - -namespace EREPAIR -{ - -const uint8_t INVALID_FAIL_LANE_NUMBER = 0xFF; - -// X-Bus is 78+2 lanes wide in 8 byte mode -// X-Bus is 44+2 lanes wide in 4 byte mode -// Data lanes numbering: 0 - 77 in 8 byte mode -// Spare lanes numbering: 78, 79 in 8 byte mode -// Data lanes numbering: 0 - 43 in 4 byte mode -// Spare lanes numbering: 44, 45 in 8 byte mode -const uint8_t XBUS_8_ACTIVE_LANE_START = 0; -const uint8_t XBUS_8_ACTIVE_LANE_END = 77; - -const uint8_t XBUS_4_ACTIVE_LANE_START = 0; -const uint8_t XBUS_4_ACTIVE_LANE_END = 43; - -const uint8_t XBUS_SPARE_DEPLOY_LANE_1 = 0; -const uint8_t XBUS_SPARE_DEPLOY_LANE_2 = 1; -const uint8_t XBUS_MAXSPARES_IN_HW = 2; - -// A-Bus is 21+1 lanes wide. -// Data lanes numbering: 0 - 20 -// Spare lane numbering: 21 -const uint8_t ABUS_ACTIVE_LANE_START = 0; -const uint8_t ABUS_ACTIVE_LANE_END = 20; - -const uint8_t ABUS_SPARE_DEPLOY_LANE_1 = 0; -const uint8_t ABUS_MAXSPARES_IN_HW = 1; - -// UpStream DMI-Bus is 21+2 lanes wide. -// Data lanes numbering: 0 - 20 -// Spare lanes numbering: 21, 22 -const uint8_t DMIBUS_UPSTREAM_ACTIVE_LANE_START = 0; -const uint8_t DMIBUS_UPSTREAM_ACTIVE_LANE_END = 20; - -// DownStream DMI-Bus is 14+2 lanes wide. -// Data lanes numbering: 0 - 13 -// Spare lanes numbering: 14, 15 -const uint8_t DMIBUS_DOWNSTREAM_ACTIVE_LANE_START = 0; -const uint8_t DMIBUS_DOWNSTREAM_ACTIVE_LANE_END = 13; - -const uint8_t DMIBUS_SPARE_DEPLOY_LANE_1 = 0; -const uint8_t DMIBUS_SPARE_DEPLOY_LANE_2 = 1; -const uint8_t DMIBUS_MAXSPARES_IN_HW = 2; - -const uint32_t EREPAIR_P8_MODULE_VPD_FIELD_SIZE = 0x154; // 340 bytes -const uint32_t EREPAIR_P8_MODULE_VPD_MNFG_SIZE = 0xC4; // 196 bytes -const uint32_t EREPAIR_MEM_FIELD_VPD_SIZE_PER_CENTAUR = 0x1C; // 28 bytes -const uint32_t EREPAIR_MEM_MNFG_VPD_SIZE_PER_CENTAUR = 0x14; // 20 bytes - -enum busType -{ - UNKNOWN_BUS_TYPE = 0, - PROCESSOR_EI4 = 1, - PROCESSOR_EDI = 2, - MEMORY_EDI = 3 -}; - -enum interfaceType -{ - UNKNOWN_INT_TYPE = 0, - PBUS_DRIVER = 1, // X-Bus, A-Bus transmit - PBUS_RECEIVER = 2, // X-Bus, A-Bus receive - DMI_MCS_RECEIVE = 3, // MCS receive - DMI_MCS_DRIVE = 4, // MCS transmit - DMI_MEMBUF_RECEIVE = 5, // Centaur receive - DMI_MEMBUF_DRIVE = 6, // Centaur transmit - DRIVE = 7, // Tx - RECEIVE = 8 // Rx -}; - -// VPD Type to read-write -enum erepairVpdType -{ - EREPAIR_VPD_UNKNOWN = 0, - EREPAIR_VPD_MNFG = 1, - EREPAIR_VPD_FIELD = 2, -}; - -}// end of EREPAIR namespace - -/****************************************************************************** - * VPD Structures. - *****************************************************************************/ - -// eRepair Header -struct eRepairHeader -{ - struct - { - uint8_t eye1; - uint8_t eye2; - uint8_t eye3; - }eyeCatcher; - - uint8_t numRecords; -}; - -// Device info structure of the P8 Processor -struct eRepairProcDevInfo -{ - uint8_t processor_id;// Range:0x00-0xFF. Value:Processor MRU IDs - uint8_t fabricBus; // Range:0x00-0xFF. Value: FabricBus(ATTR_CHIP_UNIT_POS) -}; - -// eRepair structure for failing lanes on Power Bus -struct eRepairPowerBus -{ - eRepairProcDevInfo device; // Device info of P8 - uint8_t type :4; // Range:0x0-0xF. Value:PROCESSOR_EI4, - // PROCESSOR_EDI - uint8_t interface :4; // Range:0x0-0xF. Value:PBUS_DRIVER, - // PBUS_RECEIVER - uint8_t failBit; // Range:0x00-0xFF. Value:Failing lane number -}; - - -// Device info structure of the endpoints of the Memory Channel -struct eRepairMemDevInfo -{ - uint8_t proc_centaur_id;// Range:0x00-0xFF.Value:Processor or Centaur MRU ID - uint8_t memChannel; // Range:0x00-0xFF.Value: MemoryBus(ATTR_CHIP_UNIT_POS) -}; - -// eRepair structure of failing lanes on Memory Channel -struct eRepairMemBus -{ - eRepairMemDevInfo device; // Device info of P8 and Centaur - uint8_t type :4;// Range:0x0-0xF. Value:MEMORY_EDI - uint8_t interface :4;// Range:0x0-0xF. Value:MCS_Receive, - // MCS_Drive, - // memBuf_Receive, - // memBuf_Drive - uint8_t failBit; // Range:0x00-0xFF. - // Value:Failing lane number:0-13 OR 0-20 - // depends on DownStream or UpStream -}; - -#endif diff --git a/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H deleted file mode 100644 index bcbc7b3a8..000000000 --- a/src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.H +++ /dev/null @@ -1,78 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/erepairGetFailedLanesHwp.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: erepairGetFailedLanesHwp.H,v 1.3 2014/04/29 11:59:55 bilicon Exp $ -/** - * @file erepairGetFailedLanesHwp.H - * - * @brief FW Team HWP that accesses the fail lanes of Fabric and Memory buses. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * bilicon 09/14/2012 Created. - */ - -#ifndef EREPAIRGETFAILEDLANESHWP_H_ -#define EREPAIRGETFAILEDLANESHWP_H_ - -#include <fapi.H> -#include <erepairConsts.H> - - -typedef fapi::ReturnCode (*erepairGetFailedLanesHwp_FP_t)( - const fapi::Target &i_tgtHandle, - EREPAIR::erepairVpdType i_vpdType, - std::vector<uint8_t> &o_txFailLanes, - std::vector<uint8_t> &o_rxFailLanes); - -extern "C" -{ - -/** - * @brief FW Team HWP that retrieves the eRepair fail lanes. - * It retrieves the eRepair data from the P8 MVPD and the Centaur FRU - * VPD sections depending on the passed target type. It then parses the - * eRepair data to determine the fail lane numbers on the sub-interfaces - * (Tx and Rx) of the passed bus target. - * - * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or memBuf Target - * @param[in] i_vpdType Specifies which VPD (MNFG or Field) to access. - * @param[o] o_txFailLanes Reference to a vector that will hold eRepair fail - * lane numbers of the Tx sub-interface. - * @param[o] o_rxFailLanes Reference to a vector that will hold eRepair fail - * lane numbers of the Rx sub-interface. - * - * @return ReturnCode - * - */ -fapi::ReturnCode erepairGetFailedLanesHwp( - const fapi::Target &i_tgtHandle, - EREPAIR::erepairVpdType i_vpdType, - std::vector<uint8_t> &o_txFailLanes, - std::vector<uint8_t> &o_rxFailLanes); - -}// end of extern C - -#endif diff --git a/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H b/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H deleted file mode 100755 index 52f58e77e..000000000 --- a/src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.H +++ /dev/null @@ -1,78 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/erepairSetFailedLanesHwp.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 */ -// $Id: erepairSetFailedLanesHwp.H,v 1.2 2014/04/30 09:45:10 bilicon Exp $ -/** - * @file erepairSetFailedLanesHwp.H - * - * @brief FW Team HWP that accesses the fail lanes of Fabric and Memory buses. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * bilicon 10-Jan-2013 Created. - */ - -#ifndef EREPAIRSETFAILEDLANESHWP_H_ -#define EREPAIRSETFAILEDLANESHWP_H_ - -#include <fapi.H> -#include <erepairConsts.H> - - -typedef fapi::ReturnCode (*erepairSetFailedLanesHwp_FP_t)( - const fapi::Target &i_tgtHandle, - EREPAIR::erepairVpdType i_vpdType, - const std::vector<uint8_t> &i_txFailLanes, - const std::vector<uint8_t> &i_rxFailLanes); - -extern "C" -{ - -/** - * @brief FW Team HWP that writes the eRepair fail lanes to the VPD. - * The fail lanes will be written to either the P8 MVPD or the - * Centaur FRU VPD depending on the passed target type. - * - * @param[in] i_tgtHandle Reference to X-Bus or A-Bus or MCS or memBuf Target - * @param[in] i_vpdType Specifies which VPD (MNFG or Field) to access. - * @param[in] i_txFailLanes Reference to a vector that has the Tx side - * (of i_tgtHandle) fail lane numbers that need - * to be written to the VPD - * @param[in] i_rxFailLanes Reference to a vector that has the Rx side - * (of i_tgtHandle) fail lane numbers that need - * to be written to the VPD - * - * @return ReturnCode - * - */ -fapi::ReturnCode erepairSetFailedLanesHwp( - const fapi::Target &i_tgtHandle, - EREPAIR::erepairVpdType i_vpdType, - const std::vector<uint8_t> &i_txFailLanes, - const std::vector<uint8_t> &i_rxFailLanes); - -}// end of extern C - -#endif diff --git a/src/include/usr/hwpf/hwp/fapiHwpExecInitFile.H b/src/include/usr/hwpf/hwp/fapiHwpExecInitFile.H deleted file mode 100644 index 9e8f573ab..000000000 --- a/src/include/usr/hwpf/hwp/fapiHwpExecInitFile.H +++ /dev/null @@ -1,68 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/fapiHwpExecInitFile.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 fapiHwpExecInitFile.H - * - * @brief Defines for Hardware Procedure initfile execution - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * camvanng 09/29/2011 Created. - * andrewg 11/16/2011 Refactor includes with initfile compiler - * camvanng 11/16/2011 Define function pointer to HWP - * camvanng 05/07/2012 Support for associated target attributes - * - */ - -#ifndef FAPIHWPEXECINITFILE_H_ -#define FAPIHWPEXECINITFILE_H_ - -#include <fapi.H> -#include <fapiHwpInitFileInclude.H> - -// HWPs are defined as C functions because platforms may wish to package them -// in linux shared libraries which are DL-Opened -extern "C" -{ - -//Provided for platforms that need to cast a generic function pointer into a -//function pointer of the correct type to call the HWP. -typedef fapi::ReturnCode (*fapiHwpExecInitFile_FP_t)(const std::vector<fapi::Target> & i_target, - const char * i_file); -/** -* @brief HWP to execute an initfile. -* -* @param[in] i_target Reference to std::vector of targets -* @param[in] i_file filename of binary initfile -* -* @return ReturnCode -*/ -fapi::ReturnCode fapiHwpExecInitFile(const std::vector<fapi::Target> & i_target, - const char * i_file); - -} // extern "C" - -#endif // FAPIHWPEXECINITFILE_H_ diff --git a/src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.H b/src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.H deleted file mode 100644 index 93e41935e..000000000 --- a/src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.H +++ /dev/null @@ -1,131 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/fapiHwpInitFileInclude.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 */ -/** - * @file fapiHwpInitFileInclude.H - * - * @brief Common defines for Hardware Procedure initfile execution - */ -// $Id: fapiHwpInitFileInclude.H,v 1.4 2014/06/27 19:20:10 thi Exp $ -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * andrewg 11/09/2011 Created. - * camvanng 11/16/2011 Support for system & target - * attributes - * camvanng 05/07/2012 Support for associated - * target attributes - * camvanng 06/15/2012 Ability to do bitwise OR and - * AND operations - */ - -#ifndef FAPIHWPINITFILEINCLUDE_H_ -#define FAPIHWPINITFILEINCLUDE_H_ - -/** - * @brief Enumeration of RPN ops - */ -enum IfRpnOp -{ - AND = 0x00000001, - OR = 0x00000002, - NOT = 0x00000003, - EQ = 0x00000004, - NE = 0x00000005, - GT = 0x00000006, - GE = 0x00000007, - LT = 0x00000008, - LE = 0x00000009, - PLUS = 0x0000000A, - MINUS = 0x0000000B, - MULT = 0x0000000C, - DIVIDE = 0x0000000D, - MOD = 0x0000000E, - LIST = 0x0000000F, - SHIFTLEFT = 0x00000010, - SHIFTRIGHT = 0x00000011, - FALSE_OP = 0x00000012, - TRUE_OP = 0x00000013, - BITWISEAND = 0x00000014, - BITWISEOR = 0x00000015, - LAST_OP = 0x00000016, - PUSH_MASK = 0x000000C0, - OP_MASK = 0x000000FF -}; - -/** - * @brief Enumeration of Type Mask - */ -enum IfTypeMask -{ - IF_NUM_TYPE = 0x4000, - IF_ATTR_TYPE = 0x8000, - IF_SYS_ATTR_TYPE = 0xA000, - IF_ASSOC_TGT_ATTR_TYPE = 0xC000, - IF_TYPE_MASK = 0xE000, -}; - -// Id mask -const uint16_t IF_ID_MASK = static_cast<uint16_t>(~IF_TYPE_MASK); - -// Only support up to 4 dimensions for an array -const uint8_t MAX_ATTRIBUTE_ARRAY_DIMENSION = 4; - -// Used for array size parsing -const uint8_t ATTR_DIMENSION_MASK = 0xF0; - -// Most significant nibble in 1 byte attribute type will indicate array dimension -const uint8_t ATTR_DIMENSION_SIZE_MULT = 0x10; - -/** - * @brief Enumeration of Attribute types - * - * Note that the most significant nibble is used to determine dimension size - * by the procedure executing the initfile. - */ -enum IfAttrType -{ - SYM_ATTR_UINT8_TYPE = 0x00, - SYM_ATTR_UINT8_ARRAY1_TYPE = 0x11, - SYM_ATTR_UINT8_ARRAY2_TYPE = 0x22, - SYM_ATTR_UINT8_ARRAY3_TYPE = 0x33, - SYM_ATTR_UINT8_ARRAY4_TYPE = 0x44, - SYM_ATTR_UINT32_TYPE = 0x05, - SYM_ATTR_UINT32_ARRAY1_TYPE = 0x16, - SYM_ATTR_UINT32_ARRAY2_TYPE = 0x27, - SYM_ATTR_UINT32_ARRAY3_TYPE = 0x38, - SYM_ATTR_UINT32_ARRAY4_TYPE = 0x49, - SYM_ATTR_UINT64_TYPE = 0x0A, - SYM_ATTR_UINT64_ARRAY1_TYPE = 0x1B, - SYM_ATTR_UINT64_ARRAY2_TYPE = 0x2C, - SYM_ATTR_UINT64_ARRAY3_TYPE = 0x3D, - SYM_ATTR_UINT64_ARRAY4_TYPE = 0x4E, -}; - - - - -#endif /* FAPIHWPINITFILEINCLUDE_H_ */ - diff --git a/src/include/usr/hwpf/hwp/fapiTestHwp.H b/src/include/usr/hwpf/hwp/fapiTestHwp.H deleted file mode 100644 index 52f4c5745..000000000 --- a/src/include/usr/hwpf/hwp/fapiTestHwp.H +++ /dev/null @@ -1,63 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/fapiTestHwp.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 fapiTestHwp.H - * - * @brief Defines a simple test Hardware Procedure - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/21/2011 Created. - * mjjones 06/28/2011 Updated comment - * mjjones 08/11/2011 Removed Clock HWP - * mjjones 10/17/2011 Added func pointer - * camvanng 05/07/2012 Support for associated - * attributes - */ - -#ifndef FAPITESTHW_H_ -#define FAPITESTHW_H_ - -#include <fapi.H> -#include <vector> - -typedef fapi::ReturnCode (*hwpInitialTest_FP_t)(const std::vector<fapi::Target> &); - -extern "C" -{ - -/** - * @brief A simple HWP. Can easily be modified by HW dev team for test - * - * @param[in] i_target Reference to std::vector of targets - * - * @return ReturnCode - */ -fapi::ReturnCode hwpInitialTest(const std::vector<fapi::Target> & i_target); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/fapiTestHwpConfig.H b/src/include/usr/hwpf/hwp/fapiTestHwpConfig.H deleted file mode 100644 index d34006e98..000000000 --- a/src/include/usr/hwpf/hwp/fapiTestHwpConfig.H +++ /dev/null @@ -1,59 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/fapiTestHwpConfig.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 fapiTestHwpConfig.H - * - * @brief Defines a Hardware Procedure that exercises the FAPI System Config - * Query functions. - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 09/12/2011 Created. - * mjjones 10/17/2011 Added func pointer - */ - -#ifndef FAPITESTHWCONFIG_H_ -#define FAPITESTHWCONFIG_H_ - -#include <fapi.H> - -typedef fapi::ReturnCode (*hwpTestConfig_FP_t)(const fapi::Target &); - -extern "C" -{ - -/** - * @brief A simple HWP that exercises the FAPI System Config Query functions. - * - * @param[in] i_chip Reference to target processor chip - * - * @return ReturnCode - */ -fapi::ReturnCode hwpTestConfig(const fapi::Target & i_chip); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/fapiTestHwpDq.H b/src/include/usr/hwpf/hwp/fapiTestHwpDq.H deleted file mode 100644 index ee7115117..000000000 --- a/src/include/usr/hwpf/hwp/fapiTestHwpDq.H +++ /dev/null @@ -1,57 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/fapiTestHwpDq.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 */ -/** - * @file fapiTestHwpDq.H - * - * @brief Test Hardware Procedure that exercises the bad DQ data - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 02/21/2012 Created - */ - -#ifndef FAPITESTHWPDQ_H_ -#define FAPITESTHWPDQ_H_ - -#include <fapi.H> - -typedef fapi::ReturnCode (*fapiTestHwpDq_FP_t)(const fapi::Target &); - -extern "C" -{ - -/** - * @brief Test Hardware Procedure that exercises the bad DQ data - * - * @param[in] i_mba Reference to MBA chiplet - * - * @return ReturnCode - */ -fapi::ReturnCode fapiTestHwpDq(const fapi::Target & i_mba); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/fapiTestHwpError.H b/src/include/usr/hwpf/hwp/fapiTestHwpError.H deleted file mode 100644 index a0324e3cf..000000000 --- a/src/include/usr/hwpf/hwp/fapiTestHwpError.H +++ /dev/null @@ -1,62 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/fapiTestHwpError.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 fapiTestHwpError.H - * - * @brief Defines a simple test Hardware Procedure that returns an error - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 08/08/2011 Created. - * mjjones 10/17/2011 Added func pointer - * rjknight 09/30/2013 Add 2nd target to fctn ptr - */ - -#ifndef FAPITESTHWPERROR_H_ -#define FAPITESTHWPERROR_H_ - -#include <fapi.H> - -typedef fapi::ReturnCode (*hwpTestError_FP_t)(const fapi::Target &T1, - const fapi::Target &T2); - -extern "C" -{ - -/** - * @brief Simple HWP that returns an error (RC_TEST_ERROR_A) - * - * @param[in] i_procTarget Reference to a processor target type - * @param[in] i_mbaTarget Reference to an mba target type - * - * @return ReturnCode - */ - fapi::ReturnCode hwpTestError(const fapi::Target& i_procTarget, - const fapi::Target& i_mbaTarget); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/fapiTestHwpFfdc.H b/src/include/usr/hwpf/hwp/fapiTestHwpFfdc.H deleted file mode 100644 index a0dd9ee77..000000000 --- a/src/include/usr/hwpf/hwp/fapiTestHwpFfdc.H +++ /dev/null @@ -1,60 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/fapiTestHwpFfdc.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 fapiTestHwpFfdc.H - * - * @brief Defines a simple test Hardware Procedure that collects FFDC data - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 08/08/2011 Created. - * mjjones 10/17/2011 Added func pointer - */ - -#ifndef FAPITESTHWPFFDC_H_ -#define FAPITESTHWPFFDC_H_ - -#include <fapi.H> - -typedef fapi::ReturnCode (*hwpTestFfdc1_FP_t)(const fapi::Target &, fapi::ReturnCode &); - -extern "C" -{ - -/** - * @brief Simple FFDC HWP that collects TestFfdc1 data - * - * @param[in] i_target Reference to target (unused by this HWP) - * @param[out] o_rc Reference to ReturnCode that is updated with FFDC - * - * @return ReturnCode - */ -fapi::ReturnCode hwpTestFfdc1(const fapi::Target & i_target, - fapi::ReturnCode & o_rc); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/DQCompressionLib.H b/src/include/usr/hwpf/hwp/mvpd_accessors/DQCompressionLib.H deleted file mode 100644 index 6b14c5081..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/DQCompressionLib.H +++ /dev/null @@ -1,72 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/DQCompressionLib.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: DQCompressionLib.H,v 1.7 2014/11/12 20:03:25 pragupta Exp $ - -/* @file DQCompressionLib.H - * - * @brief Header file DQCompressionLib - * - */ - -#ifndef __DQCOMPRESSIONLIB_H -#define __DQCOMPRESSIONLIB_H - -#include <ecmdDataBufferBase.H> -#include <vector> -#include <algorithm> -#include <string.h> -#include <stdio.h> -#ifdef DQCOMPRESSION_TEST -#define DQ_TRAC(fmt,args...) FAPI_INF (fmt, ##args) -#else -#define DQ_TRAC(fmt,args...) printf(fmt, ##args) -#endif -namespace DQCompression -{ - //ERROR CODES - //Mapping of these error codes to error messages - //are in DQCompressionReasonCodes.H - enum ErrCodes - { - NO_ERR = 0, - ECMD_OPER_ERROR, - INVALID_INPUT, - INVALID_ARRAY_TYPE, - LAST_ERR, - }; -/** - * @brief Calculates the encoding for DQ or DQS arrays for one port - * to be stored in VPD - * @param i_data DQ or DQS array as a vector - * @param i_arrayType type of array being passed in (DQ/DQS) - * @param o_encodeData: 17 bytes of data for DQ and - * 2 bytes of data for DQS - * @retval ErrCodes Values - */ - int encodeDQ (std::vector<uint8_t>& i_data, - uint32_t i_arrayType, ecmdDataBufferBase& o_encodedData); -} -#endif - diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H b/src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H deleted file mode 100644 index 54ce1ff52..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H +++ /dev/null @@ -1,71 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.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 */ -// $Id: accessMBvpdL4BankDelete.H,v 1.2 2013/11/21 17:17:30 whs Exp $ -/** - * @file accessMBvpdL4BankDelete.H - * - * @brief MBvpd accessor for the ATTR_L4_BANK_DELETE_VPD attribute - */ - -#ifndef _HWP_ACCESSMBVPDL4BANKDELETE_ -#define _HWP_ACCESSMBVPDL4BANKDELETE_ - -#include <fapi.H> - -namespace fapi -{ - -// mode - enum MBvpdL4BankDeleteMode - { - GET_L4_BANK_DELETE_MODE = 0, // retrieve value from vpd - SET_L4_BANK_DELETE_MODE = 1, // update value in vpd - }; -} - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*accessMBvpdL4BankDelete_FP_t) - (const fapi::Target &, - uint32_t &, - const fapi::MBvpdL4BankDeleteMode); - -extern "C" -{ -/** - * @brief MBvpd accessor for the ATTR_L4_BANK_DELETE_VPD attribute - * - * Access L4 Bank Delete value in MBvpd record VSPD keyword MX. - * - * @param[in] i_mbTarget - Reference to mb Target - * @param[in,out] io_val - retrived MX value or value to use to update MX vpd - * @param[in] i_mode - set or get mode - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode accessMBvpdL4BankDelete( - const fapi::Target & i_mbTarget, - uint32_t & io_val, - const fapi::MBvpdL4BankDeleteMode i_mode ); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.H deleted file mode 100644 index 8e68566eb..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.H +++ /dev/null @@ -1,51 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getControlCapableData.H, v 1.1 2014/9/4 09:05:00 eliner Exp $ -/** - * @file getControlCapable.H - * - * @brief MBvpd accessor for the ATTR_VPD_POWER_CONTROL_CAPABLE attributes - */ - -#ifndef _HWP_MVPDCONTROLCAPABLEDATA_ -#define _HWP_MVPDCONTROLCAPABLEDATA_ - -extern "C" -{ -/** - * @brief MBvpd accessor for the ATTR_VPD_POWER_CONTROL_CAPABLE attribute - * - * Access Power control capable value in MBvpd record VSPD keyword MR - * - * @param[in] i_mbTarget - Reference to mb Target - * @param[out] o_val - retrieved MR value - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getControlCapableData(const fapi::Target &i_mbTarget, - uint8_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getDQAttrISDIMM.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getDQAttrISDIMM.H deleted file mode 100644 index 92ac0e59d..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getDQAttrISDIMM.H +++ /dev/null @@ -1,58 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getDQAttrISDIMM.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getDQAttrISDIMM.H, v 1.1 2014/9/25 04:38:00 eliner Exp $ -/* - * @file getDQAttrISDIMM.H - * - * @brief MBvpd accessor for the ATTR_VPD_ISDIMMTOC4DQ attribute - */ - -#ifndef _HWP_MVPDGETDQATTRISDIMM_ -#define _HWP_MVPDGETDQATTRISDIMM_ - -typedef fapi::ReturnCode (*getDQAttrISDIMM_FP_t) - (const fapi::Target &, - uint8_t (&)[4][80]); - -extern "C" -{ - -/* - * @brief MBvpd accessor for the ATTR_VPD_ISDIMMTOC4DQ attribute - * - * Access the compressed DQ data in the MBvpd record SPDX, keyword Q1-Q9 - * - * @param[in] i_mbTarget - Reference to mb Target - * @param[out] o_val[4][80] - Decoded Q data - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ - -fapi::ReturnCode getDQAttrISDIMM( - const fapi::Target &i_mbTarget, - uint8_t (&o_val)[4][80]); - -} -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getDQSAttrISDIMM.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getDQSAttrISDIMM.H deleted file mode 100644 index 593e669fd..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getDQSAttrISDIMM.H +++ /dev/null @@ -1,57 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getDQSAttrISDIMM.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getDQSAttrISDIMM.H, v 1.1 2014/9/25 04:38:00 eliner Exp $ -/* - * @file getDQSAttrISDIMM.H - * - * @brief MBvpd accessor for the ATTR_VPD_ISDIMMTOC4DQS attribute - */ - -#ifndef _HWP_MVPDGETDQSATTRISDIMM_ -#define _HWP_MVPDGETDQSATTRISDIMM_ - -typedef fapi::ReturnCode (*getDQSAttrISDIMM_FP_t) - (const fapi::Target &, - uint8_t (&)[4][20]); - -extern "C" -{ -/* - * @brief MBvpd accessor for the ATTR_VPD_ISDIMMTOC4DQS attribute - * - * Access the compressed DQS data in the MBvpd record, SPDX, keyword K1-K9 - * - * @param[in] i_mbTarget - Reference to mb Target - * @param[out] o_val[4][20] - Decoded K data - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ - -fapi::ReturnCode getDQSAttrISDIMM( - const fapi::Target &i_mbTarget, - uint8_t (&o_val)[4][20]); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getDecompressedISDIMMAttrs.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getDecompressedISDIMMAttrs.H deleted file mode 100644 index 8a46ac8a1..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getDecompressedISDIMMAttrs.H +++ /dev/null @@ -1,109 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getDecompressedISDIMMAttrs.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getDecompressedISDIMMAttrs.H, v 1.1 2014/9/26 09:22:00 eliner Exp $ -/** - * @file getDecompressedISDIMMAttrs.H - * - * @brief Decompresses the ISDIMMToC4DQ and DQS Attributes for proper use - */ -extern "C" -{ - -/** - * @brief Un-permeates the decimal input into an array of variable size - * - * @param[in] i_permNum - Decimal number to un-permeate - * @param[in] i_finalSize - Final Size of the variable array - * @param[out] o_array - Created Array of un-permeated numbers - */ -void antiPermutation(int i_permNum, int* o_array,int i_finalSize); - -/** - * @brief Translates the array from the condensed version to the - * actual information - * example: [1,0,0,5,1,1,1,1,0] -> [1,0,2,8,4,5,6,7,3] - * - * @param[in] i_array - condensed array of information - * @param[in] i_size - size of array - * @param[out] o_result - translated array of information - */ -void unPermeateToVector(int* i_array, int i_size, std::vector<int>& o_result); - -/** - * @brief Separates the input into the 4 needed parts; nibble swap, nibble - * to nibble relationship, DQS nibble swap, and the byte to - * byte relationship - * - * @param[in] i_toSeparateDQ - contains all the information for DQ - * @param[in] i_toSeparateDQS - contains all the information for DQS - * @param[out] o_nibSwap - DQ nibble swap information - * @param[out] o_nibToNib - nibble to nibble relationship - * @param[out[ o_nibSwapDQS - DQS nibble swap information - * - * @return int - byte to byte relationship information - */ -int getSeparatedInformation(ecmdDataBufferBase& i_toSeparateDQ, - ecmdDataBufferBase& i_separateDQS, - int* o_nibSwap,int* o_nibToNib,int* o_nibSwapDQS); - -/** - * @brief Converts all information into the final DQ 80-byte array - * - * @param[out] o_final80Array - completed decompressed array - * @param[in] i_byteNums - translated relationship between the bytes - * @param[in] i_nibbleSwap - translated DQ nibble swap information - * @param[in] i_nibbleToNibNums - translated relationship between the nibbles - */ -void convertToFinal80Array(int* o_final80Array, - std::vector<int>& i_byteNums,int* i_nibbleSwap, - std::vector<std::vector<int> >& i_nibbleToNibNums); - -/** - * @brief Converts all the information into the final dQS 20-byte array - * - * @param[out] o_final20Array - completed decompressed array - * @param[in] i_byteNums - translated relationship between the bytes - * @param[in] i_nibbleSwap - translated DQS nibble swap information - */ -void convertToFinal20Array(int* o_final20Array,std::vector<int>& i_byteNums, - int* i_nibbleSwap); - -/** - * @brief Controls the flow of data from the different functions - * - * @param[in] i_dataDQ - original DQ information before any processing - * @param[in] i_dataDQS - original DQS information before any processing - * @param[out] o_finalArray - completed DQ decompressed array - * @param[out] o_finalDQSArray - completed DQS decompressed array - */ -void decodeISDIMMAttrs(ecmdDataBufferBase& i_dataDQ, - ecmdDataBufferBase& i_dataDQS, - uint8_t* o_finalArray, uint8_t* o_finalDQSArray); - -} - - - - diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getISDIMMTOC4DAttrs.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getISDIMMTOC4DAttrs.H deleted file mode 100644 index 83bdd9db0..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getISDIMMTOC4DAttrs.H +++ /dev/null @@ -1,56 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getISDIMMTOC4DAttrs.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2014,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: getISDIMMTOC4DAttrs.H, v 1.1 2014/9/25 04:38:00 eliner Exp $ -/* - * @file getISDIMMTOC4DAttrs.H - * - * @brief MBvpd accessor for the ATTR_VPD_ISDIMMTOC4DQ and DQS attributes - */ - -#ifndef _HWP_MVPDGETISDIMMTOC4DATTRS_ -#define _HWP_MVPDGETISDIMMTOC4DATTRS_ - -extern "C" -{ -const uint32_t DQ_KEYWORD_SIZE = 96; - -/* - * @brief Utility function for the ATTR_VPD_ISDIMMTOC4DQ attribute - * - * Given the D0 information, return the correct DQ copy. - * - * @param[in] i_mbTarget - Reference to mb Target - * @param[in] i_whichCopy - D0 information of which Q copy to get - * @param[out] o_DQKeyword - Correct DQ information - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ - -fapi::ReturnCode getDQAttribute(const fapi::Target &i_mbTarget, - uint32_t i_whichCopy, uint8_t (&o_DQKeyword)[DQ_KEYWORD_SIZE]); - -} -#endif - diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H deleted file mode 100644 index 80d04c804..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.H +++ /dev/null @@ -1,108 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.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: getMBvpdAddrMirrorData.H,v 1.1 2013/06/07 19:04:01 whs Exp $ - -/** - * @file getMBvpdAddrMirror.H - * - * @brief Prototype for getMBvpdAddrMirror() - - * get Address Mirroring Data from MBvpd - */ - -#ifndef _HWP_MBVPDADDRMIRRORDATA_ -#define _HWP_MBVPDADDRMIRRORDATA_ - -#include <fapi.H> - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdAddrMirrorData_FP_t) - (const fapi::Target &, uint8_t (&) [2][2]); - -extern "C" -{ -/** - * @brief get Address Mirroring Data from cvpd record VSPD keyword AM - * - * The Address Mirroring Data attributes are retrieved from cvpd record VSPD - * keyword AM. - * There are two mba per memory buffer: position 0 and position 1. - * There are two ports for each mba and 2 DIMMs per port. - * - * cpvd record VSPD keyword AM - 4 bytes - * ----------------------------------- - * | mba position 0 | - * | ----------------------------- | - * | | port 0 (Port A) | | - * | | ------------------------ | | - * | | | DIMM 0 : 4 bits | | | - * | | ------------------------ | | - * | | | DIMM 1 : 4 bits | | | - * | | ------------------------ | | - * | |---------------------------| | - * | | port 1 (Port B) | | - * | | ------------------------ | | - * | | | DIMM 0 : 4 bits | | | - * | | ------------------------ | | - * | | | DIMM 1 : 4 bits | | | - * | | ------------------------ | | - * | ----------------------------- | - * |---------------------------------| - * | mba postion 1 | - * | ----------------------------- | - * | | port 0 (Port C) | | - * | | ------------------------ | | - * | | | DIMM 0 : 4 bits | | | - * | | ------------------------ | | - * | | | DIMM 1 : 4 bits | | | - * | | ------------------------ | | - * | |---------------------------| | - * | | port 1 (Port D) | | - * | | ------------------------ | | - * | | | DIMM 0 : 4 bits | | | - * | | ------------------------ | | - * | | | DIMM 1 : 4 bits | | | - * | | ------------------------ | | - * | ----------------------------- | - * ----------------------------------- - * - * Bit definition - * - * RANK0_MIRRORED = 0x08, - * RANK1_MIRRORED = 0x04, - * RANK2_MIRRORED = 0x02, - * RANK3_MIRRORED = 0x01, - * - * @param[in] i_mbaTarget - mba target - * @param[out] o_val - 2 x 2 array of bytes ([num ports] [num dimms]) - * Address Mirroring 4 bits per dimm returned - * in the lower nibble of the byte for the mba - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ -fapi::ReturnCode getMBvpdAddrMirrorData( const fapi::Target &i_mbaTarget, - uint8_t (&o_val) [2][2]); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H deleted file mode 100644 index 591617411..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H +++ /dev/null @@ -1,493 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdAttr.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2014,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: getMBvpdAttr.H,v 1.7 2015/10/06 18:04:03 janssens Exp $ - -/** - * @file getMBvpdAttr.H - * - * @brief Prototype for getMBvpdAttr() - - * get Attribute Data from MBvpd - */ - -#ifndef _HWP_MBVPDATTR_ -#define _HWP_MBVPDATTR_ - -#include <fapi.H> -#include <fapiUtil.H> -#include <fapiMBvpdAccess.H> - -namespace fapi -{ -namespace getAttrData -{ - const uint32_t VM_00_MR_LAYOUT_KW_SIZE = 255; - const uint32_t VM_00_MR_LAYOUT_NON_PORT_HEAD_SIZE = 0; - const uint32_t VM_00_MR_LAYOUT_PORT_SEC_SIZE = 64; - const uint32_t VM_00_MT_LAYOUT_KW_SIZE = 255; - const uint32_t VM_00_MT_LAYOUT_NON_PORT_HEAD_SIZE = 0; - const uint32_t VM_00_MT_LAYOUT_PORT_SEC_SIZE = 64; - const uint32_t VM_01_MR_LAYOUT_KW_SIZE = 255; - const uint32_t VM_01_MR_LAYOUT_NON_PORT_HEAD_SIZE =2; - const uint32_t VM_01_MR_LAYOUT_PORT_SEC_SIZE = 64; - const uint32_t VM_01_MT_LAYOUT_KW_SIZE = 384; - const uint32_t VM_01_MT_LAYOUT_NON_PORT_HEAD_SIZE = 2; - const uint32_t VM_01_MT_LAYOUT_PORT_SEC_SIZE = 96; - - class keywordLayout - { - public: - virtual uint32_t getKeywordSize()=0; - virtual uint32_t getNonPortHeadSize()=0; - virtual uint32_t getPortSectionSize()=0; - virtual ~keywordLayout() {} - }; - class VM_00_MR_layout : public keywordLayout - { - public: - uint32_t getKeywordSize(){ return VM_00_MR_LAYOUT_KW_SIZE; } - uint32_t getNonPortHeadSize(){ return VM_00_MR_LAYOUT_NON_PORT_HEAD_SIZE; } - uint32_t getPortSectionSize(){ return VM_00_MR_LAYOUT_PORT_SEC_SIZE; } - ~VM_00_MR_layout() {} - }; - class VM_00_MT_layout : public keywordLayout - { - public: - uint32_t getKeywordSize(){ return VM_00_MT_LAYOUT_KW_SIZE; } - uint32_t getNonPortHeadSize(){ return VM_00_MT_LAYOUT_NON_PORT_HEAD_SIZE; } - uint32_t getPortSectionSize(){ return VM_00_MT_LAYOUT_PORT_SEC_SIZE; } - ~VM_00_MT_layout() {} - }; - class VM_01_MR_layout : public keywordLayout - { - public: - uint32_t getKeywordSize(){ return VM_01_MR_LAYOUT_KW_SIZE; } - uint32_t getNonPortHeadSize(){ return VM_01_MR_LAYOUT_NON_PORT_HEAD_SIZE; } - uint32_t getPortSectionSize(){ return VM_01_MR_LAYOUT_PORT_SEC_SIZE; } - ~VM_01_MR_layout() {} - }; - class VM_01_MT_layout : public keywordLayout - { - public: - uint32_t getKeywordSize(){ return VM_01_MT_LAYOUT_KW_SIZE; } - uint32_t getNonPortHeadSize(){ return VM_01_MT_LAYOUT_NON_PORT_HEAD_SIZE; } - uint32_t getPortSectionSize(){ return VM_01_MT_LAYOUT_PORT_SEC_SIZE; } - ~VM_01_MT_layout() {} - }; - class layoutFactory - { - public: - static keywordLayout* getLayout(const uint32_t &i_keyword ,const uint32_t &i_ver); - }; - - - //MT and MR keyword layout for VM ver 0. - const uint8_t NUM_MBA = 2; //There are 2 MBAs per Centaur memory buffer - const uint8_t NUM_PORTS = 2; //Each MBA has 2 ports - const uint8_t NUM_DIMMS = 2; //Each port has 2 DIMMs - const uint8_t NUM_RANKS = 4; //Number of ranks - - // DIMM types - enum DimmType - { - ALL_DIMM = 0, // Same for all Dimm types - CDIMM = 1, - ISDIMM = 2, - }; - - //Exceptions for MT keyword layout for VM ver 1. - - - // Versions to check for - enum VpdVersion - { - VD_VER = 0x010000, // Version came from VD keyword - VZ_VER = 0x020000, // Version came from VZ keyword - VM_VER = 0x040000, // Version came from VM keyword - ALL_VD = VD_VER, // Base value for VD keyword (version=0) - ALL_VZ = VZ_VER, // Base value for VZ keyword (version=0) - ALL_VM = VM_VER, // Base value for VM keyword (version=0) - ALL_VER = VD_VER|VZ_VER|VM_VER, // Base value for all versions - - // VZ values - VZ_10 = VZ_VER | 0x3130, // Version 6.0 is ascii "10" - VZ_13 = VZ_VER | 0x3133, // Version 6.3 is ascii "13" - - // VD values - VD_01 = VD_VER | 0x3031, // VD version "01" - - // VM values - VM_01 = VM_VER | 0x0001, // VM version "01" in hex - - // Supported VM version range - // As of now only VM_01 is supported - VM_SUPPORTED_HIGH_VER = 0x01, - VM_NOT_SUPPORTED = 0x00, - - VER_MASK= 0xffff, // Just version - INVALID_VER = 0, // Invalid initialization value - }; - -// Output data types - enum OutputType - { - UINT8_BY2 =0x0001, // uint8_t [2] - UINT8_BY2_BY2 =0x0002, // uint8_t [2][2] - UINT8_BY2_BY2_BY4 =0x0003, // uint8_t [2][2][4] - UINT32_BY2 =0x0004, // uint32_t [2] - UINT32_BY2_BY2 =0x0005, // uint32_t [2][2] - UINT64 =0x0006, // uint64_t - UINT8 =0x0007, // uint8_t - }; - const uint16_t OUTPUT_TYPE_MASK = 0x00FF; - - typedef uint8_t UINT8_BY2_t [2]; - typedef uint8_t UINT8_BY2_BY2_t [2][2]; - typedef uint8_t UINT8_BY2_BY2_BY4_t [2][2][4]; - typedef uint32_t UINT32_BY2_t [2]; - typedef uint32_t UINT32_BY2_BY2_t [2][2]; - typedef uint64_t UINT64_t; - typedef uint8_t UINT8_t; - - // Special processing - // Rules: - // Values for "All types" needs to be unquie for all output types - // Values for a particular type only need to be unique within that type - enum SpecialProcessing - { - // for All Types - DEFAULT_VALUE = 0x1000, - UINT8_DATA = 0x2000, // The vpd data size - UINT16_DATA = 0x3000, // The vpd data size - UINT32_DATA = 0x4000, // The vpd data size - // All the "all types" need to be within this mask - SPECIAL_DATA_MASK = 0xF000, - - // for UINT8_BY2 (all mutually exclusive) - XLATE_SLEW = 0x0100, - HIGH_NIBBLE = 0x0200, - LOW_NIBBLE = 0x0300, - PORT00 = 0x0400, - PORT11 = 0x0500, - - // for UINT8_BY2_BY2 (all mutually exclusive) - XLATE_DRAM_RON = 0x0100, - BOTH_DIMMS = 0x0200, - - // for UNIT8_BY2_BY2_BY4 (all mutually exclusive) - XLATE_RTT_NOM = 0x0100, - XLATE_RTT_WR = 0x0200, - - // for UINT32_BY2 (all mutually exclusive) - XLATE_RD_VREF = 0x0100, - XLATE_WR_VREF = 0x0200, - // UINT8_DATA supported - // UINT16_DATA supported - - // for UINT32_BY2_BY2 - // UINT8_DATA supported - // UINT16_DATA supported - - // for UINT64 - MERGE = 0x0100, - - // all of the "for output type" enums need to be within this mask - SPECIAL_XLATE_MASK = 0x0F00, - - // All enums need to be within this mask. The lower byte is the offset. - SPECIAL_PROCESSING_MASK = 0xFF00, - }; - -// VM keyword defination - struct MBvpdVMKeyword - { - uint8_t iv_version; - uint8_t iv_systemType; - uint8_t iv_systemType_ext; - uint8_t iv_dataVersion; - }; -// Attribute definition - struct MBvpdAttrDef - { - AttributeId iv_attrId; - DimmType iv_dimmType; - VpdVersion iv_version; - fapi::MBvpdKeyword iv_keyword; - uint8_t iv_offset; - uint16_t iv_outputType; - uint32_t iv_defaultValue; - }; - -// Declare global table and size -extern const MBvpdAttrDef g_MBVPD_ATTR_DEF_array []; -extern const uint32_t g_MBVPD_ATTR_DEF_array_size; - -} // getAttrData namespace -} // fapi namespace - -// Template class that is specialized for each attribute specifying it's type -template<const fapi::AttributeId A> - class MBvpdAttrDataType { }; - -// Term Data attribute specializations -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DRAM_RON> - { public: typedef fapi::ATTR_VPD_DRAM_RON_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DRAM_RTT_NOM> - { public: typedef fapi::ATTR_VPD_DRAM_RTT_NOM_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DRAM_RTT_WR> - { public: typedef fapi::ATTR_VPD_DRAM_RTT_WR_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_ODT_RD> - { public: typedef fapi::ATTR_VPD_ODT_RD_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_ODT_WR> - { public: typedef fapi::ATTR_VPD_ODT_WR_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DIMM_RCD_IBT> - { public: typedef fapi::ATTR_VPD_DIMM_RCD_IBT_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DIMM_RCD_OUTPUT_TIMING> - { public: typedef fapi::ATTR_VPD_DIMM_RCD_OUTPUT_TIMING_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_RD_VREF> - { public: typedef fapi::ATTR_VPD_CEN_RD_VREF_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DRAM_WR_VREF> - { public: typedef fapi::ATTR_VPD_DRAM_WR_VREF_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DRAM_WRDDR4_VREF> - { public: typedef fapi::ATTR_VPD_DRAM_WRDDR4_VREF_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_RCV_IMP_DQ_DQS> - { public: typedef fapi::ATTR_VPD_CEN_RCV_IMP_DQ_DQS_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_DRV_IMP_DQ_DQS> - { public: typedef fapi::ATTR_VPD_CEN_DRV_IMP_DQ_DQS_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_DRV_IMP_CNTL> - { public: typedef fapi::ATTR_VPD_CEN_DRV_IMP_CNTL_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_DRV_IMP_ADDR> - { public: typedef fapi::ATTR_VPD_CEN_DRV_IMP_ADDR_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_DRV_IMP_CLK> - { public: typedef fapi::ATTR_VPD_CEN_DRV_IMP_CLK_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_DRV_IMP_SPCKE> - { public: typedef fapi::ATTR_VPD_CEN_DRV_IMP_SPCKE_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_SLEW_RATE_DQ_DQS> - { public: typedef fapi::ATTR_VPD_CEN_SLEW_RATE_DQ_DQS_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_SLEW_RATE_CNTL> - { public: typedef fapi::ATTR_VPD_CEN_SLEW_RATE_CNTL_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_SLEW_RATE_ADDR> - { public: typedef fapi::ATTR_VPD_CEN_SLEW_RATE_ADDR_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_SLEW_RATE_CLK> - { public: typedef fapi::ATTR_VPD_CEN_SLEW_RATE_CLK_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_SLEW_RATE_SPCKE> - { public: typedef fapi::ATTR_VPD_CEN_SLEW_RATE_SPCKE_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CKE_PRI_MAP> - { public: typedef fapi::ATTR_VPD_CKE_PRI_MAP_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CKE_PWR_MAP> - { public: typedef fapi::ATTR_VPD_CKE_PWR_MAP_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_RLO> - { public: typedef fapi::ATTR_VPD_RLO_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_WLO> - { public: typedef fapi::ATTR_VPD_WLO_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_GPO> - { public: typedef fapi::ATTR_VPD_GPO_Type Type; }; - -// Phase Rotator attribute specializations -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CLK_P1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CLK_P1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A2> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A2_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A3> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A3_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A4> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A4_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A5> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A5_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A6> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A6_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A7> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A7_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A8> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A8_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A9> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A9_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A10> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A10_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A11> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A11_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A12> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A12_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A13> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A13_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A14> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A14_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A15> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_A15_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA2> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_BA2_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_CASN> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_CASN_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_RASN> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_RASN_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_WEN> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_CMD_WEN_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_PAR> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_PAR_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M_ACTN> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M_ACTN_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE2> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE2_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE3> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CKE3_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN2> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN2_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN3> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_CSN3_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M0_CNTL_ODT1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE2> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE2_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE3> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CKE3_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN2> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN2_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN3> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_CSN3_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT0> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT0_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT1> - { public: typedef fapi::ATTR_VPD_CEN_PHASE_ROT_M1_CNTL_ODT1_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_MR_VERSION_BYTE> - { public: typedef fapi::ATTR_VPD_MR_VERSION_BYTE_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_MR_DATA_CONTROL_BYTE> - { public: typedef fapi::ATTR_VPD_MR_DATA_CONTROL_BYTE_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_PERIODIC_MEMCAL_MODE_OPTIONS> - { public: typedef fapi::ATTR_VPD_PERIODIC_MEMCAL_MODE_OPTIONS_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_MT_VERSION_BYTE> - { public: typedef fapi::ATTR_VPD_MT_VERSION_BYTE_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_MT_DATA_CONTROL_BYTE> - { public: typedef fapi::ATTR_VPD_MT_DATA_CONTROL_BYTE_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DRAM_RTT_PARK> - { public: typedef fapi::ATTR_VPD_DRAM_RTT_PARK_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_RD_CTR_WINDAGE_OFFSET> - { public: typedef fapi::ATTR_VPD_RD_CTR_WINDAGE_OFFSET_Type Type; }; - - -// There is no ATTR_VPD_DRAM_2N_MODE attribute. getMBvpdAttr is called -// directly using ATTR_VPD_DRAM_2N_MODE_ENABLED as an ID. -//template<>class MBvpdAttrDataType<fapi::ATTR_VPD_DRAM_2N_MODE> -// { public: typedef fapi::ATTR_VPD_DRAM_2N_MODE Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_TSYS_ADR> - { public: typedef fapi::ATTR_VPD_TSYS_ADR_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_TSYS_DP18> - { public: typedef fapi::ATTR_VPD_TSYS_DP18_Type Type; }; -template<>class MBvpdAttrDataType<fapi::ATTR_VPD_POWER_CONTROL_CAPABLE> - { public: typedef fapi::ATTR_VPD_POWER_CONTROL_CAPABLE_Type Type; }; - - -// Template function that checks that the type is as expected. -// This can be optionally called before calling the main HWP in order -// to check for the expected type at compile-time. -template<const fapi::AttributeId ATTR> - inline void checkAttrDataType - (typename MBvpdAttrDataType<ATTR>::Type &) {} - -/* example -#define ATTR_VPD_DRAM_RON_GETMACRO(ID, PTARGET, VAL)\ - (checkAddrDataType<fapi::ATTR_VPD_DRAM_RON>(VAL), \ - fapi::platAttrSvc::fapiPlatGetAddrData\ - (PTARGET, fapi::ATTR_VPD_DRAM_RON , VAL, sizeof(VAL))) -*/ -// The complilation will fail unless the output variable matches the type -// in the per attribute template specialization. The error messages will -// include text related to template MBvpdAttrDataSize not be able to convert -// the incorrect output variable's type to the expected type. -// -// There will be an additonal error from the general attribute compliation -// checks related to fapiCheckIdType if the output type does not match -// any of the expected types -// -// The inline function checkTermData will be optimized out by the compiler. - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdAttr_FP_t) - (const fapi::Target &, const fapi::AttributeId, - void *, const size_t); - - - -extern "C" -{ -/** - * @brief get Attribute Data from MBvpd - * - * @param[in] i_mbaTarget - mba target - * @param[in] i_attr - Attribute ID - * @param[out] o_pVal - pointer to variable typed output variable - * @param[in] i_valSize - size of output variable - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ -fapi::ReturnCode getMBvpdAttr( - const fapi::Target &i_mbaTarget, - const fapi::AttributeId i_attr, - void * o_pVal, - const size_t i_valSize); - -/** - * @brief Find dimm info; parent, type, position - */ -fapi::ReturnCode findDimmInfo (const fapi::Target & i_mbaTarget, - fapi::Target & o_mbTarget, - uint8_t & o_pos, - fapi::getAttrData::DimmType & o_dimmType); - - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H deleted file mode 100644 index 4fd9254c4..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H +++ /dev/null @@ -1,59 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.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 */ -// $Id: getMBvpdDram2NModeEnabled.H,v 1.1 2013/10/30 21:02:44 whs Exp $ -/** - * @file getMBvpdDram2NModeEnabled.H - * - * @brief MBVPD Accessor for providing the ATTR_VPD_DRAM_2N_MODE_ENABLED - * attribute - */ - -#ifndef _HWP_GETMBVPDDRAM2NMODEENABLED_ -#define _HWP_GETMBVPDDRAM2NMODEENABLED_ - -#include <fapi.H> - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdDram2NModeEnabled_FP_t) - (const fapi::Target &, uint8_t &); - -extern "C" -{ -/** - * @brief Get the ATTR_DRAM_2N_MODE_ENABLED FAPI attribute - * - * Return whether Dram 2N Mode is enabled based on the MR keyword - * DRAM_2N_MODE value. The DRAM_2N_Mode values for both ports of the mba - * must be equal, otherwise an error is returned. - * - * @param[in] i_mbaTarget - Reference to mba Target - * @param[out] o_val - ATTR_VPD_DRAM_2N_MODE_ENABLED enumeration value - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getMBvpdDram2NModeEnabled( - const fapi::Target & i_mbaTarget, - uint8_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H deleted file mode 100644 index f172508cb..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H +++ /dev/null @@ -1,62 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdMemoryDataVersion.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getMBvpdMemoryDataVersion.H,v 1.2 2015/10/06 15:18:04 dcrowell Exp $ -/** - * @file getMBvpdMemoryDataVersion.H - * - * @brief MBVPD Accessor for providing the ATTR_VPD_VM_KEYWORD attribute - */ - -#ifndef _HWP_GETMBVPDMEMDATAVERSION_ -#define _HWP_GETMBVPDMEMDATAVERSION_ - -#include <fapi.H> -#define VM_KEYWORD_DEFAULT_VALUE 0x00000000 - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdMemoryDataVersion_FP_t) - (const fapi::Target &, uint32_t &); - -extern "C" -{ -/** - * @brief Get the ATTR_VPD_VM_KEYWORD FAPI attribute - * - * Return the Memory Data version from MBvpd record SPDX keyword VM. - * - * The ATTR_VPD_VM_KEYWORD attribute is associated with a DIMM. The platfrom must - * get the associated Membuff chip to be passed to this hwp accessor. - * - * @param[in] i_mbTarget - Reference to membuf Target - * @param[out] o_val - Filled in with vpd version - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getMBvpdMemoryDataVersion( - const fapi::Target & i_mbTarget, - uint32_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSPDXRecordVersion.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSPDXRecordVersion.H deleted file mode 100644 index 647e68189..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSPDXRecordVersion.H +++ /dev/null @@ -1,62 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSPDXRecordVersion.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getMBvpdSPDXRecordVersion.H,v 1.1 2015/09/29 16:25:03 dcrowell Exp $ -/** - * @file getMBvpdSPDXRecordVersion.H - * - * @brief MBVPD Accessor for providing the ATTR_VPD_VD_KEYWORD attribute - */ - -#ifndef _HWP_GETMBVPDSPDXVERSION_ -#define _HWP_GETMBVPDSPDXVERSION_ - -#include <fapi.H> -#define VD_KEYWORD_DEFAULT_VALUE 0x0000 - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdSPDXRecordVersion_FP_t) - (const fapi::Target &, uint32_t &); - -extern "C" -{ -/** - * @brief Get the ATTR_VPD_VD_KEYWORD FAPI attribute - * - * Return the SPDX version from MBvpd record SPDX keyword VD. - * - * The ATTR_VPD_VD_KEYWORD attribute is associated with a DIMM. The platfrom must - * get the associated MemBuff chip to be passed to this hwp accessor. - * - * @param[in] i_mbTarget - Reference to membuf Target - * @param[out] o_val - Filled in with vpd version - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getMBvpdSPDXRecordVersion( - const fapi::Target & i_mbTarget, - uint32_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.H deleted file mode 100644 index d376939f8..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.H +++ /dev/null @@ -1,74 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSensorMap.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: getMBvpdSensorMap.H,v 1.1 2013/11/20 22:36:54 whs Exp $ - -/** - * @file getMBvpdSensorMap.H - * - * @brief Prototype for getMBvpdSensorMap() - - * get primary and secondary sensor map - */ - -#ifndef _HWP_MBVPDSENSORMAP_ -#define _HWP_MBVPDSENSORMAP_ - -#include <fapi.H> - -namespace fapi -{ - - enum MBvpdSensorMap - { - SENSOR_MAP_PRIMARY = 0x00, - SENSOR_MAP_SECONDARY = 0x01, - }; -} - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdSensorMap_FP_t) - (const fapi::Target &, const fapi::MBvpdSensorMap, uint8_t &); - -extern "C" -{ -/** - * @brief Return primary and secondary sensor map from cvpd record VSPD - * keyword MW for attributes: - * - * ATTR_VPD_CDIMM_SENSOR_MAP_PRIMARY - * ATTR_VPD_CDIMM_SENSOR_MAP_SECONDARY - * - * @param[in] i_mbTarget - Membuf chip target - * @param[in] i_attr - Enumerator to select requested value - * @param[out] o_val - Primary or secondary sensor map - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ -fapi::ReturnCode getMBvpdSensorMap( - const fapi::Target &i_mbTarget, - const fapi::MBvpdSensorMap i_attr, - uint8_t &o_val); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.H deleted file mode 100644 index d88a087a7..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.H +++ /dev/null @@ -1,86 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.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: getMBvpdSlopeInterceptData.H,v 1.2 2015/09/29 15:59:42 dcrowell Exp $ - -/** - * @file getMBvpdSlopeInterceptData.H - * - * @brief Prototype for getMBvpdSlopeInterceptData() - - * get master and supplier power slope and intercept from MBvpd - */ - -#ifndef _HWP_MBVPDSLOPEINTERCEPTDATA_ -#define _HWP_MBVPDSLOPEINTERCEPTDATA_ - -#include <fapi.H> - -namespace fapi -{ - - enum MBvpdSlopeIntercept - { - MASTER_POWER_SLOPE = 0x00, - MASTER_POWER_INTERCEPT = 0x01, - SUPPLIER_POWER_SLOPE = 0x02, - SUPPLIER_POWER_INTERCEPT = 0x03, - MASTER_TOTAL_POWER_SLOPE = 0x04, - MASTER_TOTAL_POWER_INTERCEPT = 0x05, - SUPPLIER_TOTAL_POWER_SLOPE = 0x06, - SUPPLIER_TOTAL_POWER_INTERCEPT = 0x07, - }; -} - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdSlopeInterceptData_FP_t) - (const fapi::Target &, const fapi::MBvpdSlopeIntercept, uint32_t &); - -extern "C" -{ -/** - * @brief Return power slope and intercept data from cvpd record VSPD - * keyword MW and MV - * - * The Master power slope and intercept data is in the MW keyword. - * The Supplier power slope and intercept data is in the MV keyword. - * The #I keyword has the Module ID for this CDIMM. The MV keyword - * has the supplier power slope and intercept for multiple vendors. - * The list in MV is searched for the Module ID in the #I keyword. - * Values for the matching vendor are returned. - * - * @param[in] i_mbTarget - membuf chip target - * @param[in] i_attr - enumerator to select requested value - * @param[out] o_val - master/supplier slope/intercept value - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ -fapi::ReturnCode getMBvpdSlopeInterceptData( - const fapi::Target &i_mbTarget, - const fapi::MBvpdSlopeIntercept i_attr, - uint32_t &o_val); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.H deleted file mode 100644 index 4a8bbea93..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.H +++ /dev/null @@ -1,54 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.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 */ -// $Id: getMBvpdSpareDramData.H,v 1.2 2013/10/03 20:40:52 dedahle Exp $ -#ifndef GETMBVPDSPAREDRAMDATA_H_ -#define GETMBVPDSPAREDRAMDATA_H_ - -#include <fapi.H> -#include <dimmConsts.H> - -typedef fapi::ReturnCode (*getMBvpdSpareDramData_FP_t)( - const fapi::Target &, - uint8_t (&)[DIMM_DQ_MAX_MBA_PORTS][DIMM_DQ_MAX_MBAPORT_DIMMS] - [DIMM_DQ_MAX_DIMM_RANKS]); -extern "C" -{ - -/** - * @brief FW Team HWP that handles the ATTR_VPD_DIMM_SPARE attribute - * by querying MBvpd to determine spare DRAM availability for C-DIMMs. - * - * This HWP should be called through the VPD_DIMM_SPARE attribute. - * - * @param[in] i_mba Reference to MBA Target. - * @param[out] o_data Reference to spare DRAM data. - * - * @return ReturnCode - */ -fapi::ReturnCode getMBvpdSpareDramData( - const fapi::Target & i_mba, - uint8_t (&o_data)[DIMM_DQ_MAX_MBA_PORTS][DIMM_DQ_MAX_MBAPORT_DIMMS] - [DIMM_DQ_MAX_DIMM_RANKS]); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.H deleted file mode 100644 index ec7770e01..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.H +++ /dev/null @@ -1,59 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.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 */ -// $Id: getMBvpdVersion.H,v 1.1 2013/10/30 21:04:08 whs Exp $ -/** - * @file getMBvpdVersion.H - * - * @brief MBVPD Accessor for providing the ATTR_VPD_VERSION attribute - */ - -#ifndef _HWP_GETMBVPDVERSION_ -#define _HWP_GETMBVPDVERSION_ - -#include <fapi.H> - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdVersion_FP_t) - (const fapi::Target &, uint32_t &); - -extern "C" -{ -/** - * @brief Get the ATTR_VPD_VERSION FAPI attribute - * - * Return the VPD version from MBvpd record VINI keyword VZ. - * - * The ATTR_VPD_VERSION attribute is associated with a DIMM. The platfrom must - * get the associated MBA chip to be passed to this hwp accessor. - * - * @param[in] i_mbaTarget - Reference to mba Target - * @param[out] o_val - Filled in with vpd version - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getMBvpdVersion( - const fapi::Target & i_mbaTarget, - uint32_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVoltageSettingData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVoltageSettingData.H deleted file mode 100644 index 90f5a4d4e..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVoltageSettingData.H +++ /dev/null @@ -1,61 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVoltageSettingData.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getMBvpdVoltageSettingData.H,v 1.1 2015/09/29 16:25:05 dcrowell Exp $ -/** - * @file getMBvpdVoltageSettingData.H - * - * @brief MBVPD Accessor for providing the ATTR_VPD_DW_KEYWORD attribute - */ - -#ifndef _HWP_GETMBVPDDWDATA_ -#define _HWP_GETMBVPDDWDATA_ - -#include <fapi.H> -#define DW_KEYWORD_DEFAULT_VALUE 0x0109 -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMBvpdVoltageSettingData_FP_t) - (const fapi::Target &, uint32_t &); - -extern "C" -{ -/** - * @brief Get the ATTR_VPD_DW_KEYWORD FAPI attribute - * - * Return the voltage setting data from MBvpd record SPDX keyword DW. - * - * The ATTR_VPD_DW_KEYWORD attribute is associated with a DIMM. The platfrom must - * get the associated MemBuff chip to be passed to this hwp accessor. - * - * @param[in] i_mbTarget - Reference to membuff Target - * @param[out] o_val - Filled in with vpd version - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getMBvpdVoltageSettingData( - const fapi::Target & i_mbTarget, - uint32_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H deleted file mode 100644 index 4aa2aaf78..000000000 --- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H +++ /dev/null @@ -1,72 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.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 */ -// $Id: getMvpdExL2SingleMemberEnable.H,v 1.1 2013/04/10 22:02:29 mjjones Exp $ -/** - * @file getMvpdExL2SingleMemberEnable.H - * - * @brief MVPD Accessor for providing the ATTR_EX_L2_SINGLE_MEMBER_ENABLE - * attribute - */ - -/* - * Change Log ****************************************************************** - * Flag Defect/Feature User Date Description - * ------ -------------- ---------- ----------- ---------------------------- - * mjjones 04/10/2013 Created. - */ - -#ifndef _HWP_GETMVPDEXL2SINGLEMEMBERENABLE_ -#define _HWP_GETMVPDEXL2SINGLEMEMBERENABLE_ - -#include <fapi.H> - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getMvpdExL2SingleMemberEnable_FP_t) - (const fapi::Target &, uint32_t &); - -extern "C" -{ -/** - * @brief Get the ATTR_EX_L2_SINGLE_MEMBER_ENABLE FAPI attribute - * - * This data in MVPD indicates which EX chiplets must be configured with the L2 - * cache in single member mode. The data is used by the p8_xip_customize HWP. It - * is used by the FSP platform to build the IPL image, and the Hostboot platform - * to build the SLW image. The data is a bit-field. - * - * @param[in] i_procTarget - Reference to Processor Chip FAPI Target - * @param[out] o_val - Filled in with attribute value - * 0x00008000 - EX00 single member enable - * 0x00004000 - EX01 single member enable - * <snip> - * 0x00000002 - EX14 single member enable - * 0x00000001 - EX15 single member enable - * - * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code - */ -fapi::ReturnCode getMvpdExL2SingleMemberEnable( - const fapi::Target & i_procTarget, - uint32_t & o_val); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/occ/occ.H b/src/include/usr/hwpf/hwp/occ/occ.H index c4dba0996..f81d4f73b 100644 --- a/src/include/usr/hwpf/hwp/occ/occ.H +++ b/src/include/usr/hwpf/hwp/occ/occ.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2015 */ +/* Contributors Listed Below - COPYRIGHT 2013,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/include/usr/hwpf/hwp/occ/occAccess.H b/src/include/usr/hwpf/hwp/occ/occAccess.H index f5de96589..4846330d5 100644 --- a/src/include/usr/hwpf/hwp/occ/occAccess.H +++ b/src/include/usr/hwpf/hwp/occ/occAccess.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/include/usr/hwpf/hwp/occ/occ_common.H b/src/include/usr/hwpf/hwp/occ/occ_common.H index 2369c0fc2..48dbd1142 100644 --- a/src/include/usr/hwpf/hwp/occ/occ_common.H +++ b/src/include/usr/hwpf/hwp/occ/occ_common.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/include/usr/hwpf/hwp/pll_accessors/getPllRingAttr.H b/src/include/usr/hwpf/hwp/pll_accessors/getPllRingAttr.H deleted file mode 100755 index 767dce42b..000000000 --- a/src/include/usr/hwpf/hwp/pll_accessors/getPllRingAttr.H +++ /dev/null @@ -1,66 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/pll_accessors/getPllRingAttr.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 */ -// $Id: getPllRingAttr.H,v 1.1 2013/12/05 18:23:24 mjjones Exp $ -/** - * @file getPllRingAttr.H - * - * @brief Prototype for getPllRingAttr() - - * fetch PLL ring attributes based on chip EC and frequencies - * from data from static arrays (fapiPllRingAttr.H) - */ - - #ifndef _HWP_GETPLLRINGATTR_ - #define _HWP_GETPLLRINGATTR_ - -#include <fapi.H> -#define MAX_PLL_RING_SIZE_BYTES 256 - -//#include <fapiPllRingAttr.H> - - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getPllRingAttr_FP_t) - (const fapi::AttributeId, const fapi::Target &, uint32_t &, uint8_t *); - -extern "C" -{ -/** - * @brief get specified PLL ring attribute for the specified target CPU. - * - * @param i_attrId - fapi attribute requested by the caller. - * @param i_fapiTarget - cpu target - * @param o_ringLength - out: size of ring buffer that caller has - * allocated - * @param 0_data - out: PLL ring data. - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ - fapi::ReturnCode getPllRingAttr( const fapi::AttributeId i_attrId, - const fapi::Target i_pChipTarget, - uint32_t & o_ringBitLength, - uint8_t *o_data); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.H b/src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.H deleted file mode 100644 index 4a77e7282..000000000 --- a/src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.H +++ /dev/null @@ -1,85 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.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 */ -// $Id: getPllRingInfoAttr.H,v 1.2 2014/01/17 23:50:25 whs Exp $ -/** - * @file getPllRingInfoAttr.H - * - * @brief Accessor HWP that gets attributes containing information about PLL - * Rings - */ - -#ifndef _GETPLLRINGINFOATTR_ -#define _GETPLLRINGINFOATTR_ - -#include <fapi.H> - -namespace fapi -{ - // Attributes supported - namespace getPllRingInfo - { - enum Attr - { - PROC_DMI_CUPLL_PFD360_OFFSET = 0x01, - PROC_DMI_CUPLL_REFCLKSEL_OFFSET = 0x02, - PROC_ABUS_CUPLL_PFD360_OFFSET = 0x03, - PROC_ABUS_CUPLL_REFCLKSEL_OFFSET = 0x04, - MEMB_DMI_CUPLL_PFD360_OFFSET = 0x05, - MEMB_DMI_CUPLL_REFCLKSEL_OFFSET = 0x06, - MEMB_MEM_PLL_CFG_UPDATE_OFFSET = 0x07, - }; - } -} - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getPllRingInfoAttr_FP_t) ( - const fapi::Target &, - const fapi::getPllRingInfo::Attr, - void *, const size_t); - -extern "C" -{ -/** - * @brief Accessor HWP that gets attributes containing information about PLL - * Rings - * - * FAPI_ATTR_GET checks at compile time that the user's attribute is the correct - * type. Assuming that the platform routes the access of the attribute to the - * corresponding attribute enum defined in this file then the size of o_pVal - * will be correct, in the unlikely event of a misroute where the buffer is too - * small, an error will be returned. - * - * @param[in] i_chip Reference to Processor/Membuf 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 - * - * @return fapi::ReturnCode Indicating success or error - */ -fapi::ReturnCode getPllRingInfoAttr(const fapi::Target & i_chip, - const fapi::getPllRingInfo::Attr i_attr, - void * o_pVal, - const size_t i_len); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/procMemConsts.H b/src/include/usr/hwpf/hwp/procMemConsts.H deleted file mode 100644 index 5d343b0bd..000000000 --- a/src/include/usr/hwpf/hwp/procMemConsts.H +++ /dev/null @@ -1,74 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/procMemConsts.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 */ -/** - * @file procMemConsts.H - * - * @brief Constants to implement support for proc_setup_bars and mss_setup_bars - * Taken from Shawn Lambeth's MMIOMap8.1.0 spreadsheet - */ - -#ifndef _HWP_PROCMEMCONSTS_H_ -#define _HWP_PROCMEMCONSTS_H_ - -// Lower FSP Bar Regions - line 226 Overall Map, line 72 service processor -// size is 4_GB -const uint64_t SP_BAR_SIZE = 0x0000000100000000ULL ; - -// FSP Bar Size, line 227 Overall Map -const uint64_t FSP_BAR_SIZE = 0x0000000100000000ULL ; - -// Fsp MMIO Mask Size -// @todo P7 had this at 4_GB, don't see it in the spreadsheet. -const uint64_t FSP_MMIO_MASK_SIZE = 0x0000000100000000 ; - -// Processor RNG Space, for NX_MMIO - line 46 Overall Map -// size is 4_KB -const uint64_t PROC_RNG_SIZE = 0x0000000000001000ULL; - -// PCIE Mem Address Space - line 236 Overall Map -// corresponds to the "unit number" in ATTR description -// size is 64_GB -const uint64_t PCI_MEM_SIZE = 0x0000001000000000ULL; - -// PCIE BAR size values -// Bar0 = 64_GB ( from spreadsheet) -// Bar1 = 2_GB ( from spreadsheet) -// Bar2 = 4_KB see NOTE above -const uint64_t PCIE_BAR0_SIZE = 0x0000001000000000ULL; -const uint64_t PCIE_BAR1_SIZE = 0x0000000080000000ULL; -const uint64_t PCIE_BAR2_SIZE = 0x0000000000001000ULL; - -// 4 PHB per chip, 4chips per node, max 4 nodes -const uint64_t PCIE_BAR0_OFFSET_MASK = ((PCIE_BAR0_SIZE*4*4*4)-1); -const uint64_t PCIE_BAR1_OFFSET_MASK = ((PCIE_BAR1_SIZE*4*4*4)-1); -const uint64_t SAPPHIRE_PCIE_BAR0_BASE = 0x00003B0000000000; -const uint64_t SAPPHIRE_PCIE_BAR1_BASE = 0x00003FE000000000; - - - -// PHB Register Address Space - line 90 Overall Map -// size is 1_MB -const uint64_t PHB_REGS_SIZE = 0x0000000000100000ULL; - - -#endif diff --git a/src/include/usr/hwpf/hwp/spd_accessors/getSpdAttrAccessor.H b/src/include/usr/hwpf/hwp/spd_accessors/getSpdAttrAccessor.H deleted file mode 100644 index ecc6048f5..000000000 --- a/src/include/usr/hwpf/hwp/spd_accessors/getSpdAttrAccessor.H +++ /dev/null @@ -1,92 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/spd_accessors/getSpdAttrAccessor.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2013,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: getSpdAttrAccessor.H,v 1.2 2014/06/27 19:50:08 thi Exp $ -/** - * @file getSpdAttrAccessor.H - * - * @brief Accessor HWP that gets DDR neutral DIMM SPD FAPI Attributes - * - * Handles DDR neutral attributes where raw SPD data cannot be returned, - * either: - * - The raw data has a different meaning between DDR3 and DDR4. - * - The raw data has a different size between DDR3 and DDR4. - * - The attribute does not map to a single field in both DDR3 and DDR4. - * - * This Accessor HWP reads the DDR specific attribute and figures out the - * data to return for the DDR neutral attribute. - */ - -#ifndef _GETSPDDATAACCESSOR_ -#define _GETSPDDATAACCESSOR_ - -#include <fapi.H> - -namespace fapi -{ - // Attributes supported - namespace getSpdAttr - { - enum Attr - { - SPD_SDRAM_BANKS = 0x01, - SPD_MODULE_NOMINAL_VOLTAGE = 0x02, - SPD_CAS_LATENCIES_SUPPORTED = 0x03, - SPD_MODULE_REVISION_CODE = 0x04, - }; - } -} - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getSpdAttrAccessor_FP_t) ( - const fapi::Target &, - const fapi::getSpdAttr::Attr, - void *, - const size_t); - -extern "C" -{ -/** - * @brief Accessor HWP that gets DDR neutral DIMM SPD FAPI Attribute data - * - * FAPI_ATTR_GET checks at compile time that the user's attribute is the correct - * type. Assuming that the platform routes the access of the attribute to the - * corresponding attribute enum defined in this file (e.g. ATTR_SPD_SDRAM_BANKS - * -> SPD_SDRAM_BANKS) then the size of o_pVal will be correct, in the unlikely - * event of a misroute where the buffer is too small, an error will be returned. - * - * @param[in] i_dimm Reference to DIMM 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 - * - * @return fapi::ReturnCode Indicating success or error - */ -fapi::ReturnCode getSpdAttrAccessor(const fapi::Target & i_dimm, - const fapi::getSpdAttr::Attr i_attr, - void * o_pVal, - const size_t i_len); -} - -#endif diff --git a/src/include/usr/hwpf/hwp/tod_init/tod_init_reasoncodes.H b/src/include/usr/hwpf/hwp/tod_init/tod_init_reasoncodes.H deleted file mode 100644 index c33e7cff6..000000000 --- a/src/include/usr/hwpf/hwp/tod_init/tod_init_reasoncodes.H +++ /dev/null @@ -1,72 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/tod_init/tod_init_reasoncodes.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 */ -#ifndef TOD_INIT_REASONCODES_H -#define TOD_INIT_REASONCODES_H - -#include <hbotcompid.H> - -namespace TOD -{ - enum TODModuleId - { - TOD_PICK_MDMT = 0x01, - TOD_BUILD_TOD_DRAWERS = 0x02, - TOD_QUERY_ACTIVE_CONFIG = 0x03, - TOD_FIND_MASTER_PROC = 0x04, - TOD_SETUP_HWP = 0x05, - TOD_SAVEREGS_HWP = 0x06, - TOD_LOG_UNSUPPORTED_BUSTYPE = 0x07, - TOD_LOG_UNSUPPORTED_BUSPORT = 0x08, - TOD_SETUP = 0x09, - TOD_READ = 0x0A, - TOD_LOG_INVALID_CONFIG = 0x0B, - TOD_LOG_UNSUPORTED_ORDINALID = 0x0C, - TOD_GETSCOM = 0x0D, - TOD_GETFUNCNODETARGETSONSYSTEM = 0x0E, - TOD_TOPOLOGY_CREATE = 0x0F, - TOD_WIRE_PROCS = 0x10, - TOD_WIRE_DRAWERS = 0x11, - TOD_INIT_HWP = 0x12, - }; - - enum TODReasonCode - { - TOD_NO_MASTER_PROC = TOD_COMP_ID | 0x01, - TOD_NO_FUNC_NODE_AVAILABLE = TOD_COMP_ID | 0x02, - TOD_NO_DRAWERS = TOD_COMP_ID | 0x03, - TOD_HW_ERROR = TOD_COMP_ID | 0x04, - TOD_UNSUPPORTED_BUSTYPE = TOD_COMP_ID | 0x05, - TOD_UNSUPPORTED_BUSPORT = TOD_COMP_ID | 0x06, - TOD_INVALID_ACTION = TOD_COMP_ID | 0x07, - TOD_INVALID_CONFIG = TOD_COMP_ID | 0x08, - TOD_UNSUPORTED_ORDINALID = TOD_COMP_ID | 0x09, - TOD_ECMD_ERROR = TOD_COMP_ID | 0x0A, - TOD_NULL_INPUT_TARGET = TOD_COMP_ID | 0x0B, - TOD_INVALID_TARGET = TOD_COMP_ID | 0x0C, - TOD_CREATION_ERR = TOD_COMP_ID | 0x0D, - TOD_CREATION_ERR_NO_DRAWER = TOD_COMP_ID | 0x0E, - TOD_CANNOT_WIRE_DRAWER = TOD_COMP_ID | 0x0F, - }; - -}; -#endif diff --git a/src/include/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.H b/src/include/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.H deleted file mode 100644 index c4e25d8e8..000000000 --- a/src/include/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.H +++ /dev/null @@ -1,93 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/tp_dbg_data_accessors/getTpDbgDataAttr.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: getTpDbgDataAttr.H,v 1.1 2015/05/07 20:11:12 thi Exp $ -/** - * @file getTpDbgDataAttr.H - * - * @brief Prototype for getPervVitalAttr() - - * Fetch TP Debug data attributes based on chip EC - * from static arrays (fapiTpDbgDataAttr.H) - */ - -#ifndef _HWP_GETPERVVITALATTR_ -#define _HWP_GETPERVVITALATTR_ - -#include <fapi.H> -#include <fapiTpDbgDataAttr.H> - -// Function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getPervVitlRingLengthAttr_FP_t) - (const fapi::Target &, uint32_t &); - -typedef fapi::ReturnCode (*getTpVitlSpyLengthAttr_FP_t) - (const fapi::Target &, uint32_t &); - -typedef fapi::ReturnCode (*getTpVitlSpyOffsetAttr_FP_t) - (const fapi::Target &, uint32_t (&)[SPY_OFFSET_SIZE]); - -extern "C" -{ - -/** - * @brief Get processor TP VITL spy length for the specified target CPU. - * - * @param i_fapiTarget - cpu target - * @param o_ringLength - out: Length of decompressed data - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ -fapi::ReturnCode getPervVitlRingLengthAttr(const fapi::Target &i_fapiTarget, - uint32_t (&o_ringLength)); - - -/** - * @brief Get processor PERV VITL ring length for the specified target CPU. - * - * @param i_fapiTarget - cpu target - * @param o_spyLength - out: Length of spy - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ -fapi::ReturnCode getTpVitlSpyLengthAttr(const fapi::Target &i_fapiTarget, - uint32_t (&o_spyLength)); - - -/** - * @brief Get processor TP VITL spy offsets for the specified target CPU. - * - * @param i_fapiTarget - cpu target - * @param o_data - out: spy offset data - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ -fapi::ReturnCode getTpVitlSpyOffsetAttr(const fapi::Target &i_fapiTarget, - uint32_t (&o_data)[SPY_OFFSET_SIZE]); - -} - -#endif diff --git a/src/include/usr/hwpf/hwp/utility_procedures/mss_count_active_centaurs.H b/src/include/usr/hwpf/hwp/utility_procedures/mss_count_active_centaurs.H deleted file mode 100644 index 6b3813a18..000000000 --- a/src/include/usr/hwpf/hwp/utility_procedures/mss_count_active_centaurs.H +++ /dev/null @@ -1,72 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/utility_procedures/mss_count_active_centaurs.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: mss_count_active_centaurs.H,v 1.1 2014/06/16 16:06:27 dcadiga Exp $ -//------------------------------------------------------------------------------ -// *! (C) Copyright International Business Machines Corp. 2011 -// *! All Rights Reserved -- Property of IBM -// *! *** *** -//------------------------------------------------------------------------------ -// *! TITLE : mss_volt_vpp_offset.H -// *! DESCRIPTION : see additional comments below -// *! OWNER NAME : Stephen Glancy Email: sglancy@us.ibm.com -// *! BACKUP NAME : Jacob Sloat Email: jdsloat@us.ibm.com -// *! ADDITIONAL COMMENTS : -// -// Header file for mss_volt. -// -//------------------------------------------------------------------------------ -// Don't forget to create CVS comments when you check in your changes! -//------------------------------------------------------------------------------ -// CHANGE HISTORY: -//------------------------------------------------------------------------------ -// Version:| Author: | Date: | Comment: -//---------|----------|----------|----------------------------------------------- -// 1.2 | sglancy | 06/04/14 | Updated to include output attribute -// 1.1 | sglancy | 05/20/14 | initial drop -#ifndef MSS_COUNT_ACTIVE_CENT_H_ -#define MSS_COUNT_ACTIVE_CENT_H_ - -#include <fapi.H> - -typedef fapi::ReturnCode (*mss_count_active_centaurs_FP_t)(std::vector<fapi::Target> & , uint32_t & , uint32_t &); - -extern "C" -{ - -/** - * @brief mss_count_active_centaurs procedure. Determines operating vpp voltage for dimms behind a voltage domain - * - * @param[in] std::vector<fapi::Target> l_targets Reference to vector of Centaur Targets - * uint32_t & var_num_active_centaur - number of active centaurs - to be returned out of the function - * uint32_t & var_num_inactive_centaur - number of inactive centaurs - to be returned out of the function - * - * @return ReturnCode - */ - - fapi::ReturnCode mss_count_active_centaurs(std::vector<fapi::Target> & i_targets, uint32_t & var_num_active_centaur, uint32_t &var_num_inactive_centaur); - -} // extern "C" - -#endif // MSS_COUNT_ACTIVE_CENT_H_ diff --git a/src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.H b/src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.H deleted file mode 100644 index 5f0fdd0a9..000000000 --- a/src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.H +++ /dev/null @@ -1,1168 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/utility_procedures/mss_maint_cmds.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: mss_maint_cmds.H,v 1.23 2015/08/11 20:09:21 lwmulkey Exp $ -//------------------------------------------------------------------------------ -// Don't forget to create CVS comments when you check in your changes! -//------------------------------------------------------------------------------ -// CHANGE HISTORY: -//------------------------------------------------------------------------------ -// Version:| Date: | Author: | Comment: -//---------|----------|---------|----------------------------------------------- -// | 11/02/11 | gollub | Created -// | 11/15/11 | gollub | Fixed some reg addresses -// | 03/30/12 | gollub | Made stop condition parm into a mask. -// | | | Added support for both MBAs -// | 04/25/12 | gollub | Added doxygen tags -// | 05/23/12 | gollub | Updates from review. -// | 07/13/12 | gollub | Updates from review. -// 1.7 | 07/16/12 | bellows | added in Id tag -// 1.8 | 07/18/12 | gollub | Updates for timebase scrub. -// 1.9 | 08/15/12 | gollub | Added stop condition enums -// | | | STOP_IMMEDIATE -// | | | ENABLE_CMD_COMPLETE_ATTENTION_ON_CLEAN_AND_ERROR -// | | | Added iv_saved_MBA_WRD_MODE to allow -// | | | save/restore of setting for super fast read -// 1.10 | 09/07/12 | gollub | Updates from review. -// | | | Support for more patterns. -// 1.11 | 09/28/12 | gollub | Added mss_restore_DRAM_repairs -// 1.12 | 11/02/12 | gollub | Updates from review. -// 1.13 | 11/08/12 | gollub | Added timebase steer cleanup -// 1.14 | 11/21/12 | gollub | Updates from review. -// 1.15 | 12/19/12 | gollub | Added UE isolation -// 1.16 | 01/31/13 | gollub | Added mss_check_steering -// | | | Added mss_do_steering -// | | | Added mss_stopCmd -// | | | Changed setupAndExecuteCmd to pure virtual -// 1.17 | 08/23/13 | gollub | Added x4 ECC mode support: mss_x4_chip_mark_to_centaurDQ -// 1.18 | 10/31/13 | gollub | Removed support for stop condition enum -// | | | ENABLE_CMD_COMPLETE_ATTENTION_ON_CLEAN_AND_ERROR -// 1.19 | 02/07/14 |adityamd | Added support to mss_restore_DRAM_repairs to be accessed at Standby -// 1.20 | 02/20/14 |bellows | RAS update from repairs at standby -// 1.21 | 03/07/14 | gollub | mss_restore_DRAM_repairs_asm: changed i_standby_flag to bool -// 1.22 | 03/11/14 | gollub | SW250519: More options for enum TimeBaseSpeed - - -#ifndef _MSS_MAINT_CMDS_H -#define _MSS_MAINT_CMDS_H - -/** @file mss_maint_cmds.H - * @brief General utility functions to for running maint cmds, - * accessing markstore, and accessing steer muxes. - */ - - -//------------------------------------------------------------------------------ -// Includes -//------------------------------------------------------------------------------ - -#include <fapi.H> -#include <ecmdDataBufferBase.H> - - - -//------------------------------------------------------------------------------ -// Constants and enums -//------------------------------------------------------------------------------ - -//Structure to get count of repairs applied - -struct repair_count -{ - uint8_t symbolmark_count[8]; - uint8_t chipmark_count[8]; - uint8_t steer_count[8]; -}; - - - -/** - * @brief For index into this table, use 1st symbol index of x8 chip mark / 4. - */ - - - - -static const uint8_t mss_x8_chip_mark_to_centaurDQ[18][2]={ -// centaurDQ port 1st symbol index of chip mark - {64, 1}, // 0 - {64, 0}, // 4 - {56, 1}, // 8 - {48, 1}, // 12 - {40, 1}, // 16 - {32, 1}, // 20 - {24, 1}, // 24 - {16, 1}, // 28 - {8, 1}, // 32 - {0, 1}, // 36 - {56, 0}, // 40 - {48, 0}, // 44 - {40, 0}, // 48 - {32, 0}, // 52 - {24, 0}, // 56 - {16, 0}, // 60 - {8, 0}, // 64 - {0, 0}}; // 68 - -/** - * @brief For index into this table, use 1st symbol index of x4 chip mark / 2. - */ - static const uint8_t mss_x4_chip_mark_to_centaurDQ[36][2]={ -// centaurDQ port 1st symbol index of x4 chip mark - {68, 1}, // 0 - NOTE: not actually valid in x4 mode.... - {64, 1}, // 2 - {68, 0}, // 4 - {64, 0}, // 6 - {60, 1}, // 8 - {56, 1}, // 10 - {52, 1}, // 12 - {48, 1}, // 14 - {44, 1}, // 16 - {40, 1}, // 18 - {36, 1}, // 20 - {32, 1}, // 22 - {28, 1}, // 24 - {24, 1}, // 26 - {20, 1}, // 28 - {16, 1}, // 30 - {12, 1}, // 32 - {8, 1}, // 34 - {4, 1}, // 36 - {0, 1}, // 38 - {60, 0}, // 40 - {56, 0}, // 42 - {52, 0}, // 44 - {48, 0}, // 46 - {44, 0}, // 48 - {40, 0}, // 50 - {36, 0}, // 52 - {32, 0}, // 54 - {28, 0}, // 56 - {24, 0}, // 58 - {20, 0}, // 60 - {16, 0}, // 62 - {12, 0}, // 64 - {8, 0}, // 66 - {4, 0}, // 68 - {0, 0}}; // 70 - - - -/** - * @brief Used to get addess range of all ranks from get_address_range() - */ - const uint8_t MSS_ALL_RANKS = 0xff; - - -/** - * @brief Used to indicate invalid symbol - */ - const uint8_t MSS_INVALID_SYMBOL = 0xff; - - - - namespace mss_SteerMux - { - -/** - * @brief Used to specify read or write steer mux - */ - enum muxType - { - READ_MUX = 0, - WRITE_MUX = 1, - }; - -/** - * @brief Used to specify steer type - */ - enum steerType - { - DRAM_SPARE_PORT0 = 0, // Spare DRAM on port0 - DRAM_SPARE_PORT1 = 1, // Spare DRAM on port1 - ECC_SPARE = 2, // ECC spare (used in x4 mode only) - }; - }; - - - -//------------------------------------------------------------------------------ -// Parent class for all maintenance command types -//------------------------------------------------------------------------------ - -/** - * @brief Contains functions common to multiple maint cmd types. - */ - - class mss_MaintCmd - { - - public: // enums - -/** - * @brief Index into array containing data patterns to load into memory - */ - enum PatternIndex - { - PATTERN_0 = 0, //0x00 - PATTERN_1 = 1, //0xFF - PATTERN_2 = 2, //0xF0 - PATTERN_3 = 3, //0x0F - PATTERN_4 = 4, //0xAA - PATTERN_5 = 5, //0x55 - PATTERN_6 = 6, //0xCC - PATTERN_7 = 7, //0x33 - PATTERN_RANDOM = 8, // random seed - }; - -/** - * @brief Inject type used for atomic error inject maint cmd - */ - enum InjectType - { - ATOMIC_ALT_CE_INJ = 0, - ATOMIC_ALT_CHIPKILL_INJ = 1, - ATOMIC_ALT_UE_INJ = 2, - ATOMIC_ALT_SUE_INJ = 3, - }; - -/** - * @brief Stop conditions for maint cmds. - */ - enum StopCondition - { -// Turn off all stop conditions - NO_STOP_CONDITIONS = 0x0000, - -// Stop immediately if stop on error condition hit - STOP_IMMEDIATE = 0x8000, - -// Stop at end of rank if stop on error condition hit - STOP_END_OF_RANK = 0x4000, - -// Stop on hard new CE error threshlold equal - STOP_ON_HARD_NCE_ETE = 0x2000, - -// Stop on intermittent new CE error threshlold equal - STOP_ON_INT_NCE_ETE = 0x1000, - -// Stop on soft new CE error threshlold equal - STOP_ON_SOFT_NCE_ETE = 0x0800, - -// Stop on symbol corrected error (error on symbol already marked) - STOP_ON_SCE = 0x0400, - -// Stop on mark corrected error (error on chip already marked) - STOP_ON_MCE = 0x0200, - -// Stop on retry CE error threshold equal (UE that went away on retry) - STOP_ON_RETRY_CE_ETE = 0x0100, - -// Stop on mark placed error (hw placed a chip mark) - STOP_ON_MPE = 0x0080, - -// Stop on UE - STOP_ON_UE = 0x0040, - -// Stop on SUE - STOP_ON_SUE = 0x0020, - -// Stop when MBMACAQ = MBMEAQ - STOP_ON_END_ADDRESS = 0x0010, - -// Enable command complete attention - ENABLE_CMD_COMPLETE_ATTENTION = 0x0008, - - }; - -/** - * @brief speed options for time base commands. - */ - enum TimeBaseSpeed - { - /** Background scrubbing (field). */ - BG_SCRUB, - - /** Runtime DRAM repairs procedures (field) and the initial fast scrub - * of memory (field). */ - FAST_MIN_BW_IMPACT, - - /** Background scrubbing (mnfg) and the initial fast scrub of memory - * (mnfg). */ - FAST_MED_BW_IMPACT, - - /** IPL time DRAM repairs procedures (field/mnfg) and runtime DRAM - * repairs procedures (mnfg). */ - FAST_MAX_BW_IMPACT, - }; - - - protected: - -/** - * @brief Maintenance command types - */ - enum CmdType - { - TIMEBASE_READ = 0, - TIMEBASE_SCRUB = 1, - TIMEBASE_STEER_CLEANUP = 2, - TIMEBASE_INIT = 3, - TIMEBASE_RANDOM_INIT = 4, - - SUPERFAST_READ = 8, - SUPERFAST_INIT = 9, - SUPERFAST_RANDOM_INIT = 10, - - MEMORY_DISPLAY = 16, - MEMORY_ALTER = 17, - MEMORY_ALTER_WITH_ECC_OVERRIDE = 18, - ATOMIC_ALTER_ERROR_INJECT = 19, - INCREMENT_MBMACA_ADDRESS = 20, - }; - - - - public: - -/** - * @brief Constructor - * - * @param i_target MBA target - * @param i_startAddr Address cmd will start at - * @param i_endAddr, Address cmd will stop at - * @param i_stopCondition Mask of error conditions cmd should stop on - * @param i_poll Set to true if you wait for command to complete - * @param i_cmdType Command type - */ - mss_MaintCmd( const fapi::Target & i_target, - const ecmdDataBufferBase & i_startAddr, - const ecmdDataBufferBase & i_endAddr, - uint32_t i_stopCondition, - bool i_poll, - CmdType i_cmdType ); - - -/** - * @brief Destructor - */ - virtual ~mss_MaintCmd() {} - - -//---------------------------------------------------------------------- -// These are pure virtual functions that must be defined by every child -// class. -//---------------------------------------------------------------------- - - -/** - * @brief Gets the cmd type of a given object - * @return CmdType - */ - virtual CmdType getCmdType() const = 0; - -/** - * @brief Saves any settings that need to be restored when command is done. - * Loads the setup parameters into the hardware. Starts the command, - * then either polls for complete or exits with command running. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode setupAndExecuteCmd() = 0; - - - -//---------------------------------------------------------------------- -// These are virtual functions that will have a default definition in this -// class but can be overriden by a child class. -//---------------------------------------------------------------------- - -/** - * @brief Stops running maint cmd, and saves the address it stopped at. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode stopCmd(); - -/** - * @brief Called once a command is done if we need to restore settings that - * had to be modified to run a specific command type, or clear error - * data in the hw that is no longer relevant. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - * @note NOT YET IMPLEMENTED - */ - virtual fapi::ReturnCode cleanupCmd(); - - protected: -//---------------------------------------------------------------------- -// These are virtual functions that will have a default definition in this -// class but can be overriden by a child class. -//---------------------------------------------------------------------- - -/** - * @brief Checks for valid hw state and setup required before a cmd is run. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode preConditionCheck(); - -/** - * @brief Loads command type into hw. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode loadCmdType(); - -/** - * @brief Loads start address into hw. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode loadStartAddress(); - -/** - * @brief Loads end address into hw. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode loadEndAddress(); - -/** - * @brief Loads stop conditions into hw. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode loadStopCondMask(); - -/** - * @brief Starts command. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode startMaintCmd(); - -/** - * @brief Polls for command complete. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode pollForMaintCmdComplete(); - -/** - * @brief FOR DEBUG ONLY: Reads hw regs for FFDC after command is done. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode collectFFDC(); - -/** - * @brief Loads pattern into hw. - * @param i_initPattern Index into array containing patterns to load. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - * @note For now, no array of pattens, just hardcoded pattern of all 0's. - */ - virtual fapi::ReturnCode loadPattern(PatternIndex i_initPattern); - -/** - * @brief Loads timebase speed into hw. - * @param i_speed See enum TimeBaseSpeed - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - virtual fapi::ReturnCode loadSpeed(TimeBaseSpeed i_speed); - -/** - * @brief Checks for hw to be right state after cmd is started. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - * @note For now, no array of pattens, just hardcoded pattern of all 0's. - */ - virtual fapi::ReturnCode postConditionCheck(); - - protected: - - const fapi::Target iv_target; // MBA - fapi::Target iv_targetCentaur; // Centaur associated with this MBA - ecmdDataBufferBase iv_startAddr; // Start address - ecmdDataBufferBase iv_endAddr; // End address - uint32_t iv_stopCondition; // Mask of stop contitions - bool iv_poll; // Set true to wait for cmd complete - const CmdType iv_cmdType; // Command type - uint8_t iv_mbaPosition; // 0 = mba01, 1 = mba23 - - - - - }; - -//------------------------------------------------------------------------------ -// Child classes -//------------------------------------------------------------------------------ - - -//------------------------------------------------------------------------------ -// mss_SuperFastInit -//------------------------------------------------------------------------------ - class mss_SuperFastInit : public mss_MaintCmd - { - public: - -// Constructor - mss_SuperFastInit( const fapi::Target & i_target, // MBA target - const ecmdDataBufferBase & i_startAddr, // Address cmd will start at - const ecmdDataBufferBase & i_endAddr, // Address cmd will stop at - PatternIndex i_initPattern, // Index into table containing patterns to load into memory - uint32_t i_stopCondition, // Mask of error conditions cmd should stop on - bool i_poll ); // Set to true if you wait for command to complete - - public: - - fapi::ReturnCode setupAndExecuteCmd(); - CmdType getCmdType() const { return cv_cmdType; } - -// This class's implementation of parent class functions that can be -// overridden. - - void setStartAddr(ecmdDataBufferBase i_startAddr) - { iv_startAddr = i_startAddr; } - - void setEndAddr( ecmdDataBufferBase i_endAddr ) - { iv_endAddr = i_endAddr; } - - ecmdDataBufferBase getStartAddr() const { return iv_startAddr; } - ecmdDataBufferBase getEndAddr() const { return iv_endAddr; } - - private: - - fapi::ReturnCode setSavedData( uint32_t i_savedData ) - {fapi::ReturnCode l_rc; iv_savedData = i_savedData; return l_rc;} - - uint32_t getSavedData() { return iv_savedData; } - - private: // Class variable(s) - - static const CmdType cv_cmdType; - - private: // Instance variable(s) - -// List of things to save may be cmd-specific, so keep it here for now - uint32_t iv_savedData; -// Index into table containing patterns to load into memory - PatternIndex iv_initPattern; - - }; - - -//------------------------------------------------------------------------------ -// SuperFastRandomInit -//------------------------------------------------------------------------------ - class mss_SuperFastRandomInit : public mss_MaintCmd - { - public: // Constructor(s) - -// Constructor - mss_SuperFastRandomInit( const fapi::Target & i_target, // MBA target - const ecmdDataBufferBase & i_startAddr, // Address cmd will start at - const ecmdDataBufferBase & i_endAddr, // Address cmd will stop at - PatternIndex i_initPattern, // Index into table containing pattern to use for random seed - uint32_t i_stopCondition, // Mask of error conditions cmd should stop on - bool i_poll ); // Set to true if you wait for command to complete - - public: - - fapi::ReturnCode setupAndExecuteCmd(); - CmdType getCmdType() const { return cv_cmdType; } - -// This class's implementation of parent class functions that can be -// overridden. - fapi::ReturnCode cleanupCmd(); - - void setStartAddr(ecmdDataBufferBase i_startAddr) - { iv_startAddr = i_startAddr; } - - void setEndAddr( ecmdDataBufferBase i_endAddr ) - { iv_endAddr = i_endAddr; } - - ecmdDataBufferBase getStartAddr() const { return iv_startAddr; } - ecmdDataBufferBase getEndAddr() const { return iv_endAddr; } - - private: - - fapi::ReturnCode setSavedData( uint32_t i_savedData ) - {fapi::ReturnCode l_rc; iv_savedData = i_savedData; return l_rc;} - - uint32_t getSavedData() { return iv_savedData; } - - private: // Class variable(s) - - static const CmdType cv_cmdType; - - private: // Instance variable(s) - -// List of things to save may be cmd-specific, so keep it here for now - uint32_t iv_savedData; -// Index into table containing patterns to load into memory - PatternIndex iv_initPattern; -// Setting that had to be restored when done - ecmdDataBufferBase iv_saved_MBA_WRD_MODE; - - }; - - - -//------------------------------------------------------------------------------ -// mss_SuperFastRead -//------------------------------------------------------------------------------ - class mss_SuperFastRead : public mss_MaintCmd - { - public: // Constructor(s) - - mss_SuperFastRead( const fapi::Target & i_target, // MBA target - const ecmdDataBufferBase & i_startAddr, // Address cmd will start at - const ecmdDataBufferBase & i_endAddr, // Address cmd will stop at - uint32_t i_stopCondition, // Mask of error conditions cmd should stop on - bool i_poll ); // Set to true if you wait for command to complete - - public: - - fapi::ReturnCode setupAndExecuteCmd(); - CmdType getCmdType() const { return cv_cmdType; } - -// This class's implementation of parent class functions that can be -// overridden. - fapi::ReturnCode cleanupCmd(); - - void setStartAddr(ecmdDataBufferBase i_startAddr) - { iv_startAddr = i_startAddr; } - - void setEndAddr( ecmdDataBufferBase i_endAddr ) - { iv_endAddr = i_endAddr; } - - ecmdDataBufferBase getStartAddr() const { return iv_startAddr; } - ecmdDataBufferBase getEndAddr() const { return iv_endAddr; } - - private: - - fapi::ReturnCode setSavedData( uint32_t i_savedData ) - {fapi::ReturnCode l_rc; iv_savedData = i_savedData; return l_rc; } - - uint32_t getSavedData() { return iv_savedData; } - - fapi::ReturnCode ueTrappingSetup(); - - private: // Class variable(s) - - static const CmdType cv_cmdType; - - private: // Instance variable(s) - -// List of things to save may be cmd-specific, so keep it here for now - uint32_t iv_savedData; -// Setting that had to be restored when done - ecmdDataBufferBase iv_saved_MBA_RRQ0; - - }; - - - -//------------------------------------------------------------------------------ -// mss_AtomicInject -//------------------------------------------------------------------------------ - class mss_AtomicInject : public mss_MaintCmd - { - public: // Constructor(s) - - mss_AtomicInject( const fapi::Target & i_target, // MBA target - const ecmdDataBufferBase & i_startAddr, // Address to inject on - InjectType i_injectType); // Inject type - - - - public: - - fapi::ReturnCode setupAndExecuteCmd(); - CmdType getCmdType() const { return cv_cmdType; } - - void setStartAddr(ecmdDataBufferBase i_startAddr) - { iv_startAddr = i_startAddr; } - - ecmdDataBufferBase getStartAddr() const { return iv_startAddr; } - - void setInjectType(InjectType i_injectType) - { iv_injectType = i_injectType; } - - - private: - - fapi::ReturnCode setSavedData( uint32_t i_savedData ) - {fapi::ReturnCode l_rc; iv_savedData = i_savedData; return l_rc; } - - uint32_t getSavedData() { return iv_savedData; } - - private: // Class variable(s) - - static const CmdType cv_cmdType; - - private: // Instance variable(s) - -// List of things to save may be cmd-specific, so keep it here for now - uint32_t iv_savedData; -// Inject type - InjectType iv_injectType; - }; - - -//------------------------------------------------------------------------------ -// Display -//------------------------------------------------------------------------------ - class mss_Display : public mss_MaintCmd - { - public: // Constructor(s) - - mss_Display( const fapi::Target & i_target, // MBA target - const ecmdDataBufferBase & i_startAddr ); // Address to display - - public: // Function declaration(s) - - fapi::ReturnCode setupAndExecuteCmd(); - CmdType getCmdType() const { return cv_cmdType; } - - void setStartAddr(const ecmdDataBufferBase & i_startAddr) - { iv_startAddr = i_startAddr; } - - ecmdDataBufferBase getStartAddr() const { return iv_startAddr; } - - - private: - - fapi::ReturnCode setSavedData( uint32_t i_savedData ) - {fapi::ReturnCode l_rc; iv_savedData = i_savedData; return l_rc; } - - uint32_t getSavedData() { return iv_savedData; } - - private: // Class variable(s) - - static const CmdType cv_cmdType; - - private: // Instance variable(s) - -// List of things to save may be cmd-specific, so keep it here for now - uint32_t iv_savedData; - }; - - - -//------------------------------------------------------------------------------ -// mss_IncrementAddress -//------------------------------------------------------------------------------ - class mss_IncrementAddress : public mss_MaintCmd - { - public: // Constructor(s) - - mss_IncrementAddress( const fapi::Target & i_target ); // MBA target - - public: - - fapi::ReturnCode setupAndExecuteCmd(); - CmdType getCmdType() const { return cv_cmdType; } - - private: - - static const CmdType cv_cmdType; - }; - - -//------------------------------------------------------------------------------ -// mss_TimeBaseScrub -//------------------------------------------------------------------------------ - class mss_TimeBaseScrub : public mss_MaintCmd - { - public: // Constructor(s) - - mss_TimeBaseScrub( const fapi::Target & i_target, // MBA target - const ecmdDataBufferBase & i_startAddr, // Address cmd will start at - const ecmdDataBufferBase & i_endAddr, // Address cmd will stop at - TimeBaseSpeed i_speed, // See enum TimeBaseSpeed - uint32_t i_stopCondition, // Mask of error conditions cmd should stop on - bool i_poll ); // Set to true if you wait for command to complete - - public: - - fapi::ReturnCode setupAndExecuteCmd(); - CmdType getCmdType() const { return cv_cmdType; } - -// This class's implementation of parent class functions that can be -// overridden. - - void setStartAddr(ecmdDataBufferBase i_startAddr) - { iv_startAddr = i_startAddr; } - - void setEndAddr( ecmdDataBufferBase i_endAddr ) - { iv_endAddr = i_endAddr; } - - ecmdDataBufferBase getStartAddr() const { return iv_startAddr; } - ecmdDataBufferBase getEndAddr() const { return iv_endAddr; } - - private: - - fapi::ReturnCode setSavedData( uint32_t i_savedData ) - {fapi::ReturnCode l_rc; iv_savedData = i_savedData; return l_rc; } - - uint32_t getSavedData() { return iv_savedData; } - - private: // Class variable(s) - - static const CmdType cv_cmdType; - - private: // Instance variable(s) - -// list of things to save may be specific to each cmd, so keep it -// here for now - uint32_t iv_savedData; - -// See enum TimeBaseSpeed - TimeBaseSpeed iv_speed; - }; - - -//------------------------------------------------------------------------------ -// mss_TimeBaseSteerCleanup -//------------------------------------------------------------------------------ - class mss_TimeBaseSteerCleanup : public mss_MaintCmd - { - public: // Constructor(s) - - mss_TimeBaseSteerCleanup( const fapi::Target & i_target, // MBA target - const ecmdDataBufferBase & i_startAddr, // Address cmd will start at - const ecmdDataBufferBase & i_endAddr, // Address cmd will stop at - TimeBaseSpeed i_speed, // See enum TimeBaseSpeed - uint32_t i_stopCondition, // Mask of error conditions cmd should stop on - bool i_poll ); // Set to true if you wait for command to complete - - public: - - fapi::ReturnCode setupAndExecuteCmd(); - CmdType getCmdType() const { return cv_cmdType; } - -// This class's implementation of parent class functions that can be -// overridden. - - void setStartAddr(ecmdDataBufferBase i_startAddr) - { iv_startAddr = i_startAddr; } - - void setEndAddr( ecmdDataBufferBase i_endAddr ) - { iv_endAddr = i_endAddr; } - - ecmdDataBufferBase getStartAddr() const { return iv_startAddr; } - ecmdDataBufferBase getEndAddr() const { return iv_endAddr; } - - private: - - fapi::ReturnCode setSavedData( uint32_t i_savedData ) - {fapi::ReturnCode l_rc; iv_savedData = i_savedData; return l_rc; } - - uint32_t getSavedData() { return iv_savedData; } - - private: // Class variable(s) - - static const CmdType cv_cmdType; - - private: // Instance variable(s) - -// list of things to save may be specific to each cmd, so keep it -// here for now - uint32_t iv_savedData; - -// See enum TimeBaseSpeed - TimeBaseSpeed iv_speed; - }; - - - -//------------------------------------------------------------------------------ -// Utility funcitons -//------------------------------------------------------------------------------ - - -/** - * @brief Calculates start and end address for a single rank, or all ranks - * behind the MBA. - * - * @param i_target MBA target - * @param i_rank Either single rank on the MBA to get start/end address - * for (0x00-0x07) - * Or MSS_ALL_RANKS = 0xff to get start/end address for - * all ranks behind the MBA. - * @param o_startAddr Address to start cmd at. - * @param o_endAddr Address to stop cmd at. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_get_address_range( const fapi::Target & i_target, - uint8_t i_rank, - ecmdDataBufferBase & o_startAddr, - ecmdDataBufferBase & o_endAddr ); - - -/** - * @brief Calculates start and end address for a single slave rank - * - * @param i_target MBA target - * @param i_master master rank corresponding to the desired slave rank on the MBA to get start/end address - * for (0x00-0x07) - * @param i_slave Slave rank to get the address range for - * @param o_startAddr Address to start cmd at. - * @param o_endAddr Address to stop cmd at. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_get_slave_address_range( const fapi::Target & i_target, - uint8_t i_master, - uint8_t i_slave, - ecmdDataBufferBase & o_startAddr, - ecmdDataBufferBase & o_endAddr ); - - -/** - * @brief Mark store is implemented as one register per rank, so read register - * for the given rank. - * If MPE FIR for the given rank (scrub or fetch) is on after the read, - * we will read one more time to make sure we get latest. - * - * @param i_target MBA target - * @param i_rank Rank to get markstore for. - * @param o_symbolMark Symbol mark, converted from galois field to symbol - * index,(if no mark return 0xff) - * @param o_chipMark Chip mark, converted from galois field to first - * symbol index of the chip, (if no mark return 0xff) - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_get_mark_store( const fapi::Target & i_target, - uint8_t i_rank, - uint8_t & o_symbolMark, - uint8_t & o_chipMark ); - - -/** - * @brief Mark store is implemented as one register per rank, so write register - * for the given rank. NOTE: Will be writing to both chip and symbol - * field at same time, so should use a read/modify/write approach to - * avoid unintentionally over-writing something. - * - * @param i_target MBA target - * @param i_rank Rank to write markstore for. - * @param i_symbolMark Symbol index, which will be converted to galois field - * (if input is 0xff, we write 0x00 for no symbol mark). - * @param i_chipMark First symbol index of the chip, which will be - * converted to galois field (if input is 0xff, we write - * 0x00 for no chip mark). - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_put_mark_store( const fapi::Target & i_target, - uint8_t i_rank, - uint8_t i_symbolMark, - uint8_t i_chipMark ); - -/** - * @brief Gets either the read or write steer mux control register for the - * given rank, and converts from steer code to x8/x4 dram index to - * first symbol index for all DRAMs steered on that rank. - * - * @param i_target MBA target - * @param i_rank Rank we want to read steer mux for. - * @param i_muxType Select either the read mux or the write mux - * to get. - * @param o_dramSparePort0Symbol First symbol index of the DRAM fixed by the - * spare on port0 (if no steer, return 0xff) - * @param o_dramSparePort1Symbol First symbol index of the DRAM fixed by the - * spare on port1 (if no steer, return 0xff) - * @param o_eccSpareSymbol First symbol index of the DRAM fixed by the - * ECC spare, which can be used on either port0 - * or port1 (if no steer, return 0xff) - * @note The ECC spare is available only with x4 mode ECC. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_get_steer_mux( const fapi::Target & i_target, - uint8_t i_rank, - mss_SteerMux::muxType i_muxType, - uint8_t & o_dramSparePort0Symbol, - uint8_t & o_dramSparePort1Symbol, - uint8_t & o_eccSpareSymbol ); - -/** - * @brief Updates either the read or write steer mux control register with the - * selected steer type for the given rank. - * - * @param i_target MBA target - * @param i_rank Rank we want to write steer mux for. - * @param i_muxType Select either the read mux or the write mux - * to update. - * @param i_steerType 0 = DRAM_SPARE_PORT0, Spare DRAM on port0 - * 1 = DRAM_SPARE_PORT1, Spare DRAM on port1 - * 2 = ECC_SPARE, ECC spare (used in x4 mode only) - * @param i_symbol First symbol index of the DRAM to steer - * around. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_put_steer_mux( const fapi::Target & i_target, - uint8_t i_rank, - mss_SteerMux::muxType i_muxType, - uint8_t i_steerType, - uint8_t i_symbol ); - -/** - * @brief Reads the steer muxes for the given rank - * - * @param i_target MBA target - * @param i_rank Rank we want to read steer mux for. - * @param o_dramSparePort0Symbol First symbol index of the DRAM fixed by the - * spare on port0 (if no steer, return 0xff) - * @param o_dramSparePort1Symbol First symbol index of the DRAM fixed by the - * spare on port1 (if no steer, return 0xff) - * @param o_eccSpareSymbol First symbol index of the DRAM fixed by the - * ECC spare, which can be used on either port0 - * or port1 (if no steer, return 0xff) - * @note The ECC spare is available only with x4 mode ECC. - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_check_steering(const fapi::Target & i_target, - uint8_t i_rank, - uint8_t & o_dramSparePort0Symbol, - uint8_t & o_dramSparePort1Symbol, - uint8_t & o_eccSpareSymbol ); - -/** - * @brief Set write mux, wait for periodic cal, set read mux, for the given rank. - * - * @param i_target MBA target - * @param i_rank Rank we want to write steer mux for. - * @param i_symbol First symbol index of the DRAM to steer - * around. - * @param i_x4EccSpare If true, writes the x4 ECC Spare. Otherwise, - * writes the DRAM spare (default). - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_do_steering(const fapi::Target & i_target, - uint8_t i_rank, - uint8_t i_symbol, - bool i_x4EccSpare = false ); - - -/** - * @brief This procedure applies the maximum possible DRAM repairs - * (chip/symbol marks, DRAM steers) to known bad bits recorded in - * DIMM VPD. This operation is done on both valid logical DIMM pairs - * behind the given MBA. - * - * @param i_target MBA target - * @param o_repairs_applied 8-bit mask, where a bit set means the - * specified rank had any repairs applied. - * - * rank0 = 0x80 (maps to port0_dimm0, port1_dimm0) - * rank1 = 0x40 (maps to port0_dimm0, port1_dimm0) - * rank2 = 0x20 (maps to port0_dimm0, port1_dimm0) - * rank3 = 0x10 (maps to port0_dimm0, port1_dimm0) - * rank4 = 0x08 (maps to port0_dimm1, port1_dimm1) - * rank5 = 0x04 (maps to port0_dimm1, port1_dimm1) - * rank6 = 0x02 (maps to port0_dimm1, port1_dimm1) - * rank7 = 0x01 (maps to port0_dimm1, port1_dimm1) - * - * @param o_repairs_exceeded 4-bit mask, where a bit set means the - * specified DIMM-select on the specified port - * had more bad bits than could be repaired. - * - * port0_dimm0 = 0x8 - * port0_dimm1 = 0x4 - * port1_dimm0 = 0x2 - * port1_dimm1 = 0x1 - * - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_restore_DRAM_repairs( const fapi::Target & i_target, - uint8_t & o_repairs_applied, - uint8_t & o_repairs_exceeded); - - -/** - * @brief This procedure counts the maximum possible DRAM repairs - * (chip/symbol marks, DRAM steers) to known bad bits recorded in - * DIMM VPD. This operation is done on both valid logical DIMM pairs - * behind the given MBA. - * - * @param i_target MBA target - * @param o_repairs_applied 8-bit mask, where a bit set means the - * specified rank had any repairs applied. - * - * rank0 = 0x80 (maps to port0_dimm0, port1_dimm0) - * rank1 = 0x40 (maps to port0_dimm0, port1_dimm0) - * rank2 = 0x20 (maps to port0_dimm0, port1_dimm0) - * rank3 = 0x10 (maps to port0_dimm0, port1_dimm0) - * rank4 = 0x08 (maps to port0_dimm1, port1_dimm1) - * rank5 = 0x04 (maps to port0_dimm1, port1_dimm1) - * rank6 = 0x02 (maps to port0_dimm1, port1_dimm1) - * rank7 = 0x01 (maps to port0_dimm1, port1_dimm1) - * - * @param o_repairs_exceeded 4-bit mask, where a bit set means the - * specified DIMM-select on the specified port - * had more bad bits than could be repaired. - * - * port0_dimm0 = 0x8 - * port0_dimm1 = 0x4 - * port1_dimm0 = 0x2 - * port1_dimm1 = 0x1 - * - * @param i_strandby_flag Boolean if we are in standby at call time - * - * @param o_repair_count Repair counts - * - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_restore_DRAM_repairs_asm( const fapi::Target & i_target, - uint8_t & o_repairs_applied, - uint8_t & o_repairs_exceeded, - bool i_standby_flag, - struct repair_count &o_repair_count); - - - - - -/** - * @brief This function takes converts from a Centaur DQ on a given port - * to a corresponding symbol index. - * - * @param i_dq Centaur DQ from 0-71 - * - * @param i_port port 0 or 1 - * - * @return Symbol index - */ - - uint8_t mss_centaurDQ_to_symbol( uint8_t i_dq, uint8_t i_port ); - - -/** - * @brief This function compares trapped actual UE data to an expected - * data pattern in order to identify the bits that contributed to - * a UE encountered during IPL memory diagnostics. - * - * @param i_target MBA target - * @param i_rank Rank containing the UE. - * @param o_bad_bits Map of bad bits (Centaur DQ format) - * 2 ports x 10 bytes - * - * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise. - */ - fapi::ReturnCode mss_IPL_UE_isolation( const fapi::Target & i_target, - uint8_t i_rank, - uint8_t (&o_bad_bits)[2][10]); - - -#endif/* _MSS_MAINT_CMDS_H */ diff --git a/src/include/usr/hwpf/hwp/utility_procedures/p8_cpu_special_wakeup.H b/src/include/usr/hwpf/hwp/utility_procedures/p8_cpu_special_wakeup.H deleted file mode 100644 index 231677691..000000000 --- a/src/include/usr/hwpf/hwp/utility_procedures/p8_cpu_special_wakeup.H +++ /dev/null @@ -1,115 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/utility_procedures/p8_cpu_special_wakeup.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: p8_cpu_special_wakeup.H,v 1.7 2013/12/11 20:39:04 stillgs Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_cpu_special_wakeup.H,v $ -//------------------------------------------------------------------------------ -// *| -// *! (C) Copyright International Business Machines Corp. 2011 -// *! All Rights Reserved -- Property of IBM -// *! *** *** -// *| -// *! TITLE : proc_cpu_special_wakeup.H -// *! DESCRIPTION : Set the EX chiplet into Special Wake-up via one of the -// *! entity bits provided -// *! -// *! OWNER NAME : Greg Still Email: stillgs@us.ibm.com -// *! BACKUP NAME : Pradeep CN Email: padeepcn@in.ibm.com -// *! -//------------------------------------------------------------------------------ - -#ifndef _PROC_CPUSPECWKUP_H_ -#define _PROC_CPUSPECWKUP_H_ - - -//------------------------------------------------------------------------------ -// Constant definitions -//------------------------------------------------------------------------------ - -#ifndef _PROC_SPCWKUP_ENTITY -#define _PROC_SPCWKUP_ENTITY - -#define NUM_SPCWKUP_ENTITIES 4 -enum PROC_SPCWKUP_ENTITY -{ - HOST, - FSP, - OCC, - PHYP = HOST, - SPW_ALL -}; - - - -#define NUM_SPCWKUP_OPS 3 -enum PROC_SPCWKUP_OPS -{ - SPCWKUP_DISABLE, - SPCWKUP_ENABLE, - SPCWKUP_INIT, - SPCWKUP_FORCE_DEASSERT -}; - - -#endif // _PROC_SPCWKUP_TGTS - - - - -//------------------------------------------------------------------------------ -// Includes -//------------------------------------------------------------------------------ - - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*p8_cpu_special_wakeup_FP_t) ( - const fapi::Target&, - PROC_SPCWKUP_OPS, - PROC_SPCWKUP_ENTITY ); - -extern "C" { - -//------------------------------------------------------------------------------ -// Parameter structure definitions -//------------------------------------------------------------------------------ - - -//------------------------------------------------------------------------------ -// Function prototype -//------------------------------------------------------------------------------ -/// \param[in] i_ex_target EX target -/// \param[in] i_entity Entity bit to use (OCC, PHYP, FSP) -/// \param[in] i_operation operation to use (SPCWKUP_ENABLE, SPCWKUP_DISABLE) - - -/// \retval ECMD_SUCCESS if something good happens, -/// \retval BAD_RETURN_CODE otherwise -fapi::ReturnCode -p8_cpu_special_wakeup( const fapi::Target& i_ex_target, - PROC_SPCWKUP_OPS i_operation , - PROC_SPCWKUP_ENTITY i_entity ); - -} // extern "C" - -#endif // _PROC_CPUSPECWKUP_H_ diff --git a/src/include/usr/hwpf/hwp/utility_procedures/p8_inst_pm_state.H b/src/include/usr/hwpf/hwp/utility_procedures/p8_inst_pm_state.H deleted file mode 100644 index 9a6989fda..000000000 --- a/src/include/usr/hwpf/hwp/utility_procedures/p8_inst_pm_state.H +++ /dev/null @@ -1,217 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/utility_procedures/p8_inst_pm_state.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: p8_inst_pm_state.H,v 1.7 2014/06/19 14:38:44 cmolsen Exp $ -//------------------------------------------------------------------------------ -// Title: p8_inst_pm_state.H -// Description: Contains definitions needed for calculating the -// Instantaneous PM State (IPMS). -//------------------------------------------------------------------------------ - -#ifndef _P8_INST_PM_STATE_H_ -#define _P8_INST_PM_STATE_H_ - -// ----------------------------------------------------------------------------- -// Includes -// ----------------------------------------------------------------------------- - -#include <fapi.H> -#include <vector> - -//------------------------------------------------------------------------------ -// Defines -//------------------------------------------------------------------------------ - -// The following enum list must start at 0x00 and must increment by 0x01. -// They are used as index to INST_PM_STATE_NAMES[INST_PM_STATE_xyz]. -enum INSTANTANEOUS_IDLE_STATES -{ - INST_PM_STATE_FS_ENTRY = 0x00, - INST_PM_STATE_DS_ENTRY = 0x01, - INST_PM_STATE_FS_EXIT = 0x02, - INST_PM_STATE_DS_EXIT = 0x03, - INST_PM_STATE_FW_ENTRY = 0x04, - INST_PM_STATE_DW_ENTRY = 0x05, - INST_PM_STATE_FW_EXIT = 0x06, - INST_PM_STATE_DW_EXIT = 0x07, - INST_PM_STATE_NAP_ENTRY = 0x08, - INST_PM_STATE_NAP_EXIT = 0x09, - INST_PM_STATE_RUN = 0x0a, - INST_PM_STATE_RUN_OHA_ENTRY = 0x0b, - INST_PM_STATE_PCBS_ANY_ENTRY = 0x0c, // Was not queued - INST_PM_STATE_PCBS_FS_EXIT = 0x0d, // Was not queued - INST_PM_STATE_PCBS_DS_EXIT = 0x0e, // Was not queued - INST_PM_STATE_PCBS_FW_EXIT = 0x0f, // Was not queued - INST_PM_STATE_PCBS_DW_EXIT = 0x10, // Was not queued - INST_PM_STATE_QUEUED_FS_ENTRY = 0x11, // Incl PMC-stuck state - INST_PM_STATE_QUEUED_DS_ENTRY = 0x12, // Incl PMC-stuck state - INST_PM_STATE_QUEUED_FS_EXIT = 0x13, // Incl PMC-stuck state - INST_PM_STATE_QUEUED_DS_EXIT = 0x14, // Incl PMC-stuck state - INST_PM_STATE_QUEUED_FW_ENTRY = 0x15, // Incl PMC-stuck state - INST_PM_STATE_QUEUED_DW_ENTRY = 0x16, // Incl PMC-stuck state - INST_PM_STATE_QUEUED_FW_EXIT = 0x17, // Incl PMC-stuck state - INST_PM_STATE_QUEUED_DW_EXIT = 0x18, // Incl PMC-stuck state - INST_PM_STATE_SPECIAL_WAKEUP = 0x19, - INST_PM_STATE_NAP_STATIC = 0x1a, - INST_PM_STATE_FS_STATIC = 0x1b, - INST_PM_STATE_DS_STATIC = 0x1c, - INST_PM_STATE_FW_STATIC = 0x1d, - INST_PM_STATE_DW_STATIC = 0x1e, - INST_PM_STATE_UNRESOLVED = 0x1f, // Final state, if no other valid state found - INST_PM_STATE_UNDEFINED = 0x20, // Initialized state - INST_PM_STATE_LAST_ENTRY = 0x21 -}; -// The following strings must precisely match the above enum INSTANTANEOUS_IDLE_STATES. -const char * const INST_PM_STATE_NAMES[INST_PM_STATE_LAST_ENTRY] = -{ - "FAST_SLEEP_ENTRY", - "DEEP_SLEEP_ENTRY", - "FAST_SLEEP_EXIT", - "DEEP_SLEEP_EXIT", - "FAST_WINKLE_ENTRY", - "DEEP_WINKLE_ENTRY", - "FAST_WINKLE_EXIT", - "DEEP_WINKLE_EXIT", - "NAP_ENTRY", - "NAP_EXIT", - "RUN", - "RUN_OHA_ENTRY", - "PCBS_ANY_ENTRY", - "PCBS_FAST_SLEEP_EXIT", - "PCBS_DEEP_SLEEP_EXIT", - "PCBS_FAST_WINKLE_EXIT", - "PCBS_DEEP_WINKLE_EXIT", - "QUEUED_FAST_SLEEP_ENTRY", - "QUEUED_DEEP_SLEEP_ENTRY", - "QUEUED_FAST_SLEEP_EXIT", - "QUEUED_DEEP_SLEEP_EXIT", - "QUEUED_FAST_WINKLE_ENTRY", - "QUEUED_DEEP_WINKLE_ENTRY", - "QUEUED_FAST_WINKLE_EXIT", - "QUEUED_DEEP_WINKLE_EXIT", - "SPECIAL_WAKEUP", - "NAP_STATIC", - "FAST_SLEEP_STATIC", - "DEEP_SLEEP_STATIC", - "FAST_WINKLE_STATIC", - "DEEP_WINKLE_STATIC", - "UNRESOLVED", - "UNDEFINED" -}; - - -enum PCBS_FSM_STATES -{ - PCBS_FSM_IDLE = 0x00, // "IDLE" means idling here. Not PM idle. - PCBS_FSM_ANY_IDLE_ENTRY = 0x2e, - PCBS_FSM_ANY_SLEEP_EXIT = 0x50, - PCBS_FSM_ANY_WINKLE_EXIT = 0x51, - PCBS_FSM_DEEP_WINKLE_EXIT = 0x57 -}; - -enum PORRR_START_VECTOR -{ - PORRR_SV_FS_ENTRY = 0x00, - PORRR_SV_DS_ENTRY = 0x01, - PORRR_SV_FS_EXIT = 0x02, - PORRR_SV_DS_EXIT = 0x03, - PORRR_SV_FW_ENTRY = 0x04, - PORRR_SV_DW_ENTRY = 0x05, - PORRR_SV_FW_EXIT = 0x06, - PORRR_SV_DW_EXIT = 0x07, - PORRR_SV_NAP_ENTRY = 0x08, - PORRR_SV_NAP_EXIT = 0x09 -}; - - -// The following enum list must start at 0x00 and must increment by 0x01. -// They are used as index to PMHIST_STATE_NAMES[PMHIST_STATE_xyz]. -enum PMHIST_STATES -{ - PMHIST_STATE_RUN = 0x0, - PMHIST_STATE_SPECIAL_WAKEUP = 0x1, - PMHIST_STATE_NAP = 0x2, - PMHIST_STATE_LEGACY_SLEEP = 0x3, - PMHIST_STATE_FAST_SLEEP = 0x4, - PMHIST_STATE_DEEP_SLEEP = 0x5, - PMHIST_STATE_FAST_WINKLE = 0x6, - PMHIST_STATE_DEEP_WINKLE = 0x7 -}; -// The following strings must precisely match the above enum PMHIST_STATES. -const char * const PMHIST_STATE_NAMES[8] = -{ - "RUN", - "SPECIAL_WAKEUP", - "NAP", - "LEGACY_SLEEP", - "FAST_SLEEP", - "DEEP_SLEEP", - "FAST_WINKLE", - "DEEP_WINKLE" -}; - -// PIRRx masks and meanings -const uint32_t PMC_QUEUE_PENDING_MASK = 0x00000080; -const uint32_t PMC_QUEUE_OP_TYPE_SCOPE_MASK = 0x00000078; -const uint32_t PMC_QUEUE_ASSIST_MASK = 0x00000004; -const uint32_t PMC_QUEUE_NAP_ENTRY = 0x00000020; -const uint32_t PMC_QUEUE_NAP_EXIT = 0x00000030; -const uint32_t PMC_QUEUE_FS_ENTRY = 0x00000040; -const uint32_t PMC_QUEUE_DS_ENTRY = 0x00000048; -const uint32_t PMC_QUEUE_FS_EXIT = 0x00000050; -const uint32_t PMC_QUEUE_DS_EXIT = 0x00000058; -const uint32_t PMC_QUEUE_FW_ENTRY = 0x00000060; -const uint32_t PMC_QUEUE_DW_ENTRY = 0x00000068; -const uint32_t PMC_QUEUE_FW_EXIT = 0x00000070; -const uint32_t PMC_QUEUE_DW_EXIT = 0x00000078; - - - -extern "C" -{ - -// ----------------------------------------------------------------------------- -// Function prototypes -// ----------------------------------------------------------------------------- - -// Determines Instantaneous PM State (IPMS). -fapi::ReturnCode ex_determine_inst_pm_state( const fapi::Target &i_ex_target, - uint32_t i_pm_settle_usec, - uint32_t i_pm_polls, - uint8_t &o_inst_pm_state); -// Determines IPMS from the PM HIST reg state. -fapi::ReturnCode ex_determine_ipms_from_pmhist( const fapi::Target &i_ex_target, - uint32_t i_pmhist_state, - uint8_t &o_inst_pm_state, - bool &o_bGoodState); -// Determines IPMS from the PMC PIRRx registers. -fapi::ReturnCode ex_determine_ipms_from_pirrx( const fapi::Target &i_ex_target, - uint32_t i_pcbs_fsm, - uint32_t i_pmc_queue_state, - uint8_t &o_inst_pm_state, - bool &o_bGoodState); -} - - -#endif diff --git a/src/include/usr/hwpf/hwp/utility_procedures/proc_cpu_special_wakeup.H b/src/include/usr/hwpf/hwp/utility_procedures/proc_cpu_special_wakeup.H deleted file mode 100644 index 1303c0cd3..000000000 --- a/src/include/usr/hwpf/hwp/utility_procedures/proc_cpu_special_wakeup.H +++ /dev/null @@ -1,107 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/utility_procedures/proc_cpu_special_wakeup.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 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: proc_cpu_special_wakeup.H,v 1.8 2012/08/21 11:39:37 pchatnah Exp $ -// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_cpu_special_wakeup.H,v $ -//------------------------------------------------------------------------------ -// *| -// *! (C) Copyright International Business Machines Corp. 2011 -// *! All Rights Reserved -- Property of IBM -// *! *** *** -// *| -// *! TITLE : proc_cpu_special_wakeup.H -// *! DESCRIPTION : Set the EX chiplet into Special Wake-up via one of the -// *! entity bits provided -// *! -// *! OWNER NAME : Greg Still Email: stillgs@us.ibm.com -// *! BACKUP NAME : Pradeep CN Email: padeepcn@in.ibm.com -// *! -//------------------------------------------------------------------------------ - -#ifndef _PROC_CPUSPECWKUP_H_ -#define _PROC_CPUSPECWKUP_H_ - - -//------------------------------------------------------------------------------ -// Constant definitions -//------------------------------------------------------------------------------ - -#ifndef _PROC_SPCWKUP_ENTITY -#define _PROC_SPCWKUP_ENTITY -enum PROC_SPCWKUP_ENTITY -{ - HOST = 0X1, - FSP = 0x2, - OCC = 0x3, - PHYP = HOST - -}; - - -enum PROC_SPCWKUP_OPS -{ - SPCWKUP_ENABLE = 0x1, - SPCWKUP_DISABLE = 0x2 -}; - -#endif // _PROC_SPCWKUP_TGTS - - - - -//------------------------------------------------------------------------------ -// Includes -//------------------------------------------------------------------------------ - - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*proc_cpu_special_wakeup_FP_t) (const fapi::Target&, PROC_SPCWKUP_OPS , PROC_SPCWKUP_ENTITY ); - -extern "C" { - - - -//------------------------------------------------------------------------------ -// Parameter structure definitions -//------------------------------------------------------------------------------ - - - -//------------------------------------------------------------------------------ -// Function prototype -//------------------------------------------------------------------------------ -/// \param[in] i_target EX target -/// \param[in] i_entity Entity bit to use (OCC, PHYP, FSP) -/// \param[in] i_operation operation to use (SPCWKUP_ENABLE, SPCWKUP_DISABLE) - - -/// \retval ECMD_SUCCESS if something good happens, -/// \retval BAD_RETURN_CODE otherwise -fapi::ReturnCode -proc_cpu_special_wakeup(const fapi::Target& i_target, PROC_SPCWKUP_OPS i_operation , PROC_SPCWKUP_ENTITY i_entity ); - - -} // extern "C" - -#endif // _PROC_CPUSPECWKUP_H_ diff --git a/src/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.H b/src/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.H deleted file mode 100755 index 6c9637669..000000000 --- a/src/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.H +++ /dev/null @@ -1,60 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.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 */ -// $Id: getL3DeltaDataAttr.H,v 1.2 2014/03/20 16:24:43 whs Exp $ -/** - * @file getL3DeltaDataAttr.H - * - * @brief Prototype for getL3DeltaDataAttr() - - * fetch L3 delta data attribute based on chip EC and PROC_PBIEX_ASYNC_SEL from data from static arrays (fapiL3DeltaDataAttr.H) - */ - - #ifndef _HWP_GETL3DELTADATAATTR_ - #define _HWP_GETL3DELTADATAATTR_ - -#include <fapi.H> -#include <fapiL3DeltaDataAttr.H> - -// function pointer typedef definition for HWP call support -typedef fapi::ReturnCode (*getL3DeltaDataAttr_FP_t) - (const fapi::Target &, uint32_t (&)[DELTA_DATA_SIZE], uint32_t &); - - -extern "C" -{ -/** - * @brief get processor ex func L3 delta data attribute for the specified target CPU. - * - * @param i_fapiTarget - cpu target - * @param o_data - out: L3 delta data data. - * @param o_ringLength - out: Length of decompressed data - * - * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success, - * relevant error code for failure. - */ -fapi::ReturnCode getL3DeltaDataAttr( const fapi::Target &i_fapiTarget, - uint32_t (&o_data)[DELTA_DATA_SIZE], - uint32_t (&o_ringLength)); - -} - -#endif |