diff options
author | Caleb Palmer <cnpalmer@us.ibm.com> | 2019-01-17 10:47:15 -0600 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2019-01-29 09:42:12 -0600 |
commit | 39a6b40220d9251f373a1ffa3ebfa379e6fa0b2c (patch) | |
tree | 81ba8fc45f0cee93ed5a5362927417fdc639ddcc /src/usr/diag/prdf/common/plat | |
parent | 675244ee606e340b96d0d6a0d42cdc2c60ec09b9 (diff) | |
download | talos-hostboot-39a6b40220d9251f373a1ffa3ebfa379e6fa0b2c.tar.gz talos-hostboot-39a6b40220d9251f373a1ffa3ebfa379e6fa0b2c.zip |
PRD: Initial NVDIMM Support
Change-Id: I37e727ed56f15a58173a7f246eeef96c9196e48c
RTC: 203495
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70717
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71002
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common/plat')
7 files changed, 441 insertions, 10 deletions
diff --git a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca.rule b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca.rule index 75d01f07f..3a475853a 100644 --- a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca.rule +++ b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca.rule @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -281,7 +281,7 @@ group gMCACALFIR /** MCACALFIR[8] * event_n active on DDR interface */ - (rMCACALFIR, bit(8)) ? defaultMaskedError; + (rMCACALFIR, bit(8)) ? analyzeNVDIMM; /** MCACALFIR[9] * WRQ or RRQ is in a hung state. diff --git a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule index 00a5136fa..e91c91a4d 100644 --- a/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule +++ b/src/usr/diag/prdf/common/plat/nimbus/nimbus_mca_actions.rule @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2016,2018 +# Contributors Listed Below - COPYRIGHT 2016,2019 # [+] International Business Machines Corp. # # @@ -138,4 +138,8 @@ actionclass mca_ue_algorithm_th_1 actionclass analyzeDDRPHYFIR { analyze(gDDRPHYFIR); }; actionclass analyzeMCACALFIR { analyze(gMCACALFIR); }; actionclass analyzeMCAECCFIR { analyze(gMCAECCFIR); }; - +actionclass analyzeNVDIMM +{ + try( analyze(connected(TYPE_DIMM, 0)), + analyze(connected(TYPE_DIMM, 1)) ); +}; diff --git a/src/usr/diag/prdf/common/plat/nimbus/nimbus_nvdimm.rule b/src/usr/diag/prdf/common/plat/nimbus/nimbus_nvdimm.rule new file mode 100644 index 000000000..14f60ef51 --- /dev/null +++ b/src/usr/diag/prdf/common/plat/nimbus/nimbus_nvdimm.rule @@ -0,0 +1,351 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/diag/prdf/common/plat/nimbus/nimbus_nvdimm.rule $ +# +# OpenPOWER HostBoot Project +# +# Contributors Listed Below - COPYRIGHT 2018,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 + +chip nimbus_nvdimm +{ + name "NIMBUS NVDIMM target"; + targettype TYPE_DIMM; + sigoff 0x9000; + dump DUMP_CONTENT_HW; + scomlen 8; + + ############################################################################# + # # + # ###### # + # # # ###### #### ### #### ##### ###### ##### #### # + # # # # # # # # # # # # # # + # ###### ##### # # #### # ##### # # #### # + # # # # # ### # # # # ##### # # + # # # # # # # # # # # # # # # # + # # # ###### #### ### #### # ###### # # #### # + # # + ############################################################################# + + ############################################################################ + # NVDIMM Status Registers + ############################################################################ + + register MODULE_HEALTH_REG + { + name "NVDIMM Module Health Register"; + scomaddr 0xA0; + scomlen 8; + capture group default; + }; + + register HEALTH_STATUS0_REG + { + name "NVDIMM Health Status0 Register"; + scomaddr 0xA1; + scomlen 8; + capture group default; + }; + + register HEALTH_STATUS1_REG + { + name "NVDIMM Health Status1 Register"; + scomaddr 0xA2; + scomlen 8; + capture group default; + }; + + register ERROR_THRESHOLD_STATUS_REG + { + name "NVDIMM Error Threshold Status Register"; + scomaddr 0xA5; + scomlen 8; + capture group default; + }; + + register WARNING_THRESHOLD_STATUS_REG + { + name "NVDIMM Warning Threshold Status Register"; + scomaddr 0xA7; + scomlen 8; + capture group default; + }; +}; + + ############################################################################## + # # + # #### # # + # # # # # # ##### ### # # # ## ##### ### ### # # ### # + # # # # # # # # # # # # # # # # # ## # # # + # #### # # # #### ### # ####### # # # # # # # # ### # + # # # # # # # # # # # # # # # # # # ## # # + # # # ### #### ##### ### # # # ## # ### ### # # ### # + # # + ############################################################################## + +rule rPersistencyLost +{ + RECOVERABLE: + summary( 0, rHEALTH_STATUS0_REG ) | + summary( 1, rHEALTH_STATUS1_REG ) | + summary( 2, rERROR_THRESHOLD_STATUS_REG ); +}; + +group gPersistencyLost filter singlebit +{ + (rPersistencyLost, bit(0)) ? analyzeHealthStatus0; + (rPersistencyLost, bit(1)) ? analyzeHealthStatus1; + (rPersistencyLost, bit(2)) ? analyzeErrorThrStatus; +}; + +################################################################################ +# P9 NVDIMM target MODULE_HEALTH_REG +################################################################################ + +rule rMODULE_HEALTH_REG +{ + RECOVERABLE: + MODULE_HEALTH_REG; +}; + +group gMODULE_HEALTH_REG attntype RECOVERABLE filter singlebit +{ + /** MODULE_HEALTH_REG[0] + * Persistency Lost + */ + (rMODULE_HEALTH_REG, bit(0)) ? analyzePersistencyLost; + + /** MODULE_HEALTH_REG[1] + * Warning Threshold Exceeded + */ + (rMODULE_HEALTH_REG, bit(1)) ? analyzeWarningThrStatus; + + /** MODULE_HEALTH_REG[2] + * Persistency Restored + */ + (rMODULE_HEALTH_REG, bit(2)) ? defaultMaskedError; + + /** MODULE_HEALTH_REG[3] + * Below Warning Threshold + */ + (rMODULE_HEALTH_REG, bit(3)) ? defaultMaskedError; + + /** MODULE_HEALTH_REG[4] + * Hardware Failure + */ + (rMODULE_HEALTH_REG, bit(4)) ? defaultMaskedError; + + /** MODULE_HEALTH_REG[5] + * EVENT_N_LOW + */ + (rMODULE_HEALTH_REG, bit(5)) ? defaultMaskedError; + +}; + +################################################################################ +# P9 NVDIMM target HEALTH_STATUS0_REG +################################################################################ + +rule rHEALTH_STATUS0_REG +{ + RECOVERABLE: + HEALTH_STATUS0_REG; +}; + +group gHEALTH_STATUS0_REG filter singlebit +{ + /** HEALTH_STATUS0_REG[0] + * Voltage Regulator Fail + */ + (rHEALTH_STATUS0_REG, bit(0)) ? defaultMaskedError; + + /** HEALTH_STATUS0_REG[1] + * VDD Lost + */ + (rHEALTH_STATUS0_REG, bit(1)) ? defaultMaskedError; + + /** HEALTH_STATUS0_REG[2] + * VPP Lost + */ + (rHEALTH_STATUS0_REG, bit(2)) ? defaultMaskedError; + + /** HEALTH_STATUS0_REG[3] + * VTT Lost + */ + (rHEALTH_STATUS0_REG, bit(3)) ? defaultMaskedError; + + /** HEALTH_STATUS0_REG[4] + * DRAM no Self Refresh + */ + (rHEALTH_STATUS0_REG, bit(4)) ? defaultMaskedError; + + /** HEALTH_STATUS0_REG[5] + * Controller HW Error + */ + (rHEALTH_STATUS0_REG, bit(5)) ? defaultMaskedError; + + /** HEALTH_STATUS0_REG[6] + * NV Controller HW Error + */ + (rHEALTH_STATUS0_REG, bit(6)) ? defaultMaskedError; + + /** HEALTH_STATUS0_REG[7] + * NVM Lifetime Error + */ + (rHEALTH_STATUS0_REG, bit(7)) ? defaultMaskedError; + +}; + +################################################################################ +# P9 NVDIMM target HEALTH_STATUS1_REG +################################################################################ + +rule rHEALTH_STATUS1_REG +{ + RECOVERABLE: + HEALTH_STATUS1_REG; +}; + +group gHEALTH_STATUS1_REG filter singlebit +{ + /** HEALTH_STATUS1_REG[0] + * Insufficient Energy + */ + (rHEALTH_STATUS1_REG, bit(0)) ? defaultMaskedError; + + /** HEALTH_STATUS1_REG[1] + * Invalid Firmware + */ + (rHEALTH_STATUS1_REG, bit(1)) ? defaultMaskedError; + + /** HEALTH_STATUS1_REG[2] + * Configuration Data Error + */ + (rHEALTH_STATUS1_REG, bit(2)) ? defaultMaskedError; + + /** HEALTH_STATUS1_REG[3] + * No Energy Source + */ + (rHEALTH_STATUS1_REG, bit(3)) ? defaultMaskedError; + + /** HEALTH_STATUS1_REG[4] + * Energy Policy Not Set + */ + (rHEALTH_STATUS1_REG, bit(4)) ? defaultMaskedError; + + /** HEALTH_STATUS1_REG[5] + * Energy Source HW Error + */ + (rHEALTH_STATUS1_REG, bit(5)) ? defaultMaskedError; + + /** HEALTH_STATUS1_REG[6] + * Energy Source Health Assessment Error + */ + (rHEALTH_STATUS1_REG, bit(6)) ? defaultMaskedError; + + /** HEALTH_STATUS1_REG[7] + * Reserved + */ + (rHEALTH_STATUS1_REG, bit(7)) ? defaultMaskedError; + +}; + +################################################################################ +# P9 NVDIMM target ERROR_THRESHOLD_STATUS_REG +################################################################################ + +rule rERROR_THRESHOLD_STATUS_REG +{ + RECOVERABLE: + ERROR_THRESHOLD_STATUS_REG; +}; + +group gERROR_THRESHOLD_STATUS_REG filter singlebit +{ + /** ERROR_THRESHOLD_STATUS_REG[0] + * NVM Lifetime Error + */ + (rERROR_THRESHOLD_STATUS_REG, bit(0)) ? defaultMaskedError; + + /** ERROR_THRESHOLD_STATUS_REG[1] + * ES Lifetime Error + */ + (rERROR_THRESHOLD_STATUS_REG, bit(1)) ? defaultMaskedError; + + /** ERROR_THRESHOLD_STATUS_REG[2] + * ES Temperature Error + */ + (rERROR_THRESHOLD_STATUS_REG, bit(2)) ? defaultMaskedError; + + /** ERROR_THRESHOLD_STATUS_REG[3] + * Reserved + */ + (rERROR_THRESHOLD_STATUS_REG, bit(3|4|5|6|7)) ? defaultMaskedError; + +}; + +################################################################################ +# P9 NVDIMM target WARNING_THRESHOLD_STATUS_REG +################################################################################ + +rule rWARNING_THRESHOLD_STATUS_REG +{ + RECOVERABLE: + WARNING_THRESHOLD_STATUS_REG; +}; + +group gWARNING_THRESHOLD_STATUS_REG filter singlebit +{ + /** WARNING_THRESHOLD_STATUS_REG[0] + * NVM Lifetime Warning + */ + (rWARNING_THRESHOLD_STATUS_REG, bit(0)) ? defaultMaskedError; + + /** WARNING_THRESHOLD_STATUS_REG[1] + * ES Lifetime Warning + */ + (rWARNING_THRESHOLD_STATUS_REG, bit(1)) ? defaultMaskedError; + + /** WARNING_THRESHOLD_STATUS_REG[2] + * ES Temperature Warning + */ + (rWARNING_THRESHOLD_STATUS_REG, bit(2)) ? defaultMaskedError; + +}; + + ############################################################################## + # # + # # ### # + # # # ## ##### ### ### # # # # # # ### ### ### ### # + # # # # # # # # # ## # # # # # # # # # # + # ####### # # # # # # # # # # ##### ### ### ## ### # + # # # # # # # # # # ## # # # # # # # # # # + # # # ## # ### ### # # ### ### # # ### ### ### ### # + # # + ############################################################################## + +# Include the actions defined for this target +.include "p9_common_actions.rule"; + +actionclass analyzeHealthStatus0 { analyze(gHEALTH_STATUS0_REG); }; +actionclass analyzeHealthStatus1 { analyze(gHEALTH_STATUS1_REG); }; +actionclass analyzeErrorThrStatus { analyze(gERROR_THRESHOLD_STATUS_REG); }; +actionclass analyzeWarningThrStatus { analyze(gWARNING_THRESHOLD_STATUS_REG); }; +actionclass analyzePersistencyLost { analyze(gPersistencyLost); }; + diff --git a/src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C b/src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C index 865b74160..fab3f3bf0 100644 --- a/src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C +++ b/src/usr/diag/prdf/common/plat/p9/prdfCommonPlugins.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -69,6 +69,7 @@ PRDF_PLUGIN_DEFINE_NS( nimbus_ec, CommonPlugins, ClearServiceCallFlag ); PRDF_PLUGIN_DEFINE_NS( nimbus_eq, CommonPlugins, ClearServiceCallFlag ); PRDF_PLUGIN_DEFINE_NS( nimbus_ex, CommonPlugins, ClearServiceCallFlag ); PRDF_PLUGIN_DEFINE_NS( nimbus_mca, CommonPlugins, ClearServiceCallFlag ); +PRDF_PLUGIN_DEFINE_NS( nimbus_nvdimm, CommonPlugins, ClearServiceCallFlag ); PRDF_PLUGIN_DEFINE_NS( nimbus_mcbist, CommonPlugins, ClearServiceCallFlag ); PRDF_PLUGIN_DEFINE_NS( nimbus_mcs, CommonPlugins, ClearServiceCallFlag ); PRDF_PLUGIN_DEFINE_NS( nimbus_obus, CommonPlugins, ClearServiceCallFlag ); diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C index ed656f2c9..d631a48ff 100755 --- a/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -46,6 +46,7 @@ #include <prdfP9ExDomain.H> #include <prdfP9McDomain.H> #include <prdfP9McaDomain.H> +#include <prdfP9NvdimmDomain.H> #include <prdfP9McbistDomain.H> #include <prdfP9MccDomain.H> #include <prdfP9McsDomain.H> @@ -106,6 +107,7 @@ errlHndl_t PlatConfigurator::build() unitMap[TYPE_MCBIST] = new McbistDomain( MCBIST_DOMAIN ); unitMap[TYPE_MCS ] = new McsDomain( MCS_DOMAIN ); unitMap[TYPE_MCA ] = new McaDomain( MCA_DOMAIN ); + unitMap[TYPE_DIMM ] = new NvdimmDomain( NVDIMM_DOMAIN ); break; @@ -255,7 +257,8 @@ errlHndl_t PlatConfigurator::addDomainChips( TARGETING::TYPE i_type, { TYPE_OBUS, nimbus_obus }, { TYPE_MCBIST, nimbus_mcbist }, { TYPE_MCS, nimbus_mcs }, - { TYPE_MCA, nimbus_mca }, } }, + { TYPE_MCA, nimbus_mca }, + { TYPE_DIMM, nimbus_nvdimm }, } }, { MODEL_CUMULUS, { { TYPE_PROC, cumulus_proc }, { TYPE_EQ, cumulus_eq }, { TYPE_EX, cumulus_ex }, @@ -298,7 +301,19 @@ errlHndl_t PlatConfigurator::addDomainChips( TARGETING::TYPE i_type, // Iterate all the targets for this type and add to given domain. for ( const auto & trgt : getFunctionalTargetList(i_type) ) { - TARGETING::MODEL model = getChipModel( trgt ); + TARGETING::MODEL model; + + // If the target type is TYPE_DIMM, assume it is an NVDIMM, so we need + // to get the parent MCA to use to get the chip model + if ( TYPE_DIMM == getTargetType(trgt) ) + { + TargetHandle_t parentMca = getConnectedParent( trgt, TYPE_MCA ); + model = getChipModel( parentMca ); + } + else + { + model = getChipModel( trgt ); + } // Ensure this model is supported. if ( fnMap.end() == fnMap.find(model) ) diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9NvdimmDomain.H b/src/usr/diag/prdf/common/plat/p9/prdfP9NvdimmDomain.H new file mode 100644 index 000000000..1ce23c57b --- /dev/null +++ b/src/usr/diag/prdf/common/plat/p9/prdfP9NvdimmDomain.H @@ -0,0 +1,61 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/plat/p9/prdfP9NvdimmDomain.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016,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 __prdfP9NvdimmDomain_H +#define __prdfP9NvdimmDomain_H + +#include <prdfRuleChipDomain.H> + +namespace PRDF +{ + +class NvdimmDomain : public RuleChipDomain +{ + public: + + /** + * @brief Constructor + * @param i_did The domain ID + * @param i_size The projected size of the domain + */ + NvdimmDomain( DOMAIN_ID i_did, uint32_t i_size = NVDIMM_DOMAIN_SIZE ) : + RuleChipDomain( i_did, i_size ) + {} + + /** + * @brief Query for an attention of a specific type in this domain + * @param i_attnType [MACHINE_CHECK | RECOVERABLE | SPECIAL] + * @return false + * @note This function will always return false. That way PRD will look + * for the attention via the processor chip. + */ + virtual bool Query( ATTENTION_TYPE i_attnType ) + { return false; } + +}; + +} // end namespace PRDF + +#endif /* __prdfP9NvdimmDomain_H */ diff --git a/src/usr/diag/prdf/common/plat/prdfTargetServices.C b/src/usr/diag/prdf/common/plat/prdfTargetServices.C index f478abea2..e493cd166 100755 --- a/src/usr/diag/prdf/common/plat/prdfTargetServices.C +++ b/src/usr/diag/prdf/common/plat/prdfTargetServices.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -1229,7 +1229,6 @@ TARGETING::TargetHandle_t getParentChip( TARGETING::TargetHandle_t i_target ) } break; } - default: PRDF_ERR( "[getParentChip] Unsupported class: %d", l_class ); } |