<commit_before>/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H $ */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2015,2019                        */
/* [+] 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_query_stop_state.H
/// @brief Determine the state of cores, L2, and L3 of the targeted EX
///        Set ATTRs to know the scommable/scannable state of the logic
///        Further operations in the dump flow will only operate on scommable
///        portions of the targets.   FW/Platform is responsible for checking these
///        states before calling HWPs
///
// *HWP HWP Owner: <NAME> <<EMAIL>>
// *HWP Backup HWP Owner: <NAME> <<EMAIL>>
// *HWP FW Owner:  <NAME> <<EMAIL>>
// *HWP Team: PM
// *HWP Level: 1
// *HWP Consumed by: FSP:HS
///
///-----------------------------------------------------------------------------

#ifndef _P9_QUERY_STOP_STATE_H_
#define _P9_QUERY_STOP_STATE_H_

//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------

#include <fapi2.H>

//------------------------------------------------------------------------------
// Constant definitions
//------------------------------------------------------------------------------

// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_query_stop_state_FP_t) (
    const fapi2::Target<fapi2::TARGET_TYPE_EX>&);

extern "C"
{

//------------------------------------------------------------------------------
// Function prototype
//------------------------------------------------------------------------------

/// @brief Determine the state of cores, L2, and L3 of the targeted EX and set ATTRS
///
/// @param[in] i_target    EX target
/// @attr
/// @attritem  ATTR_L2_IS_SCOMABLE      - Indicates the L2 region has clocks running and scommable
/// @attritem  ATTR_L3_IS_SCOMABLE      - Indicates the L3 region has clocks running and scommable
/// @attritem  ATTR_C0_EXEC_IS_SCOMABLE - Indicates the execution units in core 0 have clocks running and scommable
/// @attritem  ATTR_C1_EXEC_IS_SCOMABLE - Indicates the execution units in core 1 have clocks running and scommable
/// @attritem  ATTR_C0_PC_IS_SCOMABLE   - Indicates the core pervasive unit in core 0 has clocks running and scommable
/// @attritem  ATTR_C1_PC_IS_SCOMABLE   - Indicates the core pervasive unit in core 1 has clocks running and scommable
/// @attritem  ATTR_L2_IS_SCANABLE      - Indicates L2 has power and has valid latch state that could be scanned
/// @attritem  ATTR_L3_IS_SCANABLE      - Indicates L3 has power and has valid latch state that could be scanned
/// @attritem  ATTR_C0_IS_SCANABLE      - Indicates core 0 has power and has valid latch state that could be scanned
/// @attritem  ATTR_C1_IS_SCANABLE      - Indicates core 1 has power and has valid latch state that could be scanned
///
/// @return FAPI2_RC_SUCCESS if success, else error code.

    fapi2::ReturnCode
    p9_query_stop_state(
        const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ex_target);

} // extern "C"

#endif // _P9_QUERY_STOP_STATE_H_<commit_msg>L2 Delivery for p9_query_stop_state<commit_after>/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/import/chips/p9/procedures/hwp/pm/p9_query_stop_state.H $ */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2015,2019                        */
/* [+] 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_query_stop_state.H
/// @brief Determine the state of cores, L2, and L3 of the targeted EX
///        Set ATTRs to know if the logic has clocks or power (scomable or scanable)
///        Further operations in the dump flow will only operate on scommable
///        portions of the targets.   FW/Platform is responsible for checking these
///        states before calling HWPs
///
// *HWP HWP Owner: <NAME> <<EMAIL>>
// *HWP Backup HWP Owner: <NAME> <<EMAIL>>
// *HWP FW Owner:  <NAME> <<EMAIL>>
// *HWP Team: PM
// *HWP Level: 2
// *HWP Consumed by: FSP:HS
///
///-----------------------------------------------------------------------------

#ifndef _P9_QUERY_STOP_STATE_H_
#define _P9_QUERY_STOP_STATE_H_

//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------

#include <fapi2.H>
#include <p9_pm.H>
#include <p9_quad_scom_addresses.H>
#include <p9_hcd_common.H>

//------------------------------------------------------------------------------
// Constant definitions
//------------------------------------------------------------------------------

// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_query_stop_state_FP_t) (
    const fapi2::Target<fapi2::TARGET_TYPE_EX>&);

extern "C"
{

//------------------------------------------------------------------------------
// Function prototype
//------------------------------------------------------------------------------

/// @brief Determine the state of cores, L2, and L3 of the targeted EX and set ATTRS if powered up and clocking
///
/// @param[in] i_target    EX target
/// @attr
/// @attritem  ATTR_L2_HASCLOCKS      - Indicates the L2 region has clocks running and scommable
/// @attritem  ATTR_L3_HASCLOCKS      - Indicates the L3 region has clocks running and scommable
/// @attritem  ATTR_C0_EXEC_HASCLOCKS - Indicates the execution units in core 0 have clocks running and scommable
/// @attritem  ATTR_C1_EXEC_HASCLOCKS - Indicates the execution units in core 1 have clocks running and scommable
/// @attritem  ATTR_C0_PC_HASCLOCKS   - Indicates the core pervasive unit in core 0 has clocks running and scommable
/// @attritem  ATTR_C1_PC_HASCLOCKS   - Indicates the core pervasive unit in core 1 has clocks running and scommable
/// @attritem  ATTR_L2_HASPOWER      - Indicates L2 has power and has valid latch state that could be scanned
/// @attritem  ATTR_L3_HASPOWER      - Indicates L3 has power and has valid latch state that could be scanned
/// @attritem  ATTR_C0_HASPOWER      - Indicates core 0 has power and has valid latch state that could be scanned
/// @attritem  ATTR_C1_HASPOWER      - Indicates core 1 has power and has valid latch state that could be scanned
///
/// @return FAPI2_RC_SUCCESS if success, else error code.

    fapi2::ReturnCode
    p9_query_stop_state(
        const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_ex_target);

} // extern "C"

#endif // _P9_QUERY_STOP_STATE_H_
{'fraction_non_alphanumeric': 0.18687282408355518, 'fraction_numerical': 0.011365963546999796, 'mean_word_length': 1.1546437238032208, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 62, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4151656', 'n_tokens_mistral': 2331, 'n_tokens_neox': 2216, 'n_words': 781}