Exemplo n.º 1
0
void* call_dmi_pre_trainadv (void *io_pArgs)
{
    IStepError l_StepError;
    errlHndl_t l_err = NULL;

    TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv entry" );

    TARGETING::TargetHandleList l_dmiTargetList;
    getAllChiplets(l_dmiTargetList, TYPE_DMI);

    TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv: %d DMIs found",
            l_dmiTargetList.size());

    for (const auto & l_dmi_target : l_dmiTargetList)
    {
        TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
            "p9_io_dmi_pre_trainadv HWP target HUID %.8x",
            TARGETING::get_huid(l_dmi_target));

        //get the membuf associated with this DMI.
        TARGETING::TargetHandleList l_pChildMembufList;
        getChildAffinityTargetsByState(l_pChildMembufList,
                                       l_dmi_target,
                                       CLASS_CHIP,
                                       TYPE_MEMBUF,
                                       UTIL_FILTER_PRESENT);
        // call the HWP p9_io_dmi_pre_trainadv only if membuf connected.
        //we can't expect more than one membufs connected to a DMI
        if (l_pChildMembufList.size() == 1)
        {
            //  call the HWP with each DMI target
            fapi2::Target<fapi2::TARGET_TYPE_DMI> l_fapi_dmi_target
                (l_dmi_target);

            fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapi_membuf_target
                (l_pChildMembufList[0]);

            FAPI_INVOKE_HWP(l_err, p9_io_dmi_pre_trainadv, l_fapi_dmi_target, l_fapi_membuf_target );

            //  process return code.
            if ( l_err )
            {
                TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                    "ERROR 0x%.8X:  p9_io_dmi_pre_trainadv HWP on target HUID %.8x",
                    l_err->reasonCode(), TARGETING::get_huid(l_dmi_target) );

                // capture the target data in the elog
                ErrlUserDetailsTarget(l_dmi_target).addToLog( l_err );

                // Create IStep error log and cross reference to error that occurred
                l_StepError.addErrorDetails( l_err );

                // Commit Error
                errlCommit( l_err, ISTEP_COMP_ID );
            }
            else
            {
                TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                         "SUCCESS :  p9_io_dmi_pre_trainadv HWP");
            }
        }
        else    //No associated membuf
        {
            TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                      "p9_io_dmi_pre_trainadv HWP skipped, no associated membufs %d"
                      ,l_pChildMembufList.size());
        }

    }


    TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_dmi_pre_trainadv exit" );

    // end task, returning any errorlogs to IStepDisp
    return l_StepError.getErrorHandle();
}
Exemplo n.º 2
0
void* call_mss_memdiag (void* io_pArgs)
{
    errlHndl_t errl = nullptr;

    IStepError l_stepError;

    TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
              "call_mss_memdiag entry");

    TARGETING::Target* masterproc = nullptr;
    TARGETING::targetService().masterProcChipTargetHandle(masterproc);

#ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS
    errl = HBOCC::loadHostDataToSRAM(masterproc,
                                        PRDF::ALL_PROC_MEM_MASTER_CORE);
    assert(nullptr == errl,
           "Error returned from call to HBOCC::loadHostDataToSRAM");
