diff options
author | Joe McGill <jmcgill@us.ibm.com> | 2017-09-30 14:56:01 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-10-02 11:55:57 -0400 |
commit | a92029aaf8ad8032c6c5f297787513ce1144ef35 (patch) | |
tree | fd31ec81caddc4c6a08f323c13492341c4fd7949 /src/import/chips/p9/procedures/hwp | |
parent | d372aa8418c3f0dde8c2ca610ffc85424cb79e70 (diff) | |
download | talos-sbe-a92029aaf8ad8032c6c5f297787513ce1144ef35.tar.gz talos-sbe-a92029aaf8ad8032c6c5f297787513ce1144ef35.zip |
update HWP level metadata for nest, common files
Change-Id: I451695b8ae1d8f7d5ed6d512631992dea98b5ee8
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46967
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Benjamin Gass <bgass@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46969
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.C | 68 | ||||
-rw-r--r-- | src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.H | 55 |
2 files changed, 64 insertions, 59 deletions
diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.C b/src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.C index dec1367e..e3b3ddd7 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,49 +22,63 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ + +/// +/// @file p9_inject_local_xstop.C +/// @brief Sets FIR registers to trigger local checkstop in the core +/// +/// @author Josh Hannan <jlhannan@us.ibm.com> /// -// @file p9_inject_local_xstop.C -// @brief (eCMD) Sets FIR registers to trigger local checkstop in the core -// -// @author Josh Hannan <jlhannan@us.ibm.com> -// + +// *HWP HWP Owner: Joshua Hannan jlhannan@us.ibm.com +// *HWP FW Owner: Thi Tran thi@us.ibm.com +// *HWP Team: Core +// *HWP Level: 3 +// *HWP Consumed by: SBE + //------------------------------------------------------------------------------ // Includes //------------------------------------------------------------------------------ -#include "p9_inject_local_xstop.H" -#include <fapi2.H> +#include <p9_inject_local_xstop.H> #include <p9_quad_scom_addresses.H> +//------------------------------------------------------------------------------ +// Constant Definitions +//------------------------------------------------------------------------------ const uint32_t CORE_LOCAL_XSTOP_BIT = 51; -fapi2::ReturnCode p9_inject_local_xstop(fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target) +//------------------------------------------------------------------------------ +// Function Definitions +//------------------------------------------------------------------------------ + +fapi2::ReturnCode +p9_inject_local_xstop(fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target) { - fapi2::buffer<uint64_t> data; + fapi2::buffer<uint64_t> l_data; // Clear Bit CORE_LOCAL_XSTOP_BIT of FIRMASK register so FIR is visible - data.flush<1>().clearBit<CORE_LOCAL_XSTOP_BIT>(); - FAPI_TRY(fapi2::putScom(i_target, C_CORE_FIRMASK_AND, data), - "p9_inject_local_xstop: Could not write to FIR Mask Register"); + l_data.flush<1>().clearBit<CORE_LOCAL_XSTOP_BIT>(); + FAPI_TRY(fapi2::putScom(i_target, C_CORE_FIRMASK_AND, l_data), + "Could not write to FIR Mask Register"); // Set bit CORE_LOCAL_XSTOP_BIT of Both Action Registers // This will perform a local checkstop when the fir bit is set - FAPI_TRY(fapi2::getScom(i_target, C_CORE_ACTION0, data), - "p9_inject_local_xstop: Error while performing getscom on FIR Action 0 Register"); - data.setBit<CORE_LOCAL_XSTOP_BIT>(); - FAPI_TRY(fapi2::putScom(i_target, C_CORE_ACTION0, data), - "p9_inject_local_xstop: Error while performing putscom on FIR Action 0 Register"); - + FAPI_TRY(fapi2::getScom(i_target, C_CORE_ACTION0, l_data), + "Error while performing getscom on FIR Action 0 Register"); + l_data.setBit<CORE_LOCAL_XSTOP_BIT>(); + FAPI_TRY(fapi2::putScom(i_target, C_CORE_ACTION0, l_data), + "Error while performing putscom on FIR Action 0 Register"); - FAPI_TRY(fapi2::getScom(i_target, C_CORE_ACTION1, data), - "p9_inject_local_xstop: Error while performing getscom on FIR Action 1 Register"); - data.setBit<CORE_LOCAL_XSTOP_BIT>(); - FAPI_TRY(fapi2::putScom(i_target, C_CORE_ACTION1, data), - "p9_inject_local_xstop: Error while performing putscom on FIR Action 1 Register"); + FAPI_TRY(fapi2::getScom(i_target, C_CORE_ACTION1, l_data), + "Error while performing getscom on FIR Action 1 Register"); + l_data.setBit<CORE_LOCAL_XSTOP_BIT>(); + FAPI_TRY(fapi2::putScom(i_target, C_CORE_ACTION1, l_data), + "Error while performing putscom on FIR Action 1 Register"); // Set bit CORE_LOCAL_XSTOP_BIT of FIR register to perform local checkstop - data.flush<0>().setBit<CORE_LOCAL_XSTOP_BIT>(); - FAPI_TRY(fapi2::putScom(i_target, C_CORE_FIR_OR, data), - "p9_inject_local_xstop: Could not write to Fault Isolation Register"); + l_data.flush<0>().setBit<CORE_LOCAL_XSTOP_BIT>(); + FAPI_TRY(fapi2::putScom(i_target, C_CORE_FIR_OR, l_data), + "Could not write to Fault Isolation Register"); fapi_try_exit: FAPI_DBG("Exiting..."); diff --git a/src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.H b/src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.H index ffd55edd..c50e59a2 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.H +++ b/src/import/chips/p9/procedures/hwp/nest/p9_inject_local_xstop.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -22,58 +22,49 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -//----------------------------------------------------------------------------------- -// -// @file p9_inject_local_xstop.H -// @brief header file for triggering local checkstop in the core -// + +/// +/// @file p9_inject_local_xstop.H +/// @brief Sets FIR registers to trigger local checkstop in the core +/// +/// @author Josh Hannan <jlhannan@us.ibm.com> +/// + // *HWP HWP Owner: Joshua Hannan jlhannan@us.ibm.com // *HWP FW Owner: Thi Tran thi@us.ibm.com // *HWP Team: Core -// *HWP Level: 2 +// *HWP Level: 3 // *HWP Consumed by: SBE -// ---------------------------------------------------------------------------------- -// -// *! ADDITIONAL COMMENTS : -// *! -// *! -// *! -//----------------------------------------------------------------------------------- #ifndef _P9_INJECT_LOCAL_XSTOP_H_ #define _P9_INJECT_LOCAL_XSTOP_H_ -//----------------------------------------------------------------------------------- +//------------------------------------------------------------------------------ // Includes -//----------------------------------------------------------------------------------- - +//------------------------------------------------------------------------------ #include <fapi2.H> -//----------------------------------------------------------------------------------- +//------------------------------------------------------------------------------ // Structure definitions -//----------------------------------------------------------------------------------- - +//------------------------------------------------------------------------------ //function pointer typedef definition for HWP call support -typedef fapi2::ReturnCode -(*p9_inject_local_xstop_FP_t) ( +typedef fapi2::ReturnCode (*p9_inject_local_xstop_FP_t) ( fapi2::Target<fapi2::TARGET_TYPE_CORE>& ); -//----------------------------------------------------------------------------------- -// Constant definitions -//----------------------------------------------------------------------------------- -extern "C" { - -//----------------------------------------------------------------------------------- +//------------------------------------------------------------------------------ // Function prototype -//----------------------------------------------------------------------------------- +//------------------------------------------------------------------------------ + +extern "C" { -/// @brief Clears bit 51 of FIRMASK register, sets bit 51 of FIR ACTION registers and -/// FIR register to generate a local checkstop +/// @brief Clears bit 51 of FIRMASK register, sets bit 51 of FIR ACTION +/// registers and FIR register to generate a local checkstop /// @param[in] i_target => Core target /// @return FAPI_RC_SUCCESS if the local checkstop completes successfully - fapi2::ReturnCode p9_inject_local_xstop(fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target); + fapi2::ReturnCode p9_inject_local_xstop( + fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_target); } //extern "C" |