summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime/customize_attrs_for_payload.C
blob: 69dfc3dfb964d6f0663cdefb4d41943fb5060e8a (plain)
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
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/runtime/customize_attrs_for_payload.C $               */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2012,2019                        */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* Licensed under the Apache License, Version 2.0 (the "License");        */
/* you may not use this file except in compliance with the License.       */
/* You may obtain a copy of the License at                                */
/*                                                                        */
/*     http://www.apache.org/licenses/LICENSE-2.0                         */
/*                                                                        */
/* Unless required by applicable law or agreed to in writing, software    */
/* distributed under the License is distributed on an "AS IS" BASIS,      */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
/* implied. See the License for the specific language governing           */
/* permissions and limitations under the License.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

/**
 *  @file customize_attrs_for_payload.C
 *
 *  @brief Customize attributes in the targeting model that vary based on
 *      payload which are only needed for runtime operation
 */

//#include <sys/misc.h>
#include <trace/interface.H>
#include <errl/errlentry.H>
#include <targeting/common/target.H>
#include <targeting/common/targetservice.H>
#include <targeting/common/utilFilter.H>
#include <runtime/runtime_reasoncodes.H>
#include <runtime/runtime.H>
#include <errl/errlmanager.H>
#include <runtime/rt_targeting.H>
#include <arch/pirformat.H>
#include <targeting/common/util.H>
#include <errl/errludtarget.H>
#include <runtime/customize_attrs_for_payload.H>
#include <runtime/interface.h>

extern trace_desc_t *g_trac_runtime;

