summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Steffen <cwsteffen@us.ibm.com>2015-12-02 17:40:16 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-03-10 17:52:06 -0500
commit40e5a27c4e16339187388b2d137d490f6afcd7b7 (patch)
treeb74e643632398393512987c8023527e1216491f3
parent709cf5a6a240b1487e444c82f2efa9bf20ad452c (diff)
downloadtalos-hostboot-40e5a27c4e16339187388b2d137d490f6afcd7b7.tar.gz
talos-hostboot-40e5a27c4e16339187388b2d137d490f6afcd7b7.zip
P9 I/O X Trainadv L2
Change-Id: Ib07843ad1760e3d4b2686264cb4db1b8114099a7 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22412 Tested-by: Jenkins Server Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/21908 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.C41
-rw-r--r--src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.H20
-rw-r--r--src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.mk2
-rw-r--r--src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.C40
-rw-r--r--src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.H21
-rw-r--r--src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.mk2
6 files changed, 94 insertions, 32 deletions
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.C b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.C
index f55148c37..cb37ffcb0 100644
--- a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.C
+++ b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.C
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: chips/p9/procedures/ipl/hwp/p9_io_xbus_post_trainadv.C $ */
+/* $Source: chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.C $ */
/* */
/* IBM CONFIDENTIAL */
/* */
@@ -25,14 +25,14 @@
/// *HWP HWP Backup Owner : Gary Peterson <garyp@us.ibm.com>
/// *HWP FW Owner : Jamie Knight <rjknight@us.ibm.com>
/// *HWP Team : IO
-/// *HWP Level : 1
+/// *HWP Level : 2
/// *HWP Consumed by : FSP:HB
///-----------------------------------------------------------------------------
///
/// @verbatim
/// High-level procedure flow:
///
-/// Post-Training PHY Status Function.
+/// Post-Training PHY Status Function.
///
/// Procedure Prereq:
/// - System clocks are running.
@@ -56,17 +56,38 @@
/**
* @brief A simple HWP that runs after io_run_trainig.
* This function is called on every Xbus.
- * @param[in] i_target Reference to Target
+ * @param[in] i_target Fapi2 Target
+ * @param[in] i_group Clock Group
+ * @param[in] i_ctarget Fapi2 Connected Target
+ * @param[in] i_cgroup Connected Clock Group
* @retval ReturnCode
*/
-fapi2::ReturnCode
-p9_io_xbus_post_trainadv(const fapi2::Target < fapi2::TARGET_TYPE_XBUS >& i_target)
+fapi2::ReturnCode p9_io_xbus_post_trainadv(
+ const fapi2::Target < fapi2::TARGET_TYPE_XBUS >& i_target,
+ const uint8_t& i_group,
+ const fapi2::Target < fapi2::TARGET_TYPE_XBUS >& i_ctarget,
+ const uint8_t& i_cgroup)
{
- fapi2::ReturnCode rc = 0;
-#if 0
+ FAPI_IMP("Entering...");
+ uint8_t l_status = 0x0;
+ char target_string[fapi2::MAX_ECMD_STRING_LEN];
+ fapi2::toString(i_target, target_string, fapi2::MAX_ECMD_STRING_LEN);
-#endif
- return rc;
+ FAPI_INF("Checking %s:g%d Debug Status.", target_string, i_group);
+ FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_IO_X_DEBUG, i_target, l_status));
+
+ if(l_status == fapi2::ENUM_ATTR_IO_X_DEBUG_TRUE)
+ {
+ FAPI_INF("Debug True.");
+ }
+ else
+ {
+ FAPI_INF("Debug False.");
+ }
+
+fapi_try_exit:
+ FAPI_IMP("Exiting...");
+ return fapi2::current_err;
}
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.H b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.H
index b6f71e8a4..d77f54c0f 100644
--- a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.H
+++ b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: chips/p9/procedures/ipl/hwp/p9_io_xbus_post_trainadv.H $ */
+/* $Source: chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
@@ -43,7 +43,10 @@
// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_io_xbus_post_trainadv_FP_t)
-(const fapi2::Target < fapi2::TARGET_TYPE_XBUS >&);
+(const fapi2::Target < fapi2::TARGET_TYPE_XBUS >&,
+ const uint8_t&,
+ const fapi2::Target < fapi2::TARGET_TYPE_XBUS >&,
+ const uint8_t&);
// ----------------------------------------------------------------------------
// Constant Definitions
@@ -57,11 +60,18 @@ extern "C" {
/**
* @brief A simple HWP that runs after io_run_trainig.
* This function is called on every Xbus.
- * @param[in] iTarget Reference to Target
+ * @param[in] i_target Fapi2 Target
+ * @param[in] i_group Clock Group
+ * @param[in] i_ctarget Fapi2 Connected Target
+ * @param[in] i_cgroup Connected Clock Group
* @retval ReturnCode
*/
- fapi2::ReturnCode
- p9_io_xbus_post_trainadv(const fapi2::Target< fapi2::TARGET_TYPE_XBUS >& i_target);
+ fapi2::ReturnCode p9_io_xbus_post_trainadv(
+ const fapi2::Target< fapi2::TARGET_TYPE_XBUS >& i_target,
+ const uint8_t& i_group,
+ const fapi2::Target< fapi2::TARGET_TYPE_XBUS >& i_ctarget,
+ const uint8_t& i_cgroup);
+
} // extern "C"
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.mk b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.mk
index e05fd212e..7d025814f 100644
--- a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.mk
+++ b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.mk
@@ -1,7 +1,7 @@
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
-# $Source: chips/p9/procedures/ipl/hwp/p9_io_xbus_post_trainadv.mk $
+# $Source: chips/p9/procedures/hwp/io/p9_io_xbus_post_trainadv.mk $
#
# IBM CONFIDENTIAL
#
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.C b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.C
index 9d9802f41..d311e967a 100644
--- a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.C
+++ b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.C
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: chips/p9/procedures/ipl/hwp/p9_io_xbus_pre_trainadv.C $ */
+/* $Source: chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.C $ */
/* */
/* IBM CONFIDENTIAL */
/* */
@@ -53,16 +53,38 @@
/**
* @brief A simple HWP that runs prior to io_run_trainig.
- * This function is called on every Obus/Abus/Xbus/DMI.
- * @param[in] iTarget Reference to Target
+ * This function is called on every Xbus.
+ * @param[in] i_target Fapi2 Target
+ * @param[in] i_group Clock Group
+ * @param[in] i_ctarget Fapi2 Connected Target
+ * @param[in] i_cgroup Connected Clock Group
* @retval ReturnCode
*/
-fapi2::ReturnCode
-p9_io_xbus_pre_trainadv(const fapi2::Target < fapi2::TARGET_TYPE_XBUS >& i_target)
+fapi2::ReturnCode p9_io_xbus_pre_trainadv(
+ const fapi2::Target < fapi2::TARGET_TYPE_XBUS >& i_target,
+ const uint8_t& i_group,
+ const fapi2::Target < fapi2::TARGET_TYPE_XBUS >& i_ctarget,
+ const uint8_t& i_cgroup)
{
- fapi2::ReturnCode rc = 0;
-#if 0
+ FAPI_IMP("Entering...");
+ uint8_t l_status = 0x0;
-#endif
- return rc;
+ char target_string[fapi2::MAX_ECMD_STRING_LEN];
+ fapi2::toString(i_target, target_string, fapi2::MAX_ECMD_STRING_LEN);
+
+ FAPI_INF("Checking %s:g%d Debug Status.", target_string, i_group);
+ FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_IO_X_DEBUG, i_target, l_status));
+
+ if(l_status == fapi2::ENUM_ATTR_IO_X_DEBUG_TRUE)
+ {
+ FAPI_INF("Debug True.");
+ }
+ else
+ {
+ FAPI_INF("Debug False.");
+ }
+
+fapi_try_exit:
+ FAPI_IMP("Exiting...");
+ return fapi2::current_err;
}
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.H b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.H
index ff94d3933..2d5da6b85 100644
--- a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.H
+++ b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.H
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: chips/p9/procedures/ipl/hwp/p9_io_xbus_pre_trainadv.H $ */
+/* $Source: chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
@@ -25,7 +25,7 @@
/// *HWP HWP Backup Owner : Gary Peterson <garyp@us.ibm.com>
/// *HWP FW Owner : Jamie Knight <rjknight@us.ibm.com>
/// *HWP Team : IO
-/// *HWP Level : 1
+/// *HWP Level : 2
/// *HWP Consumed by : FSP:HB
///----------------------------------------------------------------------------
@@ -43,7 +43,10 @@
// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_io_xbus_pre_trainadv_FP_t)
-(const fapi2::Target < fapi2::TARGET_TYPE_XBUS >&);
+(const fapi2::Target < fapi2::TARGET_TYPE_XBUS >&,
+ const uint8_t&,
+ const fapi2::Target < fapi2::TARGET_TYPE_XBUS >&,
+ const uint8_t&);
// ----------------------------------------------------------------------------
// Constant Definitions
@@ -57,11 +60,17 @@ extern "C" {
/**
* @brief A simple HWP that runs prior to io_run_trainig.
* This function is called on every Xbus.
- * @param[in] i_target Reference to FAPI2 Target
+ * @param[in] i_target Fapi2 Target
+ * @param[in] i_group Clock Group
+ * @param[in] i_ctarget Fapi2 Connected Target
+ * @param[in] i_cgroup Connected Clock Group
* @retval ReturnCode
*/
- fapi2::ReturnCode
- p9_io_xbus_pre_trainadv(const fapi2::Target< fapi2::TARGET_TYPE_XBUS >& i_target);
+ fapi2::ReturnCode p9_io_xbus_pre_trainadv(
+ const fapi2::Target< fapi2::TARGET_TYPE_XBUS >& i_target,
+ const uint8_t& i_group,
+ const fapi2::Target< fapi2::TARGET_TYPE_XBUS >& i_ctarget,
+ const uint8_t& i_cgroup);
} // extern "C"
diff --git a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.mk b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.mk
index 7dd6f8e68..5b37643e1 100644
--- a/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.mk
+++ b/src/import/chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.mk
@@ -1,7 +1,7 @@
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
-# $Source: chips/p9/procedures/ipl/hwp/p9_io_xbus_pre_trainadv.mk $
+# $Source: chips/p9/procedures/hwp/io/p9_io_xbus_pre_trainadv.mk $
#
# IBM CONFIDENTIAL
#
OpenPOWER on IntegriCloud