Skip to content

Commit a21c003

Browse files
cnpalmerzane131
authored andcommitted
PRD: Collect FFDC from both sides of bus for OMI errs
Change-Id: I553087a5910a87059858ccd8b3ec504b2a382a12 CQ: SW496342 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/99346 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamen G Tyner <ben.tyner@ibm.com> Reviewed-by: Zane C Shelley <zshelle@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/99982 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
1 parent 967ca2c commit a21c003

File tree

5 files changed

+135
-15
lines changed

5 files changed

+135
-15
lines changed

src/usr/diag/prdf/common/plat/axone/axone_omic_actions.rule

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,43 +30,50 @@
3030
actionclass dl0_omi
3131
{
3232
capture(dl0_ffdc);
33+
funccall("CollectOmiOcmbFfdc_0");
3334
callout(connected(TYPE_OMI,0), MRU_MED);
3435
};
3536

3637
actionclass dl1_omi
3738
{
3839
capture(dl1_ffdc);
40+
funccall("CollectOmiOcmbFfdc_1");
3941
callout(connected(TYPE_OMI,1), MRU_MED);
4042
};
4143

4244
actionclass dl2_omi
4345
{
4446
capture(dl2_ffdc);
47+
funccall("CollectOmiOcmbFfdc_2");
4548
callout(connected(TYPE_OMI,2), MRU_MED);
4649
};
4750

4851
actionclass dl0_omi_bus
4952
{
5053
capture(dl0_ffdc);
54+
funccall("CollectOmiOcmbFfdc_0");
5155
funccall("omiParentCalloutBusInterfacePlugin_0");
5256
};
5357

5458
actionclass dl1_omi_bus
5559
{
5660
capture(dl1_ffdc);
61+
funccall("CollectOmiOcmbFfdc_1");
5762
funccall("omiParentCalloutBusInterfacePlugin_1");
5863
};
5964

6065
actionclass dl2_omi_bus
6166
{
6267
capture(dl2_ffdc);
68+
funccall("CollectOmiOcmbFfdc_2");
6369
funccall("omiParentCalloutBusInterfacePlugin_2");
6470
};
6571

6672
/** OMI-DL0 Fatal Error */
6773
actionclass dl0_fatal_error
6874
{
6975
capture(dl0_ffdc);
76+
funccall("CollectOmiOcmbFfdc_0");
7077
try( funccall("DlFatalError_0"), dl0_omi_bus );
7178
threshold1;
7279
};
@@ -75,6 +82,7 @@ actionclass dl0_fatal_error
7582
actionclass dl1_fatal_error
7683
{
7784
capture(dl1_ffdc);
85+
funccall("CollectOmiOcmbFfdc_1");
7886
try( funccall("DlFatalError_1"), dl1_omi_bus );
7987
threshold1;
8088
};
@@ -83,6 +91,7 @@ actionclass dl1_fatal_error
8391
actionclass dl2_fatal_error
8492
{
8593
capture(dl2_ffdc);
94+
funccall("CollectOmiOcmbFfdc_2");
8695
try( funccall("DlFatalError_2"), dl2_omi_bus );
8796
threshold1;
8897
};

src/usr/diag/prdf/common/plat/axone/prdfOmicPlugins.C

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@
2525

2626
// Framework includes
2727
#include <iipServiceDataCollector.h>
28+
#include <iipSystem.h>
2829
#include <prdfExtensibleChip.H>
30+
#include <prdfGlobal_common.H>
2931
#include <prdfPluginMap.H>
32+
#include <UtilHash.H>
3033

3134
// Platform includes
3235
#include <prdfMemUtils.H>
@@ -168,6 +171,68 @@ DL_FATAL_ERROR_PLUGIN( 0 );
168171
DL_FATAL_ERROR_PLUGIN( 1 );
169172
DL_FATAL_ERROR_PLUGIN( 2 );
170173

