<commit_before>/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.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                                                     */
#ifndef __HCODE_IMG_BUILD_H_
#define __HCODE_IMG_BUILD_H_

#include <stdint.h>

///
/// @file   p9_hcode_image_build.H
/// @brief  describes HWP interface that builds the STOP image.
///
/// *HWP HWP Owner:      <NAME> <<EMAIL>>
/// *HWP FW Owner:       <NAME> <<EMAIL>>
/// *HWP Team:           PM
/// *HWP Level:          2
/// *HWP Consumed by:    Hostboot:Phyp
//

//--------------------------------------------------------------------------
// Includes
//--------------------------------------------------------------------------
#include <fapi2.H>
#include <p9_infrastruct_help.H>

extern "C"
{
    typedef  const fapi2::Target< fapi2::TARGET_TYPE_PROC_CHIP > CONST_FAPI2_PROC;

    /**
     * @brief   phases of system associated for hcode image build.
     */
    enum SysPhase_t
    {
        PHASE_NA        =   0,
        PHASE_IPL       =   1,
        PHASE_REBUILD   =   2,
        PHASE_END       =   3,
    };

    /**
     * @brief   constants used for hcode image build.
     */
    enum
    {
        HW_IMG_RING_SIZE    =  MAX_SEEPROM_IMAGE_SIZE,
        WORK_BUF_SIZE       =  MAX_RING_BUF_SIZE,
    };

    /**
     * @brief image types to be handled by the hcode image build HWP.
     * @note  structure below summarizes all the components that needs to be
     *        included during STOP image build. Setting a field to 1 means that
     *        it needs to be part of STOP image in HOMER. It can be used to
     *        build partial STOP image in HOMER.
     */
    struct ImageType_t
    {
        uint32_t selfRestoreBuild: 1;       // for self restore code inclusion
        uint32_t cmeHcodeBuild: 1;           // for cme hcode inclusion
        uint32_t cmeCommonRingBuild: 1;      // for core ring inclusion
        uint32_t cmeCoreSpecificRingBuild: 1; // for core specific scan ring inclusion
        uint32_t sgpeHcodeBuild: 1;          // for sgpe inclusion
        uint32_t sgpeCommonRingBuild: 1;     // for sgpe common scan ring inclusion
        uint32_t sgpeCacheSpecificRingBuild: 1; // for cache specific ring inclusion
        uint32_t pgpeImageBuild: 1;      // pgpe platform inclusion in image build
        uint32_t pgpePstateParmBlockBuild: 1; //pgpe P-State Parameter Block Build
        uint32_t reserve: 23;

        ImageType_t( )
        {
            memset( this , 0, sizeof (*this) );
            this->selfRestoreBuild |= 0x01;
            this->cmeHcodeBuild |= 0x01;
            this->cmeCommonRingBuild |= 0x01;<commit_msg>p9_pstate_param_blk: Define VFRT table and initialize the data<commit_after>/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.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                                                     */
#ifndef __HCODE_IMG_BUILD_H_
#define __HCODE_IMG_BUILD_H_

#include <stdint.h>

///
/// @file   p9_hcode_image_build.H
/// @brief  describes HWP interface that builds the STOP image.
///
/// *HWP HWP Owner:      <NAME> <<EMAIL>>
/// *HWP FW Owner:       <NAME> <<EMAIL>>
/// *HWP Team:           PM
/// *HWP Level:          2
/// *HWP Consumed by:    Hostboot:Phyp
//

//--------------------------------------------------------------------------
// Includes
//--------------------------------------------------------------------------
#include <fapi2.H>
#include <p9_infrastruct_help.H>

extern "C"
{

#define HW_IMG_RING_BUF1_SIZE 307200

    typedef  const fapi2::Target< fapi2::TARGET_TYPE_PROC_CHIP > CONST_FAPI2_PROC;

    /**
     * @brief   phases of system associated for hcode image build.
     */
    enum SysPhase_t
    {
        PHASE_NA        =   0,
        PHASE_IPL       =   1,
        PHASE_REBUILD   =   2,
        PHASE_END       =   3,
    };

    /**
     * @brief   constants used for hcode image build.
     */
    enum
    {
        HW_IMG_RING_SIZE    =  HW_IMG_RING_BUF1_SIZE, //300K to accomodate WOF data
        WORK_BUF_SIZE       =  MAX_RING_BUF_SIZE,
    };

    /**
     * @brief image types to be handled by the hcode image build HWP.
     * @note  structure below summarizes all the components that needs to be
     *        included during STOP image build. Setting a field to 1 means that
     *        it needs to be part of STOP image in HOMER. It can be used to
     *        build partial STOP image in HOMER.
     */
    struct ImageType_t
    {
        uint32_t selfRestoreBuild: 1;       // for self restore code inclusion
        uint32_t cmeHcodeBuild: 1;           // for cme hcode inclusion
        uint32_t cmeCommonRingBuild: 1;      // for core ring inclusion
        uint32_t cmeCoreSpecificRingBuild: 1; // for core specific scan ring inclusion
        uint32_t sgpeHcodeBuild: 1;          // for sgpe inclusion
        uint32_t sgpeCommonRingBuild: 1;     // for sgpe common scan ring inclusion
        uint32_t sgpeCacheSpecificRingBuild: 1; // for cache specific ring inclusion
        uint32_t pgpeImageBuild: 1;      // pgpe platform inclusion in image build
        uint32_t pgpePstateParmBlockBuild: 1; //pgpe P-State Parameter Block Build
        uint32_t reserve: 23;

        ImageType_t( )
        {
            memset( this , 0, sizeof (*this) );
            this->selfRestoreBuild |= 0x01;
            this->cmeHcodeBuild |= 0x01;
            this->cmeCommonRingBuild |= 0x01;
{'fraction_non_alphanumeric': 0.11180405941716748, 'fraction_numerical': 0.01655516498469214, 'mean_word_length': 1.1140939597315436, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 29, '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': '4668293', 'n_tokens_mistral': 2262, 'n_tokens_neox': 2125, 'n_words': 664}