diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2016-03-07 20:07:34 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-03-25 12:24:57 -0400 |
commit | 91e03307dfe1fc47f26d23eb35bde39af751ef17 (patch) | |
tree | 145bc7b1d81f2d50ba1573faccf4006deab52f0d /src/usr/diag/prdf/plat/prdfRasServices.C | |
parent | 4dea56a10f144a1b0acb8aa9cc027870fd3c8d41 (diff) | |
download | talos-hostboot-91e03307dfe1fc47f26d23eb35bde39af751ef17.tar.gz talos-hostboot-91e03307dfe1fc47f26d23eb35bde39af751ef17.zip |
PRD: moved PlatServices code to plat/ directory
Change-Id: I950a1eba9abe3a80a75b00ab3c82696167141554
RTC: 140081
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/21861
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22138
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/plat/prdfRasServices.C')
-rw-r--r-- | src/usr/diag/prdf/plat/prdfRasServices.C | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/plat/prdfRasServices.C b/src/usr/diag/prdf/plat/prdfRasServices.C new file mode 100644 index 000000000..b40ce55ba --- /dev/null +++ b/src/usr/diag/prdf/plat/prdfRasServices.C @@ -0,0 +1,169 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/plat/prdfRasServices.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] 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 prdfRasServices.C + * @brief Utility code to parse an SDC and produce the appropriate error log. + */ + +#include <prdfRasServices.H> +#include <prdfMfgSync.H> +#include <prdfErrlUtil.H> +#include <prdfPlatServices.H> + +#include <initservice/initserviceif.H> + +using namespace TARGETING; + +namespace PRDF +{ + +using namespace PlatServices; + +//------------------------------------------------------------------------------ + +void ErrDataService::MnfgTrace( ErrorSignature * i_esig, + const PfaData & i_pfaData ) +{ + #define PRDF_FUNC "[ErrDataService::MnfgTrace] " + + do + { + // This is for Hostboot IPL and FSP machines only. + #ifndef __HOSTBOOT_RUNTIME + if ( !INITSERVICE::spBaseServicesEnabled() ) break; + + errlHndl_t errl = NULL; + errl = getMfgSync().syncMfgTraceToFsp(i_esig, i_pfaData); + if (errl) + { + PRDF_ERR(PRDF_FUNC "failed to sync to the FSP"); + PRDF_COMMIT_ERRL(errl, ERRL_ACTION_REPORT); + break; + } + #endif + + } while(0); + + #undef PRDF_FUNC +} + +//------------------------------------------------------------------------------ + +void ErrDataService::updateSrc( uint32_t i_user1, uint32_t i_user2, + uint32_t i_user3, uint32_t i_user4, + uint16_t i_rc ) +{ + // We should always have a valid pointer here. If it is NULL, there + // is some major issue. + PRDF_ASSERT ( NULL != iv_errl); + + iv_errl->setReasonCode(i_rc); + iv_errl->addUserData1( PRDF_GET_UINT64_FROM_UINT32( i_user1, i_user2 )); + iv_errl->addUserData2( PRDF_GET_UINT64_FROM_UINT32( i_user3, i_user4 )); +} + +//------------------------------------------------------------------------------ + +void ErrDataService::createInitialErrl( ATTENTION_TYPE i_attnType ) +{ + // We should always have a NULL pointer here. If it is not NULL, there + // is some major issue. + PRDF_ASSERT ( NULL == iv_errl ); + using namespace ERRORLOG; + + iv_errl = new ErrlEntry( + ERRL_SEV_RECOVERED, + PRDF_RAS_SERVICES, + PRDF_CODE_FAIL, //ERRL keys off of ReasonCode to set + //creator id. ReasonCode will later be + //changed to reflect the actual one + PRDF_GET_UINT64_FROM_UINT32( 0, 0 ), + PRDF_GET_UINT64_FROM_UINT32( 0, 0 ) ); +} + +//------------------------------------------------------------------------------ + +void ErrDataService::checkMpIplEligibility( ATTENTION_TYPE i_attnType, + TargetHandle_t i_dumpTrgt, + hwTableContent & io_dumpContent ) +{ + // no-op for Hostboot +} + +//------------------------------------------------------------------------------ + +bool ErrDataService::checkForceTerm( const ServiceDataCollector & i_sdc, + TargetHandle_t i_dumpTrgt, + PfaData &io_pfaData ) +{ + //Return false from HB + return false; +} + +//------------------------------------------------------------------------------ + +void ErrDataService::handleUnitCS( const ServiceDataCollector & i_sdc, + TargetHandle_t i_unitCsTarget, + bool & o_initiateHwudump) +{ + // No-op in Hostboot + o_initiateHwudump = false; // default to not initiate hwudump +} + +//------------------------------------------------------------------------------ + +void ErrDataService::handleChannelFail( TargetHandle_t i_memTarget ) +{ + // No-op in Hostboot +} + +//------------------------------------------------------------------------------ + +void ErrDataService::handleCoreUnitCS( TargetHandle_t i_exTarget, + bool & o_initiateHwudump) +{ + // No-op in Hostboot + o_initiateHwudump = false; // default to not initiate hwudump +} + +//------------------------------------------------------------------------------ + +void ErrDataService::handleNxUnitCS( TargetHandle_t i_nxTarget ) +{ + // No-op in Hostboot +} + +//------------------------------------------------------------------------------ + +void ErrDataService::commitErrLog( errlHndl_t & io_errl, + const PfaData & i_pfaData ) + +{ + errlCommit( io_errl, PRDF_COMP_ID ); + io_errl = NULL; +} + +} // end namespace PRDF + |