174+
/**
175+
* @brief Plugin function to collect OMI fail related FFDC from the appropriate
176+
* OCMB.
177+
* @param i_chip An OMIC chip.
178+
* @param io_sc The step code data struct.
179+
* @param i_dl The DL relative to the OMIC.
180+
* @return SUCCESS.
181+
*/
182+
int32_t CollectOmiOcmbFfdc( ExtensibleChip * i_chip,
183+
STEP_CODE_DATA_STRUCT & io_sc, uint8_t i_dl )
184+
{
185+
#define PRDF_FUNC "[axone_omic::CollectOmiOcmbFfdc] "
186+
187+
do
188+
{
189+
TargetHandle_t omiTrgt = getConnectedChild( i_chip->getTrgt(), TYPE_OMI,
190+
i_dl );
191+
if ( nullptr == omiTrgt )
192+
{
193+
PRDF_ERR( PRDF_FUNC "Failed to get connected OMI from OMIC trgt "
194+
"huid=0x%08x.", i_chip->getHuid() );
195+
break;
196+
}
197+
TargetHandle_t ocmbTrgt = getConnectedChild(omiTrgt, TYPE_OCMB_CHIP, 0);
198+
if ( nullptr == ocmbTrgt )
199+
{
200+
PRDF_ERR( PRDF_FUNC "Failed to get connected OCMB from OMI trgt "
201+
"huid=0x%08x.", getHuid(omiTrgt) );
202+
break;
203+
}
204+
205+
ExtensibleChip * ocmbChip =
206+
(ExtensibleChip *)systemPtr->GetChip(ocmbTrgt);
207+
if ( nullptr == ocmbChip )
208+
{
209+
PRDF_ERR( PRDF_FUNC "Failed to get OCMB ExtensibleChip for trgt "
210+
"huid=0x%08x", getHuid(ocmbTrgt) );
211+
break;
212+
}
213+
214+
ocmbChip->CaptureErrorData( io_sc.service_data->GetCaptureData(),
215+
Util::hashString("omi_ocmb_ffdc") );
216+
217+
}while(0);
218+
219+
return SUCCESS;
220+
221+
#undef PRDF_FUNC
222+
}
223+
224+
#define OMI_OCMB_FFDC_PLUGIN( POS ) \
225+
int32_t CollectOmiOcmbFfdc_##POS( ExtensibleChip * i_chip, \
226+
STEP_CODE_DATA_STRUCT & io_sc ) \
227+
{ \
228+
return CollectOmiOcmbFfdc( i_chip, io_sc, POS ); \
229+
} \
230+
PRDF_PLUGIN_DEFINE( axone_omic, CollectOmiOcmbFfdc_##POS );
231+
232+
OMI_OCMB_FFDC_PLUGIN( 0 );
233+
OMI_OCMB_FFDC_PLUGIN( 1 );
234+
OMI_OCMB_FFDC_PLUGIN( 2 );
235+
171236
} // end namespace axone_omic
172237

173238
} // end namespace PRDF

src/usr/diag/prdf/common/plat/explorer/explorer_ocmb_actions.rule

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,5 +412,10 @@ actionclass analyzeTLXERR1
412412
analyze(gTLX_ERR1_REPORT);
413413
funccall("clearAndMaskTlxtRe");
414414
};
415-
actionclass analyzeOMIDLFIR { analyze(gOMIDLFIR); };
415+
actionclass analyzeOMIDLFIR
416+
{
417+
capture(omi_ocmb_ffdc);
418+
funccall("CollectOmiFfdc");
419+
analyze(gOMIDLFIR);
420+
};
416421

src/usr/diag/prdf/common/plat/explorer/explorer_ocmb_regs.rule

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -438,98 +438,98 @@
438438
{
439439
name "Explorer OMI-CMN Configuration Register";
440440
scomaddr 0x0801280E;
441-
capture group default;
441+
capture group omi_ocmb_ffdc;
442442
};
443443

444444
register PMU_CNTR
445445
{
446446
name "Explorer PMU Counter Register";
447447
scomaddr 0x0801280F;
448-
capture group default;
448+
capture group omi_ocmb_ffdc;
449449
};
450450

451451
register DL0_CONFIG0
452452
{
453453
name "Explorer OMI-DL0 Configuration0 Register";
454454
scomaddr 0x08012810;
455-
capture group default;
455+
capture group omi_ocmb_ffdc;
456456
};
457457

458458
register DL0_CONFIG1
459459
{
460460
name "Explorer OMI_DL0 Configuration1 Register";
461461
scomaddr 0x08012811;
462-
capture group default;
462+
capture group omi_ocmb_ffdc;
463463
};
464464

465465
register DL0_ERROR_MASK
466466
{
467467
name "Explorer DL0 Error Mask Register";
468468
scomaddr 0x08012812;
469-
capture group default;
469+
capture group omi_ocmb_ffdc;
470470
};
471471

472472
register DL0_ERROR_CAPTURE
473473
{
474474
name "Explorer DL0 Error Capture Register";
475475
scomaddr 0x08012814;
476-
capture group default;
476+
capture group omi_ocmb_ffdc;
477477
};
478478

