summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/chips/p9')
-rwxr-xr-xsrc/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.C80
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.H77
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.mk20
3 files changed, 177 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.C
new file mode 100755
index 000000000..ae40a669e
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.C
@@ -0,0 +1,80 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.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 p9_pm_pba_bar_config.C
+///
+/// @brief Initialize PAB and PAB_MSK of PBA
+///
+// *HWP HWP Owner: Greg Still <stillgs @us.ibm.com>
+// *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com>
+// *HWP Team: PM
+// *HWP Level: 1
+// *HWP Consumed by: HS
+///
+/// @verbatim
+/// The purpose of this procedure is to set the PBA BAR, PBA BAR Mask and
+/// PBA scope value / registers
+///
+/// INPUTS: Values for one set of pbabar
+///
+/// High-level procedure flow:
+/// Parameter checking
+/// Set PBA_BAR
+/// Set PBA_BARMSK
+///
+/// Procedure Prereq:
+/// System clocks are running
+///
+/// @endverbatim
+
+// -----------------------------------------------------------------------------
+// Includes
+// -----------------------------------------------------------------------------
+#include <p9_pm_pba_bar_config.H>
+
+// -----------------------------------------------------------------------------
+// Constant definitions
+// -----------------------------------------------------------------------------
+
+enum BAR_ADDR_RANGE
+{
+ BAR_ADDR_RANGECHECK = 0x0003FFFFFFF00000ull,
+ BAR_ADDR_RANGECHECK_HIGH = 0xFFFC000000000000ull,
+ BAR_ADDR_RANGECHECK_LOW = 0x00000000000FFFFFull
+};
+
+// -----------------------------------------------------------------------------
+// Prototypes
+// -----------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// Function definitions
+// -----------------------------------------------------------------------------
+fapi2::ReturnCode p9_pm_pba_bar_config (
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
+ const uint32_t i_index,
+ const uint64_t i_pba_bar_addr,
+ const uint64_t i_pba_bar_size,
+ const p9pba::CMD_SCOPE i_pba_cmd_scope)
+{
+ FAPI_IMP("Entering P9_PM_PBA_BAR_CONFIG...");
+
+ FAPI_IMP("Exiting P9_PM_PBA_BAR_CONFIG...");
+ return fapi2::current_err;
+}
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.H
new file mode 100644
index 000000000..5798d0cf7
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.H
@@ -0,0 +1,77 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.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_pm_pba_bar_config.H
+///
+/// @brief Initialize PAB and PAB_MSK of PBA
+///
+// *HWP HWP Owner: Greg Still <stillgs @us.ibm.com>
+// *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com>
+// *HWP Team: PM
+// *HWP Level: 1
+// *HWP Consumed by: HS
+//
+
+#ifndef _P9_PM_PBA_CONFIG_H_
+#define _P9_PM_PBA_CONFIG_H_
+
+// -----------------------------------------------------------------------------
+// Includes
+// -----------------------------------------------------------------------------
+#include <fapi2.H>
+#include <p9_pm_pba_init.H>
+
+// function pointer typedef definition for HWP call support
+
+typedef fapi2::ReturnCode (*p9_pm_pba_bar_config_FP_t)
+(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&,
+ const uint32_t,
+ const uint64_t,
+ const uint64_t,
+ const p9pba::CMD_SCOPE);
+
+extern "C"
+{
+
+// -----------------------------------------------------------------------------
+// Function prototype
+// -----------------------------------------------------------------------------
+
+///
+/// @brief Initialize PAB_BAR (cmd_scope & address) and PAB_BARMSK (mask/size)
+///
+/// @param [in] i_target Chip Target
+/// @param [in] i_index Identifies the set of BAR/BARMSK registers [0-3]
+/// @param [in] i_pba_bar_addr PBA base address - 1MB granularity
+/// @param [in] i_pba_bar_size PBA region size in MB; If not a power of two,
+/// the value will be rounded up to the next power
+/// of 2 for setting hardware mask
+/// @param [in] i_pba_cmd_scope Command scope according to pba spec
+///
+/// @return FAPI_RC_SUCCESS on success or error return code
+///
+ fapi2::ReturnCode p9_pm_pba_bar_config(
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
+ const uint32_t i_index,
+ const uint64_t i_pba_bar_addr,
+ const uint64_t i_pba_bar_size,
+ const p9pba::CMD_SCOPE i_pba_cmd_scope);
+}
+
+#endif // _P9_PM_PBA_CONFIG_H_
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.mk b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.mk
new file mode 100644
index 000000000..94afc58d3
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_pba_bar_config.mk
@@ -0,0 +1,20 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: chips/p9/procedures/ipl/hwp/p9_pm_ocb_init.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_pm_pba_bar_config
+$(call BUILD_PROCEDURE)
OpenPOWER on IntegriCloud