#endif

    do
    {
        // Actions vary by processor type.
        ATTR_MODEL_type procType = masterproc->getAttr<ATTR_MODEL>();

        if ( MODEL_NIMBUS == procType )
        {
            TargetHandleList trgtList; getAllChiplets( trgtList, TYPE_MCBIST );

            // @todo RTC 179458  Intermittent SIMICs action file issues
            if ( Util::isSimicsRunning() == false )
            {
                // Start Memory Diagnostics.
                errl = __runMemDiags( trgtList );
                if ( nullptr != errl ) break;
            }

            for ( auto & tt : trgtList )
            {
                fapi2::Target<fapi2::TARGET_TYPE_MCBIST> ft ( tt );

                // Unmask mainline FIRs.
                FAPI_INVOKE_HWP( errl, mss::unmask::after_memdiags, ft );
                if ( nullptr != errl )
                {
                    TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                               "mss::unmask::after_memdiags(0x%08x) failed",
                               get_huid(tt) );
                    break;
                }

                // Turn off FIFO mode to improve performance.
                FAPI_INVOKE_HWP( errl, mss::reset_reorder_queue_settings, ft );
                if ( nullptr != errl )
                {
                    TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                               "mss::reset_reorder_queue_settings(0x%08x) "
                               "failed", get_huid(tt) );
                    break;
                }
            }
            if ( nullptr != errl ) break;
        }
        else if ( MODEL_CUMULUS == procType )
        {
            TargetHandleList trgtList; getAllChiplets( trgtList, TYPE_MBA );

            if ( Util::isSimicsRunning() == false )
            {
                // Start Memory Diagnostics
                errl = __runMemDiags( trgtList );
                if ( nullptr != errl ) break;
            }

            // No need to unmask or turn off FIFO. That is already contained
            // within the other Centaur HWPs.
        }

    } while (0);

    if ( nullptr != errl )
    {
        // Create IStep error log and cross reference to error that occurred
        l_stepError.addErrorDetails(errl);

        // Commit Error
        errlCommit(errl, HWPF_COMP_ID);
    }

    TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
              "call_mss_memdiag exit");

    // end task, returning any errorlogs to IStepDisp
    return l_stepError.getErrorHandle();
}
Exemplo n.º 3
0
    //
    //  Used to update the sensor status for a specific set of target types
    //  currently supported types are TYPE_DIMM, TYPE_CORE, TYPE_PROC.  These
    //  are virtual sensors where Hostboot updates the present and functional
    //  states and the BMC maintains the sensor.
    //
    void updateBMCSensorStatus(TARGETING::TYPE i_type)
    {

        TARGETING::TargetHandleList l_tList;

        // get all targets of the passed in type, functional or not
        switch( i_type )
        {
            case TARGETING::TYPE_PROC:
                getAllChips( l_tList, TARGETING::TYPE_PROC, false );
                break;

            case TARGETING::TYPE_DIMM:
                getAllLogicalCards( l_tList, TARGETING::TYPE_DIMM, false );
                break;

            case TARGETING::TYPE_CORE:
                getAllChiplets( l_tList, TARGETING::TYPE_CORE, false);
                break;

            default:
                assert(0, "invalid target type for BMC update");

        }

        // have a list of targets now set the status sensor on the BMC for each
        // one.
        for(TARGETING::TargetHandleList::const_iterator pTargetIt =
            l_tList.begin();
            pTargetIt != l_tList.end();
            ++pTargetIt )
        {

            StatusSensor::statusEnum l_status
                                    = StatusSensor::PRESENT_FUNCTIONAL;

            // create a status sensor for our needs
            StatusSensor l_sensor((*pTargetIt));

            TARGETING::HwasState l_state =
                    (*pTargetIt)->getAttr<TARGETING::ATTR_HWAS_STATE>();

            if( l_state.present == true )
            {
                if( l_state.functional == false )
                {
                    l_status = StatusSensor::PRESENT_NONFUNCTIONAL;
                }
            }
            else
            {
                l_status = StatusSensor::NOT_PRESENT;
            }

            // send the status to the BMC
            errlHndl_t l_err = l_sensor.setStatus( l_status );

            // commit the error and move to the next target
            if( l_err )
            {
               errlCommit( l_err, IPMI_COMP_ID );
            }
        }

    }