namespace RUNTIME
{

/**
 *  @brief Create procesor targeting target not found error
 *  @param[in] i_pTarget Targeting target which did not have a processor
 *      targeting target.  Must not be NULL (asserts otherwise)
 *  @return Error log handle
 *  @retval !NULL New error log indicating the error
 */
errlHndl_t createProcNotFoundError(
    const TARGETING::Target* const i_pTarget)
{
    assert(i_pTarget != NULL);

    errlHndl_t pError = NULL;
    auto huid = TARGETING::get_huid(i_pTarget);
    TRACFCOMP(g_trac_runtime, ERR_MRK
        " No processor targeting target found for targeting target with "
        "HUID of 0x%08X",
        huid);

    // Note: the module ID below references the function that exclusively
    // creates this error
    /*@
     * @errortype
     * @moduleid    RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET
     * @reasoncode  RUNTIME::RT_NO_PROC_TARGET
     * @userdata1   Input targeting target's HUID
     * @devdesc     No processor targeting target was found for the given
     *              targeting target
     * @custdesc    Unexpected internal firmware error
     */
    pError = new ERRORLOG::ErrlEntry(
        ERRORLOG::ERRL_SEV_INFORMATIONAL,
        RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET,
        RUNTIME::RT_NO_PROC_TARGET,
        huid,
        0,
        ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);

    ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting target").
        addToLog(pError);

    return pError;
}

/**
 *  @brief Returns the runtime target ID for a given targeting target for all
 *      hypervisors other than PHyp
 *  @param[in] i_pTarget Targeting target, must not be NULL (asserts
 *      otherwise)
 *  @param[out] o_rtTargetId Runtime target ID which maps to the given targeting
 *      target
 *  @return Error log handle
 *  @retval NULL Computed a valid runtime target ID for the given input
 *      targeting target and returned it in the output parameter.
 *  @retval !NULL Failed to compute a runtime target ID for the given input
 *      targeting target. Ignore output parameter.
 */
errlHndl_t computeNonPhypRtTarget(
    const TARGETING::Target*   i_pTarget,
          RT_TARG::rtChipId_t& o_rtTargetId)
{
    assert(i_pTarget != NULL);

    errlHndl_t pError = NULL;

    do
    {
        if(i_pTarget == TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL)
        {
            TARGETING::Target* masterProcChip = NULL;
            TARGETING::targetService().
                masterProcChipTargetHandle(masterProcChip);
            i_pTarget = masterProcChip;
        }

        auto targetingTargetType = i_pTarget->getAttr<TARGETING::ATTR_TYPE>();

        if(targetingTargetType == TARGETING::TYPE_PROC)
        {
            uint32_t fabId =
                i_pTarget->getAttr<TARGETING::ATTR_FABRIC_GROUP_ID>();

            uint32_t procPos =
                i_pTarget->getAttr<TARGETING::ATTR_FABRIC_CHIP_ID>();

            o_rtTargetId = PIR_t::createChipId( fabId, procPos );
        }
        else if( targetingTargetType == TARGETING::TYPE_MEMBUF)
        {
            //MEMBUF
            // 0b1000.0000.0000.0000.0000.0GGG.GCCC.MMMM
            // where GGGG is group, CCC is chip, MMMM is memory channel
            //
            TARGETING::TargetHandleList targetList;

            getParentAffinityTargets(targetList,
                                    i_pTarget,
                                    TARGETING::CLASS_UNIT,
                                    TARGETING::TYPE_DMI,
                                    TARGETING::UTIL_FILTER_ALL);

            if( targetList.empty() )
            {
                auto huid = get_huid(i_pTarget);
                TRACFCOMP(g_trac_runtime, ERR_MRK
                    "No associated DMI targeting target(s) found for MEMBUF "
                    "targeting target with HUID of 0x%08X",
                    huid);
                /*@
                 * @error
                 * @moduleid    RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET
                 * @reasoncode  RUNTIME::RT_UNIT_TARGET_NOT_FOUND
                 * @userdata1   MEMBUF targeting target's HUID
                 * @devdesc     No associated DMI targeting target(s) found for
                 *              given MEMBUF targeting target
                 * @custdesc    Unexpected internal firmware error
                 */
                pError = new ERRORLOG::ErrlEntry(
                    ERRORLOG::ERRL_SEV_INFORMATIONAL,
                    RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET,
                    RUNTIME::RT_UNIT_TARGET_NOT_FOUND,
                    huid,
                    0,
                    ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);

                ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target").
                    addToLog(pError);

                break;
            }

            auto target = targetList[0];
            auto pos = target->getAttr<TARGETING::ATTR_CHIP_UNIT>();

            targetList.clear();
            getParentAffinityTargets(targetList,
                                     target,
                                     TARGETING::CLASS_CHIP,
                                     TARGETING::TYPE_PROC,
                                     TARGETING::UTIL_FILTER_ALL);

            if(targetList.empty())
            {
                pError = createProcNotFoundError(target);
                break;
            }

            auto procTarget = targetList[0];
            pError = computeNonPhypRtTarget(procTarget, o_rtTargetId);
            if(pError)
            {
                break;
            }

            o_rtTargetId = (o_rtTargetId << RT_TARG::MEMBUF_ID_SHIFT);
            o_rtTargetId += pos;
            o_rtTargetId |= HBRT_MEMBUF_TYPE;
        }
        else if(targetingTargetType == TARGETING::TYPE_CORE)
        {
            // CORE
            // 0b0100.0000.0000.0000.0000.GGGG.CCCP.PPPP
            // GGGG is group, CCC is chip, PPPPP is core
            auto pos = i_pTarget->getAttr<TARGETING::ATTR_CHIP_UNIT>();
            const TARGETING::Target* procTarget = getParentChip(i_pTarget);
            if(procTarget == NULL)
            {
                pError = createProcNotFoundError(i_pTarget);
                break;
            }

            pError = computeNonPhypRtTarget(procTarget, o_rtTargetId);
            if(pError)
            {
                break;
            }

            o_rtTargetId = PIR_t::createCoreId(o_rtTargetId,pos);
            o_rtTargetId |= HBRT_CORE_TYPE;
        }
        else if( targetingTargetType == TARGETING::TYPE_OCMB_CHIP)
        {
            // OCMB (This layout mimics MEMBUF)
            // 0b1000.0000.0000.0000.0000.0GGG.GCCC.UUUU
            // where GGGG is group, CCC is chip, UUUU is OMI chip unit
            //
            TARGETING::TargetHandleList targetList;

            getParentAffinityTargets(targetList,
                                    i_pTarget,
                                    TARGETING::CLASS_UNIT,
                                    TARGETING::TYPE_OMI,
                                    TARGETING::UTIL_FILTER_ALL);

            if( targetList.empty() )
            {
                auto huid = get_huid(i_pTarget);
                TRACFCOMP(g_trac_runtime, ERR_MRK
                    "No associated OMI targeting target(s) found for OCMB_CHIP "
                    "targeting target with HUID of 0x%08X",
                    huid);
                /*@
                 * @error
                 * @moduleid    RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET
                 * @reasoncode  RUNTIME::RT_NO_OMI_TARGET_FOUND
                 * @userdata1   OCMB targeting target's HUID
                 * @devdesc     No associated OMI targeting target(s) found for
                 *              given OCMB targeting target
                 * @custdesc    Unexpected internal firmware error
                 */
                pError = new ERRORLOG::ErrlEntry(
                    ERRORLOG::ERRL_SEV_INFORMATIONAL,
                    RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET,
                    RUNTIME::RT_NO_OMI_TARGET_FOUND,
                    huid,
                    0,
                    ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);

                ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target").
                    addToLog(pError);

                break;
            }

            auto target = targetList[0];
            auto pos = target->getAttr<TARGETING::ATTR_CHIP_UNIT>();

            targetList.clear();
            getParentAffinityTargets(targetList,
                                     target,
                                     TARGETING::CLASS_CHIP,
                                     TARGETING::TYPE_PROC,
                                     TARGETING::UTIL_FILTER_ALL);

            if(targetList.empty())
            {
                pError = createProcNotFoundError(target);
                break;
            }

            auto procTarget = targetList[0];
            pError = computeNonPhypRtTarget(procTarget, o_rtTargetId);
            if(pError)
            {
                break;
            }

            // GGGG = 0 by default, CCC = o_rtTargetId, UUUU = pos
            // HBRT_MEMBUF_TYPE distinguishes this target as a MEMBUF/OCMB
            // Reusing MEMBUF for OCMB type as the two can't coexist
            o_rtTargetId = (o_rtTargetId << RT_TARG::MEMBUF_ID_SHIFT);
            o_rtTargetId += pos;  // OMI chip unit acts as unique target position
            o_rtTargetId |= HBRT_MEMBUF_TYPE;
        }
        else
        {
            auto huid = get_huid(i_pTarget);
            TRACFCOMP(g_trac_runtime,ERR_MRK
                      "Targeting target type 0x%08X not supported.  Cannot "
                      "convert targeting target with HUID of 0x%08X into a "
                      "runtime target ID",
                      targetingTargetType,
                      huid);
            /*@
             * @errortype
             * @moduleid    RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET
             * @reasoncode  RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED
             * @userdata1   Targeting target's HUID
             * @userdata2   Targeting target's type
             * @devdesc     The targeting type of the input targeting target is
             *              not supported by runtime code
             * @custdesc    Unexpected internal firmware error
             */
            pError = new ERRORLOG::ErrlEntry(
                ERRORLOG::ERRL_SEV_INFORMATIONAL,
                RUNTIME::MOD_CUST_COMP_NON_PHYP_RT_TARGET,
                RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED,
                huid,
                targetingTargetType,
                ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);

            ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target").
                addToLog(pError);
        }

    } while(0);

    return pError;
}

/**
 *  @brief Returns the runtime target type for a given targeting target
 *  @param[in] i_pTarget Targeting target, must not be NULL
 *      (asserts otherwise)
 *  @param[out] o_rtType Runtime target type for given targeting target
 *  @return Error log handle
 *  @retval NULL Returned supported runtime target type for the given input
 *      targeting target in the output parameter.
 *  @retval !NULL Failed to determine runtime target type for the
 *      given input targeting target, ignore output parameter.
 */
errlHndl_t getRtTypeForTarget(
    const TARGETING::Target*   i_pTarget,
          RT_TARG::rtChipId_t& o_rtType)
{
    assert(i_pTarget != NULL);

    errlHndl_t pError = NULL;

    if(i_pTarget == TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL)
    {
        TARGETING::Target* masterProcChip = NULL;
        TARGETING::targetService().
            masterProcChipTargetHandle(masterProcChip);
        i_pTarget = masterProcChip;
    }

    auto found = true;
    auto rtType = RT_TYPE_UNKNOWN;
    auto targetingTargetType = i_pTarget->getAttr<TARGETING::ATTR_TYPE>();
    switch(targetingTargetType)
    {
        case TARGETING::TYPE_PROC:
            rtType = HBRT_PROC_TYPE;
            break;
        case TARGETING::TYPE_MEMBUF:
            rtType = HBRT_MEMBUF_TYPE;
            break;
        case TARGETING::TYPE_CORE:
            rtType = HBRT_CORE_TYPE;
            break;
        case TARGETING::TYPE_OCMB_CHIP:
            // reusing MEMBUF type as it is not present
            rtType = HBRT_MEMBUF_TYPE;
            break;
        default:
            found = false;
            break;
    }

    if(!found)
    {
        auto huid = get_huid(i_pTarget);
        TRACFCOMP(g_trac_runtime, ERR_MRK
            "Input targeting target's type of 0x%08X is not supported. "
            "HUID: 0x%08X",
            targetingTargetType,
            huid);
        /*@
         * @errortype
         * @moduleid    RUNTIME::MOD_CUST_CONF_HBRT_HYP_IDS
         * @reasoncode  RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED
         * @userdata1   Target's HUID
         * @userdata2   Target's targeting type
         * @devdesc     Targeting target's type not supported by runtime code
         * @custdesc    Unexpected internal firmware error
         */
        pError = new ERRORLOG::ErrlEntry(
            ERRORLOG::ERRL_SEV_INFORMATIONAL,
            RUNTIME::MOD_CUST_CONF_HBRT_HYP_IDS,
            RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED,
            huid,
            targetingTargetType,
            ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);

        ERRORLOG::ErrlUserDetailsTarget(i_pTarget,"Targeting Target").
            addToLog(pError);
    }

    o_rtType = rtType;

    return pError;
}

errlHndl_t configureHbrtHypIds(const bool i_configForPhyp)
{
    TRACDCOMP( g_trac_runtime, ENTER_MRK "configureHbrtHypIds" );

    errlHndl_t pError = NULL;

    TARGETING::PredicateCTM isaProc(
        TARGETING::CLASS_CHIP, TARGETING::TYPE_PROC);
    TARGETING::PredicateCTM isaMembuf(
        TARGETING::CLASS_CHIP, TARGETING::TYPE_MEMBUF);
    TARGETING::PredicateCTM isaCore(
        TARGETING::CLASS_UNIT, TARGETING::TYPE_CORE);
    TARGETING::PredicateCTM isanOcmbChip(
        TARGETING::CLASS_CHIP, TARGETING::TYPE_OCMB_CHIP);
    TARGETING::PredicatePostfixExpr isaProcMembufCoreorOcmb;
    isaProcMembufCoreorOcmb.push(&isaProc).push(&isaMembuf).Or()
        .push(&isaCore).Or().push(&isanOcmbChip).Or();
    TARGETING::TargetRangeFilter pIt(
        TARGETING::targetService().begin(),
        TARGETING::targetService().end(),
        &isaProcMembufCoreorOcmb);
    for (; pIt; ++pIt)
    {
        auto hbrtHypId = HBRT_HYP_ID_UNKNOWN;

        // Phyp is the only special case
        if(i_configForPhyp)
        {
            auto rtType = RT_TYPE_UNKNOWN;
            pError = getRtTypeForTarget(*pIt,rtType);
            if(pError)
            {
                break;
            }

            switch ((*pIt)->getAttr<TARGETING::ATTR_TYPE>())
            {
              case TARGETING::TYPE_CORE:
                {
                    if(TARGETING::is_fused_mode())
                    {
                        // If we're in fused core mode, all core ID's must
                        // match that of the parent EX
                        auto type = TARGETING::TYPE_EX;
                        const TARGETING::Target* pEx =
                                TARGETING::getParent(*pIt,type);

                        // If this fails, everything is already hosed
                        assert(pEx != NULL);

                        hbrtHypId = (pEx)->getAttr<TARGETING::ATTR_ORDINAL_ID>();
                    }
                    else
                    {
                        hbrtHypId = (*pIt)->getAttr<TARGETING::ATTR_ORDINAL_ID>();
                    }
                    break;
                }
              case TARGETING::TYPE_MEMBUF:
                {
                    //MEMBUF
                    // 0b1000.0000.0000.0000.0000.0PPP.PPPP.MMMM
                    // where PP is the parent proc's id, MMMM is memory channel
                    //
                    TARGETING::TargetHandleList targetList;

                    getParentAffinityTargets(targetList,
                                             (*pIt),
                                             TARGETING::CLASS_UNIT,
                                             TARGETING::TYPE_DMI, false);
                    assert( !targetList.empty() );

                    auto dmi_target = targetList[0];
                    auto pos = dmi_target->getAttr<TARGETING::ATTR_CHIP_UNIT>();

                    targetList.clear();
                    getParentAffinityTargets(targetList,
                                             dmi_target,
                                             TARGETING::CLASS_CHIP,
                                             TARGETING::TYPE_PROC, false);
                    assert( !targetList.empty() );

                    auto procTarget = targetList[0];
                    hbrtHypId = procTarget->getAttr<TARGETING::ATTR_ORDINAL_ID>();
                    hbrtHypId = (hbrtHypId << RT_TARG::MEMBUF_ID_SHIFT);
                    hbrtHypId += pos;
                    break;
                }
              case TARGETING::TYPE_OCMB_CHIP:
                {
                    TRACDCOMP( g_trac_runtime, "configureHbrtHypIds> "
                      "Set ATTR_HBRT_HYP_ID attribute for OCMB target "
                      "with HUID of 0x%08X", TARGETING::get_huid(*pIt));

                    // TYPE_OCMB_CHIP (mimics MEMBUF layout)
                    // 0b1000.0000.0000.0000.0000.0PPP.PPPP.UUUU
                    // where PP is the parent proc's id, UUUU is OMI chip unit
                    //
                    TARGETING::TargetHandleList targetList;

                    getParentAffinityTargets(targetList,
                                             (*pIt),
                                             TARGETING::CLASS_UNIT,
                                             TARGETING::TYPE_OMI, false);
                    assert( !targetList.empty() );

                    auto omi_target = targetList[0];
                    auto pos = omi_target->getAttr<TARGETING::ATTR_CHIP_UNIT>();

                    targetList.clear();
                    getParentAffinityTargets(targetList,
                                             omi_target,
                                             TARGETING::CLASS_CHIP,
                                             TARGETING::TYPE_PROC, false);
                    assert( !targetList.empty() );

                    auto procTarget = targetList[0];
                    // Reusing MEMBUF for OCMB Chip communication
                    hbrtHypId = procTarget->getAttr<TARGETING::ATTR_ORDINAL_ID>();
                    hbrtHypId = (hbrtHypId << RT_TARG::MEMBUF_ID_SHIFT);
                    hbrtHypId += pos; // Add OMI chip unit to end
                    break;
                }
              case TARGETING::TYPE_PROC:
                {
                    hbrtHypId = (*pIt)->getAttr<TARGETING::ATTR_ORDINAL_ID>();
                    break;
                }
              default:
                {
                    auto huid = get_huid(*pIt);
                    auto targetType = (*pIt)->getAttr<TARGETING::ATTR_TYPE>();
                    TRACFCOMP(g_trac_runtime, ERR_MRK
                        "configureHbrtHypIds> 0x%08X is not a supported type. "
                        "HUID: 0x%08X", targetType, huid);
                    /*@
                     * @errortype
                     * @moduleid    RUNTIME::MOD_CONFIGURE_HBRT_HYP_IDS
                     * @reasoncode  RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED
                     * @userdata1   Target's HUID
                     * @userdata2   Target's targeting type
                     * @devdesc     Targeting target's type not supported by runtime code
                     * @custdesc    Unexpected internal firmware error
                     */
                    pError = new ERRORLOG::ErrlEntry(
                        ERRORLOG::ERRL_SEV_INFORMATIONAL,
                        RUNTIME::MOD_CONFIGURE_HBRT_HYP_IDS,
                        RUNTIME::RT_TARGET_TYPE_NOT_SUPPORTED,
                        huid,
                        targetType,
                        ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);

                    ERRORLOG::ErrlUserDetailsTarget(*pIt,"Targeting Target").
                        addToLog(pError);
                    break;
                }
            } // end of ATTR_TYPE switch
            hbrtHypId |= rtType;
        }
        else
        {
            pError = computeNonPhypRtTarget(*pIt,hbrtHypId);
            if(pError)
            {
                break;
            }
        }

        // Only set HBRT_HYP_ID attribute if no error found
        if (pError)
        {
            break;
        }

        (*pIt)->setAttr<TARGETING::ATTR_HBRT_HYP_ID>(hbrtHypId);
        TRACDCOMP( g_trac_runtime, "configureHbrtHypIds> "
            "Set ATTR_HBRT_HYP_ID attribute to 0x%016llX on targeting target "
            "with HUID of 0x%08X",
            hbrtHypId,TARGETING::get_huid(*pIt));
    }

    TRACDCOMP( g_trac_runtime, EXIT_MRK "configureHbrtHypIds" );

    return pError;
}

}; // End namespace RUNTIME
OpenPOWER on IntegriCloud