summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBilicon Patil <bilpatil@in.ibm.com>2015-10-28 04:10:57 -0500
committerStephen Cprek <smcprek@us.ibm.com>2016-02-19 17:06:02 -0600
commit1b95beb2d2791bda1ae2efc12db7ad112bf5ff1f (patch)
tree3312d797ed21b42f9aad1ad3ded332232002d43e /src
parent19b7e50ba108fcb9d463a1a0b6f67ec4ba597548 (diff)
downloadtalos-hostboot-1b95beb2d2791bda1ae2efc12db7ad112bf5ff1f.tar.gz
talos-hostboot-1b95beb2d2791bda1ae2efc12db7ad112bf5ff1f.zip
p9_block_wakeup_intr Level 1
Change-Id: I0326e34e77951042660f16292d2ec01f3a23e8ae RTC: 138607 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/18178 Tested-by: Jenkins Server Reviewed-by: Bilicon Patil <bilpatil@in.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23638 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.C107
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.H97
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.mk20
3 files changed, 224 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.C b/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.C
new file mode 100644
index 000000000..9defe99ff
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.C
@@ -0,0 +1,107 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: chips/p9/procedures/ipl/hwp/p9_block_wakeup_intr.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2015 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* 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. */
+/* */
+/* IBM_PROLOG_END_TAG */
+///
+/// @file p8_block_wakeup_intr.C
+/// @brief Set/reset the BLOCK_REG_WKUP_SOURCES bit in the PCBS-PM associated
+/// with an EX chiplet
+///
+// *HWP HWP Owner: Amit Kumar <akumar3@us.ibm.com>
+// *HWP FW Owner: Bilicon Patil <bilpatil@in.ibm.com>
+// *HWP Team: PM
+// *HWP Level: 1
+// *HWP Consumed by: FSP:HS
+///
+/// @verbatim
+/// High-level procedure flow:
+///
+/// With set/reset enum parameter, either set or clear PMGP0(53)
+///
+/// Procedure Prereq:
+/// - System clocks are running
+/// @endverbatim
+///
+//------------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------
+// Includes
+// ----------------------------------------------------------------------
+
+#include "p9_block_wakeup_intr.H"
+
+// ----------------------------------------------------------------------
+// Procedure Function
+// ----------------------------------------------------------------------
+
+/// @brief @brief Set/reset the BLOCK_INTR_INPUTS bit in the Core PPM
+/// associated with an EX chiplet
+fapi2::ReturnCode p9_block_wakeup_intr(
+ const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_core_target,
+ const p9pmblockwkup::OP_TYPE i_operation )
+
+{
+ FAPI_IMP("p9_block_wakeup_intr start");
+
+#if 0
+ ecmdDataBufferBase data(64);
+
+ uint8_t attr_chip_unit_pos = 0;
+
+ // CPMMR Bit definitions
+ const uint32_t BLOCK_INTR_INPUTS = 11;
+
+ FAPI_DBG("Executing with operation %s to Core %s...",
+ p9pmblockwkup::P9_BLKWKUP_OP_STRING[i_operation],
+ i_core_target.toEcmdString());
+
+
+ // Get the core number
+ FAPI_TRY(FAPI_ATTR_GET( ATTR_CHIP_UNIT_POS,
+ &i_core_target,
+ attr_chip_unit_pos),
+ "fapiGetAttribute of ATTR_CHIP_UNIT_POS failed");
+
+ FAPI_DBG("Core number = %d", attr_chip_unit_pos);
+
+ if (i_operation == p9pmblockwkup::SET)
+ {
+ FAPI_INF("Setting Block Interrupt Sources...");
+
+
+ }
+ else if (i_operation == p9pmblockwkup::CLEAR)
+ {
+
+ FAPI_INF("Clearing Block Interrupt Sources...");
+
+
+ }
+ else
+ {
+ FAPI_ASSERT(false,
+ BLOCK_WAKEUP_INTR_OP()
+ .set_OPERATION(i_operation),
+ "Invalid operation specified.");
+ }
+
+
+#endif
+ FAPI_INF("p9_block_wakeup_intr end");
+ return fapi2::current_err;
+}
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.H b/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.H
new file mode 100644
index 000000000..e23b43dd8
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.H
@@ -0,0 +1,97 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* EKB Project */
+/* */
+/* COPYRIGHT 2015 */
+/* [+] < */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* 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. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+/// @file p9_block_wakeup_intr.H
+/// @brief Set/reset the BLOCK_REG_WKUP_SOURCES bit in the PPM
+/// associated with an EX chiplet
+///
+// *HWP HWP Owner: Amit Kumar <akumar3@us.ibm.com>
+// *HWP Backup HWP Owner: Greg Still <stillgs@us.ibm.com>
+// *HWP FW Owner: Bilicon Patil <bilpatil@in.ibm.com>
+// *HWP Team: PM
+// *HWP Level: 1
+// *HWP Consumed by: FSP:HS
+///
+///-----------------------------------------------------------------------------
+
+#ifndef _P9_BLKWKUP_H_
+#define _P9_BLKWKUP_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include <p9_pm.H>
+#include <fapi2.H>
+#include <p9_misc_scom_addresses.H>
+
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+namespace p9pmblockwkup
+{
+
+static const uint8_t NUM_OPS = 2;
+
+enum OP_TYPE
+{
+ SET,
+ CLEAR
+};
+
+// This must stay in sync with enum above
+const char* OP_TYPE_STRING[] =
+{
+ "SET",
+ "CLEAR"
+};
+
+} // namespace p9pmblockwkup
+
+// function pointer typedef definition for HWP call support
+typedef fapi2::ReturnCode (*p9_block_wakeup_intr_FP_t) (
+ const fapi2::Target<fapi2::TARGET_TYPE_CORE>&,
+ const p9pmblockwkup::OP_TYPE);
+
+extern "C" {
+
+//------------------------------------------------------------------------------
+// Function prototype
+//------------------------------------------------------------------------------
+
+/// @brief @brief Set/reset the BLOCK_REG_WKUP_SOURCES bit in the PPM
+/// associated with an EX chiplet
+///
+/// @param[in] i_core_target Core target
+/// @param[in] i_operation SET, CLEAR
+///
+/// @retval ECMD_SUCCESS
+/// @retval ERROR only those from called functions or MACROs
+
+ fapi2::ReturnCode
+ p9_block_wakeup_intr( const fapi2::Target<fapi2::TARGET_TYPE_CORE>&
+ i_core_target,
+ p9pmblockwkup::OP_TYPE i_operation);
+
+} // extern "C"
+
+#endif // _P9_BLKWKUP_H_
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.mk b/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.mk
new file mode 100644
index 000000000..ab3b6fe56
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.mk
@@ -0,0 +1,20 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: chips/p9/procedures/hwp/pm/p9_block_wakeup_intr.mk $
+#
+# IBM CONFIDENTIAL
+#
+# EKB Project
+#
+# COPYRIGHT 2015
+# [+] International Business Machines Corp.
+#
+#
+# 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.
+#
+# IBM_PROLOG_END_TAG
+PROCEDURE=p9_block_wakeup_intr
+$(call BUILD_PROCEDURE)
OpenPOWER on IntegriCloud