summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plat/pegasus/prdfP8DataBundle.H
blob: 41758d90963f8645afae3c7f85ccaad4510771f5 (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
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfP8DataBundle.H $    */
/*                                                                        */
/* IBM CONFIDENTIAL                                                       */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 2013,2014              */
/*                                                                        */
/* p1                                                                     */
/*                                                                        */
/* Object Code Only (OCO) source materials                                */
/* Licensed Internal Code Source Materials                                */
/* IBM HostBoot Licensed Internal Code                                    */
/*                                                                        */
/* The source code for this program is not published or otherwise         */
/* divested of its trade secrets, irrespective of what has been           */
/* deposited with the U.S. Copyright Office.                              */
/*                                                                        */
/* Origin: 30                                                             */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef __prdfP8DataBundle_H
#define __prdfP8DataBundle_H

/** @file  prdfP8DataBundle.H
 *  @brief Contains the data bundle for a P8 MCS object.
 */

#include <iipSystem.h>
#include <prdfExtensibleChip.H>
#include <prdfGlobal.H>
#include <prdfPlatServices.H>
//#include <prdfTrace.H>

namespace PRDF
{

/**
 * @brief The P8 data bundle.
 */
class P8DataBundle : public DataBundle
{
  public: // functions

      /*
       * @brief  Proc PLL chiplet types
       */
      enum ChipletType
      {
          ABUS,
          EX,
          PB,
      };

      /*
       * @brief  Proc PLL Error Reg data structure
       */
      struct PllErrReg
      {
          ExtensibleChip * chip;
          ChipletType type;
          SCAN_COMM_REGISTER_CLASS * errReg;
          SCAN_COMM_REGISTER_CLASS * configReg;
          PllErrReg() : chip(NULL), errReg(NULL), configReg(NULL) {}
      };

      typedef std::vector<PllErrReg>  ProcPllErrRegList;
      typedef ProcPllErrRegList::iterator ProcPllErrRegListIter;


    /**
     * @brief Constructor.
     * @param i_chip The P8 chip.
     */
    explicit P8DataBundle( ExtensibleChip * i_chip )
    {}

    /**
     * @brief Destructor.
     */
    ~P8DataBundle() {}

    /**
     * @brief get a list of Proc PLL Error reg data
     * @return returns a list of Proc PLL Error reg data
     */
    ProcPllErrRegList & getProcPllErrRegList()
    {
        return iv_procPllErrRegList;
    }

  private: // functions

    P8DataBundle( const P8DataBundle & );
    const P8DataBundle & operator=( const P8DataBundle & );

  private: // instance variables

    ProcPllErrRegList iv_procPllErrRegList;

};

//------------------------------------------------------------------------------

/**
 * @brief  Wrapper function for the P8DataBundle.
 * @param  i_chip The P8 chip.
 * @return This P8's data bundle.
 */
inline P8DataBundle * getDataBundle( ExtensibleChip * i_chip )
{
    return static_cast<P8DataBundle *>(i_chip->getDataBundle());
}

} // end namespace PRDF

#endif // __prdfP8DataBundle_H

OpenPOWER on IntegriCloud