summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures
diff options
context:
space:
mode:
authorCHRISTINA L. GRAVES <clgraves@us.ibm.com>2016-04-18 10:35:22 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-01-30 11:35:00 -0500
commitf95cc42d122a0cf2c004d33a22c061881d4a3473 (patch)
tree428957c4ddf76f35762bce9ab151306808ff137e /src/import/chips/p9/procedures
parentb83556b80737f7098ce5cae73a61068f8bf56184 (diff)
downloadtalos-hostboot-f95cc42d122a0cf2c004d33a22c061881d4a3473.tar.gz
talos-hostboot-f95cc42d122a0cf2c004d33a22c061881d4a3473.zip
p9_tod_save_config L1 and L2
Change-Id: Ie312342650f53acc35daa6902d61fd90f6121f2c Original-Change-Id: If36086829e98eb69c10f9355253b4ce0c7276902 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25040 Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: James N. Klazynski <jklazyns@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35470 Reviewed-by: Dzuy Nguyen <dzuy@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: CHRISTINA L. GRAVES <clgraves@us.ibm.com> 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: 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_tod_save_config.C99
-rw-r--r--src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.H74
-rw-r--r--src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.mk28
3 files changed, 201 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.C b/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.C
new file mode 100644
index 000000000..9475774b2
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.C
@@ -0,0 +1,99 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016,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_tod_save_config.C
+/// @brief Saves TOD configuration registers to i_tod_node->o_todRegs
+//
+// *HWP Owner: Christina Graves clgraves@us.ibm.com
+// *FW Owner: Thi Tran thi@us.ibm.com
+// *HWP Team: Nest
+// *HWP Level: 2
+// *HWP Consumed by: PRD
+//
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+#include <p9_tod_save_config.H>
+
+extern "C"
+{
+
+//------------------------------------------------------------------------------
+// Function definitions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// NOTE: description in header
+//------------------------------------------------------------------------------
+ fapi2::ReturnCode p9_tod_save_config(tod_topology_node* i_tod_node)
+ {
+ FAPI_DBG("Start");
+
+ fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>* target = i_tod_node->i_target;
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_M_PATH_CTRL_REG, i_tod_node->o_todRegs.tod_m_path_ctrl_reg),
+ "Error saving PERV_TOD_M_PATH_CTRL_REG...");
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_PRI_PORT_0_CTRL_REG, i_tod_node->o_todRegs.tod_pri_port_0_ctrl_reg),
+ "Error saving PERV_TOD_PRI_PORT_0_CTRL_REG...");
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_PRI_PORT_1_CTRL_REG, i_tod_node->o_todRegs.tod_pri_port_1_ctrl_reg),
+ "Error saving PERV_TOD_PRI_PORT_1_CTRL_REG...");
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_SEC_PORT_0_CTRL_REG, i_tod_node->o_todRegs.tod_sec_port_0_ctrl_reg),
+ "Error saving PERV_TOD_SEC_PORT_0_CTRL_REG...");
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_SEC_PORT_1_CTRL_REG, i_tod_node->o_todRegs.tod_sec_port_1_ctrl_reg),
+ "Error saving PERV_TOD_SEC_PORT_1_CTRL_REG...");
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_S_PATH_CTRL_REG, i_tod_node->o_todRegs.tod_s_path_ctrl_reg),
+ "Error saving PERV_TOD_S_PATH_CTRL_REG...");
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_I_PATH_CTRL_REG, i_tod_node->o_todRegs.tod_i_path_ctrl_reg),
+ "Error saving PERV_TOD_I_PATH_CTRL_REG...");
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_PSS_MSS_CTRL_REG, i_tod_node->o_todRegs.tod_pss_mss_ctrl_reg),
+ "Error saving PERV_TOD_PSS_MSS_CTRL_REG...");
+
+ FAPI_TRY(fapi2::getScom(*target, PERV_TOD_CHIP_CTRL_REG, i_tod_node->o_todRegs.tod_chip_ctrl_reg),
+ "Error saving PERV_TOD_CHIP_CTRL_REG...");
+
+ // Recurse to save children configuration
+ for (std::list<tod_topology_node*>::iterator child = (i_tod_node->i_children).begin();
+ child != (i_tod_node->i_children).end();
+ ++child)
+ {
+ tod_topology_node* tod_node = *child;
+ FAPI_TRY(p9_tod_save_config(tod_node), "Failure saving downstream configurations!");
+ }
+
+ fapi_try_exit:
+ FAPI_DBG("End");
+ return fapi2::current_err;
+ }
+} // extern "C"
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.H b/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.H
new file mode 100644
index 000000000..47c03be9b
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.H
@@ -0,0 +1,74 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016,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_tod_save_config.H
+/// @brief Header for p9_tod_save_config.C
+//
+// *HWP HWP Owner: Christina Graves clgraves@us.ibm.com
+// *HWP FW Owner: Thi Tran thi@us.ibm.com
+// *HWP Team: Nest
+// *HWP Level: 2
+// *HWP Consumed by: PRD
+//
+//------------------------------------------------------------------------------
+
+#ifndef P9_TOD_SAVE_CONFIG_H_
+#define P9_TOD_SAVE_CONFIG_H_
+
+//------------------------------------------------------------------------------
+// Includes
+//------------------------------------------------------------------------------
+
+#include <fapi2.H>
+#include <p9_tod_utils.H>
+
+//------------------------------------------------------------------------------
+// Constant definitions
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Structure definitions
+//------------------------------------------------------------------------------
+
+// function pointer typedef definition for HWP call support
+typedef fapi2::ReturnCode
+(*p9_tod_save_config_FP_t) (tod_topology_node*);
+
+extern "C"
+{
+
+//------------------------------------------------------------------------------
+// Function prototypes
+//------------------------------------------------------------------------------
+
+ /// @brief Saves TOD configuration registers to i_tod_node->o_todRegs
+ /// @param[in] i_tod_node Reference to TOD topology (FAPI targets included within)
+ /// @return FAPI_RC_SUCCESS if all registers were read and saved in node structure else FAPI or ECMD error is sent through
+ fapi2::ReturnCode p9_tod_save_config(tod_topology_node* i_tod_node);
+
+} // extern "C"
+
+#endif // P9_TOD_SAVE_CONFIG_H_
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.mk b/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.mk
new file mode 100644
index 000000000..c14730423
--- /dev/null
+++ b/src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.mk
@@ -0,0 +1,28 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.mk $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2016,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_tod_save_config
+OBJS+=p9_tod_utils.o
+$(call BUILD_PROCEDURE)
+
OpenPOWER on IntegriCloud