summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/bus_training
diff options
context:
space:
mode:
authorMatt Ploetz <maploetz@us.ibm.com>2014-02-25 16:34:40 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-02-27 15:52:53 -0600
commit5dca7cc4768d1963e4f1304996622cb658ad7a72 (patch)
tree3190bec2543e2c064381ac8b49723c426b0e4ef2 /src/usr/hwpf/hwp/bus_training
parent27b7743dc369209b32071eed287bea3a10a6b7cc (diff)
downloadtalos-hostboot-5dca7cc4768d1963e4f1304996622cb658ad7a72.tar.gz
talos-hostboot-5dca7cc4768d1963e4f1304996622cb658ad7a72.zip
INITPROC: Hostboot - SW243755 Horton 5/8 RAS changes
Change-Id: Ie81c5b949d28b5f1eec9c705d37558e710764107 CQ:SW243755 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9149 Tested-by: Jenkins Server Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/bus_training')
-rw-r--r--src/usr/hwpf/hwp/bus_training/makefile4
-rw-r--r--src/usr/hwpf/hwp/bus_training/proc_fab_smp.C324
-rw-r--r--src/usr/hwpf/hwp/bus_training/proc_fab_smp.H161
3 files changed, 2 insertions, 487 deletions
diff --git a/src/usr/hwpf/hwp/bus_training/makefile b/src/usr/hwpf/hwp/bus_training/makefile
index 03a29a6ef..75af4954a 100644
--- a/src/usr/hwpf/hwp/bus_training/makefile
+++ b/src/usr/hwpf/hwp/bus_training/makefile
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012,2013
+# COPYRIGHT International Business Machines Corp. 2012,2014
#
# p1
#
@@ -35,7 +35,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/nest_chiplets/proc_a_x_pci_dmi_pll_s
## pointer to common HWP files
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include
-OBJS = gcr_funcs.o io_funcs.o io_run_training.o pbusLinkSvc.o proc_fab_smp.o \
+OBJS = gcr_funcs.o io_funcs.o io_run_training.o pbusLinkSvc.o \
io_dccal.o \
io_power_down_lanes.o \
io_read_erepair.o \
diff --git a/src/usr/hwpf/hwp/bus_training/proc_fab_smp.C b/src/usr/hwpf/hwp/bus_training/proc_fab_smp.C
deleted file mode 100644
index 1b031a621..000000000
--- a/src/usr/hwpf/hwp/bus_training/proc_fab_smp.C
+++ /dev/null
@@ -1,324 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/bus_training/proc_fab_smp.C $ */
-/* */
-/* IBM CONFIDENTIAL */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
-/* */
-/* p1 */
-/* */
-/* Object Code Only (OCO) source materials */
-/* Licensed Internal Code Source Materials */
-/* IBM HostBoot Licensed Internal Code */
-/* */
-/* The source code for this program is not published or otherwise */
-/* divested of its trade secrets, irrespective of what has been */
-/* deposited with the U.S. Copyright Office. */
-/* */
-/* Origin: 30 */
-/* */
-/* IBM_PROLOG_END_TAG */
-// $Id: proc_fab_smp.C,v 1.8 2013/09/23 22:01:31 jmcgill Exp $
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_fab_smp.C,v $
-//------------------------------------------------------------------------------
-// *|
-// *! (C) Copyright International Business Machines Corp. 2011
-// *! All Rights Reserved -- Property of IBM
-// *! *** IBM Confidential ***
-// *|
-// *! TITLE : proc_fab_smp.C
-// *! DESCRIPTION : Common fabric structure defintions/utility functions (FAPI)
-// *!
-// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
-// *!
-//------------------------------------------------------------------------------
-
-
-//------------------------------------------------------------------------------
-// Includes
-//------------------------------------------------------------------------------
-#include "proc_fab_smp.H"
-
-extern "C" {
-
-
-//------------------------------------------------------------------------------
-// Function definitions
-//------------------------------------------------------------------------------
-
-
-//------------------------------------------------------------------------------
-// function: utility function to read & return fabric node ID attribute
-// parameters: i_target => pointer to chip/chiplet target
-// o_node_id => structure encapsulating node ID value
-// returns: FAPI_RC_SUCCESS if attribute read is successful & value is valid,
-// RC_PROC_FAB_SMP_FABRIC_NODE_ID_ATTR_ERR if attribute value is
-// invalid,
-// else FAPI_ATTR_GET return code
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_fab_smp_get_node_id_attr(
- const fapi::Target* i_target,
- proc_fab_smp_node_id& o_node_id)
-{
- // return code
- fapi::ReturnCode rc;
- // chiplet->chip target conversion
- bool use_parent = false;
- fapi::Target parent_target;
- // temporary attribute storage used to build procedure data structures
- uint8_t node_id_attr;
-
- // mark function entry
- FAPI_DBG("proc_fab_smp_get_node_id_attr: Start");
-
- do
- {
- if (i_target->getType() != fapi::TARGET_TYPE_PROC_CHIP)
- {
- use_parent = true;
- // retrieve parent target if input target is a chiplet
- rc = fapiGetParentChip(*i_target,
- parent_target);
- if (!rc.ok())
- {
- FAPI_ERR("proc_fab_smp_get_node_id_attr: Error from fapiGetParentChip");
- break;
- }
- }
-
- // retrieve node ID attribute
- rc = FAPI_ATTR_GET(ATTR_FABRIC_NODE_ID,
- ((use_parent)?
- (&parent_target):
- (i_target)),
- node_id_attr);
- if (!rc.ok())
- {
- FAPI_ERR("proc_fab_smp_get_node_id_attr: Error querying ATTR_FABRIC_NODE_ID");
- break;
- }
-
- // print attribute value
- FAPI_DBG("proc_fab_smp_get_node_id_attr: ATTR_FABRIC_NODE_ID = 0x%X",
- node_id_attr);
-
- // translate to output value
- switch (node_id_attr)
- {
- case 0:
- o_node_id = FBC_NODE_ID_0;
- break;
- case 1:
- o_node_id = FBC_NODE_ID_1;
- break;
- case 2:
- o_node_id = FBC_NODE_ID_2;
- break;
- case 3:
- o_node_id = FBC_NODE_ID_3;
- break;
- case 4:
- o_node_id = FBC_NODE_ID_4;
- break;
- case 5:
- o_node_id = FBC_NODE_ID_5;
- break;
- case 6:
- o_node_id = FBC_NODE_ID_6;
- break;
- case 7:
- o_node_id = FBC_NODE_ID_7;
- break;
- default:
- FAPI_ERR("proc_fab_smp_get_node_id_attr: Invalid fabric node ID attribute value 0x%02X",
- node_id_attr);
- const uint8_t& ATTR_DATA = node_id_attr;
- FAPI_SET_HWP_ERROR(rc,
- RC_PROC_FAB_SMP_FABRIC_NODE_ID_ATTR_ERR);
- break;
- }
- } while(0);
-
- // mark function exit
- FAPI_DBG("proc_fab_smp_get_node_id_attr: End");
- return rc;
-}
-
-
-//------------------------------------------------------------------------------
-// function: utility function to read & return fabric chip ID attribute
-// parameters: i_target => pointer to chip/chiplet target
-// o_chip_id => structure encapsulating chip ID value
-// returns: FAPI_RC_SUCCESS if attribute read is successful & value is valid,
-// RC_PROC_FAB_SMP_FABRIC_CHIP_ID_ATTR_ERR if attribute value is
-// invalid,
-// else FAPI_ATTR_GET return code
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_fab_smp_get_chip_id_attr(
- const fapi::Target* i_target,
- proc_fab_smp_chip_id& o_chip_id)
-{
- // return code
- fapi::ReturnCode rc;
- // chiplet->chip target conversion
- bool use_parent = false;
- fapi::Target parent_target;
- // temporary attribute storage used to build procedure data structures
- uint8_t chip_id_attr;
-
- // mark function entry
- FAPI_DBG("proc_fab_smp_get_chip_id_attr: Start");
-
- do
- {
- if (i_target->getType() != fapi::TARGET_TYPE_PROC_CHIP)
- {
- use_parent = true;
- // retrieve parent target if input target is a chiplet
- rc = fapiGetParentChip(*i_target,
- parent_target);
- if (!rc.ok())
- {
- FAPI_ERR("proc_fab_smp_get_chip_id_attr: Error from fapiGetParentChip");
- break;
- }
- }
-
- // retrieve chip ID attribute
- rc = FAPI_ATTR_GET(ATTR_FABRIC_CHIP_ID,
- ((use_parent)?
- (&parent_target):
- (i_target)),
- chip_id_attr);
- if (!rc.ok())
- {
- FAPI_ERR("proc_fab_smp_get_chip_id_attr: Error querying ATTR_FABRIC_CHIP_ID");
- break;
- }
-
- // print attribute value
- FAPI_DBG("proc_fab_smp_get_chip_id_attr: ATTR_FABRIC_CHIP_ID = 0x%X",
- chip_id_attr);
-
- // translate to output value
- switch (chip_id_attr)
- {
- case 0:
- o_chip_id = FBC_CHIP_ID_0;
- break;
- case 1:
- o_chip_id = FBC_CHIP_ID_1;
- break;
- case 2:
- o_chip_id = FBC_CHIP_ID_2;
- break;
- case 3:
- o_chip_id = FBC_CHIP_ID_3;
- break;
- case 4:
- o_chip_id = FBC_CHIP_ID_4;
- break;
- case 5:
- o_chip_id = FBC_CHIP_ID_5;
- break;
- case 6:
- o_chip_id = FBC_CHIP_ID_6;
- break;
- case 7:
- o_chip_id = FBC_CHIP_ID_7;
- break;
- default:
- FAPI_ERR("proc_fab_smp_get_chip_id_attr: Invalid fabric chip ID attribute value 0x%02X",
- chip_id_attr);
- const uint8_t& ATTR_DATA = chip_id_attr;
- FAPI_SET_HWP_ERROR(rc,
- RC_PROC_FAB_SMP_FABRIC_CHIP_ID_ATTR_ERR);
- break;
- }
- } while(0);
-
- // mark function exit
- FAPI_DBG("proc_fab_smp_get_chip_id_attr: End");
- return rc;
-}
-
-
-//------------------------------------------------------------------------------
-// function: utility function to read & return PCIe/DSMP mux attribute values
-// parameters: i_target => pointer to chip target
-// o_pcie_not_f_link => vector of boolean values representing state
-// of PCIe/DSMP mux settings (one value per
-// foreign link, true=PCIe function, false=
-// DSMP function)
-// returns: FAPI_RC_SUCCESS if attribute read is successful & value is valid,
-// RC_PROC_FAB_SMP_PCIE_NOT_F_LINK_ATTR_ERR if attribute value is
-// invalid,
-// else FAPI_ATTR_GET return code
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_fab_smp_get_pcie_dsmp_mux_attrs(
- const fapi::Target* i_target,
- bool o_pcie_not_f_link[PROC_FAB_SMP_NUM_F_LINKS])
-{
- // return code
- fapi::ReturnCode rc;
- // temporary attribute storage used to build procedure data structures
- uint8_t pcie_not_f_link_attr[PROC_FAB_SMP_NUM_F_LINKS];
-
- // mark function entry
- FAPI_DBG("proc_fab_smp_get_pcie_dsmp_mux_attrs: Start");
-
- do
- {
- // retrieve PCIe/DSMP mux attributes
- rc = FAPI_ATTR_GET(ATTR_PROC_PCIE_NOT_F_LINK,
- i_target,
- pcie_not_f_link_attr);
- if (!rc.ok())
- {
- FAPI_ERR("proc_fab_smp_get_pcie_dsmp_mux_attrs: Error querying ATTR_PROC_PCIE_NOT_F_LINK");
- break;
- }
-
- // loop over all links
- for (uint8_t l = 0;
- l < PROC_FAB_SMP_NUM_F_LINKS;
- l++)
- {
- // print attribute value
- FAPI_DBG("proc_fab_smp_get_pcie_dsmp_mux_attrs: ATTR_PROC_PCIE_NOT_F_LINK[%d] = 0x%X",
- l, pcie_not_f_link_attr[l]);
-
- // validate attribute value
- switch (pcie_not_f_link_attr[l])
- {
- case 0:
- o_pcie_not_f_link[l] = false;
- break;
- case 1:
- o_pcie_not_f_link[l] = true;
- break;
- default:
- FAPI_ERR("proc_fab_smp_get_pcie_dsmp_mux_attrs: Invalid PCIe/DSMP mux attribute value 0x%02X",
- pcie_not_f_link_attr[l]);
- const uint8_t& ATTR_DATA = pcie_not_f_link_attr[l];
- FAPI_SET_HWP_ERROR(rc,
- RC_PROC_FAB_SMP_PCIE_NOT_F_LINK_ATTR_ERR);
- break;
- }
- if (!rc.ok())
- {
- break;
- }
- }
- } while(0);
-
- // mark function exit
- FAPI_DBG("proc_fab_smp_get_pcie_dsmp_mux_attrs: End");
- return rc;
-}
-
-
-
-} // extern "C"
diff --git a/src/usr/hwpf/hwp/bus_training/proc_fab_smp.H b/src/usr/hwpf/hwp/bus_training/proc_fab_smp.H
deleted file mode 100644
index fb020c633..000000000
--- a/src/usr/hwpf/hwp/bus_training/proc_fab_smp.H
+++ /dev/null
@@ -1,161 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/hwpf/hwp/bus_training/proc_fab_smp.H $ */
-/* */
-/* IBM CONFIDENTIAL */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2013 */
-/* */
-/* p1 */
-/* */
-/* Object Code Only (OCO) source materials */
-/* Licensed Internal Code Source Materials */
-/* IBM HostBoot Licensed Internal Code */
-/* */
-/* The source code for this program is not published or otherwise */
-/* divested of its trade secrets, irrespective of what has been */
-/* deposited with the U.S. Copyright Office. */
-/* */
-/* Origin: 30 */
-/* */
-/* IBM_PROLOG_END_TAG */
-// $Id: proc_fab_smp.H,v 1.8 2013/09/23 22:01:31 jmcgill Exp $
-// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_fab_smp.H,v $
-//------------------------------------------------------------------------------
-// *|
-// *! (C) Copyright International Business Machines Corp. 2011
-// *! All Rights Reserved -- Property of IBM
-// *! *** IBM Confidential ***
-// *|
-// *! TITLE : proc_fab_smp.H
-// *! DESCRIPTION : Common fabric structure defintions/utility functions (FAPI)
-// *!
-// *! OWNER NAME : Joe McGill Email: jmcgill@us.ibm.com
-// *!
-//------------------------------------------------------------------------------
-
-#ifndef _PROC_FAB_SMP_H_
-#define _PROC_FAB_SMP_H_
-
-//------------------------------------------------------------------------------
-// Includes
-//------------------------------------------------------------------------------
-#include <fapi.H>
-
-
-//------------------------------------------------------------------------------
-// Structure definitions
-//------------------------------------------------------------------------------
-
-// define set of supported fabric node ID values
-enum proc_fab_smp_node_id
-{
- FBC_NODE_ID_0 = 0,
- FBC_NODE_ID_1 = 1,
- FBC_NODE_ID_2 = 2,
- FBC_NODE_ID_3 = 3,
- FBC_NODE_ID_4 = 4,
- FBC_NODE_ID_5 = 5,
- FBC_NODE_ID_6 = 6,
- FBC_NODE_ID_7 = 7
-};
-
-// define set of supported fabric chip ID values
-enum proc_fab_smp_chip_id
-{
- FBC_CHIP_ID_0 = 0,
- FBC_CHIP_ID_1 = 1,
- FBC_CHIP_ID_2 = 2,
- FBC_CHIP_ID_3 = 3,
- FBC_CHIP_ID_4 = 4,
- FBC_CHIP_ID_5 = 5,
- FBC_CHIP_ID_6 = 6,
- FBC_CHIP_ID_7 = 7
-};
-
-// define set of supported epsilon table types
-enum proc_fab_smp_eps_table_type
-{
- PROC_FAB_SMP_EPSILON_TABLE_TYPE_LE = 1,
- PROC_FAB_SMP_EPSILON_TABLE_TYPE_HE = 2,
- PROC_FAB_SMP_EPSILON_TABLE_TYPE_1S = 3
-};
-
-// define set of supported broadcast/pump modes
-enum proc_fab_smp_pump_mode
-{
- PROC_FAB_SMP_PUMP_MODE1 = 1,
- PROC_FAB_SMP_PUMP_MODE2 = 2
-};
-
-
-//------------------------------------------------------------------------------
-// Constant definitions
-//------------------------------------------------------------------------------
-
-// largest representable fabric real address given HW implementation
-const uint64_t PROC_FAB_SMP_MAX_ADDRESS = ((1ULL << 50)-1ULL);
-
-// number of links supported per chip
-const uint8_t PROC_FAB_SMP_NUM_A_LINKS = 3;
-const uint8_t PROC_FAB_SMP_NUM_X_LINKS = 4;
-const uint8_t PROC_FAB_SMP_NUM_F_LINKS = 2;
-
-// range of fabric node/chip ID fields
-const uint8_t PROC_FAB_SMP_NUM_CHIP_IDS = 8;
-const uint8_t PROC_FAB_SMP_NUM_NODE_IDS = 8;
-
-extern "C"
-{
-
-//------------------------------------------------------------------------------
-// Function prototypes
-//------------------------------------------------------------------------------
-
-//------------------------------------------------------------------------------
-// function: utility function to read & return fabric node ID attribute
-// parameters: i_target => pointer to chip/chiplet target
-// o_node_id => structure encapsulating node ID value
-// returns: FAPI_RC_SUCCESS if attribute read is successful & value is valid,
-// RC_PROC_FAB_SMP_FABRIC_NODE_ID_ATTR_ERR if attribute value is
-// invalid,
-// else FAPI_ATTR_GET return code
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_fab_smp_get_node_id_attr(
- const fapi::Target* i_target,
- proc_fab_smp_node_id& o_node_id);
-
-//------------------------------------------------------------------------------
-// function: utility function to read & return fabric chip ID attribute
-// parameters: i_target => pointer to chip/chiplet target
-// o_chip_id => structure encapsulating chip ID value
-// returns: FAPI_RC_SUCCESS if attribute read is successful & value is valid,
-// RC_PROC_FAB_SMP_FABRIC_CHIP_ID_ATTR_ERR if attribute value is
-// invalid,
-// else FAPI_ATTR_GET return code
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_fab_smp_get_chip_id_attr(
- const fapi::Target* i_target,
- proc_fab_smp_chip_id& o_chip_id);
-
-//------------------------------------------------------------------------------
-// function: utility function to read & return PCIe/DSMP mux attribute values
-// parameters: i_target => pointer to chip target
-// o_pcie_not_f_link => vector of boolean values representing state
-// of PCIe/DSMP mux settings (one value per
-// foreign link, true=PCIe function, false=
-// DSMP function)
-// returns: FAPI_RC_SUCCESS if attribute read is successful & value is valid,
-// RC_PROC_FAB_SMP_PCIE_NOT_F_LINK_ATTR_ERR if attribute value is
-// invalid,
-// else FAPI_ATTR_GET return code
-//------------------------------------------------------------------------------
-fapi::ReturnCode proc_fab_smp_get_pcie_dsmp_mux_attrs(
- const fapi::Target* i_target,
- bool o_pcie_not_f_link[PROC_FAB_SMP_NUM_F_LINKS]);
-
-
-} // extern "C"
-
-#endif // _PROC_FAB_SMP_H_
OpenPOWER on IntegriCloud