/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* $Source: import/chips/p9/procedures/hwp/lib/p9_sbe_ppe_ffdc.H $ */ /* */ /* OpenPOWER HCODE Project */ /* */ /* COPYRIGHT 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_sbe_ppe_ffdc.H /// @brief Dumps a minimal and critical state of a PPE from SBE /// /// *HWP HW Owner : Greg Still /// *HWP HW Backup Owner : Brian Vanderpool /// *HWP FW Owner : Amit Tendolkar /// *HWP Team : PM /// *HWP Level : 2 /// *HWP Consumed by : SBE #ifndef __P9_SBE_PPE_FFDC_H__ #define __P9_SBE_PPE_FFDC_H__ #include #include static const uint32_t default_32 = 0xDEADC0DE; static const uint64_t default_64 = 0xBADFEED0DEADC0DEULL; // @note This enum is used to order, as well as pack, PPE register FFDC added to // a vector of uint64_t. 32 bit PPE register data is packed into // bits 0-31 or 32-63 of each element of the vector of type uint64_t. // This order and packing matches that of the SPRS in error xml for // RC_CHECK_MASTER_STOP15_FAILED. If need be, both should change in // lock-step. XSR, IAR, IR, EDR and SPRG0 are read via PPE XIR SCOMs. // LR, SRR0 and SSR1 are read via RAMming the PPE. typedef enum { REG_FFDC_IDX_XIR_FIRST = 0, REG_FFDC_IDX_XSR_IAR = REG_FFDC_IDX_XIR_FIRST, // 0 REG_FFDC_IDX_IR_EDR, // 1 REG_FFDC_IDX_LR_SPRG0, // 2 REG_FFDC_IDX_SPR_FIRST = REG_FFDC_IDX_LR_SPRG0, REG_FFDC_IDX_XIR_MAX, REG_FFDC_IDX_SRR0_SRR1 = REG_FFDC_IDX_XIR_MAX, // 3 REG_FFDC_IDX_SPR_MAX, REG_FFDC_IDX_MAX = REG_FFDC_IDX_SPR_MAX } SbePpeRegFfdcIdx_t; /// @typedef p9_sbe_ppe_ffdc_FP_t /// function pointer typedef definition for HWP call support typedef fapi2::ReturnCode (*p9_sbe_ppe_ffdc_FP_t) ( const fapi2::Target&, const uint64_t, std::vector& ); /// @brief Collects PPE register data as defined by SbePpeRegFfdcIdx_t /// @param[in] i_target Proc Chip Target /// @param[in] i_base_address Base address of the PPE, see p9_ppe_defs.H /// @param[out] o_v_ppe_reg_ffdc Vector to collect PPE Internal Registers /// On input: An empty vector of type uint64_t with size 0 /// On ouptut: Updated with REG_FFDC_IDX_MAX elements in the /// order defined by SbePpeRegFfdcIdx_t /// @return FAPI2_RC_SUCCESS fapi2::ReturnCode p9_sbe_ppe_ffdc ( const fapi2::Target& i_target, const uint64_t i_base_address, std::vector& o_v_ppe_reg_ffdc ); #endif // __P9_SBE_PPE_FFDC_H__