src/occ_gpe1/gpe_centaur_scom.c
// Get data from each existing centaur.
Get data from each existing centaur.
Get data from each existing centaur .
int centaur_get_scom_vector(CentaurConfiguration_t* i_config,
                            uint32_t i_scom_address,
                            uint64_t* o_data)
{
    int rc = 0;
    int access_rc = 0;
    int pba_rc = 0;
    int instance = 0;
    uint64_t pba_slvctln_save;
    pbaslvctl_reset(&(i_config->scomParms));
    pba_slvctln_save = pbaslvctl_setup(&(i_config->scomParms));
    mtmsr((mfmsr() & ~(MSR_SIBRC | MSR_SIBRCA)));
    for(instance = 0; instance < OCCHW_NCENTAUR; ++instance)
    {
        if( CHIP_CONFIG_CENTAUR(instance) & (i_config->config))
        {
            uint32_t oci_addr;
            pba_rc = centaur_scom_setup(i_config,
                                        instance,
                                        i_scom_address,
                                        &oci_addr);
            if(pba_rc)
            {
                rc = pba_rc;
                *o_data = 0;
            }
            access_rc = centaur_access(i_config,
                                        instance,
                                        oci_addr,
                                        o_data,
                                        CENTAUR_ACCESS_READ);
            if(!rc && access_rc)
            {
                rc = access_rc;
                *o_data = 0;
            }
        }
        else
        {
            *o_data = 0;
        }
        ++o_data;
    }
    pbaslvctl_reset(&(i_config->scomParms));
    PPE_STVD((i_config->scomParms).slvctl_address, pba_slvctln_save);
    return rc;
}
int centaur_get_scom_vector ( CentaurConfiguration_t * i_config , uint32_t i_scom_address , uint64_t * o_data ) { int rc = 0 ; int access_rc = 0 ; int pba_rc = 0 ; int instance = 0 ; uint64_t pba_slvctln_save ; pbaslvctl_reset ( & ( i_config -> scomParms ) ) ; pba_slvctln_save = pbaslvctl_setup ( & ( i_config -> scomParms ) ) ; mtmsr ( ( mfmsr ( ) & ~ ( MSR_SIBRC | MSR_SIBRCA ) ) ) ; for ( instance = 0 ; instance < OCCHW_NCENTAUR ; ++ instance ) { if ( CHIP_CONFIG_CENTAUR ( instance ) & ( i_config -> config ) ) { uint32_t oci_addr ; pba_rc = centaur_scom_setup ( i_config , instance , i_scom_address , & oci_addr ) ; if ( pba_rc ) { rc = pba_rc ; * o_data = 0 ; } access_rc = centaur_access ( i_config , instance , oci_addr , o_data , CENTAUR_ACCESS_READ ) ; if ( ! rc && access_rc ) { rc = access_rc ; * o_data = 0 ; } } else { * o_data = 0 ; } ++ o_data ; } pbaslvctl_reset ( & ( i_config -> scomParms ) ) ; PPE_STVD ( ( i_config -> scomParms ) . slvctl_address , pba_slvctln_save ) ; return rc ; }
Get data from each existing centaur.
Get data from each existing centaur .
// clear SIB errors in MSR // Already traced. // Trumps any access error // read centaur scom // not critical, but don't touch this centaur again. // continue // gpe_pba_cntl function?