-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
b83556b
commit f95cc42
Showing
3 changed files
with
201 additions
and
0 deletions.
There are no files selected for viewing
99 changes: 99 additions & 0 deletions
99
src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
74 changes: 74 additions & 0 deletions
74
src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.H
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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_ |
28 changes: 28 additions & 0 deletions
28
src/import/chips/p9/procedures/hwp/nest/p9_tod_save_config.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|