xref: /linux/drivers/gpu/drm/amd/include/discovery.h (revision cb8fef4b07f71da01843457b66e579ad248a625e)
1 /*
2  * Copyright 2018 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  *
22  */
23 
24 #ifndef _DISCOVERY_H_
25 #define _DISCOVERY_H_
26 
27 #define PSP_HEADER_SIZE                 256
28 #define BINARY_SIGNATURE                0x28211407
29 #define DISCOVERY_TABLE_SIGNATURE       0x53445049
30 #define GC_TABLE_ID                     0x4347
31 #define HARVEST_TABLE_SIGNATURE         0x56524148
32 #define VCN_INFO_TABLE_ID               0x004E4356
33 #define MALL_INFO_TABLE_ID              0x4C4C414D
34 #define NPS_INFO_TABLE_ID 0x0053504E
35 
36 /* = ('I' << 16u | 'R' << 8u | 'M') */
37 #define MEM_RSV_TABLE_SIGNATURE          0x0049524D
38 #define MEM_RSV_TABLE_VERSION            0x01
39 #define MAX_MEM_REGION_NUM               16
40 
41 typedef enum {
42 	IP_DISCOVERY = 0,
43 	GC,
44 	HARVEST_INFO,
45 	VCN_INFO,
46 	MALL_INFO,
47 	NPS_INFO,
48 	MEM_RESERVED_INFO,
49 	TOTAL_TABLES = 7
50 } table;
51 
52 #pragma pack(1)
53 
54 typedef struct table_info
55 {
56 	uint16_t offset;   /* Byte offset */
57 	uint16_t checksum; /* Byte sum of the table */
58 	uint16_t size;     /* Table size */
59 	uint16_t padding;
60 } table_info;
61 
62 typedef struct binary_header
63 {
64 	/* psp structure should go at the top of this structure */
65 	uint32_t binary_signature; /* 0x7, 0x14, 0x21, 0x28 */
66 	uint16_t version_major;
67 	uint16_t version_minor;
68 	uint16_t binary_checksum;  /* Byte sum of the binary after this field */
69 	uint16_t binary_size;      /* Binary Size*/
70 	table_info table_list[TOTAL_TABLES];
71 } binary_header;
72 
73 typedef struct binary_header_v2
74 {
75 	/* psp structure should go at the top of this structure */
76 	uint32_t binary_signature; /* 0x7, 0x14, 0x21, 0x28 */
77 	uint16_t version_major;     /* 0x02 */
78 	uint16_t version_minor;
79 	uint16_t binary_checksum;  /* Byte sum of the binary after this field */
80 	uint16_t binary_size;      /* Binary Size*/
81 	uint16_t num_tables;
82 	uint16_t padding;
83 	table_info table_list[] __counted_by(num_tables);
84 } binary_header_v2;
85 
86 typedef struct die_info
87 {
88 	uint16_t die_id;
89 	uint16_t die_offset; /* Points to the corresponding die_header structure */
90 } die_info;
91 
92 
93 typedef struct ip_discovery_header
94 {
95 	uint32_t signature;    /* Table Signature */
96 	uint16_t version;      /* Table Version */
97 	uint16_t size;         /* Table Size */
98 	uint32_t id;           /* Table ID */
99 	uint16_t num_dies;     /* Number of Dies */
100 	die_info die_info[16]; /* list die information for up to 16 dies */
101 	union {
102 		uint16_t padding[1];	/* version <= 3 */
103 		struct {		/* version == 4 */
104 			uint8_t base_addr_64_bit : 1; /* ip structures are using 64 bit base address */
105 			uint8_t reserved : 7;
106 			uint8_t reserved2;
107 		};
108 	};
109 } ip_discovery_header;
110 
111 typedef struct ip
112 {
113 	uint16_t hw_id;           /* Hardware ID */
114 	uint8_t number_instance;  /* instance of the IP */
115 	uint8_t num_base_address; /* Number of Base Addresses */
116 	uint8_t major;            /* HCID Major */
117 	uint8_t minor;            /* HCID Minor */
118 	uint8_t revision;         /* HCID Revision */
119 #if defined(__BIG_ENDIAN)
120 	uint8_t reserved : 4;     /* Placeholder field */
121 	uint8_t harvest : 4;      /* Harvest */
122 #else
123 	uint8_t harvest : 4;      /* Harvest */
124 	uint8_t reserved : 4;     /* Placeholder field */
125 #endif
126 	uint32_t base_address[]; /* variable number of Addresses */
127 } ip;
128 
129 typedef struct ip_v3
130 {
131 	uint16_t hw_id;                         /* Hardware ID */
132 	uint8_t instance_number;                /* Instance number for the IP */
133 	uint8_t num_base_address;               /* Number of base addresses*/
134 	uint8_t major;                          /* Hardware ID.major version */
135 	uint8_t minor;                          /* Hardware ID.minor version */
136 	uint8_t revision;                       /* Hardware ID.revision version */
137 #if defined(__BIG_ENDIAN)
138 	uint8_t variant : 4;                    /* HW variant */
139 	uint8_t sub_revision : 4;               /* HCID Sub-Revision */
140 #else
141 	uint8_t sub_revision : 4;               /* HCID Sub-Revision */
142 	uint8_t variant : 4;                    /* HW variant */
143 #endif
144 	uint32_t base_address[];		/* Base Address list. Corresponds to the num_base_address field*/
145 } ip_v3;
146 
147 typedef struct ip_v4 {
148 	uint16_t hw_id;                         /* Hardware ID */
149 	uint8_t instance_number;                /* Instance number for the IP */
150 	uint8_t num_base_address;               /* Number of base addresses*/
151 	uint8_t major;                          /* Hardware ID.major version */
152 	uint8_t minor;                          /* Hardware ID.minor version */
153 	uint8_t revision;                       /* Hardware ID.revision version */
154 #if defined(LITTLEENDIAN_CPU)
155 	uint8_t sub_revision : 4;               /* HCID Sub-Revision */
156 	uint8_t variant : 4;                    /* HW variant */
157 #elif defined(BIGENDIAN_CPU)
158 	uint8_t variant : 4;                    /* HW variant */
159 	uint8_t sub_revision : 4;               /* HCID Sub-Revision */
160 #endif
161 	union {
162 		DECLARE_FLEX_ARRAY(uint32_t, base_address);	/* 32-bit Base Address list. Corresponds to the num_base_address field*/
163 		DECLARE_FLEX_ARRAY(uint64_t, base_address_64);	/* 64-bit Base Address list. Corresponds to the num_base_address field*/
164 	} __packed;
165 } ip_v4;
166 
167 typedef struct die_header
168 {
169 	uint16_t die_id;
170 	uint16_t num_ips;
171 } die_header;
172 
173 typedef struct ip_structure
174 {
175 	ip_discovery_header* header;
176 	struct die
177 	{
178 		die_header *die_header;
179 		union
180 		{
181 			ip *ip_list;
182 			ip_v3 *ip_v3_list;
183 			ip_v4 *ip_v4_list;
184 		};                                  /* IP list. Variable size*/
185 	} die;
186 } ip_structure;
187 
188 struct gpu_info_header {
189 	uint32_t table_id;      /* table ID */
190 	uint16_t version_major; /* table version */
191 	uint16_t version_minor; /* table version */
192 	uint32_t size;          /* size of the entire header+data in bytes */
193 };
194 
195 struct gc_info_v1_0 {
196 	struct gpu_info_header header;
197 
198 	uint32_t gc_num_se;
199 	uint32_t gc_num_wgp0_per_sa;
200 	uint32_t gc_num_wgp1_per_sa;
201 	uint32_t gc_num_rb_per_se;
202 	uint32_t gc_num_gl2c;
203 	uint32_t gc_num_gprs;
204 	uint32_t gc_num_max_gs_thds;
205 	uint32_t gc_gs_table_depth;
206 	uint32_t gc_gsprim_buff_depth;
207 	uint32_t gc_parameter_cache_depth;
208 	uint32_t gc_double_offchip_lds_buffer;
209 	uint32_t gc_wave_size;
210 	uint32_t gc_max_waves_per_simd;
211 	uint32_t gc_max_scratch_slots_per_cu;
212 	uint32_t gc_lds_size;
213 	uint32_t gc_num_sc_per_se;
214 	uint32_t gc_num_sa_per_se;
215 	uint32_t gc_num_packer_per_sc;
216 	uint32_t gc_num_gl2a;
217 };
218 
219 struct gc_info_v1_1 {
220 	struct gpu_info_header header;
221 
222 	uint32_t gc_num_se;
223 	uint32_t gc_num_wgp0_per_sa;
224 	uint32_t gc_num_wgp1_per_sa;
225 	uint32_t gc_num_rb_per_se;
226 	uint32_t gc_num_gl2c;
227 	uint32_t gc_num_gprs;
228 	uint32_t gc_num_max_gs_thds;
229 	uint32_t gc_gs_table_depth;
230 	uint32_t gc_gsprim_buff_depth;
231 	uint32_t gc_parameter_cache_depth;
232 	uint32_t gc_double_offchip_lds_buffer;
233 	uint32_t gc_wave_size;
234 	uint32_t gc_max_waves_per_simd;
235 	uint32_t gc_max_scratch_slots_per_cu;
236 	uint32_t gc_lds_size;
237 	uint32_t gc_num_sc_per_se;
238 	uint32_t gc_num_sa_per_se;
239 	uint32_t gc_num_packer_per_sc;
240 	uint32_t gc_num_gl2a;
241 	uint32_t gc_num_tcp_per_sa;
242 	uint32_t gc_num_sdp_interface;
243 	uint32_t gc_num_tcps;
244 };
245 
246 struct gc_info_v1_2 {
247 	struct gpu_info_header header;
248 	uint32_t gc_num_se;
249 	uint32_t gc_num_wgp0_per_sa;
250 	uint32_t gc_num_wgp1_per_sa;
251 	uint32_t gc_num_rb_per_se;
252 	uint32_t gc_num_gl2c;
253 	uint32_t gc_num_gprs;
254 	uint32_t gc_num_max_gs_thds;
255 	uint32_t gc_gs_table_depth;
256 	uint32_t gc_gsprim_buff_depth;
257 	uint32_t gc_parameter_cache_depth;
258 	uint32_t gc_double_offchip_lds_buffer;
259 	uint32_t gc_wave_size;
260 	uint32_t gc_max_waves_per_simd;
261 	uint32_t gc_max_scratch_slots_per_cu;
262 	uint32_t gc_lds_size;
263 	uint32_t gc_num_sc_per_se;
264 	uint32_t gc_num_sa_per_se;
265 	uint32_t gc_num_packer_per_sc;
266 	uint32_t gc_num_gl2a;
267 	uint32_t gc_num_tcp_per_sa;
268 	uint32_t gc_num_sdp_interface;
269 	uint32_t gc_num_tcps;
270 	uint32_t gc_num_tcp_per_wpg;
271 	uint32_t gc_tcp_l1_size;
272 	uint32_t gc_num_sqc_per_wgp;
273 	uint32_t gc_l1_instruction_cache_size_per_sqc;
274 	uint32_t gc_l1_data_cache_size_per_sqc;
275 	uint32_t gc_gl1c_per_sa;
276 	uint32_t gc_gl1c_size_per_instance;
277 	uint32_t gc_gl2c_per_gpu;
278 };
279 
280 struct gc_info_v1_3 {
281 	struct gpu_info_header header;
282 	uint32_t gc_num_se;
283 	uint32_t gc_num_wgp0_per_sa;
284 	uint32_t gc_num_wgp1_per_sa;
285 	uint32_t gc_num_rb_per_se;
286 	uint32_t gc_num_gl2c;
287 	uint32_t gc_num_gprs;
288 	uint32_t gc_num_max_gs_thds;
289 	uint32_t gc_gs_table_depth;
290 	uint32_t gc_gsprim_buff_depth;
291 	uint32_t gc_parameter_cache_depth;
292 	uint32_t gc_double_offchip_lds_buffer;
293 	uint32_t gc_wave_size;
294 	uint32_t gc_max_waves_per_simd;
295 	uint32_t gc_max_scratch_slots_per_cu;
296 	uint32_t gc_lds_size;
297 	uint32_t gc_num_sc_per_se;
298 	uint32_t gc_num_sa_per_se;
299 	uint32_t gc_num_packer_per_sc;
300 	uint32_t gc_num_gl2a;
301 	uint32_t gc_num_tcp_per_sa;
302 	uint32_t gc_num_sdp_interface;
303 	uint32_t gc_num_tcps;
304 	uint32_t gc_num_tcp_per_wpg;
305 	uint32_t gc_tcp_l1_size;
306 	uint32_t gc_num_sqc_per_wgp;
307 	uint32_t gc_l1_instruction_cache_size_per_sqc;
308 	uint32_t gc_l1_data_cache_size_per_sqc;
309 	uint32_t gc_gl1c_per_sa;
310 	uint32_t gc_gl1c_size_per_instance;
311 	uint32_t gc_gl2c_per_gpu;
312 	uint32_t gc_tcp_size_per_cu;
313 	uint32_t gc_tcp_cache_line_size;
314 	uint32_t gc_instruction_cache_size_per_sqc;
315 	uint32_t gc_instruction_cache_line_size;
316 	uint32_t gc_scalar_data_cache_size_per_sqc;
317 	uint32_t gc_scalar_data_cache_line_size;
318 	uint32_t gc_tcc_size;
319 	uint32_t gc_tcc_cache_line_size;
320 };
321 
322 struct gc_info_v1_4 {
323     struct gpu_info_header header;
324     uint32_t gc_num_se;
325     uint32_t gc_num_wgp0_per_sa;
326     uint32_t gc_num_wgp1_per_sa;
327     uint32_t gc_num_rb_per_se;
328     uint32_t gc_num_gl2c;
329     uint32_t gc_num_gprs;
330     uint32_t gc_num_max_gs_thds;
331     uint32_t gc_gs_table_depth;
332     uint32_t gc_gsprim_buff_depth;
333     uint32_t gc_parameter_cache_depth;
334     uint32_t gc_double_offchip_lds_buffer;
335     uint32_t gc_wave_size;
336     uint32_t gc_max_waves_per_simd;
337     uint32_t gc_max_scratch_slots_per_cu;
338     uint32_t gc_lds_size;
339     uint32_t gc_num_sc_per_se;
340     uint32_t gc_num_sa_per_se;
341     uint32_t gc_num_packer_per_sc;
342     uint32_t gc_num_gl2a;
343     uint32_t gc_num_tcp_per_sa;
344     uint32_t gc_num_sdp_interface;
345     uint32_t gc_num_tcps;
346     uint32_t gc_num_tcp_per_wpg;
347     uint32_t gc_tcp_l1_size;
348     uint32_t gc_num_sqc_per_wgp;
349     uint32_t gc_l1_instruction_cache_size_per_sqc;
350     uint32_t gc_l1_data_cache_size_per_sqc;
351     uint32_t gc_gl1c_per_sa;
352     uint32_t gc_gl1c_size_per_instance;
353     uint32_t gc_gl2c_per_gpu;
354     uint32_t gc_num_rwgp0_per_sa;
355     uint32_t gc_num_rwgp0_per_sa1;
356     uint32_t gc_num_rwgp1_per_sa;
357     uint32_t gc_num_rwgp1_per_sa1;
358     uint32_t gc_num_twgp0_per_sa;
359     uint32_t gc_num_twgp0_per_sa1;
360     uint32_t gc_num_twgp1_per_sa;
361     uint32_t gc_num_twgp1_per_sa1;
362 };
363 
364 struct gc_info_v1_5 {
365 	struct gpu_info_header header;
366 	uint32_t gc_num_se;
367 	uint32_t gc_num_wgp0_per_sa;
368 	uint32_t gc_num_wgp1_per_sa;
369 	uint32_t gc_num_rb_per_se;
370 	uint32_t gc_num_gl2c;
371 	uint32_t gc_num_gprs;
372 	uint32_t gc_num_max_gs_thds;
373 	uint32_t gc_gs_table_depth;
374 	uint32_t gc_gsprim_buff_depth;
375 	uint32_t gc_parameter_cache_depth;
376 	uint32_t gc_double_offchip_lds_buffer;
377 	uint32_t gc_wave_size;
378 	uint32_t gc_max_waves_per_simd;
379 	uint32_t gc_max_scratch_slots_per_cu;
380 	uint32_t gc_lds_size;
381 	uint32_t gc_num_sc_per_se;
382 	uint32_t gc_num_sa_per_se;
383 	uint32_t gc_num_packer_per_sc;
384 	uint32_t gc_num_gl2a;
385 	uint32_t gc_num_tcp_per_sa;
386 	uint32_t gc_num_sdp_interface;
387 	uint32_t gc_num_tcps;
388 	uint32_t gc_num_tcp_per_wpg;
389 	uint32_t gc_tcp_l1_size;
390 	uint32_t gc_num_sqc_per_wgp;
391 	uint32_t gc_l1_instruction_cache_size_per_sqc;
392 	uint32_t gc_l1_data_cache_size_per_sqc;
393 	uint32_t gc_gl1c_per_sa;
394 	uint32_t gc_gl1c_size_per_instance;
395 	uint32_t gc_gl2c_per_gpu;
396 	uint32_t gc_tcp_size_per_cu;
397 	uint32_t gc_tcp_cache_line_size;
398 	uint32_t gc_instruction_cache_size_per_sqc;
399 	uint32_t gc_instruction_cache_line_size;
400 	uint32_t gc_scalar_data_cache_size_per_sqc;
401 	uint32_t gc_scalar_data_cache_line_size;
402 	uint32_t gc_tcc_size;
403 	uint32_t gc_tcc_cache_line_size;
404 	uint32_t gc_num_wgp0_per_sa1;
405 	uint32_t gc_num_wgp1_per_sa1;
406 	uint32_t gc_max_num_residency_ways;
407 	uint32_t gc_cache_ways_size_in_bytes;
408 	uint32_t gc_reserved;
409 };
410 
411 struct gc_info_v2_0 {
412 	struct gpu_info_header header;
413 
414 	uint32_t gc_num_se;
415 	uint32_t gc_num_cu_per_sh;
416 	uint32_t gc_num_sh_per_se;
417 	uint32_t gc_num_rb_per_se;
418 	uint32_t gc_num_tccs;
419 	uint32_t gc_num_gprs;
420 	uint32_t gc_num_max_gs_thds;
421 	uint32_t gc_gs_table_depth;
422 	uint32_t gc_gsprim_buff_depth;
423 	uint32_t gc_parameter_cache_depth;
424 	uint32_t gc_double_offchip_lds_buffer;
425 	uint32_t gc_wave_size;
426 	uint32_t gc_max_waves_per_simd;
427 	uint32_t gc_max_scratch_slots_per_cu;
428 	uint32_t gc_lds_size;
429 	uint32_t gc_num_sc_per_se;
430 	uint32_t gc_num_packer_per_sc;
431 };
432 
433 struct gc_info_v2_1 {
434 	struct gpu_info_header header;
435 
436 	uint32_t gc_num_se;
437 	uint32_t gc_num_cu_per_sh;
438 	uint32_t gc_num_sh_per_se;
439 	uint32_t gc_num_rb_per_se;
440 	uint32_t gc_num_tccs;
441 	uint32_t gc_num_gprs;
442 	uint32_t gc_num_max_gs_thds;
443 	uint32_t gc_gs_table_depth;
444 	uint32_t gc_gsprim_buff_depth;
445 	uint32_t gc_parameter_cache_depth;
446 	uint32_t gc_double_offchip_lds_buffer;
447 	uint32_t gc_wave_size;
448 	uint32_t gc_max_waves_per_simd;
449 	uint32_t gc_max_scratch_slots_per_cu;
450 	uint32_t gc_lds_size;
451 	uint32_t gc_num_sc_per_se;
452 	uint32_t gc_num_packer_per_sc;
453 	/* new for v2_1 */
454 	uint32_t gc_num_tcp_per_sh;
455 	uint32_t gc_tcp_size_per_cu;
456 	uint32_t gc_num_sdp_interface;
457 	uint32_t gc_num_cu_per_sqc;
458 	uint32_t gc_instruction_cache_size_per_sqc;
459 	uint32_t gc_scalar_data_cache_size_per_sqc;
460 	uint32_t gc_tcc_size;
461 };
462 
463 typedef struct harvest_info_header {
464 	uint32_t signature; /* Table Signature */
465 	uint32_t version;   /* Table Version */
466 } harvest_info_header;
467 
468 typedef struct harvest_info {
469 	uint16_t hw_id;          /* Hardware ID */
470 	uint8_t number_instance; /* Instance of the IP */
471 	uint8_t reserved;        /* Reserved for alignment */
472 } harvest_info;
473 
474 typedef struct harvest_table {
475 	harvest_info_header header;
476 	harvest_info list[32];
477 } harvest_table;
478 
479 struct mall_info_header {
480 	uint32_t table_id; /* table ID */
481 	uint16_t version_major; /* table version */
482 	uint16_t version_minor; /* table version */
483 	uint32_t size_bytes; /* size of the entire header+data in bytes */
484 };
485 
486 struct mall_info_v1_0 {
487 	struct mall_info_header header;
488 	uint32_t mall_size_per_m;
489 	uint32_t m_s_present;
490 	uint32_t m_half_use;
491 	uint32_t m_mall_config;
492 	uint32_t reserved[5];
493 };
494 
495 struct mall_info_v2_0 {
496 	struct mall_info_header header;
497 	uint32_t mall_size_per_umc;
498 	uint32_t reserved[8];
499 };
500 
501 #define VCN_INFO_TABLE_MAX_NUM_INSTANCES 4
502 
503 struct vcn_info_header {
504     uint32_t table_id; /* table ID */
505     uint16_t version_major; /* table version */
506     uint16_t version_minor; /* table version */
507     uint32_t size_bytes; /* size of the entire header+data in bytes */
508 };
509 
510 struct vcn_instance_info_v1_0
511 {
512 	uint32_t instance_num; /* VCN IP instance number. 0 - VCN0; 1 - VCN1 etc*/
513 	union _fuse_data {
514 		struct {
515 			uint32_t av1_disabled : 1;
516 			uint32_t vp9_disabled : 1;
517 			uint32_t hevc_disabled : 1;
518 			uint32_t h264_disabled : 1;
519 			uint32_t reserved : 28;
520 		} bits;
521 		uint32_t all_bits;
522 	} fuse_data;
523 	uint32_t reserved[2];
524 };
525 
526 struct vcn_info_v1_0 {
527 	struct vcn_info_header header;
528 	uint32_t num_of_instances; /* number of entries used in instance_info below*/
529 	struct vcn_instance_info_v1_0 instance_info[VCN_INFO_TABLE_MAX_NUM_INSTANCES];
530 	uint32_t reserved[4];
531 };
532 
533 #define NPS_INFO_TABLE_MAX_NUM_INSTANCES 12
534 
535 struct nps_info_header {
536 	uint32_t table_id; /* table ID */
537 	uint16_t version_major; /* table version */
538 	uint16_t version_minor; /* table version */
539 	uint32_t size_bytes; /* size of the entire header+data in bytes = 0x000000D4 (212) */
540 };
541 
542 struct nps_instance_info_v1_0 {
543 	uint64_t base_address;
544 	uint64_t limit_address;
545 };
546 
547 struct nps_info_v1_0 {
548 	struct nps_info_header header;
549 	uint32_t nps_type;
550 	uint32_t count;
551 	struct nps_instance_info_v1_0
552 		instance_info[NPS_INFO_TABLE_MAX_NUM_INSTANCES];
553 };
554 
555 typedef enum {
556 	NO_RESERVED_REGION_ID		= 0,
557 	/* reserved for UEFI GOP/DMUB FW */
558 	PRE_OS_DISP_FW_REGION_ID	= 1,
559 	/* UMF reserved region for master die MPASP */
560 	MASTER_DIE_UMF_REGION_ID	= 2,
561 	/* DCC meta data */
562 	DCC_META_DATA_REGION_ID		= 3,
563 	/* GPUVM page fault region */
564 	VM_PAGE_FAULT_REGION_ID		= 4,
565 	/* G7 Alternate Pstate Aperture 1 */
566 	G7_PSTATE_APERTURE1_ID		= 5,
567 	/* G7 Alternate Pstate Aperture 2 */
568 	G7_PSTATE_APERTURE2_ID		= 6,
569 	/* G7 Alternate Pstate Mirror Region */
570 	G7_PSTATE_MIRROR_REGION_ID	= 7,
571 	/* G7 Pstate Training Data */
572 	G7_TRAINING_DATA_REGION_ID	= 8,
573 	/* Specific purpose memory region */
574 	SPECIFIC_PURPOSE_REGION_ID	= 9,
575 	MEM_RESERVED_REGION_NUM,
576 } MEM_RESERVED_REGION_ID;
577 
578 typedef struct mem_reserved_info_header {
579 	/* Table Signature */
580 	uint32_t signature;
581 	/* Table Version */
582 	uint32_t version;
583 	uint32_t size;
584 } mem_reserved_info_header;
585 
586 typedef struct mem_reserved_info {
587 	/* enum of MEM_RESERVED_REGION_ID */
588 	uint32_t reserved_region_id;
589 	/* Memory Reserved Region Size */
590 	uint64_t reserved_region_size;
591 	/* Memory Reserved Region Start Address */
592 	uint64_t reserved_region_start;
593 } mem_reserved_info;
594 
595 typedef struct mem_reserved_info_table_v1_0 {
596 	mem_reserved_info_header header;
597 	uint32_t list_num;
598 	mem_reserved_info list[MAX_MEM_REGION_NUM];
599 } mem_reserved_info_table_v1_0;
600 
601 #pragma pack()
602 
603 #endif
604