479479
register DL0_EDPL_MAX_COUNT
480480
{
481481
name "Explorer DL0 EDPL Threshold Register";
482482
scomaddr 0x08012815;
483-
capture group default;
483+
capture group omi_ocmb_ffdc;
484484
};
485485

486486
register DL0_STATUS
487487
{
488488
name "Explorer DL0 Status Register";
489489
scomaddr 0x08012816;
490-
capture group default;
490+
capture group omi_ocmb_ffdc;
491491
};
492492

493493
register DL0_TRAINING_STATUS
494494
{
495495
name "Explorer DL0 Training Status Register";
496496
scomaddr 0x08012817;
497-
capture group default;
497+
capture group omi_ocmb_ffdc;
498498
};
499499

500500
register DL0_DLX_CONFIG
501501
{
502502
name "Explorer PowerBus DL0 Endpoint Config Register";
503503
scomaddr 0x08012818;
504-
capture group default;
504+
capture group omi_ocmb_ffdc;
505505
};
506506

507507
register DL0_DLX_INFO
508508
{
509509
name "Explorer DL0 Remote Information Register";
510510
scomaddr 0x08012819;
511-
capture group default;
511+
capture group omi_ocmb_ffdc;
512512
};
513513

514514
register DL0_ERROR_ACTION
515515
{
516516
name "Explorer DL0 Error Action Register";
517517
scomaddr 0x0801281D;
518-
capture group default;
518+
capture group omi_ocmb_ffdc;
519519
};
520520

521521
register DL0_DEBUG_AID
522522
{
523523
name "Explorer DL0 Debug Aid Register";
524524
scomaddr 0x0801281E;
525-
capture group default;
525+
capture group omi_ocmb_ffdc;
526526
};
527527

528528
register DL0_CYA_BITS
529529
{
530530
name "Explorer PowerBus DL0 CYA Bits Register";
531531
scomaddr 0x0801281F;
532-
capture group default;
532+
capture group omi_ocmb_ffdc;
533533
};
534534

535535
############################################################################

src/usr/diag/prdf/common/plat/explorer/prdfExplorerPlugins_common.C

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@
2525

2626
// Framework includes
2727
#include <iipServiceDataCollector.h>
28+
#include <iipSystem.h>
2829
#include <prdfExtensibleChip.H>
30+
#include <prdfGlobal_common.H>
2931
#include <prdfPluginMap.H>
32+
#include <UtilHash.H>
3033

3134
// Platform includes
3235
#include <prdfMemDbUtils.H>
@@ -102,6 +105,44 @@ int32_t PostAnalysis( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc )
102105
}
103106
PRDF_PLUGIN_DEFINE( explorer_ocmb, PostAnalysis );
104107

108+
/**
109+
* @brief Plugin that collects OMI fail related FFDC registers from the OMIC.
110+
* @param i_chip An OCMB chip.
111+
* @param io_sc The step code data struct.
112+
* @return SUCCESS
113+
*/
114+
int32_t CollectOmiFfdc( ExtensibleChip * i_chip, STEP_CODE_DATA_STRUCT & io_sc )
115+
{
116+
#define PRDF_FUNC "[explorer_ocmb::CollectOmiFfdc] "
117+
118+
// Get the OMI and OMIC targets
119+
TargetHandle_t omiTrgt = getConnectedParent( i_chip->getTrgt(), TYPE_OMI );
120+
TargetHandle_t omicTrgt = getConnectedParent( omiTrgt, TYPE_OMIC );
121+
122+
// Get the FFDC for the appropriate DL
123+
uint8_t omiPosRelOmic = omiTrgt->getAttr<ATTR_OMI_DL_GROUP_POS>(); // 0:2
124+
char ffdcName[64];
125+
sprintf( ffdcName, "dl%x_ffdc", omiPosRelOmic );
126+
127+
// Collect the capture data
128+
ExtensibleChip * omicChip = (ExtensibleChip *)systemPtr->GetChip(omicTrgt);
129+
if ( nullptr != omicChip )
130+
{
131+
omicChip->CaptureErrorData( io_sc.service_data->GetCaptureData(),
132+
Util::hashString(ffdcName) );
133+
}
134+
else
135+
{
136+
PRDF_ERR( PRDF_FUNC "Failed to get OMIC ExtensibleChip for trgt "
137+
"huid=0x%08x.", getHuid(omicTrgt) );
138+
}
139+
140+
return SUCCESS;
141+
142+
#undef PRDF_FUNC
143+
}
144+
PRDF_PLUGIN_DEFINE( explorer_ocmb, CollectOmiFfdc );
145+
105146

106147
//##############################################################################
107148
//

0 commit comments

Comments
 (0)