summaryrefslogtreecommitdiffstats
path: root/src/import/chips/centaur/procedures/hwp/io
diff options
context:
space:
mode:
authorChris Steffen <cwsteffen@us.ibm.com>2017-04-24 13:09:57 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2017-08-30 13:34:43 -0400
commit7901cf9e10727a671930cd0d3b2ea1d844471d74 (patch)
tree5d3de1e047e9a6faa01408412e3b4354015c0ee2 /src/import/chips/centaur/procedures/hwp/io
parente5eae5a0d869c729b5cbd827de2a7b6fb4b85461 (diff)
downloadtalos-hostboot-7901cf9e10727a671930cd0d3b2ea1d844471d74.tar.gz
talos-hostboot-7901cf9e10727a671930cd0d3b2ea1d844471d74.zip
DMI / CEN IO Level 1 Procedures
Change-Id: I9de45364707b10d11860c8305a43327cc2033311 Original-Change-Id: I21cf3398d0a924b17078e3e6232b1fcb2ae83206 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39608 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Gary A. Peterson <garyp@us.ibm.com> Dev-Ready: Gary A. Peterson <garyp@us.ibm.com> Reviewed-by: Benjamin Gass <bgass@us.ibm.com> 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/45323 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/centaur/procedures/hwp/io')
-rw-r--r--src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.C102
-rw-r--r--src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.H78
-rw-r--r--src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.mk29
3 files changed, 209 insertions, 0 deletions
diff --git a/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.C b/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.C
new file mode 100644
index 000000000..b7e552645
--- /dev/null
+++ b/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.C
@@ -0,0 +1,102 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+///
+/// @file p9_io_cen_scominit.C
+/// @brief Invoke OBUS initfile
+///
+///----------------------------------------------------------------------------
+/// *HWP HWP Owner : Chris Steffen <cwsteffen@us.ibm.com>
+/// *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 Consumed by : FSP:HB
+///----------------------------------------------------------------------------
+///
+/// @verbatim
+/// High-level procedure flow:
+///
+/// Invoke CEN scominit file.
+///
+/// Procedure Prereq:
+/// - System clocks are running.
+/// @endverbatim
+///----------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include <p9_io_scom.H>
+#include <p9_io_regs.H>
+#include <p9_io_cen_scominit.H>
+
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+// Function definitions
+//------------------------------------------------------------------------------
+
+// HWP entry point, comments in header
+fapi2::ReturnCode p9_io_cen_scominit( const CEN_TGT& i_target )
+{
+ // mark HWP entry
+ FAPI_INF("p9_io_cen_scominit: Entering...");
+ /*
+ const uint8_t GROUP_00 = 0;
+ const uint8_t LANE_00 = 0;
+ const uint8_t SET_RESET = 1;
+ const uint8_t CLEAR_RESET = 0;
+ fapi2::ReturnCode rc = fapi2::FAPI2_RC_SUCCESS;
+
+ // get system target
+ const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> l_system_target;
+
+ // get a proc target
+ //fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_proc_target = i_target.getParent<fapi2::TARGET_TYPE_PROC_CHIP>();
+
+ // assert IO reset to power-up bus endpoint logic
+ FAPI_TRY( io::rmw( OPT_IORESET_HARD_BUS0, i_target, GROUP_00, LANE_00, SET_RESET ) );
+
+ // Bus Reset is relatively fast, only needing < a hundred cycles to allow the signal to propogate.
+ FAPI_TRY( fapi2::delay( 10, 1000 ) );
+
+ FAPI_TRY( io::rmw( OPT_IORESET_HARD_BUS0, i_target, GROUP_00, LANE_00, CLEAR_RESET ) );
+
+ FAPI_INF("Invoke FAPI procedure core: input_target");
+ FAPI_EXEC_HWP(rc, p9_cen_scom, i_target, l_system_target);
+
+
+ fapi_try_exit:
+ */
+ // mark HWP exit
+ FAPI_INF("p9_io_cen_scominit: ...Exiting");
+ return fapi2::current_err;
+}
+
diff --git a/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.H b/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.H
new file mode 100644
index 000000000..440e9c53f
--- /dev/null
+++ b/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.H
@@ -0,0 +1,78 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+///
+/// @file p9_io_cen_scominit.H
+/// @brief Invoke CEN initfile (FAPI)
+///
+///----------------------------------------------------------------------------
+/// *HWP HWP Owner : Chris Steffen <cwsteffen@us.ibm.com>
+/// *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 Consumed by : FSP:HB
+///----------------------------------------------------------------------------
+#ifndef P9_IO_CEN_SCOMINIT_H_
+#define P9_IO_CEN_SCOMINIT_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include <fapi2.H>
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+typedef fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> CEN_TGT;
+
+// function pointer typedef definition for HWP call support
+typedef fapi2::ReturnCode (*p9_io_cen_scominit_FP_t)(const CEN_TGT& i_target);
+
+extern "C" {
+
+//------------------------------------------------------------------------------
+// Function prototypes
+//------------------------------------------------------------------------------
+
+ /**
+ * @brief HWP that calls the Centaur SCOM initfiles
+ *
+ * Should be called for all valid/connected OBUS endpoints
+ *
+ * @param[in] i_target Reference to CEN chiplet target
+ * - p9.cen.scom.initfile
+ *
+ * @return FAPI2_RC_SUCCESS on success, error otherwise
+ */
+ fapi2::ReturnCode p9_io_cen_scominit(const CEN_TGT& i_target);
+
+
+} // extern "C"
+
+#endif // P9_IO_CEN_SCOMINIT_H_
diff --git a/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.mk b/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.mk
new file mode 100644
index 000000000..77375a4fc
--- /dev/null
+++ b/src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.mk
@@ -0,0 +1,29 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/import/chips/centaur/procedures/hwp/io/p9_io_cen_scominit.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2015,2017
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+
+PROCEDURE=p9_io_cen_scominit
+$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/io/)
+
+$(call BUILD_PROCEDURE)
OpenPOWER on IntegriCloud