Exemplo n.º 4
0
void axone_dccal_setup(IStepError & io_istepError)
{
    errlHndl_t l_err = nullptr;
    TargetHandleList l_omic_target_list;
    getAllChiplets(l_omic_target_list, TYPE_OMIC);

    for (const auto & l_omic_target : l_omic_target_list)
    {
        //  call the HWP with each target
        fapi2::Target<fapi2::TARGET_TYPE_OMIC> l_fapi_omic_target
                (l_omic_target);

        TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                  "p9a_io_omi_scominit HWP target HUID %.8x",
                  get_huid(l_omic_target));

        FAPI_INVOKE_HWP(l_err, p9a_io_omi_scominit, l_fapi_omic_target);
        //  process return code.
        if ( l_err )
        {
            TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                      "ERROR 0x%.8X:  p9a_io_omi_scominit HWP on target HUID %.8x",
                      l_err->reasonCode(), TARGETING::get_huid(l_omic_target) );

            // capture the target data in the elog
            ErrlUserDetailsTarget(l_omic_target).addToLog( l_err );

            // Create IStep error log and cross reference to error that occurred
            io_istepError.addErrorDetails( l_err );

            // Commit Error
            errlCommit( l_err, ISTEP_COMP_ID );
        }
        else
        {
            TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                      "SUCCESS :  p9a_io_omi_scominit HWP on target HUID %.8x",
                      TARGETING::get_huid(l_omic_target) );
        }

        TargetHandleList l_omi_target_list;

        getChildOmiTargetsByState(l_omi_target_list,
                                  l_omic_target,
                                  CLASS_UNIT,
                                  TYPE_OMI,
                                  UTIL_FILTER_FUNCTIONAL);

        uint32_t l_laneVector = 0x00000000;

        for(const auto & l_omi_target : l_omi_target_list)
        {
            // The OMI dc calibration HWP requires us to pass in the OMIC target
            // and then a bit mask representing which positon of OMI we are calibrating.
            // To get the position of the OMI relative to its parent OMIC, look up
            // ATTR_OMI_DL_GROUP_POS then shift the POS_0_VECTOR = 0x000000FF by 1 byte to the left
            // for every position away from 0 OMI_DL_GROUP_POS is.
            // Therefore
            // POS_0_VECTOR = 0x000000FF
            // POS_1_VECTOR = 0x0000FF00
            // POS_2_VECTOR = 0x00FF0000

            l_laneVector |=
                  POS_0_VECTOR << (l_omi_target->getAttr<ATTR_OMI_DL_GROUP_POS>() * BITS_PER_BYTE);

        }

        TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                  "p9a_io_omi_dccal HWP target HUID %.8x with lane vector 0x%x",
                  TARGETING::get_huid(l_omic_target), l_laneVector);

        FAPI_INVOKE_HWP(l_err, p9a_io_omi_dccal, l_fapi_omic_target, l_laneVector);

        //  process return code.
        if ( l_err )
        {
            TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                      "ERROR 0x%.8X:  p9a_io_omi_dccal HWP on target HUID %.8x with lane vector 0x%x",
                      l_err->reasonCode(), TARGETING::get_huid(l_omic_target),  l_laneVector);

            // capture the target data in the elog
            ErrlUserDetailsTarget(l_omic_target).addToLog( l_err );
            l_err->collectTrace("ISTEPS_TRACE", 256);

            // Create IStep error log and cross reference to error that occurred
            io_istepError.addErrorDetails( l_err );

            // Commit Error
            errlCommit( l_err, ISTEP_COMP_ID );
        }
        else
        {
            TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                      "SUCCESS :  p9a_io_omi_dccal HWP on target HUID %.8x with lane vector 0x%x",
                      TARGETING::get_huid(l_omic_target), l_laneVector );
        }

    }
}
Exemplo n.º 5
0
void* call_mss_power_cleanup (void *io_pArgs)
{
    errlHndl_t  l_err  =   NULL;
    IStepError  l_stepError;

    TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
            "call_mss_power_cleanup entry" );

    TARGETING::TargetHandleList l_mcbistTargetList;
    getAllChiplets(l_mcbistTargetList, TYPE_MCBIST);

    for (const auto & l_target : l_mcbistTargetList)
    {
        // Dump current run on target
        TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                "Running mss_power_cleanup HWP on "
                "target HUID %.8X",
                TARGETING::get_huid(l_target));

        fapi2::Target <fapi2::TARGET_TYPE_MCBIST> l_fapi_target
            (l_target);

        //  call the HWP with each fapi2::Target
        FAPI_INVOKE_HWP(l_err, p9_mss_power_cleanup, l_fapi_target);

        if (l_err)
        {
            TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                      "ERROR 0x%.8X: mss_power_cleanup HWP returns error",
                      l_err->reasonCode());

            // capture the target data in the elog
            ErrlUserDetailsTarget(l_target).addToLog(l_err);

            // Create IStep error log and cross reference to error that
            // occurred
            l_stepError.addErrorDetails( l_err );

            // Commit Error
            errlCommit( l_err, HWPF_COMP_ID );
        }
        else
        {
            TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                       "SUCCESS :  mss_power_cleanup HWP( )" );
        }
    }

    // -- Cumulus only
    // Get a list of all present Centaurs
    TargetHandleList l_presCentaurs;
    getChipResources(l_presCentaurs, TYPE_MEMBUF, UTIL_FILTER_PRESENT);

    // For each present Centaur
    for (TargetHandleList::const_iterator
            l_cenIter = l_presCentaurs.begin();
            l_cenIter != l_presCentaurs.end();
            ++l_cenIter)
    {
        // Make a local copy of the target for ease of use
        TARGETING::Target * l_pCentaur = *l_cenIter;
        // Retrieve HUID of current Centaur
        TARGETING::ATTR_HUID_type l_currCentaurHuid =
            TARGETING::get_huid(l_pCentaur);

        // Find all present MBAs associated with this Centaur
        TARGETING::TargetHandleList l_presMbas;
        getChildAffinityTargetsByState(l_presMbas,
                                       l_pCentaur,
                                       CLASS_UNIT,
                                       TYPE_MBA,
                                       UTIL_FILTER_PRESENT);

        // If not at least two MBAs found
        if (l_presMbas.size() < 2)
        {
            TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
              "Not enough MBAs found for Centaur target HUID %.8X, "
              "skipping this Centaur.",
               l_currCentaurHuid);
            continue;
        }

        // Cache current MBA HUIDs for tracing
        TARGETING::ATTR_HUID_type l_currMBA0Huid =
                    TARGETING::get_huid(l_presMbas[0]);
        TARGETING::ATTR_HUID_type l_currMBA1Huid =
                    TARGETING::get_huid(l_presMbas[1]);

        TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                "Running mss_power_cleanup HWP on "
                "Centaur HUID %.8X, MBA0 HUID %.8X, "
                "MBA1 HUID %.8X, ", l_currCentaurHuid,
                        l_currMBA0Huid, l_currMBA1Huid);

        // Create FAPI Targets.
        fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP> l_fapiCentaurTarget( l_pCentaur );
        fapi2::Target<fapi2::TARGET_TYPE_MBA_CHIPLET> l_fapiMba0Target( l_presMbas[0] );
        fapi2::Target<fapi2::TARGET_TYPE_MBA_CHIPLET> l_fapiMba1Target( l_presMbas[1] );

        //  Call the HWP with each fapi::Target
        FAPI_INVOKE_HWP(l_err, p9c_mss_power_cleanup, l_fapiCentaurTarget,
                        l_fapiMba0Target, l_fapiMba1Target);

        if (l_err)
        {
            TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                      "mss_power_cleanup HWP failed to perform"
                      " cleanup on centaur: 0x%.8X HWP_ERROR: 0x%.8X",
                      l_currCentaurHuid,l_err->reasonCode());
            // Capture the target data in the error log
            ErrlUserDetailsTarget(l_pCentaur).addToLog(l_err);
            // Create IStep error log and cross reference error that occurred
            l_stepError.addErrorDetails(l_err);
            // Commit error
            errlCommit(l_err, HWPF_COMP_ID);
        }
        else
        {
            // Success
            TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
                    "Successfully ran mss_power_cleanup HWP on "
                    "Centaur HUID %.8X, MBA0 HUID %.8X, "
                    "MBA1 HUID %.8X, ", l_currCentaurHuid,
                           l_currMBA0Huid, l_currMBA1Huid);
        }
    }
    TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
            "call_mss_power_cleanup exit" );

    // end task, returning any errorlogs to IStepDisp
    return l_stepError.getErrorHandle();
}