summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures
diff options
context:
space:
mode:
authorJoe McGill <jmcgill@us.ibm.com>2016-06-28 08:38:45 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-07-01 10:13:41 -0400
commit98e5df59f56d3327551c71fb43dd6817b49ab7bc (patch)
tree418ec620350e88852a1179382fa6107b9f10c666 /src/import/chips/p9/procedures
parent5afecea9a424b1c717393062673197185cdc3275 (diff)
downloadtalos-hostboot-98e5df59f56d3327551c71fb43dd6817b49ab7bc.tar.gz
talos-hostboot-98e5df59f56d3327551c71fb43dd6817b49ab7bc.zip
p9_npu_scominit -- L2 delivery to invoke initfile
Change-Id: Ib946b39da91de1ada676571ba98050045718258c Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26339 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: CHRISTINA L. GRAVES <clgraves@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26343 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures')
-rw-r--r--src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.C55
-rw-r--r--src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.H17
-rw-r--r--src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.mk3
3 files changed, 32 insertions, 43 deletions
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.C b/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.C
index 332cdf3cb..c6413b31c 100644
--- a/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.C
+++ b/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.C
@@ -7,7 +7,7 @@
/* */
/* EKB Project */
/* */
-/* COPYRIGHT 2015 */
+/* COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -20,52 +20,41 @@
/// @file p9_npu_scominit.C
/// @brief Apply SCOM overrides for the NPU unit via an init file
///
-// *HWP HWP Owner: Michael Dye <dyem@us.ibm.com>
+// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
// *HWP Team: Nest
-// *HWP Level: 1
+// *HWP Level: 2
// *HWP Consumed by: HB
//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
#include <p9_npu_scominit.H>
+#include <p9_npu_scom.H>
-extern "C"
-{
///
/// p9_npu_scominit HWP entry point (Defined in .H file)
///
- fapi2::ReturnCode p9_npu_scominit(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
- & i_target)
- {
- //Mark Entry
- FAPI_DBG("Entering ...");
- const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM;
- // uint8_t l_capi_mode;
- // uint8_t l_opt_mode [4];
- //basically what we need to know is which of the 6 possible NPU bricks are connected to GPUs in the system.
- //From that information we know which of the 3 NPU Powerbus ramps to activate.
-
- //Level of NPU involvement is determined from the below 4 pieces of information
- FAPI_DBG("Collecting system information to determine npu state");
- //Powerbus Epsilon setting
- //FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_CAPI_MODE, FAPI_SYSTEM, l_capi_mode));
- //Gives information on link type for powerbus snooping setup
- //FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_FABRIC_OPT_MODE, FAPI_SYSTEM, l_opt_mode));
- //Attribute for GPUs in System
- //"Link Enable" reflected in targeting mode
-
- //NPU snoop configuration using above information
- //scom FIR initialization in initfile
+fapi2::ReturnCode p9_npu_scominit(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ & i_target)
+{
+ fapi2::ReturnCode l_rc;
+ const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM;
- //Mark Exit
- FAPI_DBG("Exiting ...");
+ FAPI_DBG("Entering ...");
+ FAPI_DBG("Invoking p9.npu.scom.initfile...");
+ FAPI_EXEC_HWP(l_rc, p9_npu_scom, i_target, FAPI_SYSTEM);
- //fapi_try_exit:
- return fapi2::current_err;
+ if (l_rc)
+ {
+ FAPI_ERR("Error from p9.npu.scom.initfile");
+ fapi2::current_err = l_rc;
+ goto fapi_try_exit;
}
-} // extern "C"
-/* End: */
+fapi_try_exit:
+ FAPI_DBG("Exiting ...");
+ return fapi2::current_err;
+}
+
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.H b/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.H
index 445d8e990..f81740097 100644
--- a/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.H
+++ b/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.H
@@ -7,7 +7,7 @@
/* */
/* EKB Project */
/* */
-/* COPYRIGHT 2015 */
+/* COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -20,10 +20,10 @@
/// @file p9_npu_scominit.C
/// @brief Apply SCOM overrides for the NPU unit via an init file
///
-// *HWP HWP Owner: Michael Dye <dyem@us.ibm.com>
+// *HWP HWP Owner: Joe McGill <jmcgill@us.ibm.com>
// *HWP FW Owner: Thi Tran <thi@us.ibm.com>
// *HWP Team: Nest
-// *HWP Level: 1
+// *HWP Level: 2
// *HWP Consumed by: HB
#ifndef _PROC_NPU_SCOMINIT_H_
@@ -32,21 +32,20 @@
//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
-
#include <fapi2.H>
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
// function pointer typedef definition for HWP call support
-typedef fapi2::ReturnCode
-(*p9_npu_scominit_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);
+typedef fapi2::ReturnCode (*p9_npu_scominit_FP_t)(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&);
//------------------------------------------------------------------------------
// Function prototypes
//------------------------------------------------------------------------------
extern "C"
{
-//------------------------------------------------------------------------------
-// Hardware Procedure
-//------------------------------------------------------------------------------
+
///
/// @brief Apply SCOM overrides for the NPU unit via an init file
/// @param[in] i_target Reference to processor chip target
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.mk b/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.mk
index cb31d9a60..d7e8bc45d 100644
--- a/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.mk
+++ b/src/import/chips/p9/procedures/hwp/nest/p9_npu_scominit.mk
@@ -7,7 +7,7 @@
#
# EKB Project
#
-# COPYRIGHT 2015
+# COPYRIGHT 2015,2016
# [+] International Business Machines Corp.
#
#
@@ -17,4 +17,5 @@
#
# IBM_PROLOG_END_TAG
PROCEDURE=p9_npu_scominit
+$(call ADD_MODULE_INCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/initfiles)
$(call BUILD_PROCEDURE)
OpenPOWER on IntegriCloud