summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/utils/imageProcs/p9_ring_identification.H
blob: b9ddd5f4f696e991a7e7df13245b6ca1488b5c98 (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
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: chips/p9/utils/imageProcs/p9_ring_identification.H $          */
/*                                                                        */
/* IBM CONFIDENTIAL                                                       */
/*                                                                        */
/* EKB Project                                                            */
/*                                                                        */
/* COPYRIGHT 2015,2016                                                    */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* 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.                              */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef _P9_RING_IDENT_H_
#define _P9_RING_IDENT_H_
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

// General Ring ID list structure
typedef struct
{
    const char*  ringName;
    uint8_t      ringId;
    uint8_t      instanceIdMin;    // the min instanceId
    uint8_t      instanceIdMax;    // the max instanceId
    const char*  ringNameImg; // Ring name in image: ringName + "_ring"
    uint8_t      vpdKeyword;
    uint8_t      pllCopy;     // 0,1,2,3,4,5 -- No of PLL copies required
    uint64_t     scanRegionType;
} GenRingIdList;

typedef struct
{
    uint16_t  ring_offset;
    uint16_t  ring_size;
} Ring_toc_entry;

typedef struct
{
    uint8_t  variant[3];
} RingVariantOrder;


namespace PERV
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace N0
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace N1
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace N2
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace N3
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace XB
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace MC
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace OB0
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace OB1
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace OB2
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace OB3
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace PCI0
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace PCI1
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace PCI2
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace EQ
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

namespace EC
{
extern const GenRingIdList RING_ID_LIST_COMMON[];
extern const GenRingIdList RING_ID_LIST_INSTANCE[];
extern const RingVariantOrder RING_VARIANT_ORDER[];
}

// MVPD Ring ID list structure.
typedef struct
{
    const char*  ringName;
    //@FIXME: CMO: Replace this with RingID asap.
    uint8_t      ringId;
    uint8_t      instanceIdMin;    // the min instanceId
    uint8_t      instanceIdMax;    // the max instanceId
    uint8_t      vpdKeyword;
    uint8_t      vpdRingClass;     // Indicates std, gptr, or ex instance.
} RingIdList;


typedef struct
{
    const RingIdList* ringIdList;
    uint32_t    ringIdListSize;
} VPDRingList;

extern const RingIdList  RING_ID_LIST_PG[], RING_ID_LIST_PR[];
extern const VPDRingList ALL_VPD_RINGS[];

extern const uint32_t    RING_ID_LIST_CHIP_SIZE, RING_ID_LIST_CORE_SIZE,
       RING_ID_LIST_CME_SIZE, RING_ID_LIST_CC_SIZE;


// Enumerated VPD keyword values.
// Note! This is DIFFERENT from the MvpdKeyword list in fapiMvpdAccess.H which
//       can't be used in this file since it's not, per se, a fapi file. So
//       these values need to be translated in xip_customize when passing the
//       mvpdKeyword to getMvpdRing();
enum VpdKeyword
{
    VPD_KEYWORD_PDG = 0,
    VPD_KEYWORD_PDR = 1,
    NUM_OF_VPD_TYPES = 2,
    NON_VPD_RING = 3,
    NON_VPD_PLL_RING = 4,
};


enum VpdRingClass
{
    VPD_RING_CLASS_NEST = 0,   // Indicates NEST rings
    VPD_RING_CLASS_EQ = 1,     // Indicates EQ rings
    VPD_RING_CLASS_EX = 2,     // Indicates EX rings
    VPD_RING_CLASS_EC = 3,     // Indicates EC rings
    VPD_RING_CLASS_GPTR = 4,   // Indicates GPTR #G rings
    VPD_RING_CLASS_LAST = 5,
};


#define MVPD_END_OF_DATA_MAGIC (uint32_t)0x454E4400 // "END "


#endif
OpenPOWER on IntegriCloud