1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
|
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaTdCtlr_common.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2013,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 */
#include <prdfCenMbaTdCtlr_common.H>
// Framework includes
#include <prdfRegisterCache.H>
// Pegasus includes
#include <prdfCalloutUtil.H>
#include <prdfCenDqBitmap.H>
#include <prdfCenMbaDataBundle.H>
#include <prdfCenMbaThresholds.H>
using namespace TARGETING;
namespace PRDF
{
using namespace PlatServices;
//------------------------------------------------------------------------------
int32_t CenMbaTdCtlrCommon::initialize()
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::initialize] "
int32_t o_rc = SUCCESS;
do
{
// Set iv_mbaTrgt
iv_mbaTrgt = iv_mbaChip->GetChipHandle();
// Validate iv_mbaChip.
if ( TYPE_MBA != getTargetType(iv_mbaTrgt) )
{
PRDF_ERR( PRDF_FUNC "iv_mbaChip is not TYPE_MBA" );
o_rc = FAIL; break;
}
// Set iv_membChip.
CenMbaDataBundle * mbadb = getMbaDataBundle( iv_mbaChip );
iv_membChip = mbadb->getMembChip();
if ( NULL == iv_membChip )
{
PRDF_ERR( PRDF_FUNC "getMembChip() failed" );
o_rc = FAIL; break;
}
// Set iv_mbaPos.
iv_mbaPos = getTargetPosition( iv_mbaTrgt );
if ( MAX_MBA_PER_MEMBUF <= iv_mbaPos )
{
PRDF_ERR( PRDF_FUNC "iv_mbaPos=%d is invalid", iv_mbaPos );
o_rc = FAIL; break;
}
// Set iv_x4Dimm.
iv_x4Dimm = isDramWidthX4(iv_mbaTrgt);
} while (0);
return o_rc;
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
bool CenMbaTdCtlrCommon::isInTdMode()
{
return ( (NO_OP != iv_tdState) && (MAX_TD_STATE > iv_tdState) );
}
//------------------------------------------------------------------------------
int32_t CenMbaTdCtlrCommon::cleanupPrevCmd()
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::cleanupPrevCmd] "
int32_t o_rc = SUCCESS;
// Clean up the current maintenance command. This must be done whenever
// maintenance command will no longer be executed.
if ( NULL != iv_mssCmd )
{
o_rc = iv_mssCmd->cleanupCmd();
if ( SUCCESS != o_rc )
PRDF_ERR( PRDF_FUNC "cleanupCmd() failed" );
delete iv_mssCmd; iv_mssCmd = NULL;
}
// Clear the command complete attention. This must be done before starting
// the next maintenance command.
SCAN_COMM_REGISTER_CLASS * firand = iv_mbaChip->getRegister("MBASPA_AND");
firand->setAllBits();
firand->ClearBit(0); // Maintenance command complete
firand->ClearBit(8); // Maintenance command complete (DD1.0 workaround)
if ( SUCCESS != firand->Write() )
{
PRDF_ERR( PRDF_FUNC "Write() failed on MBASPA_AND" );
o_rc = FAIL;
}
return o_rc;
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
int32_t CenMbaTdCtlrCommon::prepareNextCmd( bool i_clearStats )
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::prepareNextCmd] "
int32_t o_rc = SUCCESS;
do
{
//----------------------------------------------------------------------
// Clean up previous command
//----------------------------------------------------------------------
o_rc = cleanupPrevCmd();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "cleanupPrevCmd() failed" );
break;
}
//----------------------------------------------------------------------
// Clear ECC counters
//----------------------------------------------------------------------
const char * reg_str = NULL;
if ( i_clearStats )
{
reg_str = (0 == iv_mbaPos) ? "MBA0_MBSTR" : "MBA1_MBSTR";
SCAN_COMM_REGISTER_CLASS * mbstr =
iv_membChip->getRegister( reg_str );
// MBSTR's content could be modified from cleanupCmd()
// so we need to refresh
o_rc = mbstr->ForceRead();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "ForceRead() failed on %s", reg_str );
break;
}
mbstr->SetBit(53); // Setting this bit clears all counters.
o_rc = mbstr->Write();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str );
break;
}
// Hardware automatically clears bit 53, so flush this register out
// of the register cache to avoid clearing the counters again with
// a write from the out-of-date cached copy.
RegDataCache & cache = RegDataCache::getCachedRegisters();
cache.flush( iv_membChip, mbstr );
}
//----------------------------------------------------------------------
// Clear ECC FIRs
//----------------------------------------------------------------------
reg_str = (0 == iv_mbaPos) ? "MBA0_MBSECCFIR_AND"
: "MBA1_MBSECCFIR_AND";
SCAN_COMM_REGISTER_CLASS * firand = iv_membChip->getRegister( reg_str );
firand->setAllBits();
// Clear all scrub MPE bits.
// This will need to be done when starting a TD procedure or background
// scrubbing. iv_rank may not be set when starting background scrubbing
// and technically there should only be one of these MPE bits on at a
// time so we should not have to worry about losing an attention by
// clearing them all.
firand->SetBitFieldJustified( 20, 8, 0 );
// Clear scrub NCE, SCE, MCE, RCE, SUE, UE bits (36-41)
firand->SetBitFieldJustified( 36, 6, 0 );
o_rc = firand->Write();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str );
break;
}
SCAN_COMM_REGISTER_CLASS * spaAnd =
iv_mbaChip->getRegister("MBASPA_AND");
spaAnd->setAllBits();
// Clear threshold exceeded attentions
spaAnd->SetBitFieldJustified( 1, 4, 0 );
o_rc = spaAnd->Write();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Write() failed on MBASPA_AND" );
break;
}
} while (0);
return o_rc;
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
int32_t CenMbaTdCtlrCommon::chipMarkCleanup()
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::chipMarkCleanup] "
int32_t o_rc = SUCCESS;
do
{
SCAN_COMM_REGISTER_CLASS * ddrPhyAndFir =
iv_mbaChip->getRegister( "MBADDRPHYFIR_AND" );
ddrPhyAndFir->setAllBits();
ddrPhyAndFir->ClearBit(50); // Calibration Error RE 0
ddrPhyAndFir->ClearBit(58); // Calibration Error RE 1
o_rc = ddrPhyAndFir->Write();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Write() failed on MBADDRPHYFIR_AND" );
break;
}
} while(0);
return o_rc;
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
int32_t CenMbaTdCtlrCommon::checkEccErrors( uint16_t & o_eccErrorMask,
STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::checkEccErrors] "
int32_t o_rc = SUCCESS;
o_eccErrorMask = NO_ERROR;
do
{
const char * reg_str = (0 == iv_mbaPos) ? "MBA0_MBSECCFIR"
: "MBA1_MBSECCFIR";
SCAN_COMM_REGISTER_CLASS * mbsEccFir
= iv_membChip->getRegister( reg_str );
o_rc = mbsEccFir->Read();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Read() failed on %s", reg_str );
break;
}
if ( mbsEccFir->IsBitSet(20 + iv_rank.getMaster()) )
{
o_eccErrorMask |= MPE;
io_sc.service_data->AddSignatureList(iv_mbaTrgt, PRDFSIG_MaintMPE);
// Clean up side-effect FIRs that may be set due to the chip mark.
o_rc = chipMarkCleanup();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "chipMarkCleanup() failed" );
break;
}
}
if ( mbsEccFir->IsBitSet(38) )
{
// No need to add error signature. MCE is not error. It will be
// handled only in VCM/DSD phase 2.
o_eccErrorMask |= MCE;
}
if ( mbsEccFir->IsBitSet(41) )
{
o_eccErrorMask |= UE;
io_sc.service_data->AddSignatureList( iv_mbaTrgt, PRDFSIG_MaintUE );
}
SCAN_COMM_REGISTER_CLASS * mbaSpaFir =
iv_mbaChip->getRegister("MBASPA");
o_rc = mbaSpaFir->Read();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Failed to read MBASPA Regsiter");
break;
}
if ( mbaSpaFir->IsBitSet(1) )
{
o_eccErrorMask |= HARD_CTE;
io_sc.service_data->AddSignatureList( iv_mbaTrgt,
PRDFSIG_MaintHARD_CTE );
}
if ( mbaSpaFir->IsBitSet(2) )
{
o_eccErrorMask |= SOFT_CTE;
io_sc.service_data->AddSignatureList( iv_mbaTrgt,
PRDFSIG_MaintSOFT_CTE );
}
if ( mbaSpaFir->IsBitSet(3) )
{
o_eccErrorMask |= INTER_CTE;
io_sc.service_data->AddSignatureList( iv_mbaTrgt,
PRDFSIG_MaintINTER_CTE );
}
if ( mbaSpaFir->IsBitSet(4) )
{
o_eccErrorMask |= RETRY_CTE;
io_sc.service_data->AddSignatureList( iv_mbaTrgt,
PRDFSIG_MaintRETRY_CTE );
}
} while(0);
return o_rc;
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
int32_t CenMbaTdCtlrCommon::handleMCE_VCM2( STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::handleMCE_VCM2] "
using namespace fapi; // For spare config macros.
int32_t o_rc = SUCCESS;
iv_isEccSteer = false;
do
{
if ( VCM_PHASE_2 != iv_tdState )
{
PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
o_rc = FAIL; break;
}
setTdSignature( io_sc, PRDFSIG_VcmVerified );
if ( areDramRepairsDisabled() )
{
iv_tdState = NO_OP; // The TD procedure is complete.
io_sc.service_data->setServiceCall();
break; // nothing else to do.
}
// If there is a symbol mark on the same DRAM as the newly verified chip
// mark, remove the symbol mark.
const uint8_t cmDram = iv_mark.getCM().getDram();
if ( cmDram == iv_mark.getSM().getDram() )
{
iv_mark.clearSM();
bool blocked; // Won't be blocked because chip mark is in place.
o_rc = mssSetMarkStore( iv_mbaTrgt, iv_rank, iv_mark, blocked );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "mssSetMarkStore() failed" );
break;
}
}
bool startDsdProcedure = false;
// Read VPD.
CenDqBitmap bitmap;
o_rc = getBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getBadDqBitmap() failed" );
break;
}
// The chip mark is considered verified, so set it in VPD.
o_rc = bitmap.setDram( iv_mark.getCM() );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "setDram() failed" );
break;
}
uint8_t ps = iv_mark.getCM().getPortSlct();
uint8_t spareConfig = ENUM_ATTR_VPD_DIMM_SPARE_NO_SPARE;
o_rc = getDimmSpareConfig( iv_mbaTrgt, iv_rank, ps,
spareConfig );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getDimmSpareConfig() failed" );
break;
}
// Check if DRAM spare is present. Also, ECC spares are available on all
// x4 DIMMS.
if ( ( ENUM_ATTR_VPD_DIMM_SPARE_NO_SPARE != spareConfig ) || iv_x4Dimm )
{
// Get the current spares in hardware.
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 the verified chip mark is on a spare then the spare is bad and
// hardware can not steer it to another DRAM even if one is
// available (e.g. ECC spare). In this this case, make error log
// predictive (remember that the chip mark has already been added to
// the callout list.
if ( ( cmDram == (0 == ps ? sp0.getDram() : sp1.getDram()) ) ||
( cmDram == ecc.getDram() ) )
{
setTdSignature( io_sc, PRDFSIG_VcmBadSpare );
io_sc.service_data->setServiceCall();
}
else
{
// Certain DIMMs may have had spares intentially made
// unavailable by the manufacturer. Check the VPD for available
// spares. Note that a x4 DIMM has DRAM spares and ECC spares,
// so check for availability on both.
bool dramSparePossible = false;
bool eccSparePossible = false;
o_rc = bitmap.isSpareAvailable( ps, dramSparePossible,
eccSparePossible );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "isDramSpareAvailable() failed" );
break;
}
if ( dramSparePossible &&
(0 == ps ? !sp0.isValid() : !sp1.isValid()) )
{
// A spare DRAM is available.
startDsdProcedure = true;
}
else if ( eccSparePossible && !ecc.isValid() )
{
startDsdProcedure = true;
iv_isEccSteer = true;
}
else
{
// Chip mark is in place and sparing is not possible.
setTdSignature( io_sc, PRDFSIG_VcmCmAndSpare );
io_sc.service_data->setServiceCall();
// The mark has already been added to the callout list.
// Callout the used spares, if they exists.
if ( sp0.isValid() )
{
MemoryMru memmru ( iv_mbaTrgt, iv_rank, sp0 );
io_sc.service_data->SetCallout( memmru );
}
if ( sp1.isValid() )
{
MemoryMru memmru ( iv_mbaTrgt, iv_rank, sp1 );
io_sc.service_data->SetCallout( memmru );
}
if ( ecc.isValid() )
{
MemoryMru memmru ( iv_mbaTrgt, iv_rank, ecc );
io_sc.service_data->SetCallout( memmru );
}
}
}
}
else // DRAM spare not supported.
{
// Not able to do dram sparing. If there is a symbol mark, there are
// no repairs available so call it out and set the error log to
// predictive.
if ( iv_mark.getSM().isValid() )
{
setTdSignature( io_sc, PRDFSIG_VcmCmAndSm );
io_sc.service_data->setServiceCall();
}
}
// Write VPD.
o_rc = setBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "setBadDqBitmap() failed" );
break;
}
// Start DSD Phase 1, if possible.
if ( startDsdProcedure )
{
o_rc = startDsdPhase1( io_sc );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "startDsdPhase1() failed" );
break;
}
}
else
{
iv_tdState = NO_OP; // The TD procedure is complete.
}
} while(0);
return o_rc;
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
int32_t CenMbaTdCtlrCommon::handleMCE_DSD2( STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::handleMCE_DSD2] "
int32_t o_rc = SUCCESS;
do
{
if ( DSD_PHASE_2 != iv_tdState )
{
PRDF_ERR( PRDF_FUNC "Invalid state machine configuration" );
o_rc = FAIL; break;
}
setTdSignature( io_sc, PRDFSIG_DsdBadSpare );
io_sc.service_data->setServiceCall();
// Callout spare DRAM.
MemoryMru memmru ( iv_mbaTrgt, iv_rank, iv_mark.getCM() );
io_sc.service_data->SetCallout( memmru );
// The spare DRAM is bad, so set it in VPD. At this point, the chip mark
// should have already been set in the VPD because it was recently
// verified.
CenDqBitmap bitmap;
o_rc = getBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getBadDqBitmap() failed" );
break;
}
if ( iv_isEccSteer )
{
bitmap.setEccSpare();
}
else
{
o_rc = bitmap.setDramSpare( iv_mark.getCM().getPortSlct() );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "setDramSpare() failed" );
break;
}
}
o_rc = setBadDqBitmap( iv_mbaTrgt, iv_rank, bitmap );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "setBadDqBitmap() failed" );
break;
}
} while(0);
return o_rc;
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
int32_t CenMbaTdCtlrCommon::setRtEteThresholds()
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::setRtEteThresholds] "
int32_t o_rc = SUCCESS;
do
{
const char * reg_str = (0 == iv_mbaPos) ? "MBA0_MBSTR" : "MBA1_MBSTR";
SCAN_COMM_REGISTER_CLASS * mbstr = iv_membChip->getRegister( reg_str );
// MBSTR's content could be modified from cleanupCmd()
// so we need to refresh
o_rc = mbstr->ForceRead();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "ForceRead() failed on %s", reg_str );
break;
}
uint16_t softIntCe = 0;
o_rc = getScrubCeThreshold( iv_mbaChip, iv_rank, softIntCe );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getScrubCeThreshold() failed." );
break;
}
// Only care about retry CEs if there are a lot of them. So the
// threshold will be high in the field. However, in MNFG the retry CEs
// will be handled differently by putting every occurrence in the RCE
// table and doing targeted diagnostics when needed.
uint16_t retryCe = mfgMode() ? 1 : 2047;
uint16_t hardCe = 1; // Always stop on first occurrence.
mbstr->SetBitFieldJustified( 4, 12, softIntCe );
mbstr->SetBitFieldJustified( 16, 12, softIntCe );
mbstr->SetBitFieldJustified( 28, 12, hardCe );
mbstr->SetBitFieldJustified( 40, 12, retryCe );
// Set the per symbol counters to count hard CEs only. This is so that
// when the scrub stops on the first hard CE, we can use the per symbol
// counters to tell us which symbol reported the hard CE.
mbstr->SetBitFieldJustified( 55, 3, 0x1 );
o_rc = mbstr->Write();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Write() failed on %s", reg_str );
break;
}
} while(0);
return o_rc;
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
void CenMbaTdCtlrCommon::badPathErrorHandling( STEP_CODE_DATA_STRUCT & io_sc )
{
#define PRDF_FUNC "[CenMbaTdCtlrCommon::badPathErrorHandling] "
PRDF_ERR( PRDF_FUNC "iv_mbaChip:0x%08x iv_initialized:%c iv_tdState:%d "
"iv_rank:M%dS%d iv_mark:%2d %2d", iv_mbaChip->GetId(),
iv_initialized ? 'T' : 'F', iv_tdState, iv_rank.getMaster(),
iv_rank.getSlave(), iv_mark.getCM().getSymbol(),
iv_mark.getSM().getSymbol() );
iv_tdState = NO_OP;
setTdSignature( io_sc, PRDFSIG_MaintCmdComplete_ERROR );
io_sc.service_data->setServiceCall();
// There may have been a code bug, callout 2nd level support.
io_sc.service_data->SetCallout( NextLevelSupport_ENUM, MRU_HIGH );
// Callout the rank if no other callouts have been made (besides 2nd
// Level Support). Note that iv_mark is not always guaranteed to be
// valid for every error scenario. For simplicity, callout the rank that
// was targeted with low priority.
if ( 1 == io_sc.service_data->getMruListSize() )
{
MemoryMru memmru ( iv_mbaTrgt, iv_rank, MemoryMruData::CALLOUT_RANK );
io_sc.service_data->SetCallout( memmru, MRU_LOW );
}
// Just in case it was a legitimate maintenance command complete (error
// log not committed) but something else failed.
io_sc.service_data->clearFlag(ServiceDataCollector::DONT_COMMIT_ERRL);
#undef PRDF_FUNC
}
//------------------------------------------------------------------------------
void CenMbaTdCtlrCommon::setTdSignature( STEP_CODE_DATA_STRUCT & io_sc,
uint32_t i_sig )
{
HUID mbaId = iv_mbaChip->GetId();
(io_sc.service_data->GetErrorSignature())->setChipId(mbaId);
io_sc.service_data->SetErrorSig( i_sig );
}
} // end namespace PRDF
|