summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2018-06-04 12:42:18 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-06-04 23:24:37 -0400
commit41f3aa61a7e97de134cffd04ebbbbb286424c3cb (patch)
tree2d9cb7452510e59d40bf95c84965d56399a7e8f3 /src
parent41daed137d2f31ba125a1ada241755e42f36868c (diff)
downloadblackbird-hostboot-41f3aa61a7e97de134cffd04ebbbbb286424c3cb.tar.gz
blackbird-hostboot-41f3aa61a7e97de134cffd04ebbbbb286424c3cb.zip
PRD: removed old P8 memory system system code
Change-Id: Ib6f0557afad5cf4c1b3f98aeec0e0799734f1370 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59855 Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59873 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/diag/prdf/common/plat/cen/prdfCenMembuf_common.C55
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/Mcs.rule579
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.C390
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.H175
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C461
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H195
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMarkstore.H94
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.C364
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.H97
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C880
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H418
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.C237
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.H346
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C157
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H34
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C289
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H146
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H39
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfP8ProcMbCommonExtraSig.H36
-rw-r--r--src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C102
20 files changed, 55 insertions, 5039 deletions
diff --git a/src/usr/diag/prdf/common/plat/cen/prdfCenMembuf_common.C b/src/usr/diag/prdf/common/plat/cen/prdfCenMembuf_common.C
index 75cefe21e..f78fab59d 100644
--- a/src/usr/diag/prdf/common/plat/cen/prdfCenMembuf_common.C
+++ b/src/usr/diag/prdf/common/plat/cen/prdfCenMembuf_common.C
@@ -102,6 +102,61 @@ int32_t PostAnalysis( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc )
}
PRDF_PLUGIN_DEFINE( cen_centaur, PostAnalysis );
+/**
+ * @brief During system or unit checkstop analysis, this is used to determine
+ * if a chip has any active recoverable attentions.
+ * @param i_chip A MEMBUF chip.
+ * @param o_hasAttns True if a recoverable attention exists on the Centaur.
+ * @return SUCCESS.
+ */
+int32_t CheckForRecovered( ExtensibleChip * i_chip, bool & o_hasAttns )
+{
+ o_hasAttns = false;
+
+ SCAN_COMM_REGISTER_CLASS * reg = i_chip->getRegister("GLOBAL_RE_FIR");
+ if ( SUCCESS != reg->Read() )
+ {
+ PRDF_ERR( "[CheckForRecovered] GLOBAL_RE_FIR read failed on 0x%08x",
+ i_chip->getHuid() );
+ }
+ else if ( 0 != reg->GetBitFieldJustified(1,3) )
+ {
+ o_hasAttns = true;
+ }
+
+ return SUCCESS;
+
+} PRDF_PLUGIN_DEFINE( cen_centaur, CheckForRecovered );
+
+/**
+ * @brief During system checkstop analysis, this is used to determine if a chip
+ * has any active unit checkstop attentions.
+ * @param i_chip A MEMBUF chip.
+ * @param o_hasAttns True if a recoverable attention exists on the Centaur.
+ * @return SUCCESS.
+ */
+int32_t CheckForUnitCs( ExtensibleChip * i_chip, bool & o_hasAttns )
+{
+ o_hasAttns = false;
+
+ // Note that Centaur checkstop attentions are all reported as unit
+ // checkstops and they do not directly trigger system checkstops.
+
+ SCAN_COMM_REGISTER_CLASS * reg = i_chip->getRegister("GLOBAL_CS_FIR");
+ if ( SUCCESS != reg->Read() )
+ {
+ PRDF_ERR( "[CheckForUnitCs] GLOBAL_CS_FIR read failed on 0x%08x",
+ i_chip->getHuid() );
+ }
+ else if ( 0 != reg->GetBitFieldJustified(1,3) )
+ {
+ o_hasAttns = true;
+ }
+
+ return SUCCESS;
+
+} PRDF_PLUGIN_DEFINE( cen_centaur, CheckForUnitCs );
+
//##############################################################################
//
// MBSFIR
diff --git a/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule b/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule
deleted file mode 100755
index 7897d3e79..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/Mcs.rule
+++ /dev/null
@@ -1,579 +0,0 @@
-# IBM_PROLOG_BEGIN_TAG
-# This is an automatically generated prolog.
-#
-# $Source: src/usr/diag/prdf/common/plat/pegasus/Mcs.rule $
-#
-# OpenPOWER HostBoot Project
-#
-# Contributors Listed Below - COPYRIGHT 2012,2018
-# [+] 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
-
-################################################################################
-#
-# Scope:
-# Registers and actions for the following chiplets:
-# Note that only addresses for MC0/MCS0 will be used.
-#
-# Chiplet Register Addresses Description
-# ======= ======================= ============================================
-# MCS 0x02011800 - 0x0201187F MC0/MCS0
-# MCS 0x02011880 - 0x020118FF MC0/MCS1
-# MCS 0x02011900 - 0x0201197F MC1/MCS0
-# MCS 0x02011980 - 0x020119FF MC1/MCS1
-# MCS 0x02011A00 - 0x02011A3E DMI0 - DMI3
-# MCS 0x02011C00 - 0x02011C7F MC2/MCS0
-# MCS 0x02011C80 - 0x02011CFF MC2/MCS1
-# MCS 0x02011D00 - 0x02011D7F MC3/MCS0
-# MCS 0x02011D80 - 0x02011DFF MC3/MCS1
-# MCS 0x02011E00 - 0x02011E3E DMI4 - DMI7
-#
-################################################################################
-
-chip Mcs
-{
- name "Power8 MCS Chiplet";
- targettype TYPE_MCS;
- sigoff 0x8000;
- dump DUMP_CONTENT_HW;
- scomlen 64;
-
-.include "prdfP8McsExtraSig.H";
-
- #############################################################################
- # #
- # ###### #
- # # # ###### #### ### #### ##### ###### ##### #### #
- # # # # # # # # # # # # # #
- # ###### ##### # # #### # ##### # # #### #
- # # # # # ### # # # # ##### # #
- # # # # # # # # # # # # # # # #
- # # # ###### #### ### #### # ###### # # #### #
- # #
- #############################################################################
-
- ############################################################################
- # PB Chiplet MCIFIR
- ############################################################################
-
- register MCIFIR
- {
- name "MC0.MCS0.RIGHT.MCI.SCOMFIR.MCIFIRQ";
- scomaddr 0x02011840;
- reset (&, 0x02011841);
- mask (|, 0x02011845);
- capture group default;
- };
-
- register MCIFIR_AND
- {
- name "MC0.MCS0.RIGHT.MCI.SCOMFIR.MCIFIRQ AND";
- scomaddr 0x02011841;
- capture group never;
- access write_only;
- };
-
- register MCIFIR_MASK
- {
- name "MC0.MCS0.RIGHT.MCI.SCOMFIR.MCIFIRMASK";
- scomaddr 0x02011843;
- capture group default;
- };
-
- register MCIFIR_ACT0
- {
- name "MC0.MCS0.RIGHT.MCI.SCOMFIR.MCIFIRACT0";
- scomaddr 0x02011846;
- capture type secondary;
- capture group default;
- capture req nonzero("MCIFIR");
- };
-
- register MCIFIR_ACT1
- {
- name "MC0.MCS0.RIGHT.MCI.SCOMFIR.MCIFIRACT1";
- scomaddr 0x02011847;
- capture type secondary;
- capture group default;
- capture req nonzero("MCIFIR");
- };
-
- register MCIFIR_WOF
- {
- name "MC0.MCS0.RIGHT.MCI.SCOMFIR.MCIFIRWOF";
- scomaddr 0x02011848;
- capture type secondary;
- capture group default;
- capture req nonzero("MCIFIR");
- };
-
- ############################################################################
- # Error Report Registers
- ############################################################################
-
- register MCERPT0
- {
- name "MC0.MCS0.LEFT.LEFT.MCERPT0";
- scomaddr 0x0201181E;
- capture group default;
- };
-
- register MCIERPT0
- {
- name "MC0.MCS0.RIGHT.MCI.MCIERPT0";
- scomaddr 0x0201184E;
- capture group default;
- };
-
- ############################################################################
- # Primary Memory Configuration Register
- ############################################################################
-
- register MCFGP
- {
- name "MC0.MCS0.LEFT.LEFT.MCFGPQ";
- scomaddr 0x02011800;
- capture group default;
- };
-
- ############################################################################
- # MCS Hardware Force Mirror Read SUE
- ############################################################################
-
- register MCHWFM
- {
- name "MC0.MCS0.LEFT.LEFT.MCHWFMQ";
- scomaddr 0x0201181C;
- capture group MirrorRegs; # Only valid on even MCSs of the mirror.
- # Will have to capture manually.
- };
-
-};
-
- ##############################################################################
- # #
- # #### # #
- # # # # # # ##### ### # # # ## ##### ### ### # # ### #
- # # # # # # # # # # # # # # # # # ## # # #
- # #### # # # #### ### # ####### # # # # # # # # ### #
- # # # # # # # # # # # # # # # # # # ## # #
- # # # ### #### ##### ### # # # ## # ### ### # # ### #
- # #
- ##############################################################################
-
-################################################################################
-# PB Chiplet MCIFIR
-# Reviewed p8dd1_mss_FFDC_72.xls on 01/16/14
-################################################################################
-
-rule MciFir
-{
- CHECK_STOP: MCIFIR & ~MCIFIR_MASK & ~MCIFIR_ACT0 & ~MCIFIR_ACT1;
- RECOVERABLE: MCIFIR & ~MCIFIR_MASK & ~MCIFIR_ACT0 & MCIFIR_ACT1;
- SPECIAL: MCIFIR & ~MCIFIR_MASK & MCIFIR_ACT0 & ~MCIFIR_ACT1;
-
- # All of the Centaur CS (channel fail) bits set as recoverable.
- UNIT_CS: MCIFIR & ~MCIFIR_MASK & ~MCIFIR_ACT0 & MCIFIR_ACT1;
-};
-
-group gMciFir attntype CHECK_STOP, RECOVERABLE, SPECIAL, UNIT_CS
- filter priority( 8, 9, 22, 23, 6, 0, 40, # Channel failure
- 20, 5, 10 ), # Recoverable
- secondarybits(1,2,3,4,5,7,10,11,12,13,14,15,16,17,18,19,20,21,24,
- 31,32,34,35,37,41,42,43,44,45,47,50,51,52,53)
-{
- /** MCIFIR[0]
- * MCIFIRQ_REPLAY_TIMEOUT
- */
- (MciFir, bit(0)) ? clearSecMbsBitsCalloutDmiBusTh1;
-
- /** MCIFIR[1]
- * MCIFIRQ_CHANNEL_FAIL
- */
- (MciFir, bit(1)) ? defaultMaskedError;
-
- /** MCIFIR[2]
- * MCIFIRQ_CRC_ERROR
- */
- (MciFir, bit(2)) ? defaultMaskedError;
-
- /** MCIFIR[3]
- * MCIFIRQ_FRAME_NOACK
- */
- (MciFir, bit(3)) ? defaultMaskedError;
-
- /** MCIFIR[4]
- * MCIFIRQ_SEQID_OUT_OF_ORDER
- */
- (MciFir, bit(4)) ? defaultMaskedError;
-
- /** MCIFIR[5]
- * MCIFIRQ_REPLAY_BUFFER_ECC_CE
- */
- (MciFir, bit(5)) ? SelfHighThr5PerHour;
-
- /** MCIFIR[6]
- * MCIFIRQ_REPLAY_BUFFER_ECC_UE
- */
- (MciFir, bit(6)) ? SelfHighThr1;
-
- /** MCIFIR[7]
- * MCIFIRQ_MCI_CHINIT_STATE_MACHINE_TIMEOUT
- */
- (MciFir, bit(7)) ? defaultMaskedError;
-
- /** MCIFIR[8]
- * MCIFIRQ_MCI_INTERNAL_CONTROL_PARITY_ERROR
- */
- (MciFir, bit(8)) ? SelfHighThr1;
-
- /** MCIFIR[9]
- * MCIFIRQ_MCI_DATA_FLOW_PARITY_ERROR
- */
- (MciFir, bit(9)) ? SelfHighThr1;
-
- /** MCIFIR[10]
- * MCIFIRQ_CRC_PERFORMANCE_DEGRADATION
- */
- (MciFir, bit(10)) ? defaultMaskedError;
-
- /** MCIFIR[11]
- * MCIFIRQ_CHANNEL_INTERLOCK_FAIL
- */
- (MciFir, bit(11)) ? defaultMaskedError;
-
- /** MCIFIR[12]
- * MCIFIRQ_CENTAUR_CHECKSTOP
- */
- # NOTE: This bit will be set to host_attn and only monitored by HostATTN
- # during Hostboot.
- (MciFir, bit(12)) ? defaultMaskedError;
-
- /** MCIFIR[13]
- * MCIFIRQ_CENTAUR_TRACESTOP
- */
- (MciFir, bit(13)) ? defaultMaskedError;
-
- /** MCIFIR[14]
- * MCIFIRQ_FPGA_INTERRUPT
- */
- (MciFir, bit(14)) ? defaultMaskedError;
-
- /** MCIFIR[15]
- * MCIFIRQ_CENTAUR_RECOVERABLE_ERROR
- */
- # NOTE: This bit will be set to host_attn and only monitored by HostATTN
- # during Hostboot.
- (MciFir, bit(15)) ? defaultMaskedError;
-
- /** MCIFIR[16]
- * MCIFIRQ_CENTAUR_SPECIAL_ATTENTION
- */
- # NOTE: This bit will be set to host_attn and only monitored by HostATTN
- # during Hostboot.
- (MciFir, bit(16)) ? defaultMaskedError;
-
- /** MCIFIR[17]
- * MCIFIRQ_CENTAUR_MAINTENANCE_COMPLETE
- */
- # NOTE: This bit will be set to host_attn and only monitored by HostATTN
- # during Hostboot.
- (MciFir, bit(17)) ? defaultMaskedError;
-
- /** MCIFIR[18]
- * MCIFIRQ_CENTAUR_INBAND_PIB_ERROR
- */
- (MciFir, bit(18)) ? defaultMaskedError;
-
- /** MCIFIR[19]
- * FRTL Conter Overflow
- */
- (MciFir, bit(19)) ? defaultMaskedError;
-
- /** MCIFIR[20]
- * SCOM Register parity Error
- */
- (MciFir, bit(20)) ? SelfHighThr1;
-
- /** MCIFIR[21]
- * MCIFIRQ_MULTIPLE_REPLAY
- */
- (MciFir, bit(21)) ? defaultMaskedError;
-
- /** MCIFIR[22]
- * MCIFIRQ_MCICFG_PARITY_SCOM_ERROR
- */
- (MciFir, bit(22)) ? SelfMedThr1;
-
- /** MCIFIR[23]
- * MCIFIRQ_REPLAY_BUFFER_OVERRUN
- */
- (MciFir, bit(23)) ? calloutDmiBusTh1;
-
- /** MCIFIR[24]
- * MCIFIRQ_MCS_RECOVERABLE_ERROR
- */
- (MciFir, bit(24)) ? SelfHighThr1;
-
- /** MCIFIR[25]
- * MCIFIRQ_MCS_INTERNAL_NONRECOVERABLE_ERROR
- */
- (MciFir, bit(25)) ? SelfHighThr1;
-
- /** MCIFIR[26]
- * MCIFIRQ_POWERBUS_PROTOCOL_ERROR
- */
- (MciFir, bit(26)) ? callout2ndLvlDumpSw;
-
- /** MCIFIR[27]
- * MCIFIRQ_MCS_COMMAND_LIST_TIMEOUT_DUE_TO_POWERBUS
- */
- (MciFir, bit(27)) ? calloutDmiBusAndLvl2Th1;
-
- /** MCIFIR[28]
- * MCIFIRQ_MULTIPLE_RCMD_OR_CRESP_ACTIVE
- */
- (MciFir, bit(28)) ? SelfLowLevel2MedThr1;
-
- /** MCIFIR[29]
- * MCIFIRQ_INBAND_BAR_HIT_WITH_INCORRECT_TTYPE
- */
- (MciFir, bit(29)) ? SelfLowLevel2MedThr1;
-
- /** MCIFIR[30]
- * MCIFIRQ_MULTIPLE_BAR_HIT
- */
- (MciFir, bit(30)) ? SelfLowLevel2MedThr1;
-
- /** MCIFIR[31]
- * MCIFIRQ_CHANNEL_FAIL_SIGNAL_ACTIVE
- */
- # NOTE: PRD checks this bit anytime it is called to analyze the MCS. It is
- # intended to indicate that another bit in this FIR signaled a channel
- # failure/checkstop. It should always be masked.
- (MciFir, bit(31)) ? defaultMaskedError;
-
- /** MCIFIR[32]
- * Mirror action occurred
- */
- (MciFir, bit(32)) ? handleMirrorAction;
-
- /** MCIFIR[33]
- * MCIFIRQ_NONFOREIGN_ACCESS_TO_FOREIGN_BAR
- */
- (MciFir, bit(33)) ? callout2ndLvlDumpSw;
-
- /** MCIFIR[34]
- * MCIFIRQ_CENTAUR_SYNC_COMMAND_DETECTED
- */
- (MciFir, bit(34)) ? defaultMaskedError;
-
- /** MCIFIR[35]
- * MCIFIRQ_POWERBUS_WRITE_DATA_BUFFER_CE
- */
- (MciFir, bit(35)) ? calloutProcHighThr5PerHr;
-
- /** MCIFIR[36]
- * MCIFIRQ_POWERBUS_WRITE_DATA_BUFFER_UE
- */
- (MciFir, bit(36)) ? calloutParentProcHighThr1;
-
- /** MCIFIR[37]
- * MCIFIRQ_POWERBUS_WRITE_DATA_BUFFER_SUE
- */
- (MciFir, bit(37)) ? defaultMaskedError;
-
- /** MCIFIR[38]
- * MCIFIRQ_HA_ILLEGAL_CONSUMER_ACCESS_ERROR
- */
- (MciFir, bit(38)) ? callout2ndLvlDumpSw;
-
- /** MCIFIR[39]
- * MCIFIRQ_HA_ILLEGAL_PRODUCER_ACCESS_ERROR
- */
- (MciFir, bit(39)) ? callout2ndLvlDumpSw;
-
- /** MCIFIR[40]
- * CHANNEL TIMEOUT ERROR
- */
- (MciFir, bit(40)) ? calloutDmiBusTh1;
-
- /** MCIFIR[41]
- * CENTAUR FAULT LINE
- */
- (MciFir, bit(41)) ? defaultMaskedError;
-
- /** MCIFIR[42]
- * MCS WAT
- */
- (MciFir, bit(42)) ? defaultMaskedError;
-
- /** MCIFIR[43]
- * INVALID ADDRESS
- */
- (MciFir, bit(43)) ? defaultMaskedError;
-
- /** MCIFIR[44]
- * MCIFIRQ_COMMAND_AND_LIST_TIMEOUT
- */
- (MciFir, bit(44)) ? defaultMaskedError;
-
- /** MCIFIR[45]
- * MCIFIRQ_MPIPL_OR_FLR_WRITE_SUE
- */
- (MciFir, bit(45)) ? defaultMaskedError;
-
- /** MCIFIR[46]
- * MCIFIRQ_INVALID_CENTAUR_BYPASS
- */
- (MciFir, bit(46)) ? calloutDmiBusSelfLowConnMed;
-
- /** MCIFIR[47]
- * MCS WRITE DATAFLOW SUE
- */
- (MciFir, bit(47)) ? defaultMaskedError;
-
- /** MCIFIR[48]
- * MCIFIRQ_BAD_MDI0_UPDATE
- */
- (MciFir, bit(48)) ? mcifirBit48;
-
- /** MCIFIR[49]
- * MCIFIRQ_INCONSISTENT_SF_STAT
- */
- (MciFir, bit(49)) ? mcifirBit49;
-
- /** MCIFIR[50:51]
- * RESERVED
- */
- (MciFir, bit(50|51)) ? defaultMaskedError;
-
- /** MCIFIR[52]
- * MCIFIRQ_INTERNAL_SCOM_ERROR
- */
- (MciFir, bit(52)) ? defaultMaskedError;
-
- /** MCIFIR[53]
- * MCIFIRQ_INTERNAL_SCOM_ERROR_CLONE
- */
- (MciFir, bit(53)) ? defaultMaskedError;
-
- /** MCIFIR[54:63]
- * RESERVED
- */
- (MciFir, bit( 54|55|56|57|58|59|
- 60|61|62|63 )) ? defaultMaskedError;
-
-};
-
- ##############################################################################
- # #
- # # ### #
- # # # ## ##### ### ### # # # # # # ### ### ### ### #
- # # # # # # # # # ## # # # # # # # # # #
- # ####### # # # # # # # # # # ##### ### ### ## ### #
- # # # # # # # # # # ## # # # # # # # # # #
- # # # ## # ### ### # # ### ### # # ### ### ### ### #
- # #
- ##############################################################################
-
-# Include the common action set.
-.include "CommonActions.rule"
-
-actionclass calloutProcHighThr5PerHr
-{
- callout(connected(TYPE_PROC),MRU_HIGH);
- threshold5phour;
-};
-
-/** Callout the connected Centaur, threshold 1 */
-actionclass calloutConnCenTh1
-{
- callout(connected(TYPE_MEMBUF), MRU_MED);
- threshold1;
-};
-
-/** Callout the DMI bus (MEDA) */
-actionclass calloutDmiBus
-{
- calloutSelfMedA;
- callout(connected(TYPE_MEMBUF), MRU_MEDA);
- funccall("calloutInterface_dmi");
-};
-
-/** Clear MBS SecondaryBits and calloutDmiBusTh1 */
-actionclass clearSecMbsBitsCalloutDmiBusTh1
-{
- funccall("ClearMbsSecondaryBits");
- calloutDmiBusTh1;
-};
-
-/** Callout the DMI bus (MEDA), threshold 1*/
-actionclass calloutDmiBusTh1
-{
- calloutDmiBus;
- threshold1;
-};
-
-/** Callout the DMI bus (MEDA) and 2nd Level Support (LOW), threshold 1 */
-actionclass calloutDmiBusAndLvl2Th1
-{
- calloutDmiBusTh1;
- callout2ndLvlLow;
-};
-
-actionclass CalloutDmiBusAndThr2pd
-{
- calloutDmiBus;
- threshold2pday;
-};
-
-/** The plugin checks if the Proc is either Murano DD2 or Venice DD1.
- If neither, then callout thresholdAndMask_self and change signature to
- DD1: MCIFIRQ_INTERNAL_SCOM_ERROR. */
-actionclass mcifirBit48
-{
- threshold32pday;
- try( funccall("dd1mcifirBit48"), calloutDmiBusSelfLowConnMed );
-};
-
-/** The plugin checks if the Proc is either Murano DD2 or Venice DD1.
- If neither, then callout thresholdAndMask_self and change signature to
- DD1: MCIFIRQ_INTERNAL_SCOM_ERROR_CLONE. */
-actionclass mcifirBit49
-{
- threshold32pday;
- try( funccall("dd1mcifirBit49"), calloutDmiBusSelfLowConnMed );
-};
-
-/** Callout MCS Low and Centaur High */
-actionclass calloutDmiBusSelfLowConnMed
-{
- calloutSelfLow;
- callout(connected(TYPE_MEMBUF), MRU_MED);
- funccall("calloutInterface_dmi");
- threshold1;
-};
-
-/** Handles memory mirror action event */
-actionclass handleMirrorAction
-{
- calloutSelfMed;
- threshold( field(33 / 30 min) );
- funccall( "handleMirrorAction" );
-};
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.C
deleted file mode 100644
index d7a9d056e..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.C
+++ /dev/null
@@ -1,390 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
-/* [+] 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 prdfCalloutUtil.C */
-
-#include <prdfCalloutUtil.H>
-
-#include <iipServiceDataCollector.h>
-#include <prdfCenAddress.H>
-#include <prdfCenMarkstore.H>
-#include <prdfErrlUtil.H>
-#include <prdfPlatServices.H>
-#include <prdfTrace.H>
-
-#include <hwas/common/hwasCallout.H>
-
-using namespace TARGETING;
-
-namespace PRDF
-{
-
-using namespace PlatServices;
-
-namespace CalloutUtil
-{
-
-void defaultError( STEP_CODE_DATA_STRUCT & i_sc )
-{
- i_sc.service_data->SetCallout( LEVEL2_SUPPORT, MRU_MED, NO_GARD );
- i_sc.service_data->SetCallout( SP_CODE, MRU_MED, NO_GARD );
- i_sc.service_data->setServiceCall();
-}
-
-//------------------------------------------------------------------------------
-
-void calloutMark( TargetHandle_t i_mba, const CenRank & i_rank,
- const CenMark & i_mark, STEP_CODE_DATA_STRUCT & io_sc,
- PRDpriority i_priority )
-{
- if ( i_mark.getCM().isValid() )
- {
- MemoryMru memmru ( i_mba, i_rank, i_mark.getCM() );
- io_sc.service_data->SetCallout( memmru, i_priority );
- }
-
- if ( i_mark.getSM().isValid() )
- {
- MemoryMru memmru ( i_mba, i_rank, i_mark.getSM() );
- io_sc.service_data->SetCallout( memmru, i_priority );
- }
-}
-
-//------------------------------------------------------------------------------
-
-void calloutSymbolData( TargetHandle_t i_mba, const CenRank & i_rank,
- const MemUtils::MaintSymbols & i_symData,
- STEP_CODE_DATA_STRUCT & io_sc, PRDpriority i_priority )
-{
- bool dimmsBad[MBA_DIMMS_PER_RANK] = { false, false };
-
- for ( MemUtils::MaintSymbols::const_iterator it = i_symData.begin();
- it != i_symData.end(); it++ )
- {
- dimmsBad[it->symbol.getPortSlct()] = true;
- }
-
- for ( uint32_t port = 0; port < MBA_DIMMS_PER_RANK; port++ )
- {
- if ( dimmsBad[port] )
- {
- TargetHandleList list = getConnectedDimms( i_mba, i_rank, port );
- for ( TargetHandleList::iterator it = list.begin();
- it != list.end(); it++ )
- {
- io_sc.service_data->SetCallout( *it, i_priority );
- }
- }
- }
-}
-
-//------------------------------------------------------------------------------
-
-TargetHandleList getConnectedDimms( TargetHandle_t i_mba,
- const CenRank & i_rank )
-{
- #define PRDF_FUNC "[CalloutUtil::getConnectedDimms] "
-
- TargetHandleList o_list;
-
- if ( TYPE_MBA != getTargetType(i_mba) )
- {
- PRDF_ERR( PRDF_FUNC "Invalid target type: HUID=0x%08x", getHuid(i_mba) );
- }
- else
- {
- TargetHandleList dimmList = getConnected( i_mba, TYPE_DIMM );
- for ( TargetHandleList::iterator dimmIt = dimmList.begin();
- dimmIt != dimmList.end(); dimmIt++)
- {
- uint8_t dimmSlct;
- int32_t l_rc = getMbaDimm( *dimmIt, dimmSlct );
- if ( SUCCESS != l_rc )
- {
- PRDF_ERR( PRDF_FUNC "getMbaDimm(0x%08x) failed",
- getHuid(*dimmIt) );
- continue;
- }
-
- if ( dimmSlct == i_rank.getDimmSlct() )
- {
- o_list.push_back( *dimmIt );
- }
- }
- }
-
- return o_list;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-TargetHandleList getConnectedDimms( TargetHandle_t i_mba )
-{
- TargetHandleList o_list;
-
- if ( TYPE_MBA != getTargetType(i_mba) )
- {
- PRDF_ERR( "[CalloutUtil::getConnectedDimms] Invalid target type: "
- "HUID=0x%08x", getHuid(i_mba) );
- }
- else
- o_list = getConnected( i_mba, TYPE_DIMM );
-
- return o_list;
-}
-
-//------------------------------------------------------------------------------
-
-TargetHandleList getConnectedDimms( TargetHandle_t i_mba,
- const CenRank & i_rank,
- uint8_t i_port )
-{
- #define PRDF_FUNC "[CalloutUtil::getConnectedDimms] "
-
- TargetHandleList o_list;
-
- TargetHandleList dimmList = getConnectedDimms( i_mba, i_rank );
-
- for ( TargetHandleList::iterator dimmIt = dimmList.begin();
- dimmIt != dimmList.end(); dimmIt++)
- {
- uint8_t portSlct;
- int32_t l_rc = getMbaPort( *dimmIt, portSlct );
- if ( SUCCESS != l_rc )
- {
- PRDF_ERR( PRDF_FUNC "getMbaPort(0x%08x) failed",
- getHuid(*dimmIt) );
- continue;
- }
-
- if ( portSlct == i_port )
- {
- o_list.push_back( *dimmIt );
- }
- }
-
- return o_list;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-TargetHandleList getConnectedDimms( TargetHandle_t i_mba,
- uint8_t i_port )
-{
- #define PRDF_FUNC "[CalloutUtil::getConnectedDimms] "
-
- TargetHandleList o_list;
-
- TargetHandleList dimmList = getConnectedDimms( i_mba );
-
- for ( TargetHandleList::iterator dimmIt = dimmList.begin();
- dimmIt != dimmList.end(); dimmIt++)
- {
- uint8_t portSlct;
- int32_t l_rc = getMbaPort( *dimmIt, portSlct );
- if ( SUCCESS != l_rc )
- {
- PRDF_ERR( PRDF_FUNC "getMbaPort(0x%08x) failed",
- getHuid(*dimmIt) );
- continue;
- }
-
- if ( portSlct == i_port )
- {
- o_list.push_back( *dimmIt );
- }
- }
-
- return o_list;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t getBusEndpoints( ExtensibleChip * i_chip,
- TargetHandle_t & o_rxTrgt, TargetHandle_t & o_txTrgt,
- TYPE i_busType, uint32_t i_busPos )
-{
- #define PRDF_FUNC "[CalloutUtil::getBusEndpoints] "
-
- int32_t rc = SUCCESS;
-
- o_rxTrgt = NULL;
- o_txTrgt = NULL;
-
- TargetHandle_t chipTrgt = i_chip->GetChipHandle();
- TYPE chipType = getTargetType(chipTrgt);
-
- if ( TYPE_PROC == chipType )
- {
- o_rxTrgt = getConnectedChild( chipTrgt, i_busType, i_busPos );
-
- if ( TYPE_ABUS == i_busType || TYPE_XBUS == i_busType )
- {
- o_txTrgt = getConnectedPeerTarget( o_rxTrgt );
- }
- else if ( TYPE_MCS == i_busType )
- {
- o_txTrgt = getConnectedChild( o_rxTrgt, TYPE_MEMBUF, 0 );
- }
- }
- else if ( TYPE_MCS == chipType )
- {
- o_rxTrgt = chipTrgt;
- o_txTrgt = getConnectedChild( o_rxTrgt, TYPE_MEMBUF, 0 );
- }
- else if ( TYPE_MEMBUF == chipType )
- {
- o_rxTrgt = chipTrgt;
- o_txTrgt = getConnectedParent( o_rxTrgt, TYPE_MCS );
- }
-
- // Note that all of the 'getConnected' functions above do proper parameter
- // checking and will return NULL if anything is wrong. So this is the only
- // NULL check we actually need in this function.
-
- if ( NULL == o_rxTrgt || NULL == o_txTrgt )
- {
- PRDF_ERR( PRDF_FUNC "i_chip:0x%08x o_rxTrgt:0x%08x o_txTrgt:0x%08x "
- "i_busType:%d i_busPos:%d", getHuid(chipTrgt),
- getHuid(o_rxTrgt), getHuid(o_txTrgt), i_busType, i_busPos );
- rc = FAIL;
- }
-
- return rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t calloutBusInterface( TargetHandle_t i_rxTrgt, TargetHandle_t i_txTrgt,
- PRDpriority i_priority )
-{
- #define PRDF_FUNC "[CalloutUtil::calloutBusInterface] "
-
- int32_t rc = SUCCESS;
-
- do
- {
- // Check for valid targets.
- if ( NULL == i_rxTrgt || NULL == i_txTrgt )
- {
- PRDF_ERR( PRDF_FUNC "Given target(s) are NULL" );
- rc = FAIL; break;
- }
-
- // Get the HWAS bus type.
- HWAS::busTypeEnum hwasType;
-
- TYPE rxType = getTargetType(i_rxTrgt);
- TYPE txType = getTargetType(i_txTrgt);
-
- if ( TYPE_ABUS == rxType && TYPE_ABUS == txType )
- {
- hwasType = HWAS::A_BUS_TYPE;
- }
- else if ( TYPE_XBUS == rxType && TYPE_XBUS == txType )
- {
- hwasType = HWAS::X_BUS_TYPE;
- }
- else if ( (TYPE_MCS == rxType && TYPE_MEMBUF == txType) ||
- (TYPE_MEMBUF == rxType && TYPE_MCS == txType) )
- {
- hwasType = HWAS::DMI_BUS_TYPE;
- }
- else
- {
- PRDF_ERR( PRDF_FUNC "Unsupported target types" );
- rc = FAIL; break;
- }
-
- // Get the global error log.
- errlHndl_t errl = NULL;
- errl = ServiceGeneratorClass::ThisServiceGenerator().getErrl();
- if ( NULL == errl )
- {
- PRDF_ERR( PRDF_FUNC "Failed to get the global error log" );
- rc = FAIL; break;
- }
-
- // Callout this bus interface.
- PRDF_ADD_BUS_CALLOUT( errl, i_rxTrgt, i_txTrgt, hwasType, i_priority );
-
- } while(0);
-
- if ( SUCCESS != rc )
- {
- PRDF_ERR( PRDF_FUNC "i_rxTrgt:0x%08x i_txTrgt:0x%08x i_priority:%d",
- getHuid(i_rxTrgt), getHuid(i_txTrgt), i_priority );
- }
-
- return rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t calloutBusInterface( ExtensibleChip * i_chip, PRDpriority i_priority,
- TYPE i_busType, uint32_t i_busPos )
-{
- #define PRDF_FUNC "[CalloutUtil::calloutBusInterface] "
-
- int32_t rc = SUCCESS;
-
- do
- {
- TargetHandle_t rxTrgt = NULL; TargetHandle_t txTrgt = NULL;
-
- rc = getBusEndpoints( i_chip, rxTrgt, txTrgt, i_busType, i_busPos );
- if ( SUCCESS != rc ) break;
-
- rc = calloutBusInterface( rxTrgt, txTrgt, i_priority );
- if ( SUCCESS != rc ) break;
-
- } while(0);
-
- if ( SUCCESS != rc )
- {
- PRDF_ERR( PRDF_FUNC "i_chip:0x%08x i_busType:%d i_busPos:%d "
- "i_priority:%d", i_chip->GetId(), i_busType, i_busPos,
- i_priority );
- }
-
- return rc;
-
- #undef PRDF_FUNC
-}
-
-} // end namespace CalloutUtil
-
-} // end namespace PRDF
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.H
deleted file mode 100644
index 502467ba9..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.H
+++ /dev/null
@@ -1,175 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCalloutUtil.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2015 */
-/* [+] 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 prdfCalloutUtil_H
-#define prdfCalloutUtil_H
-
-/** @file prdfCalloutUtil.H
- * @brief Utility functions for common, non-trivial callouts.
- */
-
-#include <prdfPlatServices.H>
-
-#include <prdfCallouts.H>
-#include <prdfCenMemUtils.H>
-
-namespace PRDF
-{
-
-class CenMark;
-class CenRank;
-struct STEP_CODE_DATA_STRUCT;
-
-namespace CalloutUtil
-{
-
-/**
- * @brief In many cases, an internal logic error may occur in which 2nd level
- * support and FSP code need to be called out. This function is intended
- * to help eliminate the need to constantly repeat the list of callouts.
- * @param i_sc The step code data struct.
- */
-void defaultError( STEP_CODE_DATA_STRUCT & i_sc );
-
-/**
- * @brief Will add a MemoryMru to the callout list for the chip mark and symbol
- * mark, if they exist.
- * @param i_mba Target MBA.
- * @param i_rank Target rank.
- * @param i_mark Target mark.
- * @param io_sc The step code data struct.
- * @param i_priority Callout priority (default MRU_MED).
- */
-void calloutMark( TARGETING::TargetHandle_t i_mba, const CenRank & i_rank,
- const CenMark & i_mark, STEP_CODE_DATA_STRUCT & io_sc,
- PRDpriority i_priority = MRU_MED );
-
-/**
- * @brief Will add all DIMMs with symbols that exist in the given list to the
- * callout list.
- * @note We cannot just callout a MemoryMru for each symbol because there could
- * be a lot more symbols in the list than we have room for in the PFA
- * data section in the error log.
- * @param i_mba Target MBA.
- * @param i_rank Target rank.
- * @param i_symData The list of symbols.
- * @param io_sc The step code data struct.
- * @param i_priority Callout priority (default MRU_MED).
- */
-void calloutSymbolData( TARGETING::TargetHandle_t i_mba, const CenRank & i_rank,
- const MemUtils::MaintSymbols & i_symData,
- STEP_CODE_DATA_STRUCT & io_sc,
- PRDpriority i_priority = MRU_MED );
-
-/**
- * @param i_mba The target MBA.
- * @param i_rank The target rank.
- * @return A list of DIMMs connected to the MBA and rank.
- */
-TARGETING::TargetHandleList getConnectedDimms( TARGETING::TargetHandle_t i_mba,
- const CenRank & i_rank );
-
-/**
- * @param i_mba The target MBA.
- * @return A list of DIMMs connected to the MBA.
- */
-TARGETING::TargetHandleList getConnectedDimms(TARGETING::TargetHandle_t i_mba);
-
-/**
- * @param i_mba The target MBA.
- * @param i_rank The target rank.
- * @param i_port MBA port.
- * @return A list of DIMMs connected to the MBA and rank on a port.
- */
-TARGETING::TargetHandleList getConnectedDimms( TARGETING::TargetHandle_t i_mba,
- const CenRank & i_rank,
- uint8_t i_port );
-
-/**
- * @param i_mba The target MBA.
- * @param i_port MBA port.
- * @return A list of DIMMs connected to the MBA on given port.
- */
-TARGETING::TargetHandleList getConnectedDimms( TARGETING::TargetHandle_t i_mba,
- uint8_t i_port );
-
-/**
- * @brief Will return the bus endpoint targets based in the given information.
- *
- * Supported configurations:
- * i_chip i_busType i_busPos o_rxTrgt o_txTrgt
- * ------ ----------- -------- ------------- -------------
- * PROC TYPE_ABUS 0-2 ABUS target ABUS target
- * PROC TYPE_XBUS 0-3 XBUS target XBUS target
- * PROC TYPE_MCS 0-7 MCS target MEMBUF target
- * MCS n/a n/a MCS target MEMBUF target
- * MEMBUF n/a n/a MEMBUF target MCS target
- *
- * @param i_chip Chip or unit on the RX side of the bus.
- * @param o_rxTrgt The RX target, NULL on failure.
- * @param o_txTrgt The TX target, NULL on failure.
- * @param i_busType Bus type.
- * @param i_busPos Bus position.
- * @return Non-SUCCESS if an internal function fails. SUCCESS otherwise.
- *
- */
-int32_t getBusEndpoints( ExtensibleChip * i_chip,
- TARGETING::TargetHandle_t & o_rxTrgt,
- TARGETING::TargetHandle_t & o_txTrgt,
- TARGETING::TYPE i_busType = TARGETING::TYPE_NA,
- uint32_t i_busPos = 0 );
-
-/**
- * @brief Will add target bus interface endpoints and all parts in between the
- * endpoints to the global error log in RasServices.
- * @param i_rxTrgt The RX target.
- * @param i_txTrgt The TX target.
- * @param i_priority Callout priority (default MRU_LOW).
- * @return Non-SUCCESS if an internal function fails. SUCCESS otherwise.
- */
-int32_t calloutBusInterface( TARGETING::TargetHandle_t i_rxTrgt,
- TARGETING::TargetHandle_t i_txTrgt,
- PRDpriority i_priority = MRU_LOW );
-
-/**
- * @brief Will add target bus interface endpoints and all parts in between the
- * endpoints to the global error log in RasServices.
- * @note See function getBusEndpoints() for parameter rules.
- * @param i_chip Chip or unit on the RX side of the bus.
- * @param i_priority Callout priority (default MRU_LOW).
- * @param i_busType Bus type.
- * @param i_busPos Bus position.
- * @return Non-SUCCESS if an internal function fails. SUCCESS otherwise.
- */
-int32_t calloutBusInterface( ExtensibleChip * i_chip,
- PRDpriority i_priority = MRU_LOW,
- TARGETING::TYPE i_busType = TARGETING::TYPE_NA,
- uint32_t i_busPos = 0 );
-
-} // end namespace CalloutUtil
-
-} // end namespace PRDF
-
-#endif // prdfCalloutUtil_H
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C
deleted file mode 100644
index fb9ef7cba..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C
+++ /dev/null
@@ -1,461 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
-/* [+] 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 prdfCenDqBitmap.C */
-
-#include <prdfCenDqBitmap.H>
-
-#include <UtilHash.H>
-#include <iipServiceDataCollector.h>
-#include <prdfParserUtils.H>
-
-namespace PRDF
-{
-
-using namespace PlatServices;
-using namespace PARSERUTILS;
-using namespace fapi; // for spare dram config
-
-bool CenDqBitmap::badDqs() const
-{
- bool o_badDqs = false;
-
- for ( uint32_t i = 0; i < MBA_DIMMS_PER_RANK; i++ )
- {
- for ( uint32_t j = 0; j < DIMM_DQ_RANK_BITMAP_SIZE; j++ )
- {
- if ( 0 != iv_data[i][j] )
- {
- o_badDqs = true;
- break;
- }
- }
- if ( o_badDqs ) break;
- }
-
- return o_badDqs;
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::badDqs( uint8_t i_portSlct, bool & o_badDqs ) const
-{
- #define PRDF_FUNC "[CenDqBitmap::badDqs] "
-
- int32_t o_rc = SUCCESS;
-
- o_badDqs = false;
-
- do
- {
- if ( MBA_DIMMS_PER_RANK <= i_portSlct )
- {
- PRDF_ERR( PRDF_FUNC "Invalid parameter: i_portSlct=%d", i_portSlct );
- o_rc = FAIL; break;
- }
-
- for ( uint32_t j = 0; j < DIMM_DQ_RANK_BITMAP_SIZE; j++ )
- {
- if ( 0 != iv_data[i_portSlct][j] )
- {
- o_badDqs = true;
- break;
- }
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::setDq( uint8_t i_dq, uint8_t i_portSlct )
-{
- #define PRDF_FUNC "[CenDqBitmap::setDq] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( DQS_PER_DIMM <= i_dq )
- {
- PRDF_ERR( PRDF_FUNC "Invalid parameter: i_dq=%d", i_dq );
- o_rc = FAIL; break;
- }
-
- if ( MBA_DIMMS_PER_RANK <= i_portSlct )
- {
- PRDF_ERR( PRDF_FUNC "Invalid parameter: i_portSlct=%d", i_portSlct );
- o_rc = FAIL; break;
- }
-
- uint8_t byteIdx = i_dq / DQS_PER_BYTE;
- uint8_t bitIdx = i_dq % DQS_PER_BYTE;
-
- uint32_t shift = (DQS_PER_BYTE-1) - bitIdx; // 0-7
- iv_data[i_portSlct][byteIdx] |= 0x01 << shift;
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::setSymbol( const CenSymbol & i_symbol, uint8_t i_pins )
-{
- #define PRDF_FUNC "[CenDqBitmap::setSymbol] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- uint8_t portSlct, byteIdx, bitIdx;
- o_rc = getPortByteBitIdx( i_symbol, portSlct, byteIdx, bitIdx );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getPortByteBitIdx() failed" );
- break;
- }
-
- i_pins &= 0x3; // limit to 2 bits
- uint32_t shift = (DQS_PER_BYTE-1) - bitIdx;
- shift = (shift / MBA_DQS_PER_SYMBOL) * MBA_DQS_PER_SYMBOL; // 0,2,4,6
- iv_data[portSlct][byteIdx] |= i_pins << shift;
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::setDram( const CenSymbol & i_symbol, uint8_t i_pins )
-{
- #define PRDF_FUNC "[CenDqBitmap::setDram] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- uint8_t portSlct, byteIdx, bitIdx;
- o_rc = getPortByteBitIdx( i_symbol, portSlct, byteIdx, bitIdx );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getPortByteBitIdx() failed" );
- break;
- }
-
- if ( iv_x4Dram )
- {
- i_pins &= 0xf; // limit to 4 bits
- uint32_t shift = (DQS_PER_BYTE-1) - bitIdx;
- shift = (shift / DQS_PER_NIBBLE) * DQS_PER_NIBBLE; // 0,4
- iv_data[portSlct][byteIdx] |= i_pins << shift;
- }
- else
- {
- i_pins &= 0xff; // limit to 8 bits
- iv_data[portSlct][byteIdx] |= i_pins;
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::isChipMark( const CenSymbol & i_symbol, bool & o_cm )
-{
- #define PRDF_FUNC "[CenDqBitmap::isChipMark] "
-
- int32_t o_rc = SUCCESS;
- o_cm = false;
-
- do
- {
- uint8_t portSlct, byteIdx, bitIdx;
- o_rc = getPortByteBitIdx( i_symbol, portSlct, byteIdx, bitIdx );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getPortByteBitIdx() failed" );
- break;
- }
-
- // When PRD marks a DRAM as 'bad', it will set all bits on the DRAM in
- // VPD. Due to a bug in DRAM init training, the training procedure will
- // change the VPD to 0xee (x8) or 0xe (x4). Therefore, PRD will need to
- // compare against the value the procedure sets in order to confirm a
- // chip mark has been verified on this DRAM.
-
- uint8_t pinMsk = 0xee;
- uint8_t cmData = iv_data[portSlct][byteIdx];
-
- if ( iv_x4Dram )
- {
- pinMsk = 0xe; // limit to 4 bits
- uint32_t shift = (DQS_PER_BYTE-1) - bitIdx;
- shift = (shift / DQS_PER_NIBBLE) * DQS_PER_NIBBLE; // 0,4
- cmData = (cmData >> shift) & 0xf;
- }
-
- o_cm = ( (cmData & pinMsk) == pinMsk );
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::setDramSpare( uint8_t i_portSlct, uint8_t i_pins )
-{
- #define PRDF_FUNC "[CenDqBitmap::setDramSpare] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( MBA_DIMMS_PER_RANK <= i_portSlct )
- {
- PRDF_ERR( PRDF_FUNC "Invalid parameter: i_portSlct=%d", i_portSlct );
- o_rc = FAIL; break;
- }
-
- uint8_t spareConfig = ENUM_ATTR_VPD_DIMM_SPARE_NO_SPARE;
- o_rc = getDimmSpareConfig( iv_mba , iv_rank, i_portSlct,
- spareConfig );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getDimmSpareConfig() failed" );
- o_rc = FAIL; break;
- }
-
- if ( ENUM_ATTR_VPD_DIMM_SPARE_NO_SPARE == spareConfig )
- {
- PRDF_ERR( PRDF_FUNC "DRAM Spare is not avaiable" );
- o_rc = FAIL; break;
- }
-
- if ( iv_x4Dram )
- {
- i_pins &= 0xf; // limit to 4 bits
-
- if ( ENUM_ATTR_VPD_DIMM_SPARE_LOW_NIBBLE == spareConfig )
- {
- i_pins = i_pins << DQS_PER_NIBBLE;
- }
- iv_data[i_portSlct][DRAM_SPARE_BYTE] |= i_pins;
- }
- else
- {
- i_pins &= 0xff; // limit to 8 bits
- iv_data[i_portSlct][DRAM_SPARE_BYTE] |= i_pins;
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::setEccSpare( uint8_t i_pins )
-{
-
- #define PRDF_FUNC "[CenDqBitmap::setEccSpare] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( !iv_x4Dram )
- {
- PRDF_ERR( PRDF_FUNC "MBA 0x %08x does not support x4 ECC spare",
- getHuid(iv_mba) );
- o_rc = FAIL; break;
- }
-
- i_pins &= 0xf; // limit to 4 bits
- iv_data[ECC_SPARE_PORT][ECC_SPARE_BYTE] |= i_pins;
-
- } while( 0 );
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::isSpareAvailable( uint8_t i_portSlct,
- bool & o_dramSpare, bool & o_eccSpare )
-{
- #define PRDF_FUNC "[CenDqBitmap::isDramSpareAvailable] "
-
- int32_t o_rc = SUCCESS;
-
- o_dramSpare = false;
- o_eccSpare = false;
-
- do
- {
- if ( MBA_DIMMS_PER_RANK <= i_portSlct )
- {
- PRDF_ERR( PRDF_FUNC "Invalid parameter: i_portSlct=%d", i_portSlct );
- o_rc = FAIL; break;
- }
-
- uint8_t spareConfig = ENUM_ATTR_VPD_DIMM_SPARE_NO_SPARE;
- o_rc = getDimmSpareConfig( iv_mba , iv_rank, i_portSlct,
- spareConfig );
- if( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getDimmSpareConfig() failed" );
- break;
- }
-
- uint8_t spareDqBits = iv_data[i_portSlct][DRAM_SPARE_BYTE];
-
- if ( iv_x4Dram )
- {
- // Check for DRAM spare
- if ( ENUM_ATTR_VPD_DIMM_SPARE_LOW_NIBBLE == spareConfig )
- {
- o_dramSpare = ( 0 == ( spareDqBits & 0xf0 ) );
- }
- else if ( ENUM_ATTR_VPD_DIMM_SPARE_HIGH_NIBBLE == spareConfig )
- {
- o_dramSpare = ( 0 == ( spareDqBits & 0x0f ) );
- }
-
- // Check for ECC spare
- uint8_t eccDqBits = iv_data[ECC_SPARE_PORT][ECC_SPARE_BYTE];
- o_eccSpare = ( 0 == (eccDqBits & 0x0f) );
- }
- else
- {
- if ( ENUM_ATTR_VPD_DIMM_SPARE_NO_SPARE == spareConfig )
- {
- // spare is not available.
- o_dramSpare = false;
- }
- else
- o_dramSpare = ( 0 == spareDqBits );
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-void CenDqBitmap::getCaptureData( CaptureData & o_cd ) const
-{
- uint8_t rank = iv_rank.getMaster();
- size_t sz_rank = sizeof(rank);
-
- size_t sz_capData = sz_rank + sizeof(iv_data);
-
- // Adjust the size for endianness.
- const size_t sz_word = sizeof(CPU_WORD);
- sz_capData = ((sz_capData + sz_word-1) / sz_word) * sz_word;
-
- uint8_t capData[sz_capData];
- memset( capData, 0x00, sz_capData );
-
- capData[0] = rank;
- memcpy( &capData[1], iv_data, sizeof(iv_data) );
-
- // Fix endianness issues with non PPC machines.
- for ( uint32_t i = 0; i < (sz_capData/sz_word); i++ )
- ((CPU_WORD*)capData)[i] = htonl(((CPU_WORD*)capData)[i]);
-
- BitString bs ( sz_capData*8, (CPU_WORD *) &capData );
- o_cd.Add( iv_mba, Util::hashString("BAD_DQ_BITMAP"), bs );
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenDqBitmap::getPortByteBitIdx( const CenSymbol & i_symbol,
- uint8_t & o_portSlct,
- uint8_t & o_byteIdx,
- uint8_t & o_bitIdx ) const
-{
- #define PRDF_FUNC "[CenDqBitmap::getPortByteBitIdx] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( !i_symbol.isValid() )
- {
- PRDF_ERR( PRDF_FUNC "i_symbol is invalid" );
- o_rc = FAIL; break;
- }
-
- o_portSlct = i_symbol.getPortSlct();
- o_byteIdx = i_symbol.getEvenDq() / DQS_PER_BYTE;
- o_bitIdx = i_symbol.getEvenDq() % DQS_PER_BYTE;
-
- if ( i_symbol.isDramSpared() )
- {
- o_byteIdx = DRAM_SPARE_BYTE;
- }
- else if ( i_symbol.isEccSpared() )
- {
- o_portSlct = ECC_SPARE_PORT;
- o_byteIdx = ECC_SPARE_BYTE;
-
- // x4 ECC spare is the second nibble of the byte.
- o_bitIdx = (o_bitIdx % DQS_PER_NIBBLE) + DQS_PER_NIBBLE;
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-} // end namespace PRDF
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H
deleted file mode 100644
index 71fa02b80..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H
+++ /dev/null
@@ -1,195 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,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 prdfCenDqBitmap.H */
-
-#ifndef __prdfCenDqBitmap_H
-#define __prdfCenDqBitmap_H
-
-#include <prdfPlatServices.H>
-
-#include <prdfCenAddress.H>
-#include <prdfMemConst.H>
-
-namespace PRDF
-{
-
-class CaptureData;
-
-/**
- * @brief Container for DIMM's Centaur DQ bitmap.
- */
-class CenDqBitmap
-{
- private: // enums, constants
-
- enum
- {
- DRAM_SPARE_BYTE = 9, // Same byte for both ports.
-
- ECC_SPARE_BYTE = 8, // ECC spare is on second nibble of this byte.
- ECC_SPARE_PORT = 1, // Only on port 1.
- };
-
- public: // constructors
-
- /** @brief Default constructor */
- CenDqBitmap()
- {
- memset( iv_data, 0x00, sizeof(iv_data) );
- }
-
- /** @brief Constructor from components */
- CenDqBitmap( TARGETING::TargetHandle_t i_mba, const CenRank & i_rank,
- const uint8_t (&i_d)[MBA_DIMMS_PER_RANK][DIMM_DQ_RANK_BITMAP_SIZE] ) :
- iv_mba(i_mba), iv_rank(i_rank),
- iv_x4Dram(PlatServices::isDramWidthX4(i_mba))
- {
- memcpy( iv_data, i_d, sizeof(iv_data) );
- }
-
- public: // functions
-
- /**
- * @brief Queries if there are any bad DQs present on either port.
- * @return TRUE if any bad DQs present.
- */
- bool badDqs() const;
-
- /**
- * @brief Queries the given port to determine if there are any bad DQs
- * present.
- * @param i_portSlct The target port.
- * @param o_badDqs TRUE if there are bad DQS present the given port,
- * FALSE otherwise.
- * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
- */
- int32_t badDqs( uint8_t i_portSlct, bool & o_badDqs ) const;
-
- /**
- * @brief Sets the specified Centaur DQ.
- * @param i_dq The target Centaur DQ.
- * @param i_portSlct The target port.
- * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
- */
- int32_t setDq( uint8_t i_dq, uint8_t i_portSlct );
-
- /**
- * @brief Sets the specified symbol.
- * @note Will adjust for DRAM or ECC spares, if applicable.
- * @param i_symbol The target symbol.
- * @param i_pins Optional 2-bit value of the symbol's pins. The default
- * is to set both pins.
- * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
- */
- int32_t setSymbol( const CenSymbol & i_symbol, uint8_t i_pins = 0x3 );
-
- /**
- * @brief Sets the specified DRAM.
- * @note Will adjust for DRAM or ECC spares, if applicable.
- * @param i_symbol A symbol on the target DRAM.
- * @param i_pins Optional 8-bit (x8 mode) or 4-bit (x4 mode) value of the
- * DRAM's pins. The default is to set all pins.
- * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
- */
- int32_t setDram( const CenSymbol & i_symbol, uint8_t i_pins = 0xff );
-
- /**
- * @brief Checks if chip mark is present on specified DRAM.
- * @note Will adjust for DRAM or ECC spares, if applicable.
- * @param i_symbol A symbol on the target DRAM.
- * @param o_cm True if chip mark is present false otherwise.
- * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
- */
- int32_t isChipMark( const CenSymbol & i_symbol, bool & o_cm );
-
- /**
- * @brief Sets the DRAM spare on the specified port.
- * @param i_portSlct The target port.
- * @param i_pins Optional 8-bit (x8 mode) or 4-bit (x4 mode) value of
- * the DRAM's pins. The default is to set all pins.
- * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
- */
- int32_t setDramSpare( uint8_t i_portSlct, uint8_t i_pins = 0xff );
-
- /**
- * @brief Sets the ECC spare on the specified port (x4 mode only).
- * @param i_pins Optional 4-bit value of the DRAM's pins.
- * The default is to set all pins.
- * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
- */
- int32_t setEccSpare( uint8_t i_pins = 0xf );
-
- /**
- * @brief Queries for DRAM spare status.
- * @param i_portSlct The target port.
- * @param o_dramSpare TRUE if the DRAM spare is available, FALSE otherwise.
- * @param o_eccSpare TRUE if the ECC spare is available, FALSE otherwise.
- * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
- */
- int32_t isSpareAvailable( uint8_t i_portSlct,
- bool & o_dramSpare, bool & o_eccSpare );
-
- /**
- * @brief Adds the bitmaps for both ports to the capture data.
- * @param o_cd Capture data struct.
- */
- void getCaptureData( CaptureData & o_cd ) const;
-
- /** @return A reference to the data array. */
- const uint8_t (&getData()const)[MBA_DIMMS_PER_RANK][DIMM_DQ_RANK_BITMAP_SIZE]
- {
- return iv_data;
- }
-
- public: // functions
-
- /**
- * @brief Support function to calculate the port select, byte index, and
- * bit index based on the given symbol.
- * @note Will adjust the indexes for DRAM or ECC spares, if applicable.
- * @param i_symbol The target symbol.
- * @param o_portSlct The port select (0-1).
- * @param o_byteIdx The byte index of the symbol (0-9).
- * @param o_bitIdx The bit index of the symbol (0,2,4,6).
- * @return Non-SUCCESS if the symbol is invalid, SUCCESS otherwise.
- */
- int32_t getPortByteBitIdx( const CenSymbol & i_symbol, uint8_t & o_portSlct,
- uint8_t & o_byteIdx, uint8_t & o_bitIdx ) const;
-
- private: // instance variables
-
- TARGETING::TargetHandle_t iv_mba; ///< Target MBA
- CenRank iv_rank; ///< Target rank
- bool iv_x4Dram; ///< TRUE if iv_mba uses x4 DRAMs
-
- /** A bitmap of all bad DQs for each port. */
- uint8_t iv_data[MBA_DIMMS_PER_RANK][DIMM_DQ_RANK_BITMAP_SIZE];
-};
-
-} // end namespace PRDF
-
-#endif // __prdfCenDqBitmap_H
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMarkstore.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMarkstore.H
deleted file mode 100644
index 1649c44d9..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMarkstore.H
+++ /dev/null
@@ -1,94 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMarkstore.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,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 */
-
-#ifndef prdfCenMarkstore_H
-#define prdfCenMarkstore_H
-
-/** @file prdfCenMarkstore.H */
-
-#include <prdfCenAddress.H>
-#include <prdfMemConst.H>
-#include <prdfCenSymbol.H>
-#include <prdfTargetFwdRef.H>
-
-//##############################################################################
-// class CenMark
-//##############################################################################
-
-namespace PRDF
-{
-
-/**
- * @brief Container for a memory symbol and chip mark.
- * @note When reading and writing markstore the symbol and chip marks are set
- * or returned as a pair. This is a simple container to keep the two
- * marks bundled.
- */
-class CenMark
-{
- public: // constructors
-
- /** @brief Default constructor */
- CenMark() :
- iv_symbolMark(), iv_chipMark()
- {}
-
- /** @brief Constructor from components */
- CenMark( const CenSymbol & i_symbolMark, const CenSymbol & i_chipMark ) :
- iv_symbolMark(i_symbolMark), iv_chipMark(i_chipMark)
- {}
-
- public: // functions
-
- /** @return A symbol representing the symbol mark. */
- CenSymbol getSM() const { return iv_symbolMark; }
-
- /** @return A symbol representing the chip mark. */
- CenSymbol getCM() const { return iv_chipMark; }
-
- /** @brief Sets the symbol mark to the given symbol. */
- void setSM( const CenSymbol & i_symbolMark )
- { iv_symbolMark = i_symbolMark; }
-
- /** @brief Sets the chip mark to the given symbol. */
- void setCM( const CenSymbol & i_chipMark ) { iv_chipMark = i_chipMark; }
-
- /** @brief Sets the symbol mark to an invalid symbol. */
- void clearSM() { iv_symbolMark = CenSymbol(); }
-
- /** @brief Sets the chip mark to an invalid symbol. */
- void clearCM() { iv_chipMark = CenSymbol(); }
-
- private: // instance variables
-
- CenSymbol iv_symbolMark; ///< A symbol representing the symbol mark.
- CenSymbol iv_chipMark; ///< A symbol representing the chip mark.
-
-};
-
-} // end namespace PRDF
-
-#endif // prdfCenMarkstore_H
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.C
deleted file mode 100644
index de15a9436..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.C
+++ /dev/null
@@ -1,364 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2018 */
-/* [+] 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 prdfCenMbaCaptureData.C
- * @brief Utility Functions to capture MBA data
- */
-
-#include <prdfCenMbaCaptureData.H>
-
-// Framwork includes
-#include <iipServiceDataCollector.h>
-#include <prdfDramRepairUsrData.H>
-#include <prdfErrlUtil.H>
-#include <prdfExtensibleChip.H>
-#include <prdfRasServices.H>
-#include <utilmem.H>
-#include <UtilHash.H>
-
-// Pegasus includes
-#include <prdfCenDqBitmap.H>
-#include <prdfCenMarkstore.H>
-#include <prdfCenMbaDataBundle.H>
-#include <prdfCenMembufDataBundle.H>
-
-using namespace TARGETING;
-
-namespace PRDF
-{
-
-using namespace PlatServices;
-
-namespace CenMbaCaptureData
-{
-
-//------------------------------------------------------------------------------
-
-void addEccData( TargetHandle_t i_mbaTrgt, errlHndl_t io_errl )
-{
- CaptureData cd;
-
- // Add DRAM repairs data from hardware.
- captureDramRepairsData( i_mbaTrgt, cd );
-
- // Add DRAM repairs data from VPD.
- captureDramRepairsVpd( i_mbaTrgt, cd );
-
- ErrDataService::AddCapData( cd, io_errl );
-}
-
-//------------------------------------------------------------------------------
-
-void captureDramRepairsData( TARGETING::TargetHandle_t i_mbaTrgt,
- CaptureData & io_cd )
-{
- #define PRDF_FUNC "[CenMbaCaptureData::captureDramRepairsData] "
- using namespace fapi; // for spare config
-
- int32_t rc = SUCCESS;
- DramRepairMbaData mbaData;
-
- mbaData.header.isSpareDram = false;
- std::vector<CenRank> masterRanks;
-
- do
- {
- rc = getMasterRanks( i_mbaTrgt, masterRanks );
- if ( SUCCESS != rc )
- {
- PRDF_ERR( PRDF_FUNC "getMasterRanks() failed" );
- break;
- }
- if( masterRanks.empty() )
- {
- PRDF_ERR( PRDF_FUNC "Master Rank list size is 0");
- break;;
- }
- uint8_t spareConfig = ENUM_ATTR_VPD_DIMM_SPARE_NO_SPARE;
- // check for spare DRAM. Port does not matter.
- // Also this configuration is same for all ranks on MBA.
- rc = getDimmSpareConfig( i_mbaTrgt, masterRanks[0], 0, spareConfig );
- if( SUCCESS != rc )
- {
- PRDF_ERR( PRDF_FUNC "getDimmSpareConfig() failed" );
- break;
- }
-
- if( ENUM_ATTR_VPD_DIMM_SPARE_NO_SPARE != spareConfig )
- mbaData.header.isSpareDram = true;
-
- // Iterate all ranks to get DRAM repair data
- for ( std::vector<CenRank>::iterator it = masterRanks.begin();
- it != masterRanks.end(); it++ )
- {
- // Get chip/symbol marks
- CenMark mark;
- rc = mssGetMarkStore( i_mbaTrgt, *it, mark );
- if ( SUCCESS != rc )
- {
- PRDF_ERR( PRDF_FUNC "mssGetMarkStore() Failed");
- continue;
- }
-
- // Get DRAM spares
- CenSymbol sp0, sp1, ecc;
- rc = mssGetSteerMux( i_mbaTrgt, *it, sp0, sp1, ecc );
- if ( SUCCESS != rc )
- {
- PRDF_ERR( PRDF_FUNC "mssGetSteerMux() failed");
- continue;
- }
-
- // Add data
- DramRepairRankData rankData = { (*it).getMaster(),
- mark.getCM().getSymbol(),
- mark.getSM().getSymbol(),
- sp0.getSymbol(),
- sp1.getSymbol(),
- ecc.getSymbol() };
- if ( rankData.valid() )
- {
- mbaData.rankDataList.push_back(rankData);
- }
- }
- // If MBA had some DRAM repair data, add header information
- if( mbaData.rankDataList.size() > 0 )
- {
- mbaData.header.rankCount = mbaData.rankDataList.size();
- mbaData.header.isX4Dram = isDramWidthX4( i_mbaTrgt );
- UtilMem dramStream;
- dramStream << mbaData;
-
- #ifndef PPC
- // Fix endianness issues with non PPC machines.
- // This is a workaround. Though UtilMem takes care of endianness,
- // It seems with capture data its not working
- const size_t sz_word = sizeof(uint32_t);
-
- // Align data with 32 bit boundary
- for (uint32_t i = 0; i < ( dramStream.size()%sz_word ); i++)
- {
- uint8_t dummy = 0;
- dramStream << dummy;
- }
- for ( uint32_t i = 0; i < ( dramStream.size()/sz_word); i++ )
- {
- ((uint32_t*)dramStream.base())[i] =
- htonl(((uint32_t*)dramStream.base())[i]);
- }
- #endif
-
- // Allocate space for the capture data.
- BitString dramRepairData ( ( dramStream.size() )*8,
- (CPU_WORD *) dramStream.base() );
- io_cd.Add( i_mbaTrgt, Util::hashString("DRAM_REPAIRS_DATA"),
- dramRepairData );
- }
- }while(0);
-
- if( FAIL == rc )
- PRDF_ERR( PRDF_FUNC "Failed for MBA 0x%08X", getHuid( i_mbaTrgt ) );
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-void captureDramRepairsVpd( TargetHandle_t i_mbaTrgt, CaptureData & io_cd )
-{
- #define PRDF_FUNC "[captureDramRepairsVpd] "
-
- // Get the maximum capture data size.
- static const size_t sz_rank = sizeof(uint8_t);
- static const size_t sz_entry = MBA_DIMMS_PER_RANK * DIMM_DQ_RANK_BITMAP_SIZE;
- static const size_t sz_word = sizeof(CPU_WORD);
- int32_t rc = SUCCESS;
-
- do
- {
- std::vector<CenRank> masterRanks;
- rc = getMasterRanks( i_mbaTrgt, masterRanks );
- if ( SUCCESS != rc )
- {
- PRDF_ERR( PRDF_FUNC "getMasterRanks() failed" );
- break;
- }
-
- if( masterRanks.empty() )
- {
- PRDF_ERR( PRDF_FUNC "Master Rank list size is 0");
- break;
- }
-
- // Get the maximum capture data size.
- size_t sz_maxData = masterRanks.size() * (sz_rank + sz_entry);
-
- // Adjust the size for endianness.
- sz_maxData = ((sz_maxData + sz_word-1) / sz_word) * sz_word;
-
- // Initialize to 0.
- uint8_t capData[sz_maxData];
- memset( capData, 0x00, sz_maxData );
-
- // Iterate all ranks to get VPD data
- uint32_t idx = 0;
- for ( std::vector<CenRank>::iterator it = masterRanks.begin();
- it != masterRanks.end(); it++ )
- {
- CenDqBitmap bitmap;
- uint8_t rank = it->getMaster();
-
- if ( SUCCESS != getBadDqBitmap(i_mbaTrgt, *it, bitmap, true) )
- {
- PRDF_ERR( PRDF_FUNC "getBadDqBitmap() failed: MBA=0x%08x"
- " rank=%d", getHuid(i_mbaTrgt), rank );
- continue; // skip this rank
- }
-
- if ( bitmap.badDqs() ) // make sure the data is non-zero
- {
- // Add the rank, then the entry data.
- capData[idx] = rank; idx += sz_rank;
- memcpy(&capData[idx], bitmap.getData(), sz_entry);
- idx += sz_entry;
- }
- }
-
- if( 0 == idx ) break; // Nothing to capture
-
- // Fix endianness issues with non PPC machines.
- size_t sz_capData = idx;
- sz_capData = ((sz_capData + sz_word-1) / sz_word) * sz_word;
- for ( uint32_t i = 0; i < (sz_capData/sz_word); i++ )
- ((CPU_WORD*)capData)[i] = htonl(((CPU_WORD*)capData)[i]);
-
- // Add data to capture data.
- BitString bs ( sz_capData*8, (CPU_WORD *) &capData );
- io_cd.Add( i_mbaTrgt, Util::hashString("DRAM_REPAIRS_VPD"), bs );
-
- }while(0);
-
- if( FAIL == rc )
- PRDF_ERR( PRDF_FUNC "Failed for MBA 0x%08X", getHuid( i_mbaTrgt ) );
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-void addExtMemMruData( const MemoryMru & i_memMru, errlHndl_t io_errl )
-{
- #define PRDF_FUNC "[addExtMemMruData] "
-
- MemoryMruData::ExtendedData extMemMru ( i_memMru.toUint32() );
-
- do
- {
- int32_t l_rc = SUCCESS;
-
- TargetHandle_t mbaTrgt = i_memMru.getMbaTrgt();
-
- // Get the DRAM width.
- extMemMru.isX4Dram = isDramWidthX4( mbaTrgt ) ? 1 : 0;
-
- // Get the DIMM type.
- bool isBufDimm = isMembufOnDimm<TYPE_MBA>( mbaTrgt );
- extMemMru.isBufDimm = isBufDimm ? 1 : 0;
-
- if ( isBufDimm )
- {
- // Get the raw card type (CDIMMS only).
- CEN_SYMBOL::WiringType cardType = CEN_SYMBOL::WIRING_INVALID;
- l_rc = getMemBufRawCardType( mbaTrgt, cardType );
- if ( SUCCESS != l_rc )
- {
- PRDF_ERR( PRDF_FUNC "getMemBufRawCardType() failed. MBA:0x%08x",
- getHuid(mbaTrgt) );
- break;
- }
- extMemMru.cardType = cardType;
- }
- else
- {
- // Get the 80-byte DQ map (ISDIMMS only). This is only needed if
- // the MemoryMru contains a single DIMM callout with a valid symbol.
- if ( i_memMru.getSymbol().isValid() )
- {
- TargetHandleList partList = i_memMru.getCalloutList();
- if ( 1 != partList.size() ||
- TYPE_DIMM != getTargetType(partList[0]) )
- {
- PRDF_ERR( PRDF_FUNC "Symbol is valid but callout is not a "
- "single DIMM." );
- break;
- }
-
- errlHndl_t l_errl = getFapiDimmDqAttr( partList[0],
- &(extMemMru.dqMapping[0]) );
- if ( NULL != l_errl )
- {
- PRDF_ERR( PRDF_FUNC "getFapiDimmDqAttr() failed. "
- "DIMM:0x%08x", getHuid(partList[0]) );
- PRDF_COMMIT_ERRL( l_errl, ERRL_ACTION_REPORT );
- break;
- }
- }
- }
-
- // If we reach this point, nothing failed and the data is valid.
- extMemMru.isValid = 1;
-
- } while (0);
-
- size_t sz_buf = sizeof(extMemMru);
- uint8_t buf[sz_buf]; memset( buf, 0x00, sz_buf );
-
- buf[0] = (extMemMru.mmMeld.u >> 24) & 0xff;
- buf[1] = (extMemMru.mmMeld.u >> 16) & 0xff;
- buf[2] = (extMemMru.mmMeld.u >> 8) & 0xff;
- buf[3] = extMemMru.mmMeld.u & 0xff;
-
- buf[4] = extMemMru.cardType;
-
- buf[5] = extMemMru.isBufDimm << 7 |
- extMemMru.isX4Dram << 6 |
- extMemMru.isValid << 5;
-
- memcpy( &buf[8], &extMemMru.dqMapping[0], sizeof(extMemMru.dqMapping) );
-
- // Add the extended MemoryMru to the error log.
- PRDF_ADD_FFDC( io_errl, buf, sz_buf, ErrlVer1, ErrlMruData );
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-} //end namespace MbaCaptureData
-
-} // end namespace PRDF
-
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.H
deleted file mode 100644
index 51a0dfe2b..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.H
+++ /dev/null
@@ -1,97 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2018 */
-/* [+] 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 PRDF_CEN_MBA_CAPTURE_DATA_H
-#define PRDF_CEN_MBA_CAPTURE_DATA_H
-
-/**
- * @file prdfCenfMbaCaptureData.H
- * @brief Header File for utility functions to capture MBA related data.
- */
-
-#include <targeting/common/targetservice.H>
-#include <iipCaptureData.h>
-#include <errlentry.H>
-#include <prdfMemoryMru.H>
-
-namespace PRDF
-{
-
-class ExtensibleChip;
-struct STEP_CODE_DATA_STRUCT;
-
-namespace CenMbaCaptureData
-{
-
-/**
- * @brief Adds Memory ECC FFDC to an error log.
- * @note This is intended to be used in non-normal analysis paths that do not
- * have an SDC (i.e. Restore DRAM Repairs, IPL MNFG CE Isolation).
- * @note The data will be limited and include things like the DRAM Repairs data
- * but will not include stuff like the CE/UE tables, because that
- * information is not relevant during its intended uses.
- * @param i_mbaTrgt An MBA target
- * @param o_errl Error log.
- */
-void addEccData( TARGETING::TargetHandle_t i_mbaTrgt, errlHndl_t io_errl );
-
-/**
- * @brief Queries hardware for all DRAM repairs data (chip/symbol marks, DRAM
- * spare, etc.) for the given MBA and added it to the capture data.
- * @param i_mbaTrgt An MBA target.
- * @param io_cd Capture data struct.
- * @note This function will be used to capture DRAM repair data into
- * capture data struct. Other functions can call this function and
- * update error log.
- */
-void captureDramRepairsData( TARGETING::TargetHandle_t i_mbaTrgt,
- CaptureData & io_cd );
-
-/**
- * @brief Queries the Bad DQ attributes for the content of the DRAM repairs VPD
- * and add it to the capture data.
- * @param i_mbaTrgt An MBA target.
- * @param io_cd Capture data struct.
- * @note This function will be used to capture DRAM repair data into
- * capture data struct. Other functions can call this function and
- * update error log.
- */
-void captureDramRepairsVpd( TARGETING::TargetHandle_t i_mbaTrgt,
- CaptureData & io_cd );
-
-/**
- * @brief Adds a new user data section to the error log containing a MemoryMru
- * plus extended data for extra FFDC.
- * @param i_mbaTrgt An MBA target
- * @param io_errl Target error log.
- */
-void addExtMemMruData( const MemoryMru & i_memMru, errlHndl_t io_errl );
-
-} // end namespace MbaCaptureData
-
-} // end namespace PRDF
-
-#endif // PRDF_CEN_MBA_CAPTURE_DATA_H
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C
deleted file mode 100755
index b8a4d5ef0..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C
+++ /dev/null
@@ -1,880 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
-/* [+] 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 */
-
-#include <prdfCenMbaTdCtlr_rt.H>
-
-// Framework includes
-#include <iipconst.h>
-#include <prdfGlobal.H>
-#include <prdfTrace.H>
-#include <prdfExtensibleChip.H>
-#include <prdfPlatServices.H>
-#include <UtilHash.H>
-#include <prdfRegisterCache.H>
-
-#ifndef __HOSTBOOT_RUNTIME
- #include <prdfSdcFileControl.H>
-#endif
-
-// Pegasus includes
-#include <prdfCenAddress.H>
-#include <prdfCenDqBitmap.H>
-#include <prdfCenMbaDataBundle.H>
-#include <prdfCenMbaExtraSig.H>
-#include <prdfCalloutUtil.H>
-#include <prdfCenMemUtils.H>
-#include <prdfCenMbaThresholds.H>
-#include <prdfCenMbaDynMemDealloc_rt.H>
-
-using namespace TARGETING;
-
-namespace PRDF
-{
-
-using namespace CalloutUtil;
-using namespace PlatServices;
-using namespace MemUtils;
-
-//------------------------------------------------------------------------------
-// Class Variables
-//------------------------------------------------------------------------------
-
-CenMbaTdCtlr::FUNCS CenMbaTdCtlr::cv_cmdCompleteFuncs[] =
-{
- &CenMbaTdCtlr::analyzeCmdComplete, // NO_OP
- &CenMbaTdCtlr::analyzeVcmPhase1, // VCM_PHASE_1
- &CenMbaTdCtlr::analyzeVcmPhase2, // VCM_PHASE_2
- &CenMbaTdCtlr::analyzeDsdPhase1, // DSD_PHASE_1
- NULL, // DSD_PHASE_2
- &CenMbaTdCtlr::analyzeTpsPhase1, // TPS_PHASE_1
- NULL, // TPS_PHASE_2
-};
-
-//------------------------------------------------------------------------------
-// Private Functions
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::analyzeTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::analyzeTpsPhase1] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( TPS_PHASE_1 != iv_tdState )
- {
- PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
- o_rc = FAIL; break;
- }
-
- // Get the current marks in hardware (initialize iv_mark).
- o_rc = mssGetMarkStore( iv_mbaTrgt, iv_rank, iv_mark );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "mssGetMarkStore() failed." );
- break;
- }
-
- const bool reachedEndAddr = ( i_stopAddr == i_endAddr );
-
- // Check for any ECC errors that occurred during the procedure.
- uint16_t eccErrorMask = NO_ERROR;
- o_rc = checkEccErrors( eccErrorMask, io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "checkEccErrors() failed" );
- break;
- }
-
- // The order of the following checks is important. Each call to handle
- // an error will set the PRD signature and override the previous
- // signature. We want the highest priority error signature (memory UEs)
- // to be displayed so these checks should be ordered from lowest to
- // highest priority.
-
- if ( eccErrorMask & MPE )
- {
- // Only error that will not potentially produce a predictive error,
- // so lowest priority.
-
- o_rc = handleMpe_Tps( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "handleMpe_Tps() failed" );
- break;
- }
-
- // Abort this procedure and the do the VCM procedure.
- iv_tdState = NO_OP;
- break;
- }
-
- // The hardware thresholds are intentionally set to the max value for
- // stop on error conditions in the middle of the scrub. Therefore, we
- // must check the per symbol counters for threshold regardless of any
- // CTE attentions if the scrub has reached the end of the rank.
- // Otherwise, check the per symbol counters only of a CTE attention is
- // raised somewhere in the middle of the scrub.
- bool ceTypeTh = iv_tpsRankData.checkCeTypeTh(iv_rank);
- if ( ( reachedEndAddr ) ||
- ( !ceTypeTh && (eccErrorMask & HARD_CTE ) ) ||
- ( ceTypeTh && ((eccErrorMask & SOFT_CTE ) ||
- (eccErrorMask & INTER_CTE) ||
- (eccErrorMask & HARD_CTE )) ) )
- {
- o_rc = handleCeEte_Tps( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "handleCeEte_Tps() failed" );
- break;
- }
- }
-
- if ( eccErrorMask & RETRY_CTE )
- {
- o_rc = handleRceEte_Td( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "handleRceEte_Td() failed" );
- break;
- }
- }
-
- if ( eccErrorMask & UE )
- {
- o_rc = handleUe_Td( io_sc, i_stopAddr, false ); // No TPS request.
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "handleUe_Td() failed" );
- break;
- }
- }
-
- // If the command had reached the end of the rank, handle any false
- // alarm conditions, if needed, and continue on to the next TD
- // procedure. Otherwise, resume the scrub starting on the next address.
- if ( reachedEndAddr )
- {
- // Handle false alarm conditions, if needed.
- if ( iv_tpsFalseAlarm )
- {
- o_rc = handleTpsFalseAlarm( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "handleTpsFalseAlarm() failed" );
- break;
- }
- }
-
- // This procedure is done. Reset the state machine and go onto the
- // next TD procedure.
- iv_tdState = NO_OP;
- break;
- }
-
- // Restart the scrub on the next address.
- o_rc = resumeScrub( io_sc, eccErrorMask );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "resumeScrub() failed" );
- break;
- }
-
- } while(0);
-
- // Callout the rank if no other callouts have been made.
- if ( 0 == io_sc.service_data->getMruListSize() )
- {
- MemoryMru memmru( iv_mbaTrgt, iv_rank,
- MemoryMruData::CALLOUT_RANK );
- io_sc.service_data->SetCallout( memmru );
- }
-
- // If this TD procedure was aborted, execute TD complete sequence.
- if ( (iv_tdState == NO_OP) && (SUCCESS == o_rc) )
- {
- o_rc = handleTdComplete( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "handleTdComplete() failed" );
- }
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::startTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc )
-{
- // Initially true, until hardware error is found.
- iv_tpsFalseAlarm = true;
-
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // moved to TpsEvent class
- //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- return SUCCESS;
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::handleUe_Td( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- bool i_addTpsRequest )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::handleUe_Td] "
-
- int32_t o_rc = SUCCESS;
-
- setTdSignature( io_sc, PRDFSIG_MaintUE );
-
- // Clear TPS false alarm flag.
- iv_tpsFalseAlarm = false;
-
- // Callout the rank
- MemoryMru memmru ( iv_mbaTrgt, iv_rank, MemoryMruData::CALLOUT_RANK );
- io_sc.service_data->SetCallout( memmru );
-
- // Make error log predictive
- io_sc.service_data->setServiceCall();
-
- do
- {
- // Add entry to UE table.
- if ( (TPS_PHASE_1 != iv_tdState) )
- {
- CenMbaDataBundle * mbadb = getMbaDataBundle( iv_mbaChip );
- mbadb->iv_ueTable.addEntry( UE_TABLE::SCRUB_UE, i_stopAddr );
-
- // Send lmb gard message to PHYP.
- o_rc = DEALLOC::lmbGard( iv_mbaChip, i_stopAddr, false );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "lmbGard() failed" );
- break;
- }
- }
-
- if ( i_addTpsRequest )
- {
- // Add a TPS request to the queue and ban any future TPS requests.
- o_rc = addTdQueueEntryTPS( i_stopAddr.getRank(), io_sc, true );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "addTdQueueEntryTPS() failed" );
- break;
- }
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::handleRceEte_Td( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::handleRceEte_Td] "
-
- int32_t o_rc = SUCCESS;
-
- setTdSignature( io_sc, PRDFSIG_MaintRETRY_CTE );
-
- // Clear TPS false alarm flag.
- iv_tpsFalseAlarm = false;
-
- // Callout the rank
- MemoryMru memmru ( iv_mbaTrgt, iv_rank, MemoryMruData::CALLOUT_RANK );
- io_sc.service_data->SetCallout( memmru );
-
- // Make error log predictive
- io_sc.service_data->setServiceCall();
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::handleMpe_Tps( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::handleMpe_Tps] "
-
- int32_t o_rc = SUCCESS;
-
- setTdSignature( io_sc, PRDFSIG_MaintMPE );
-
- // Clear TPS false alarm flag.
- iv_tpsFalseAlarm = false;
-
- do
- {
- // Callout the mark.
- CalloutUtil::calloutMark( iv_mbaTrgt, iv_rank, iv_mark, io_sc );
-
- // Add a VCM request to the queue.
- o_rc = addTdQueueEntryVCM( iv_rank );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "addTdQueueEntryVCM() failed" );
- break;
- }
-
- // Clear the scrub attention. This is needed later if we need to write
- // markstore for a symbol mark.
- const char * fir_str = (0 == iv_mbaPos) ? "MBSECCFIR_0_AND"
- : "MBSECCFIR_1_AND";
-
- SCAN_COMM_REGISTER_CLASS * fir = iv_membChip->getRegister( fir_str );
-
- fir->ClearBit( 20 + iv_rank.getMaster() ); // scrub
-
- o_rc = fir->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", fir_str );
- break;
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::handleCeEte_Tps( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::handleCeEte_Tps] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( TPS_PHASE_1 != iv_tdState )
- {
- PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
- o_rc = FAIL; break;
- }
-
- // Get the current threshold.
- uint16_t thr = 0;
- o_rc = getTpsCeThr( thr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getTpsCeThr() failed." );
- break;
- }
-
- // Get all symbols that have a count greater than or equal to the target
- // threshold.
- MaintSymbols symData; CenSymbol targetCM;
- o_rc = collectCeStats( iv_mbaChip, iv_rank, symData, targetCM, thr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "collectCeStats() failed." );
- break;
- }
-
- // Check for false alarms.
- if ( symData.empty() ) break; // nothing else to do
-
- // There is valid data so clear the false alarm flag.
- iv_tpsFalseAlarm = false;
-
- // Callout all DIMMS with symbol count that reached threshold.
- CalloutUtil::calloutSymbolData( iv_mbaTrgt, iv_rank, symData, io_sc );
-
- // Check if DRAM repairs are disabled.
- if ( areDramRepairsDisabled() )
- {
- io_sc.service_data->setServiceCall();
- break; // nothing else to do
- }
-
- // Add all symbols to the VPD.
- CenDqBitmap bitmap;
- o_rc = getBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getBadDqBitmap() failed" );
- break;
- }
-
- for ( MaintSymbols::iterator it = symData.begin();
- it != symData.end(); it++ )
- {
- bitmap.setSymbol( it->symbol );
- }
-
- o_rc = setBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "setBadDqBitmap() failed" );
- break;
- }
-
- // Check if the chip mark is available.
- bool cmPlaced = false;
- if ( !iv_mark.getCM().isValid() )
- {
- if ( targetCM.isValid() )
- {
- // Use the DRAM with the highest total count.
- iv_mark.setCM( targetCM );
- o_rc = tpsChipMark( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "tpsChipMark() failed." );
- break;
- }
-
- cmPlaced = true;
- }
- // If the symbol mark has been used then use the chip mark.
- else if ( !iv_x4Dimm && iv_mark.getSM().isValid() )
- {
- for ( MaintSymbols::iterator it = symData.end();
- it-- != symData.begin(); )
- {
- if ( !(it->symbol == iv_mark.getSM()) )
- {
- iv_mark.setCM( it->symbol );
- o_rc = tpsChipMark( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "tpsChipMark() failed." );
- break;
- }
-
- cmPlaced = true;
- break;
- }
- }
- if ( SUCCESS != o_rc ) break;
- }
- }
-
- // Check if the symbol mark is available. Note that symbol marks are not
- // available in x4 mode. Also, we only want to place a symbol mark if we
- // did not just place a chip mark above. The reason for this is because
- // having a chip mark and symbol mark at the same time increases the
- // chance of UEs. We will want to wait until the chip mark we placed
- // above is verified< and possibily steered, before placing the symbol
- // mark.
- if ( !cmPlaced && !iv_x4Dimm && !iv_mark.getSM().isValid() )
- {
- // Use the symbol with the highest count.
- iv_mark.setSM( symData.back().symbol );
- o_rc = tpsSymbolMark( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "tpsSymbolMark() failed." );
- break;
- }
- }
-
- // We know with a degree of confidence that any chip mark placed in this
- // function will be verified. Therefore, we can do a early check here
- // and make a predictive callout if the chip mark and all available
- // spares have been used. This is useful because the targeted
- // diagnostics procedure will take much longer to complete due to a
- // hardware issue. By making the predictive callout now, we will send a
- // Dynamic Memory Deallocation message to PHYP sooner so that they can
- // attempt to get off the memory instead of waiting for the callout
- // after the VCM procedure.
-
- if ( iv_mark.getCM().isValid() )
- {
- bool available;
- o_rc = checkForAvailableSpares( iv_mark.getCM().getPortSlct(),
- available );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "checkForAvailableSpares() failed" );
- break;
- }
-
- if ( !available )
- {
- // Spares have been used. Callout the mark. Make the error log
- // predictive.
- CalloutUtil::calloutMark( iv_mbaTrgt, iv_rank, iv_mark, io_sc );
- setTdSignature( io_sc, PRDFSIG_TpsCmAndSpare );
- io_sc.service_data->setServiceCall();
- }
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::handleTpsFalseAlarm( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::handleTpsFalseAlarm] "
-
- int32_t o_rc = SUCCESS;
-
- setTdSignature( io_sc, PRDFSIG_TpsFalseAlarm );
-
- do
- {
- if ( TPS_PHASE_1 != iv_tdState )
- {
- PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
- o_rc = FAIL; break;
- }
-
- // Callout all DIMMs that have reached threshold.
- // Centaur DIMMS: Any non-zero count, threshold on 1.
- // IS DIMMS: Allow 1, threshold on 2 (because of limited spares).
- uint8_t thr = isMembufOnDimm<TYPE_MBA>(iv_mbaTrgt) ? 1 : 2;
- MaintSymbols symData; CenSymbol junk;
- o_rc = collectCeStats( iv_mbaChip, iv_rank, symData, junk, thr );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "collectCeStats() failed." );
- break;
- }
-
- if ( symData.empty() )
- {
- // There is no data so callout the rank.
- MemoryMru memmru (iv_mbaTrgt, iv_rank, MemoryMruData::CALLOUT_RANK);
- io_sc.service_data->SetCallout( memmru );
- }
- else
- {
- CalloutUtil::calloutSymbolData(iv_mbaTrgt, iv_rank, symData, io_sc);
- }
-
- // In manufacturing, this error log will be predictive.
- if ( areDramRepairsDisabled() )
- {
- io_sc.service_data->setServiceCall();
- break; // nothing else to do
- }
-
- // Increase the false alarm counter. Continue only if false alarm
- // threshold is exceeded.
- if ( !iv_tpsRankData.incFalseAlarm(iv_rank, io_sc) ) break;
-
- setTdSignature( io_sc, PRDFSIG_TpsFalseAlarmExceeded );
-
- // If there are no symbols in the list, exit quietly.
- if ( symData.empty() ) break;
-
- // Use the symbol with the highest count to place a symbol or chip mark,
- // if possible. Note that we only want to use one repair for this false
- // alarm to avoid using up all the repairs for 'weak' errors.
- CenSymbol highestSymbol = symData.back().symbol;
-
- // Check if the symbol mark is available. Note that symbol marks are not
- // available in x4 mode.
- if ( !iv_x4Dimm && !iv_mark.getSM().isValid() )
- {
- iv_mark.setSM( highestSymbol );
- o_rc = tpsSymbolMark( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "tpsSymbolMark() failed." );
- break;
- }
-
- // Add this symbol to the VPD.
- CenDqBitmap bitmap;
- o_rc = getBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getBadDqBitmap() failed" );
- break;
- }
-
- bitmap.setSymbol( highestSymbol );
-
- o_rc = setBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "setBadDqBitmap() failed" );
- break;
- }
- }
- // Check if the chip mark is available.
- else if ( !iv_mark.getCM().isValid() )
- {
- iv_mark.setCM( highestSymbol );
- o_rc = tpsChipMark( io_sc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "tpsChipMark() failed" );
- break;
- }
- }
- else
- {
- // The spares have been used. Make the error log predictive.
- setTdSignature( io_sc, PRDFSIG_TpsMarksUnavail );
- io_sc.service_data->setServiceCall();
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::getTpsCeThr( uint16_t & o_thr )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::getTpsCeThr] "
-
- int32_t o_rc = SUCCESS;
-
- do
- {
- if ( TPS_PHASE_1 != iv_tdState )
- {
- PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
- o_rc = FAIL;
- break;
- }
-
- if ( !iv_tpsRankData.checkCeTypeTh(iv_rank) )
- {
- o_thr = mfgMode() ? 1 : 48;
- }
- else
- {
- o_thr = getScrubCeThreshold( iv_mbaChip, iv_rank );
- }
-
- } while( 0 );
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::tpsChipMark( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::tpsChipMark] "
-
- int32_t o_rc = SUCCESS;
-
- setTdSignature( io_sc, PRDFSIG_TpsChipMark );
-
- do
- {
- if ( TPS_PHASE_1 != iv_tdState )
- {
- PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
- o_rc = FAIL; break;
- }
-
- // Write the chip mark to markstore.
- bool allowWriteBlocked = true;
- bool blocked;
- o_rc = mssSetMarkStore( iv_mbaTrgt, iv_rank, iv_mark, blocked,
- allowWriteBlocked );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "mssSetMarkStore() failed" );
- break;
- }
-
- if ( blocked )
- {
- // Continue on with the rest of the TPS procedure as if nothing
- // failed. We will find the new chip mark on a subsequent attention.
- // The chances are that hardware had placed a chip mark on the same
- // DRAM that we tried to write, so for now, ignore these failing
- // symbols.
- }
- else
- {
- // Add a VCM request to the queue.
- o_rc = addTdQueueEntryVCM( iv_rank );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "addTdQueueEntryVCM() failed" );
- break;
- }
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::tpsSymbolMark( STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::tpsSymbolMark] "
-
- int32_t o_rc = SUCCESS;
-
- setTdSignature( io_sc, PRDFSIG_TpsSymbolMark );
-
- do
- {
- if ( TPS_PHASE_1 != iv_tdState )
- {
- PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
- o_rc = FAIL; break;
- }
-
- // Write the symbol mark to markstore.
- bool allowWriteBlocked = true;
- bool blocked = false;
- o_rc = mssSetMarkStore( iv_mbaTrgt, iv_rank, iv_mark, blocked,
- allowWriteBlocked );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "mssSetMarkStore() failed." );
- o_rc = FAIL; break;
- }
-
- if ( !blocked ) break; // Write was successful, no need to continue.
-
- // Hardware placed a new chip mark. Add a VCM request to the queue.
- o_rc = addTdQueueEntryVCM( iv_rank );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "addTdQueueEntryVCM() failed" );
- break;
- }
-
- // Clear the fetch attention before attempting the rewrite.
- const char * reg_str = (0 == iv_mbaPos) ? "MBSECCFIR_0_AND"
- : "MBSECCFIR_1_AND";
- SCAN_COMM_REGISTER_CLASS * firand = iv_membChip->getRegister( reg_str );
- firand->setAllBits();
- firand->ClearBit( 0 + iv_rank.getMaster() ); // fetch
- o_rc = firand->Write();
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str );
- break;
- }
-
- // Rewrite markstore. Do not allow this write to be blocked. If it is
- // blocked there is a code bug. Note that iv_mark was updated with the
- // hardware placed chip mark in the previous call to mssSetMarkStore().
- o_rc = mssSetMarkStore( iv_mbaTrgt, iv_rank, iv_mark, blocked );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "mssSetMarkStore() failed on retry." );
- break;
- }
-
- } while( 0 );
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t CenMbaTdCtlr::checkForAvailableSpares( uint8_t i_ps, bool & o_avail )
-{
- #define PRDF_FUNC "[CenMbaTdCtlr::checkForAvailableSpares] "
-
- int32_t o_rc = SUCCESS;
-
- o_avail = false;
-
- do
- {
- // First, make sure the spares are supported and have not been
- // intentially made unavailable by the manufacturer via the VPD.
-
- CenDqBitmap bitmap;
- o_rc = getBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getBadDqBitmap() failed" );
- break;
- }
-
- bool dramSparePossible = false;
- bool eccSparePossible = false;
- o_rc = bitmap.isSpareAvailable( i_ps, dramSparePossible,
- eccSparePossible );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "isDramSpareAvailable() failed" );
- break;
- }
-
- // Second, query hardware for the any available spares.
-
- CenSymbol sp0, sp1, ecc;
- o_rc = mssGetSteerMux( iv_mbaTrgt, iv_rank, sp0, sp1, ecc );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "mssGetSteerMux() failed" );
- break;
- }
-
- if ( ( dramSparePossible &&
- (0 == i_ps ? !sp0.isValid() : !sp1.isValid()) ) ||
- ( eccSparePossible && !ecc.isValid() ) )
- {
- o_avail = true;
- }
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H
deleted file mode 100755
index 6573636cd..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H
+++ /dev/null
@@ -1,418 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_rt.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
-/* [+] 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 prdfCenMbaTdCtlr_rt.H
- * @brief The FSP implementation of the MBA TD Controller.
- */
-
-#ifndef __prdfCenMbaTdCtlr_rt_H
-#define __prdfCenMbaTdCtlr_rt_H
-
-// Pegasus includes
-#include <prdfCenMbaTdQueue_rt.H>
-#include <prdfCenMbaTdRankData_rt.H>
-
-// Should be included last in case there are any platform specific includes that
-// the common code needs.
-#include <prdfCenMbaTdCtlr_common.H>
-
-namespace PRDF
-{
-
-class CenAddr;
-
-/**
- * @brief A state machine for memory targeted diagnostics and background
- * scrubbing during FSP runtime.
- */
-class CenMbaTdCtlr : public CenMbaTdCtlrCommon
-{
- private: // constants, enums
-
- // Function pointers for maintenance command complete events.
- typedef int32_t (CenMbaTdCtlr::*FUNCS)( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr );
-
- enum RuntimeStopConditions
- {
- COND_RT_VCM_DSD =
- COND_TARGETED_CMD |
- mss_MaintCmd::STOP_ON_UE |
- mss_MaintCmd::STOP_IMMEDIATE,
-
- COND_RT_TPS_HARD_CE =
- COND_TARGETED_CMD |
- mss_MaintCmd::STOP_ON_HARD_NCE_ETE |
- mss_MaintCmd::STOP_ON_MPE |
- mss_MaintCmd::STOP_ON_UE |
- mss_MaintCmd::STOP_IMMEDIATE,
-
- COND_RT_TPS_ALL_CE =
- COND_RT_TPS_HARD_CE |
- mss_MaintCmd::STOP_ON_INT_NCE_ETE |
- mss_MaintCmd::STOP_ON_SOFT_NCE_ETE,
- };
-
- public: // functions
-
- /**
- * @brief Constructor
- *
- * This contructor will be called in the MBA data bundle code. Therefore,
- * no register reads/writes can be done in this constructor. Anything needed
- * to initialize the instance variables that requires register reads/writes
- * or is non-trivial should be done in initialize().
- *
- * @param i_mbaChip An MBA chip.
- */
- explicit CenMbaTdCtlr( ExtensibleChip * i_mbaChip ) :
- CenMbaTdCtlrCommon(i_mbaChip), iv_queue(), iv_masterRanks(),
- iv_vcmRankData(), iv_tpsRankData(), iv_tpsFalseAlarm(false),
- iv_fetchAttnsMasked(false)
- {}
-
- public: // Overloaded functions
-
- int32_t handleCmdCompleteEvent( STEP_CODE_DATA_STRUCT & io_sc );
- int32_t handleTdEvent( STEP_CODE_DATA_STRUCT & io_sc,
- const CenRank & i_rank, const TdType i_event,
- bool i_banTps = false );
-
- private: // Overloaded functions
-
- int32_t initialize();
-
- int32_t analyzeCmdComplete( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr );
- int32_t analyzeVcmPhase1( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr );
- int32_t analyzeVcmPhase2( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr );
- int32_t analyzeDsdPhase1( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr );
- int32_t analyzeDsdPhase2( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr ) { return FAIL; }
- int32_t analyzeTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr );
- int32_t analyzeTpsPhase2( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- const CenAddr & i_endAddr ) { return FAIL; }
-
- int32_t startVcmPhase1( STEP_CODE_DATA_STRUCT & io_sc );
- int32_t startVcmPhase2( STEP_CODE_DATA_STRUCT & io_sc );
- int32_t startDsdPhase1( STEP_CODE_DATA_STRUCT & io_sc );
- int32_t startDsdPhase2( STEP_CODE_DATA_STRUCT & io_sc ) { return FAIL; }
- int32_t startTpsPhase1( STEP_CODE_DATA_STRUCT & io_sc );
- int32_t startTpsPhase2( STEP_CODE_DATA_STRUCT & io_sc ) { return FAIL; }
-
- private: // functions
-
- /**
- * @brief Starts/restarts background scrubbing.
- * @param io_sc The step code data struct.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t startBgScrub( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Starts the next TD procedure based on the next event in iv_queue.
- * @param io_sc The step code data struct.
- * @note If iv_queue is empty, this function will resume background
- * scrubbing.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t startNextTd( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Resumes a scrub from the address after the current stopped
- * address.
- * @param io_sc The step code data struct.
- * @param i_eccErrorMask Bitwise mask indicating which ECC errors have
- * occurred (see enum EccErrorMask).
- * @note This function should only be called from the background scrub or
- * TPS analysis functions.
- * @note This function will not clear the total and per symbol CE
- * counters. Instead, it clears the counters specifically for the
- * errors at attention (specified by i_eccErrorMask).
- * @note Before calling this function, should check that the stopped
- * address does not equal the end address in hardware. Otherwise, it
- * will result in an additional scrub of all memory, which will not
- * be desirable.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t resumeScrub( STEP_CODE_DATA_STRUCT & io_sc,
- uint32_t i_eccErrorMask );
-
- /**
- * @brief Handle TD (VCM|TPS) completion sequence.
- * @param io_sc The step code data struct.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t handleTdComplete( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Adds a VCM event to the TD queue and sets the rank as bad.
- * @param i_rank Target rank.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t addTdQueueEntryVCM( const CenRank & i_rank );
-
- /**
- * @brief Adds a TPS event to the TD queue and sets the rank as bad.
- * @param i_rank Target rank.
- * @param io_sc The step code data struct.
- * @param i_banTps TRUE to ban any future TPS requests for this rank,
- * default FALSE.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t addTdQueueEntryTPS( const CenRank & i_rank,
- STEP_CODE_DATA_STRUCT & io_sc,
- bool i_banTps = false );
-
- /**
- * @brief Pops the first entry off the TD queue and sets the rank as good,
- * if possible.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t removeTdQueueEntry();
-
- /**
- * @brief Will first sync the SDC then call the parent version of this
- * function. The SDC needed to be synched because the parent function
- * will clear the maintenance command complete attention and we need
- * to protect against reset/reloads and failovers.
- * @param io_sc The step code data struct.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t cleanupPrevCmd( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Will first sync the SDC then call the parent version of this
- * function. The SDC needed to be synched because the parent function
- * will clear the maintenance command complete attention and we need
- * to protect against reset/reloads and failovers.
- * @param io_sc The step code data struct.
- * @param i_clearStats True if this function should clear the total and per
- * symbol CE counters (default), false otherwise.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t prepareNextCmd( STEP_CODE_DATA_STRUCT & io_sc,
- bool i_clearStats = true );
-
- /**
- * @brief Handles UEs during a TD procedure.
- * @param io_sc The step code data struct.
- * @param i_stopAddr The address in which the command stopped.
- * @param i_addTpsRequest True to add a TPS request in addition to the rest
- * of the analysis, false otherwise.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t handleUe_Td( STEP_CODE_DATA_STRUCT & io_sc,
- const CenAddr & i_stopAddr,
- bool i_addTpsRequest = true );
-
- /**
- * @brief Handles RCE ETEs during a TD procedure.
- * @param io_sc The step code data struct.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t handleRceEte_Td( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Handles MPEs during a TPS procedure.
- * @param io_sc The step code data struct.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t handleMpe_Tps( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Handles CE ( soft/intermittent|Hard ) ETE attention in TPS mode.
- * @param io_sc The step code data struct.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t handleCeEte_Tps( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Handles TPS false alarms.
- * @param io_sc The step code data struct.
- * @note Should only be called at the end of TPS phase 2 if no ECC errors
- * that have reached threshold have been found.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t handleTpsFalseAlarm( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Calculates the CE threshold used during a TPS procedure.
- * @param o_thr Threshold based on TPS phase and MNFG vs. non-MNFG.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- * @note iv_tdState must be set to a valid TPS phase before calling this
- * function.
- */
- int32_t getTpsCeThr( uint16_t & o_thr );
-
- /**
- * @brief Sets iv_mark in hardware and adds a VCM request to the TD queue.
- * @param io_sc The step code data struct.
- * @note iv_mark must be set with the chip mark before calling this
- * function.
- * @note If the write to markstore is blocked by hardware, iv_mark is
- * updated to contain the new chip mark placed by hardware. No retry
- * is attempted.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t tpsChipMark( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Sets iv_mark in hardware.
- * @param io_sc The step code data struct.
- * @note iv_mark must be set with the symbol mark before calling this
- * function.
- * @note If the write to markstore is blocked by hardware, iv_mark is
- * updated to contain the new chip mark placed by hardware. Then
- * this function retries the write to hardware.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t tpsSymbolMark( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Masks fetch ECC attentions.
- * @note Only intended to be used just before starting a new TD procedure.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t maskFetchAttns();
-
- /**
- * @brief Clears and unmasks fetch ECC attentions.
- * @note maskFetchAttns() will not mask fetch UEs, however, this function
- * will unmask them because it is possible that fetch UEs exceeded
- * threshold and were masked by the rule code.
- * @note Only intended to be used just after completing a TD procedure.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t unmaskFetchAttns();
-
- /**
- * @brief Conditionally clears the CE counters based on the error types
- * given.
- * @param i_eccErrorMask Bitwise mask indicating which ECC errors have
- * occurred (see enum EccErrorMask).
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t clearCeCounters( uint32_t i_eccErrorMask );
-
- /**
- * @brief Helper function to start a maintenance command for background
- * scrub.
- * @param i_stopCond Bit mask for conditions in which to stop command.
- * @param i_flags See enum CtrlFlags for details.
- * @param i_sAddrOverride A non-NULL value indicates to use this start
- * address and not the start address of i_rank.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t doBgScrubCmd( uint32_t i_stopCond,
- uint32_t i_flags =
- PlatServices::mss_MaintCmdWrapper::END_OF_MEMORY,
- const CenAddr * i_sAddrOverride = NULL );
-
- /**
- * @brief Helper function to start a maintenance command for targeted
- * diagnostics scrub.
- * @param i_stopCond Bit mask for conditions in which to stop command.
- * @param i_flags See enum CtrlFlags for details.
- * @param i_sAddrOverride A non-NULL value indicates to use this start
- * address and not the start address of i_rank.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t doTdScrubCmd( uint32_t i_stopCond,
- uint32_t i_flags =
- PlatServices::mss_MaintCmdWrapper::NO_FLAGS,
- const CenAddr * i_sAddrOverride = NULL );
-
- /**
- * @brief Queries for any available spares on iv_rank and the given port.
- * @param i_ps Target port select.
- * @param o_avail True a spare DRAM or ECC spare is avaiable, false
- * otherwise.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t checkForAvailableSpares( uint8_t i_ps, bool & o_avail );
-
- /**
- * @brief Adds the TD controller state at the beginning of analysis to the
- * capture data.
- * @param io_sc The step code data struct.
- */
- void collectStateCaptureDataStart( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Adds the TD controller state at the end of analysis to the
- * capture data.
- * @param io_sc The step code data struct.
- */
- void collectStateCaptureDataEnd( STEP_CODE_DATA_STRUCT & io_sc );
-
- /**
- * @brief Adds the TD controller state to the capture data.
- * @param io_sc The step code data struct.
- * @param i_descTag Description tag for the capture data. Used to
- * distinguish between data captured at the beginning or end or
- * analysis.
- * @note Only intended to be called by collectStateCaptureDataStart() or
- * collectStateCaptureDataEnd().
- */
- void collectStateCaptureData( STEP_CODE_DATA_STRUCT & io_sc,
- const char * i_descTag );
-
- private: // instance variables
-
- /** Array of functions pointers for TD controller states. This is used to
- * determine the next course of action after a maintenance command complete
- * attention.
- */
- static FUNCS cv_cmdCompleteFuncs[MAX_TD_STATE];
-
- TdQueue iv_queue; ///< Queue for all TD events
- TdRankList iv_masterRanks; ///< List of master ranks
- VcmRankData iv_vcmRankData; ///< VCM specific data for each rank.
- TpsRankData iv_tpsRankData; ///< TPS specific data for each rank.
- bool iv_tpsFalseAlarm; ///< TPS false alarm
-
- /** Keeps track if the fetch attentions have been masked during a TD
- * procedure. */
- bool iv_fetchAttnsMasked;
-
-}; // CenMbaTdCtlr
-
-} // end namespace PRDF
-
-#endif // __prdfCenMbaTdCtlr_rt_H
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.C
deleted file mode 100644
index cdf374113..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.C
+++ /dev/null
@@ -1,237 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.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 prdfCenMbaTdRankData_rt.C */
-
-#include <prdfCenMbaTdRankData_rt.H>
-
-// Framework includes
-#include <prdfTrace.H>
-
-using namespace TARGETING;
-
-namespace PRDF
-{
-
-using namespace PlatServices;
-
-//------------------------------------------------------------------------------
-
-int32_t TdRankList::initialize( TargetHandle_t i_mbaTrgt )
-{
- #define PRDF_FUNC "[TdRankList::initialize] "
-
- int32_t o_rc = SUCCESS;
-
- iv_list.clear();
-
- do
- {
- // Get the list of master ranks for this MBA.
- std::vector<CenRank> ranks;
- o_rc = getMasterRanks( i_mbaTrgt, ranks );
- if ( SUCCESS != o_rc )
- {
- PRDF_ERR( PRDF_FUNC "getMasterRanks() failed" );
- break;
- }
-
- // Make sure the list is not empty for some reason.
- if ( ranks.empty() )
- {
- PRDF_ERR( PRDF_FUNC "getMasterRanks() returned an empty list" );
- o_rc = FAIL; break;
- }
-
- // Sort the list of ranks.
- std::sort( ranks.begin(), ranks.end() );
-
- // Initialize iv_list.
- for ( std::vector<CenRank>::iterator it = ranks.begin();
- it != ranks.end(); it++ )
- {
- iv_list.push_back( Entry(*it) );
- }
-
- } while (0);
-
- // Initially set iv_curRank to an invalid value.
- iv_curRank = iv_list.end();
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-TdRankList::Entry TdRankList::findNextGoodRank()
-{
- if ( iv_list.end() == iv_curRank )
- {
- // It is possible to get a maintenance command complete attention
- // without having an error. A prime example, is the maintenance command
- // complete after the initial fast scrub. In this case, back iv_curRank
- // up to the last rank in the list so that the next good rank will be
- // the first rank in the list.
- iv_curRank--;
- }
-
- // Only want to iterate the list once, so keep track of where we started.
- const ListItr startItr = iv_curRank;
-
- do
- {
- // Increment to the next rank and wrap to the beginning if needed.
- iv_curRank++;
- if ( iv_list.end() == iv_curRank )
- iv_curRank = iv_list.begin();
-
- } while ( !iv_curRank->isGood && (startItr != iv_curRank) );
-
- return *(iv_curRank);
-}
-
-//------------------------------------------------------------------------------
-
-int32_t TdRankList::setInterruptedRank( const CenRank & i_rank )
-{
- #define PRDF_FUNC "[TdRankList::setInterruptedRank] "
-
- int32_t o_rc = SUCCESS;
-
- ListItr it = findRank( i_rank );
- if ( iv_list.end() == it )
- {
- PRDF_ERR( PRDF_FUNC "findRank() failed: i_rank=%d", i_rank.getMaster() );
- o_rc = FAIL;
- }
- else
- {
- iv_curRank = it;
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-int32_t TdRankList::setRankStatus( const CenRank & i_rank, bool i_isGood )
-{
- #define PRDF_FUNC "[TdRankList::setRankStatus] "
-
- int32_t o_rc = SUCCESS;
-
- ListItr it = findRank( i_rank );
- if ( iv_list.end() == it )
- {
- PRDF_ERR( PRDF_FUNC "findRank() failed: i_rank=%d i_isGood=%c",
- i_rank.getMaster(), i_isGood ? 'T' : 'F' );
- o_rc = FAIL;
- }
- else
- {
- it->isGood = i_isGood;
- }
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
-//------------------------------------------------------------------------------
-
-uint8_t VcmRankData::getFalseAlarmCount( const CenRank & i_rank )
-{
- uint8_t o_count = 0;
-
- // Using [] will add an entry to the map if it does not exist. Use find()
- // instead so it won't add a bunch of unused entries.
- std::map<uint8_t, Entry>::iterator it = iv_map.find(getKey(i_rank));
- if ( iv_map.end() != it )
- {
- o_count = (it->second).falseAlarms.getCount();
- }
-
- return o_count;
-}
-
-//------------------------------------------------------------------------------
-
-uint8_t TpsRankData::getFalseAlarmCount( const CenRank & i_rank )
-{
- uint8_t o_count = 0;
-
- // Using [] will add an entry to the map if it does not exist. Use find()
- // instead so it won't add a bunch of unused entries.
- std::map<CenRank, Entry>::iterator it = iv_map.find(i_rank);
- if ( iv_map.end() != it )
- {
- o_count = (it->second).falseAlarms.getCount();
- }
-
- return o_count;
-}
-
-//------------------------------------------------------------------------------
-
-bool TpsRankData::checkCeTypeTh( const CenRank & i_rank )
-{
- bool th = false;
-
- // Using [] will add an entry to the map if it does not exist. Use find()
- // instead so it won't add a bunch of unused entries.
- std::map<CenRank, Entry>::iterator it = iv_map.find( i_rank );
- if ( iv_map.end() != it )
- {
- th = ( 1 <= (it->second).falseAlarms.getCount() );
- }
-
- return th;
-}
-
-//------------------------------------------------------------------------------
-
-bool TpsRankData::isBanned( const CenRank & i_rank,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- bool isBanned = false;
-
- // Using [] will add an entry to the map if it does not exist. Use find()
- // instead so it won't add a bunch of unused entries.
- std::map<CenRank, Entry>::iterator it = iv_map.find( i_rank );
- if ( iv_map.end() != it &&
- ( (it->second).isBanned || (it->second).falseAlarms.thReached(i_sc) ) )
- {
- isBanned = true;
- }
-
- return isBanned;
-}
-
-} // end namespace PRDF
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.H
deleted file mode 100644
index 2c593fec8..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.H
+++ /dev/null
@@ -1,346 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdRankData_rt.H $ */
-/* */
-/* 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 */
-
-#ifndef __prdfCenMbaTdRankData_rt_H
-#define __prdfCenMbaTdRankData_rt_H
-
-/** @file prdfCenMbaTdRankData_rt.H */
-
-// Framework includes
-#include <prdfPlatServices.H>
-
-// Pegasus includes
-#include <prdfCenAddress.H>
-#include <prdfThresholdUtils.H>
-
-// Other includes
-#include <vector>
-#include <algorithm>
-
-namespace PRDF
-{
-
-/**
- * @brief A sorted list of all master ranks behind an MBA.
- *
- * The list will be sorted by the order in which hardware will scrub memory.
- * Each time a rank is targeted for diagnostics, the rank should be marked as
- * bad. This is intended to assist in the design in which PRD will do a fast
- * scrub on the next 'good' rank between targeted diagnostics procedures. The
- * hope is that even though we may skip around in memory targeting ranks that
- * are reporting errors, we are still able to continue scrubbing the rest of
- * the good memory at least one every 24 hours.
- *
- * @note This list is only intended to be used by the runtime TD controller.
- */
-class TdRankList
-{
- public: // structs, typedefs
-
- /** @brief Structure to represent a rank list entry. */
- struct Entry
- {
- CenRank rank; ///< The rank in which this event occurred.
- bool isGood; ///< False if currently being targeted by diagnotics
-
- /** @brief Default constructor */
- Entry() : isGood(true) {}
-
- /** @brief Constructor */
- explicit Entry( const CenRank & i_rank ) :
- rank(i_rank), isGood(true)
- {}
- };
-
- typedef std::vector<Entry> List;
- typedef std::vector<Entry>::iterator ListItr;
-
- public: // functions
-
- /** @brief Default constructor */
- TdRankList() : iv_list(), iv_curRank(iv_list.end()) {}
-
- /**
- * @brief Populates and sorts the list.
- * @param i_mbaTrgt The target MBA.
- * @note Should be called in the TD controller's initialize() function.
- * @note Will fail if unable to find any configured ranks behind the given
- * MBA. This is to guarantee the list is not empty.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t initialize( TARGETING::TargetHandle_t i_mbaTrgt );
-
- /**
- * @return A contant reference to the master rank list.
- * @note This is useful if someone needs to iterate over the list of
- * ranks.
- */
- const List & getList() const { return iv_list; }
-
- /**
- * @brief Will find the next rank in the list that is marked as 'good'.
- *
- * Will start with the entry that iv_curRank is pointing to and increment
- * the iterator until it points to a rank that is marked as good. If the
- * search reaches the end of the list, this function will wrap around to the
- * beginning the list.
- *
- * @note If the returned entry's isGood field is false, it means all ranks
- * in the list are set to bad.
- *
- * @return The next 'good' list entry.
- */
- Entry findNextGoodRank();
-
- /**
- * @brief Marks the given rank as 'good'.
- * @param i_rank A rank that has completed Targeted diagnostics.
- * @note Should be called when all entries for a rank are removed from
- * the TD queue.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t setGood( const CenRank & i_rank )
- { return setRankStatus( i_rank, true ); }
-
- /**
- * @brief Marks the given rank as 'bad'.
- * @param i_rank A rank that is currently targeted for diagnostics.
- * @note Should be called when an entry is added to the TD queue.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t setBad( const CenRank & i_rank )
- { return setRankStatus( i_rank, false ); }
-
- /**
- * @brief Will initialize iv_curRank so that background scrubbing (or the
- * fast rank scrub) can resume on the next good rank after the rank
- * that was interrupted.
- * @param i_rank The rank that was interrupted.
- * @note Should be called when background scrubbing is interrupted by an
- * error.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t setInterruptedRank( const CenRank & i_rank );
-
- private: // functions
-
- /**
- * @brief Sets a rank's status to good or bad depending on inputs.
- * @param i_rank The target rank.
- * @param i_isGood True to set good, false to set bad.
- * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
- */
- int32_t setRankStatus( const CenRank & i_rank, bool i_isGood );
-
- /**
- * @param i_rank The target rank.
- * @return An iterator pointing the rank in the list. Will return
- * iv_list.end() if the rank is not found.
- */
- ListItr findRank( const CenRank & i_rank )
- { return std::find_if(iv_list.begin(), iv_list.end(), MatchRank(i_rank)); }
-
- private: // instance variables
-
- List iv_list; ///< The master list
- ListItr iv_curRank; ///< Will point to the next rank that is considered good
-
- private: // functors
-
- /**
- * @brief Functor to find a rank in this list.
- * @note This functor will only match master rank.
- */
- class MatchRank
- {
- public:
- explicit MatchRank( const CenRank & i_rank ) : iv_rank(i_rank) {}
-
- bool operator() ( const Entry & i_e ) const
- { return ( iv_rank.getMaster() == i_e.rank.getMaster() ); }
-
- private:
- CenRank iv_rank; ///< Rank to match.
- };
-
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * @brief A map containing VCM data for affected ranks.
- *
- * Keeps track of VCM false alarm thresholds.
- *
- * @note This data is only intended to be used by the runtime TD controller.
- */
-class VcmRankData
-{
- private: // structs, typedefs
-
- /** @brief Structure to represent a data entry. */
- struct Entry
- {
- /** Time based false alarm counter. */
- TimeBasedThreshold falseAlarms;
-
- /** @brief Default constructor */
- Entry() :
- falseAlarms( 4, 7 * ThresholdResolution::ONE_DAY )
- {}
- };
-
- public: // functions
-
- /** @brief Default constructor */
- VcmRankData() : iv_map() {}
-
- /**
- * @brief Increments the time based counter for false alarms.
- * @param i_rank Target master rank.
- * @param i_sc The step code data struct.
- * @return TRUE if false alarm threshold is exceeded, FALSE otherwise.
- */
- bool incFalseAlarm( const CenRank & i_rank, STEP_CODE_DATA_STRUCT & i_sc )
- {
- return (iv_map[getKey(i_rank)].falseAlarms).inc( i_sc );
- }
-
- /**
- * @param Target master rank.
- * @return Current false alarm threshold count.
- */
- uint8_t getFalseAlarmCount( const CenRank & i_rank );
-
- private: // functions
-
- /**
- * @brief VCM procedures operate on master ranks only.
- * @return Master rank key value.
- */
- uint8_t getKey( const CenRank & i_rank )
- {
- return i_rank.getMaster();
- }
-
- private: // instance variables
-
- std::map<uint8_t, Entry> iv_map; ///< The VCM data map
-
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * @brief A map containing TPS data for affected ranks.
- *
- * Keeps track of TPS false alarm thresholds and whether a rank has been banned
- * from further TPS request because TPS is no longer useful for that rank.
- *
- * @note This data is only intended to be used by the runtime TD controller.
- */
-class TpsRankData
-{
- private: // structs, typedefs
-
- /** @brief Structure to represent a data entry. */
- struct Entry
- {
- bool isBanned; ///< True if TPS is no longer allowed on this rank.
-
- /** Time based false alarm counter. */
- TimeBasedThreshold falseAlarms;
-
- /** @brief Default constructor */
- Entry() :
- isBanned(false),
- falseAlarms( 3, 7 * ThresholdResolution::ONE_DAY )
- {}
- };
-
- public: // functions
-
- /** @brief Default constructor */
- TpsRankData() : iv_map() {}
-
- /**
- * @brief Increments the time based counter for false alarms.
- * @param i_rank Target slave rank.
- * @param i_sc The step code data struct.
- * @return TRUE if false alarm threshold is exceeded, FALSE otherwise.
- */
- bool incFalseAlarm( const CenRank & i_rank, STEP_CODE_DATA_STRUCT & i_sc )
- {
- return (iv_map[i_rank].falseAlarms).inc( i_sc );
- }
-
- /**
- * @param Target slave rank.
- * @return Current false alarm threshold count.
- */
- uint8_t getFalseAlarmCount( const CenRank & i_rank );
-
- /**
- * @brief Initially TPS only counts hard CEs. After serveral false alarms
- * TPS needs to switch to counting all CEs.
- * @param i_rank Target slave rank.
- * @return True if this threshold has been reached and TPS needs to count
- * all CEs, false otherwise.
- */
- bool checkCeTypeTh( const CenRank & i_rank );
-
- /**
- * @brief Ban all future TPS requests on this rank.
- * @param i_rank Target slave rank.
- */
- void ban( const CenRank & i_rank ) { iv_map[i_rank].isBanned = true; }
-
- /**
- * @brief Check if TPS requests are banned on this rank.
- *
- * There are two ways a rank can be banned:
- * - If ban() was called on this rank. This is a permanent ban. It should
- * only be called if there was a predictive error log calling out this
- * rank.
- * - If there was a TPS false alarm threshold. This is a temporary ban. All
- * subsequent TPS requests for this rank will be suppressed until the
- * threshold time period has expired.
- *
- * @param i_rank Target slave rank.
- * @param i_sc The step code data struct.
- * @return True if TPS is not allowed on this rank, false otherwise.
- */
- bool isBanned( const CenRank & i_rank, STEP_CODE_DATA_STRUCT & i_sc );
-
- private: // instance variables
-
- std::map<CenRank, Entry> iv_map; ///< The TPS data map
-
-};
-
-} // end namespace PRDF
-
-#endif // __prdfCenMbaTdRankData_rt_H
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
deleted file mode 100755
index 4ef094ccb..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C
+++ /dev/null
@@ -1,157 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMembuf.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2018 */
-/* [+] 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 prdfCenMembuf.C
- * @brief Contains all the plugin code for the PRD Centaur Membuf
- */
-
-// Framework includes
-#include <iipServiceDataCollector.h>
-#include <prdfExtensibleChip.H>
-#include <prdfPlatServices.H>
-#include <prdfPluginMap.H>
-#include <prdfGlobal.H>
-#include <iipSystem.h>
-#include <UtilHash.H>
-
-// Pegasus includes
-#include <prdfCalloutUtil.H>
-#include <prdfCenAddress.H>
-#include <prdfCenMarkstore.H>
-#include <prdfCenMbaCaptureData.H>
-#include <prdfCenMbaDataBundle.H>
-#include <prdfCenMbaTdCtlr_common.H>
-#include <prdfCenMbaThresholds.H>
-#include <prdfCenMembufDataBundle.H>
-#include <prdfCenMembufExtraSig.H>
-#include <prdfLaneRepair.H>
-#include <prdfCenMemUtils.H>
-#if !defined(__HOSTBOOT_MODULE) || defined(__HOSTBOOT_RUNTIME)
- #include <prdfCenMbaDynMemDealloc_rt.H>
-#endif
-#include <prdfMemEccAnalysis.H>
-
-using namespace TARGETING;
-
-namespace PRDF
-{
-
-using namespace PlatServices;
-
-namespace Membuf
-{
-
-//##############################################################################
-//
-// Special plugins
-//
-//##############################################################################
-
-/**
- * @fn CheckForRecovered
- * @brief Used when the chip has a CHECK_STOP attention to check for the
- * presence of recovered errors.
- *
- * @param i_chip The Centaur chip.
- * @param o_hasRecovered TRUE if a recoverable attention exists in the Centaur.
- *
- * @return SUCCESS.
-
- */
-int32_t CheckForRecovered(ExtensibleChip * i_chip,
- bool & o_hasRecovered)
-{
- o_hasRecovered = false;
-
- int32_t l_rc = SUCCESS;
-
- SCAN_COMM_REGISTER_CLASS * l_grer = i_chip->getRegister("GLOBAL_RE_FIR");
- l_rc = l_grer->Read();
-
- if ( SUCCESS != l_rc )
- {
- PRDF_ERR("[CheckForRecovered] GLOBAL_RE_FIR read failed"
- "for 0x%08x", i_chip->GetId());
- }
- else if ( 0 != l_grer->GetBitFieldJustified(1,3) )
- {
- o_hasRecovered = true;
- }
-
- return SUCCESS;
-
-} PRDF_PLUGIN_DEFINE( Membuf, CheckForRecovered );
-
-//##############################################################################
-//
-// DMIFIR
-//
-//##############################################################################
-
-/**
- * @brief Handle lane repair spare deployed
- * @param i_membChip A Centaur chip.
- * @param i_sc The step code data struct
- * @return SUCCESS
- */
-int32_t spareDeployed( ExtensibleChip * i_membChip,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- return LaneRepair::handleLaneRepairEvent( i_membChip, TYPE_MEMBUF, 0, i_sc,
- true );
-}
-PRDF_PLUGIN_DEFINE( Membuf, spareDeployed );
-
-/**
- * @brief Handle lane repair max spares exceeded
- * @param i_membChip A Centaur chip.
- * @param i_sc The step code data struct
- * @return SUCCESS
- */
-int32_t maxSparesExceeded( ExtensibleChip * i_membChip,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- return LaneRepair::handleLaneRepairEvent( i_membChip, TYPE_MEMBUF, 0, i_sc,
- false );
-}
-PRDF_PLUGIN_DEFINE( Membuf, maxSparesExceeded );
-
-//##############################################################################
-//
-// MBSECCFIRs
-//
-//##############################################################################
-
-int32_t calloutInterface_dmi( ExtensibleChip * i_membChip,
- STEP_CODE_DATA_STRUCT & io_sc )
-{
- CalloutUtil::calloutBusInterface( i_membChip, MRU_LOW );
- return SUCCESS;
-}
-PRDF_PLUGIN_DEFINE( Membuf, calloutInterface_dmi );
-
-} // end namespace Membuf
-
-} // end namespace PRDF
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H
deleted file mode 100644
index d4c664c4c..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H
+++ /dev/null
@@ -1,34 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMembufExtraSig.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
-/* [+] 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 __prdfCenMembufExtraSig_H
-#define __prdfCenMembufExtraSig_H
-
-#include <prdrSignatures.H>
-
-PRDR_ERROR_SIGNATURE(MbsFir_30_DD1Signature, 0x44440008, "MBSFIR[30]",
- "DD1: MBS_FIR_REG_INTERNAL_SCOM_ERROR_COPY");
-
-#endif // __prdfCenMembufExtraSig_H
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C b/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C
deleted file mode 100755
index 7a35d87cb..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C
+++ /dev/null
@@ -1,289 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfP8Mcs.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2018 */
-/* [+] 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 prdfP8Mcs.C
- * @brief Contains all the plugin code for the PRD P8 MCS
- */
-
-// Framework includes
-#include <iipServiceDataCollector.h>
-#include <iipSystem.h>
-#include <prdfExtensibleChip.H>
-#include <prdfGlobal.H>
-#include <prdfPluginMap.H>
-#include <UtilHash.H>
-
-// Pegasus includes
-#include <prdfCalloutUtil.H>
-#include <prdfCenMbaCaptureData.H>
-#include <prdfCenMembufDataBundle.H>
-#include <prdfLaneRepair.H>
-#include <prdfP8McsDataBundle.H>
-#include <prdfCenMemUtils.H>
-
-#include <prdfP8McsExtraSig.H>
-
-//##############################################################################
-//
-// Special plugins
-//
-//##############################################################################
-
-namespace PRDF
-{
-
-using namespace PlatServices;
-using namespace TARGETING;
-
-namespace Mcs
-{
-
-/**
- * @brief Plugin that initializes the MCS data bundle.
- * @param i_mcsChip An MCS chip.
- * @return SUCCESS
- */
-int32_t Initialize( ExtensibleChip * i_mcsChip )
-{
- i_mcsChip->getDataBundle() = new P8McsDataBundle( i_mcsChip );
- return SUCCESS;
-}
-PRDF_PLUGIN_DEFINE( Mcs, Initialize );
-
-/**
- * @fn ClearMbsSecondaryBits
- * @brief Clears MBS secondary Fir bits which may come up because of MCIFIR
- * @param i_chip The Mcs chip.
- * @param i_sc ServiceDataColector.
- * @return SUCCESS.
-
- */
-int32_t ClearMbsSecondaryBits( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- #define PRDF_FUNC "[ClearMbsSecondaryBits] "
-
- int32_t l_rc = SUCCESS;
- do
- {
- P8McsDataBundle * mcsdb = getMcsDataBundle( i_chip );
- ExtensibleChip * membChip = mcsdb->getMembChip();
-
- if ( NULL == membChip ) break;
-
- // Not checking if MBSFIR bits are set or not.
- // Clearing them blindly as it will give better performance.
- SCAN_COMM_REGISTER_CLASS * mbsAndFir =
- membChip->getRegister("MBSFIR_AND");
-
- if( NULL == mbsAndFir )
- {
- PRDF_ERR( PRDF_FUNC "Can not find MBSFIR_AND "
- "for 0x%08x", membChip->GetId());
- break;
- }
- mbsAndFir->setAllBits();
-
- mbsAndFir->ClearBit(3);
- mbsAndFir->ClearBit(4);
- l_rc = mbsAndFir->Write();
- if ( SUCCESS != l_rc )
- {
- PRDF_ERR( PRDF_FUNC "MBSFIR_AND write failed"
- "for 0x%08x", membChip->GetId());
- break;
- }
- }while( 0 );
- return SUCCESS;
-
- #undef PRDF_FUNC
-} PRDF_PLUGIN_DEFINE( Mcs, ClearMbsSecondaryBits );
-
-//------------------------------------------------------------------------------
-
-/**
- * @brief When not in MNFG mode, clear the service call flag so that
- * thresholding will still be done, but no visible error log committed.
- * @param i_chip MCS chip
- * @param i_sc Step code data struct
- * @returns SUCCESS always
- */
-int32_t ClearServiceCallFlag( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- if ( i_sc.service_data->IsAtThreshold() && !mfgMode() &&
- (CHECK_STOP != i_sc.service_data->getPrimaryAttnType()) &&
- (!i_sc.service_data->queryFlag(ServiceDataCollector::UNIT_CS)) )
- {
- i_sc.service_data->clearServiceCall();
- }
-
- return SUCCESS;
-}
-PRDF_PLUGIN_DEFINE( Mcs, ClearServiceCallFlag );
-
-/**
- * @brief Checks if the parent proc chip is either a Murano at DD least 2.0
- * or a Venice. If neither, implements the DD1 actions
- * of MBSFIR for the specified bit.
- * @param i_mcsChip MCS chip
- * @param i_sc Step code data struct
- * @return FAIL if MuranoDD2Plus or Venice, SUCCESS otherwise
- */
-int32_t dd1mcifirBit(ExtensibleChip * i_mcsChip,
- STEP_CODE_DATA_STRUCT & i_sc,
- uint32_t i_bitNum )
-{
- int32_t l_rc = SUCCESS;
- bool isMuranoDD2Plus = false;
- bool isVenice = false;
- TargetHandle_t l_mcsTrgt = i_mcsChip->GetChipHandle();
- TargetHandle_t l_proc = getParentChip( l_mcsTrgt );
- uint8_t l_chipLevel = getChipLevel(l_proc);
- MODEL l_model = getProcModel(l_proc);
-
- if( MODEL_VENICE == l_model )
- isVenice = true;
- else if( (0x20 <= l_chipLevel) && (MODEL_MURANO == l_model) )
- isMuranoDD2Plus = true;
-
- if(isMuranoDD2Plus || isVenice)
- {
- l_rc = FAIL;
- }
- else
- {
- i_sc.service_data->SetCallout(l_mcsTrgt, MRU_MED);
- ClearServiceCallFlag(i_mcsChip, i_sc);
- if(48 == i_bitNum)
- i_sc.service_data->SetErrorSig( PRDFSIG_MciFir_48_DD1Signature );
- else if(49 == i_bitNum)
- i_sc.service_data->SetErrorSig( PRDFSIG_MciFir_49_DD1Signature );
- }
-
- return l_rc;
-}
-
-#define PLUGIN_MCIFIR_DD1_CHECK( BITNUM ) \
-int32_t dd1mcifirBit##BITNUM (ExtensibleChip * i_mcsChip, \
- STEP_CODE_DATA_STRUCT & i_sc ) \
-{ \
- return dd1mcifirBit( i_mcsChip, i_sc, BITNUM ); \
-} \
-PRDF_PLUGIN_DEFINE( Mcs, dd1mcifirBit##BITNUM );
-
-PLUGIN_MCIFIR_DD1_CHECK( 48 )
-PLUGIN_MCIFIR_DD1_CHECK( 49 )
-
-//------------------------------------------------------------------------------
-
-/**
- * @brief Handles a memory mirror action event.
- * @param i_mcsChip An MCS chip.
- * @param i_sc The step code data struct
- * @returns SUCCESS always
- */
-int32_t handleMirrorAction( ExtensibleChip * i_mcsChip,
- STEP_CODE_DATA_STRUCT & i_sc )
-{
- #define PRDF_FUNC "[handleMirrorAction] "
-
- int32_t l_rc = SUCCESS;
-
- do
- {
- // Get the primary MCS of the mirrored pair.
- P8McsDataBundle * mcsdb = getMcsDataBundle( i_mcsChip );
- ExtensibleChip * primcs = mcsdb->getPrimaryMirroredMcs();
- if ( NULL == primcs )
- {
- PRDF_ERR( PRDF_FUNC "getPrimaryMirroredMcs() failed: "
- "i_mcsChip=0x%08x", i_mcsChip->GetId() );
- break;
- }
-
- // Manually capture the registers needed from the primary MCS.
- CaptureData & cd = i_sc.service_data->GetCaptureData();
- primcs->CaptureErrorData( cd, Util::hashString("MirrorRegs") );
-
- SCAN_COMM_REGISTER_CLASS * reg = primcs->getRegister("MCHWFM");
- l_rc = reg->Read();
- if ( SUCCESS != l_rc )
- {
- PRDF_ERR( PRDF_FUNC "Read() failed on MCHWFM: primcs=0x%08x",
- primcs->GetId() );
- break;
- }
-
- if ( i_sc.service_data->IsAtThreshold() )
- {
- if ( reg->IsBitSet(1) ) // Mirror disabled.
- {
- // Error log will be predictive.
- i_sc.service_data->SetErrorSig( PRDFSIG_MirrorActionTH );
- }
- else // Mirror still enabled but getting a flood of attentions.
- {
- // Just submit the error log as hidden.
- i_sc.service_data->clearLogging();
- }
- }
- else // Under threshold
- {
- // Re-enable the mirror.
- reg->ClearBit(1);
- reg->ClearBit(2);
- reg->ClearBit(3);
-
- l_rc = reg->Write();
- if ( SUCCESS != l_rc )
- {
- PRDF_ERR( PRDF_FUNC "Write() failed on MCHWFM: primcs=0x%08x",
- primcs->GetId() );
- break;
- }
- }
-
- } while (0);
-
- return SUCCESS;
-
- #undef PRDF_FUNC
-}
-PRDF_PLUGIN_DEFINE( Mcs, handleMirrorAction );
-
-//------------------------------------------------------------------------------
-
-int32_t calloutInterface_dmi( ExtensibleChip * i_mcsChip,
- STEP_CODE_DATA_STRUCT & io_sc )
-{
- CalloutUtil::calloutBusInterface( i_mcsChip, MRU_LOW );
- return SUCCESS;
-}
-PRDF_PLUGIN_DEFINE( Mcs, calloutInterface_dmi );
-
-} // end namespace Mcs
-} // end namespace PRDF
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H b/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H
deleted file mode 100644
index 338a99468..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H
+++ /dev/null
@@ -1,146 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfP8McsDataBundle.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
-/* [+] 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 __prdfP8McsDataBundle_H
-#define __prdfP8McsDataBundle_H
-
-/** @file prdfP8McsDataBundle.H
- * @brief Contains the data bundle for a P8 MCS object.
- */
-
-#include <iipSystem.h>
-#include <prdfExtensibleChip.H>
-#include <prdfGlobal.H>
-#include <prdfPlatServices.H>
-#include <prdfParserEnums.H>
-
-namespace PRDF
-{
-
-/**
- * @brief The P8 Centaur MBA data bundle.
- */
-class P8McsDataBundle : public DataBundle
-{
- public: // functions
-
- /**
- * @brief Constructor.
- * @param i_mcsChip The MCS chip.
- */
- explicit P8McsDataBundle( ExtensibleChip * i_mcsChip ) :
- iv_mcsChip(i_mcsChip), iv_membChip(NULL), iv_primMirMcsChip(NULL)
- {}
-
- /**
- * @brief Destructor.
- */
- ~P8McsDataBundle() {}
-
- /** @return The connected MEMBUF chip. */
- ExtensibleChip * getMembChip()
- {
- using namespace TARGETING;
- using namespace PlatServices;
-
- if ( NULL == iv_membChip )
- {
- TargetHandle_t mcs = iv_mcsChip->GetChipHandle();
-
- TargetHandle_t memb = getConnectedChild( mcs, TYPE_MEMBUF, 0 );
- if ( NULL != memb )
- iv_membChip = (ExtensibleChip *)systemPtr->GetChip( memb );
- }
-
- return iv_membChip;
- }
-
- /** @return The primary MCS of a mirrored MCS pair. */
- ExtensibleChip * getPrimaryMirroredMcs()
- {
- using namespace TARGETING;
- using namespace PlatServices;
-
- do
- {
- if ( NULL != iv_primMirMcsChip ) break; // nothing to do.
-
- TargetHandle_t mcs = iv_mcsChip->GetChipHandle();
- uint32_t pos = getTargetPosition(mcs);
-
- if ( MAX_MCS_PER_PROC <= pos ) break; // can't continue, return NULL
-
- if ( 0 == (pos & 0x1) ) // This is the primary.
- {
- iv_primMirMcsChip = iv_mcsChip;
- }
- else // The other MCS is the primary.
- {
- pos &= ~0x1; // get even position
-
- TargetHandle_t proc = getConnectedParent( mcs, TYPE_PROC );
- if ( NULL == proc ) break; // can't continue, return NULL
-
- TargetHandle_t pmcs = getConnectedChild( proc, TYPE_MCS, pos );
- if ( NULL == pmcs ) break; // can't continue, return NULL
-
- iv_primMirMcsChip = (ExtensibleChip *)systemPtr->GetChip(pmcs);
- }
-
- } while (0);
-
- return iv_primMirMcsChip;
- }
-
- private: // functions
-
- P8McsDataBundle( const P8McsDataBundle & );
- const P8McsDataBundle & operator=( const P8McsDataBundle & );
-
- private: // instance variables
-
- ExtensibleChip * iv_mcsChip; ///< This MCS chip
- ExtensibleChip * iv_membChip; ///< The connected MEMBUF chip
-
- /** The primary MCS of a mirrored MCS pair. */
- ExtensibleChip * iv_primMirMcsChip;
-};
-
-//------------------------------------------------------------------------------
-
-/**
- * @brief Wrapper function for the P8McsDataBundle.
- * @param i_mcsChip The MCS chip.
- * @return This MBA's data bundle.
- */
-inline P8McsDataBundle * getMcsDataBundle( ExtensibleChip * i_mcsChip )
-{
- return static_cast<P8McsDataBundle *>(i_mcsChip->getDataBundle());
-}
-
-} // end namespace PRDF
-
-#endif // __prdfP8McsDataBundle_H
-
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H b/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H
deleted file mode 100644
index ff061ddc0..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H
+++ /dev/null
@@ -1,39 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfP8McsExtraSig.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
-/* [+] 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 __prdfP8McsExtraSig_H
-#define __prdfP8McsExtraSig_H
-
-#include <prdrSignatures.H>
-
-PRDR_ERROR_SIGNATURE(MciFir_48_DD1Signature, 0x55550000, "MCIFIR[48]",
- "DD1: MCIFIRQ_INTERNAL_SCOM_ERROR");
-PRDR_ERROR_SIGNATURE(MciFir_49_DD1Signature, 0x55550001, "MCIFIR[49]",
- "DD1: MCIFIRQ_INTERNAL_SCOM_ERROR_CLONE");
-
-PRDR_ERROR_SIGNATURE(MirrorActionTH, 0x55550010, "MCIFIR[32]",
- "Mirror disabled due to too many UEs");
-
-#endif // __prdfP8McsExtraSig_H
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfP8ProcMbCommonExtraSig.H b/src/usr/diag/prdf/common/plat/pegasus/prdfP8ProcMbCommonExtraSig.H
deleted file mode 100644
index 18dfff660..000000000
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfP8ProcMbCommonExtraSig.H
+++ /dev/null
@@ -1,36 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfP8ProcMbCommonExtraSig.H $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
-/* */
-/* 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 __prdfP8ProcMbCommonExtraSig_H
-#define __prdfP8ProcMbCommonExtraSig_H
-
-#include <prdrSignatures.H>
-
-/* ERepair Extra signatures */
-PRDR_ERROR_SIGNATURE( ERepair_ERROR, 0xffff0000, "","ERepair Internal error" );
-PRDR_ERROR_SIGNATURE( ERepair_FWThrExceeded, 0xffff0001, "",
- "ERepair FW threshold exceeded" );
-
-/* PLL Extra signatures */
-PRDR_ERROR_SIGNATURE( PLL_ERROR, 0x00ed0000, "","PLL error" );
-#endif // __prdfP8ProcMbCommonExtraSig_H
diff --git a/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C b/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C
deleted file mode 100644
index 6e0139169..000000000
--- a/src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C
+++ /dev/null
@@ -1,102 +0,0 @@
-/* IBM_PROLOG_BEGIN_TAG */
-/* This is an automatically generated prolog. */
-/* */
-/* $Source: src/usr/diag/prdf/plat/pegasus/prdfPlatCenPll.C $ */
-/* */
-/* OpenPOWER HostBoot Project */
-/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2018 */
-/* [+] 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 prdfPlatCenPLL.C
- * @brief Contains all Hostboot-only plugin code for the Centaur PLL logic.
- */
-
-// Framework includes
-#include <iipServiceDataCollector.h>
-#include <prdfExtensibleChip.H>
-#include <prdfPluginMap.H>
-#include <prdfPlatServices.H>
-#include <prdfCenMemUtils.H>
-
-using namespace TARGETING;
-
-namespace PRDF
-{
-
-using namespace PlatServices;
-
-namespace Membuf
-{
-
-/**
- * @brief Optional plugin function called after analysis is complete but
- * before PRD exits.
- * @param i_chip A MEMBUF chip.
- * @param io_sc The step code data struct.
- * @note This is especially useful for any analysis that still needs to be
- * done after the framework clears the FIR bits that were at attention.
- * @return SUCCESS.
- */
-int32_t PllPostAnalysis( ExtensibleChip * i_chip,
- STEP_CODE_DATA_STRUCT & io_sc )
-{
- #define PRDF_FUNC "[Membuf::PllPostAnalysis] "
-
- int32_t o_rc = SUCCESS;
-
-
- do
- {
- // The PLL FIR bits have been cleared on the MEMBUF, but there are some
- // bits on the processor side of the bus that need to be cleared in
- // order to complete clear the attentions.
- MemUtils::cleanupChnlAttns<TYPE_MEMBUF>( i_chip, io_sc );
-
- #ifndef __HOSTBOOT_RUNTIME
-
- if ( isInMdiaMode() &&
- io_sc.service_data->IsAtThreshold() &&
- io_sc.service_data->isGardRequested() )
- {
- // Tell MDIA to stop testing on all attached MBAs.
- for ( auto & trgt : getConnected(i_chip->getTrgt(), TYPE_MBA) )
- {
- if ( SUCCESS != mdiaSendEventMsg(trgt, MDIA::STOP_TESTING) )
- {
- PRDF_ERR( PRDF_FUNC "mdiaSendEventMsg(0x%08x,STOP_TESTING) "
- "failed", getHuid(trgt) );
- o_rc |= FAIL;
- continue; // keep going
- }
- }
- }
-
- #endif
-
- } while(0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-PRDF_PLUGIN_DEFINE( Membuf, PllPostAnalysis );
-
-} // end namespace Membuf
-
-} // end namespace PRDF
OpenPOWER on IntegriCloud