10228b17c7d75ef3dd6c8e8c74ea2167f80327f7
[reactos.git] / drivers / bus / acpi / acpica / include / actbl3.h
1 /******************************************************************************
2 *
3 * Name: actbl3.h - ACPI Table Definitions
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2018, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44 #ifndef __ACTBL3_H__
45 #define __ACTBL3_H__
46
47
48 /*******************************************************************************
49 *
50 * Additional ACPI Tables (3)
51 *
52 * These tables are not consumed directly by the ACPICA subsystem, but are
53 * included here to support device drivers and the AML disassembler.
54 *
55 * In general, the tables in this file are fully defined within the ACPI
56 * specification.
57 *
58 ******************************************************************************/
59
60
61 /*
62 * Values for description table header signatures for tables defined in this
63 * file. Useful because they make it more difficult to inadvertently type in
64 * the wrong signature.
65 */
66 #define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
67 #define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */
68 #define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */
69 #define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */
70 #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */
71 #define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */
72 #define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
73 #define ACPI_SIG_RASF "RASF" /* RAS Feature table */
74 #define ACPI_SIG_STAO "STAO" /* Status Override table */
75 #define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
76 #define ACPI_SIG_XENV "XENV" /* Xen Environment table */
77
78 #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */
79 #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */
80
81 /* Reserved table signatures */
82
83 #define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */
84 #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
85
86 /*
87 * All tables must be byte-packed to match the ACPI specification, since
88 * the tables are provided by the system BIOS.
89 */
90 #pragma pack(1)
91
92 /*
93 * Note: C bitfields are not used for this reason:
94 *
95 * "Bitfields are great and easy to read, but unfortunately the C language
96 * does not specify the layout of bitfields in memory, which means they are
97 * essentially useless for dealing with packed data in on-disk formats or
98 * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
99 * this decision was a design error in C. Ritchie could have picked an order
100 * and stuck with it." Norman Ramsey.
101 * See http://stackoverflow.com/a/1053662/41661
102 */
103
104
105 /*******************************************************************************
106 *
107 * BGRT - Boot Graphics Resource Table (ACPI 5.0)
108 * Version 1
109 *
110 ******************************************************************************/
111
112 typedef struct acpi_table_bgrt
113 {
114 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
115 UINT16 Version;
116 UINT8 Status;
117 UINT8 ImageType;
118 UINT64 ImageAddress;
119 UINT32 ImageOffsetX;
120 UINT32 ImageOffsetY;
121
122 } ACPI_TABLE_BGRT;
123
124 /* Flags for Status field above */
125
126 #define ACPI_BGRT_DISPLAYED (1)
127 #define ACPI_BGRT_ORIENTATION_OFFSET (3 << 1)
128
129
130 /*******************************************************************************
131 *
132 * DRTM - Dynamic Root of Trust for Measurement table
133 * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
134 * Table version 1
135 *
136 ******************************************************************************/
137
138 typedef struct acpi_table_drtm
139 {
140 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
141 UINT64 EntryBaseAddress;
142 UINT64 EntryLength;
143 UINT32 EntryAddress32;
144 UINT64 EntryAddress64;
145 UINT64 ExitAddress;
146 UINT64 LogAreaAddress;
147 UINT32 LogAreaLength;
148 UINT64 ArchDependentAddress;
149 UINT32 Flags;
150
151 } ACPI_TABLE_DRTM;
152
153 /* Flag Definitions for above */
154
155 #define ACPI_DRTM_ACCESS_ALLOWED (1)
156 #define ACPI_DRTM_ENABLE_GAP_CODE (1<<1)
157 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS (1<<2)
158 #define ACPI_DRTM_AUTHORITY_ORDER (1<<3)
159
160
161 /* 1) Validated Tables List (64-bit addresses) */
162
163 typedef struct acpi_drtm_vtable_list
164 {
165 UINT32 ValidatedTableCount;
166 UINT64 ValidatedTables[1];
167
168 } ACPI_DRTM_VTABLE_LIST;
169
170 /* 2) Resources List (of Resource Descriptors) */
171
172 /* Resource Descriptor */
173
174 typedef struct acpi_drtm_resource
175 {
176 UINT8 Size[7];
177 UINT8 Type;
178 UINT64 Address;
179
180 } ACPI_DRTM_RESOURCE;
181
182 typedef struct acpi_drtm_resource_list
183 {
184 UINT32 ResourceCount;
185 ACPI_DRTM_RESOURCE Resources[1];
186
187 } ACPI_DRTM_RESOURCE_LIST;
188
189 /* 3) Platform-specific Identifiers List */
190
191 typedef struct acpi_drtm_dps_id
192 {
193 UINT32 DpsIdLength;
194 UINT8 DpsId[16];
195
196 } ACPI_DRTM_DPS_ID;
197
198
199 /*******************************************************************************
200 *
201 * FPDT - Firmware Performance Data Table (ACPI 5.0)
202 * Version 1
203 *
204 ******************************************************************************/
205
206 typedef struct acpi_table_fpdt
207 {
208 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
209
210 } ACPI_TABLE_FPDT;
211
212
213 /* FPDT subtable header (Performance Record Structure) */
214
215 typedef struct acpi_fpdt_header
216 {
217 UINT16 Type;
218 UINT8 Length;
219 UINT8 Revision;
220
221 } ACPI_FPDT_HEADER;
222
223 /* Values for Type field above */
224
225 enum AcpiFpdtType
226 {
227 ACPI_FPDT_TYPE_BOOT = 0,
228 ACPI_FPDT_TYPE_S3PERF = 1
229 };
230
231
232 /*
233 * FPDT subtables
234 */
235
236 /* 0: Firmware Basic Boot Performance Record */
237
238 typedef struct acpi_fpdt_boot_pointer
239 {
240 ACPI_FPDT_HEADER Header;
241 UINT8 Reserved[4];
242 UINT64 Address;
243
244 } ACPI_FPDT_BOOT_POINTER;
245
246
247 /* 1: S3 Performance Table Pointer Record */
248
249 typedef struct acpi_fpdt_s3pt_pointer
250 {
251 ACPI_FPDT_HEADER Header;
252 UINT8 Reserved[4];
253 UINT64 Address;
254
255 } ACPI_FPDT_S3PT_POINTER;
256
257
258 /*
259 * S3PT - S3 Performance Table. This table is pointed to by the
260 * S3 Pointer Record above.
261 */
262 typedef struct acpi_table_s3pt
263 {
264 UINT8 Signature[4]; /* "S3PT" */
265 UINT32 Length;
266
267 } ACPI_TABLE_S3PT;
268
269
270 /*
271 * S3PT Subtables (Not part of the actual FPDT)
272 */
273
274 /* Values for Type field in S3PT header */
275
276 enum AcpiS3ptType
277 {
278 ACPI_S3PT_TYPE_RESUME = 0,
279 ACPI_S3PT_TYPE_SUSPEND = 1,
280 ACPI_FPDT_BOOT_PERFORMANCE = 2
281 };
282
283 typedef struct acpi_s3pt_resume
284 {
285 ACPI_FPDT_HEADER Header;
286 UINT32 ResumeCount;
287 UINT64 FullResume;
288 UINT64 AverageResume;
289
290 } ACPI_S3PT_RESUME;
291
292 typedef struct acpi_s3pt_suspend
293 {
294 ACPI_FPDT_HEADER Header;
295 UINT64 SuspendStart;
296 UINT64 SuspendEnd;
297
298 } ACPI_S3PT_SUSPEND;
299
300
301 /*
302 * FPDT Boot Performance Record (Not part of the actual FPDT)
303 */
304 typedef struct acpi_fpdt_boot
305 {
306 ACPI_FPDT_HEADER Header;
307 UINT8 Reserved[4];
308 UINT64 ResetEnd;
309 UINT64 LoadStart;
310 UINT64 StartupStart;
311 UINT64 ExitServicesEntry;
312 UINT64 ExitServicesExit;
313
314 } ACPI_FPDT_BOOT;
315
316
317 /*******************************************************************************
318 *
319 * GTDT - Generic Timer Description Table (ACPI 5.1)
320 * Version 2
321 *
322 ******************************************************************************/
323
324 typedef struct acpi_table_gtdt
325 {
326 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
327 UINT64 CounterBlockAddresss;
328 UINT32 Reserved;
329 UINT32 SecureEl1Interrupt;
330 UINT32 SecureEl1Flags;
331 UINT32 NonSecureEl1Interrupt;
332 UINT32 NonSecureEl1Flags;
333 UINT32 VirtualTimerInterrupt;
334 UINT32 VirtualTimerFlags;
335 UINT32 NonSecureEl2Interrupt;
336 UINT32 NonSecureEl2Flags;
337 UINT64 CounterReadBlockAddress;
338 UINT32 PlatformTimerCount;
339 UINT32 PlatformTimerOffset;
340
341 } ACPI_TABLE_GTDT;
342
343 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
344
345 #define ACPI_GTDT_INTERRUPT_MODE (1)
346 #define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
347 #define ACPI_GTDT_ALWAYS_ON (1<<2)
348
349
350 /* Common GTDT subtable header */
351
352 typedef struct acpi_gtdt_header
353 {
354 UINT8 Type;
355 UINT16 Length;
356
357 } ACPI_GTDT_HEADER;
358
359 /* Values for GTDT subtable type above */
360
361 enum AcpiGtdtType
362 {
363 ACPI_GTDT_TYPE_TIMER_BLOCK = 0,
364 ACPI_GTDT_TYPE_WATCHDOG = 1,
365 ACPI_GTDT_TYPE_RESERVED = 2 /* 2 and greater are reserved */
366 };
367
368
369 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */
370
371 /* 0: Generic Timer Block */
372
373 typedef struct acpi_gtdt_timer_block
374 {
375 ACPI_GTDT_HEADER Header;
376 UINT8 Reserved;
377 UINT64 BlockAddress;
378 UINT32 TimerCount;
379 UINT32 TimerOffset;
380
381 } ACPI_GTDT_TIMER_BLOCK;
382
383 /* Timer Sub-Structure, one per timer */
384
385 typedef struct acpi_gtdt_timer_entry
386 {
387 UINT8 FrameNumber;
388 UINT8 Reserved[3];
389 UINT64 BaseAddress;
390 UINT64 El0BaseAddress;
391 UINT32 TimerInterrupt;
392 UINT32 TimerFlags;
393 UINT32 VirtualTimerInterrupt;
394 UINT32 VirtualTimerFlags;
395 UINT32 CommonFlags;
396
397 } ACPI_GTDT_TIMER_ENTRY;
398
399 /* Flag Definitions: TimerFlags and VirtualTimerFlags above */
400
401 #define ACPI_GTDT_GT_IRQ_MODE (1)
402 #define ACPI_GTDT_GT_IRQ_POLARITY (1<<1)
403
404 /* Flag Definitions: CommonFlags above */
405
406 #define ACPI_GTDT_GT_IS_SECURE_TIMER (1)
407 #define ACPI_GTDT_GT_ALWAYS_ON (1<<1)
408
409
410 /* 1: SBSA Generic Watchdog Structure */
411
412 typedef struct acpi_gtdt_watchdog
413 {
414 ACPI_GTDT_HEADER Header;
415 UINT8 Reserved;
416 UINT64 RefreshFrameAddress;
417 UINT64 ControlFrameAddress;
418 UINT32 TimerInterrupt;
419 UINT32 TimerFlags;
420
421 } ACPI_GTDT_WATCHDOG;
422
423 /* Flag Definitions: TimerFlags above */
424
425 #define ACPI_GTDT_WATCHDOG_IRQ_MODE (1)
426 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY (1<<1)
427 #define ACPI_GTDT_WATCHDOG_SECURE (1<<2)
428
429
430 /*******************************************************************************
431 *
432 * MPST - Memory Power State Table (ACPI 5.0)
433 * Version 1
434 *
435 ******************************************************************************/
436
437 #define ACPI_MPST_CHANNEL_INFO \
438 UINT8 ChannelId; \
439 UINT8 Reserved1[3]; \
440 UINT16 PowerNodeCount; \
441 UINT16 Reserved2;
442
443 /* Main table */
444
445 typedef struct acpi_table_mpst
446 {
447 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
448 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
449
450 } ACPI_TABLE_MPST;
451
452
453 /* Memory Platform Communication Channel Info */
454
455 typedef struct acpi_mpst_channel
456 {
457 ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */
458
459 } ACPI_MPST_CHANNEL;
460
461
462 /* Memory Power Node Structure */
463
464 typedef struct acpi_mpst_power_node
465 {
466 UINT8 Flags;
467 UINT8 Reserved1;
468 UINT16 NodeId;
469 UINT32 Length;
470 UINT64 RangeAddress;
471 UINT64 RangeLength;
472 UINT32 NumPowerStates;
473 UINT32 NumPhysicalComponents;
474
475 } ACPI_MPST_POWER_NODE;
476
477 /* Values for Flags field above */
478
479 #define ACPI_MPST_ENABLED 1
480 #define ACPI_MPST_POWER_MANAGED 2
481 #define ACPI_MPST_HOT_PLUG_CAPABLE 4
482
483
484 /* Memory Power State Structure (follows POWER_NODE above) */
485
486 typedef struct acpi_mpst_power_state
487 {
488 UINT8 PowerState;
489 UINT8 InfoIndex;
490
491 } ACPI_MPST_POWER_STATE;
492
493
494 /* Physical Component ID Structure (follows POWER_STATE above) */
495
496 typedef struct acpi_mpst_component
497 {
498 UINT16 ComponentId;
499
500 } ACPI_MPST_COMPONENT;
501
502
503 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
504
505 typedef struct acpi_mpst_data_hdr
506 {
507 UINT16 CharacteristicsCount;
508 UINT16 Reserved;
509
510 } ACPI_MPST_DATA_HDR;
511
512 typedef struct acpi_mpst_power_data
513 {
514 UINT8 StructureId;
515 UINT8 Flags;
516 UINT16 Reserved1;
517 UINT32 AveragePower;
518 UINT32 PowerSaving;
519 UINT64 ExitLatency;
520 UINT64 Reserved2;
521
522 } ACPI_MPST_POWER_DATA;
523
524 /* Values for Flags field above */
525
526 #define ACPI_MPST_PRESERVE 1
527 #define ACPI_MPST_AUTOENTRY 2
528 #define ACPI_MPST_AUTOEXIT 4
529
530
531 /* Shared Memory Region (not part of an ACPI table) */
532
533 typedef struct acpi_mpst_shared
534 {
535 UINT32 Signature;
536 UINT16 PccCommand;
537 UINT16 PccStatus;
538 UINT32 CommandRegister;
539 UINT32 StatusRegister;
540 UINT32 PowerStateId;
541 UINT32 PowerNodeId;
542 UINT64 EnergyConsumed;
543 UINT64 AveragePower;
544
545 } ACPI_MPST_SHARED;
546
547
548 /*******************************************************************************
549 *
550 * PCCT - Platform Communications Channel Table (ACPI 5.0)
551 * Version 2 (ACPI 6.2)
552 *
553 ******************************************************************************/
554
555 typedef struct acpi_table_pcct
556 {
557 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
558 UINT32 Flags;
559 UINT64 Reserved;
560
561 } ACPI_TABLE_PCCT;
562
563 /* Values for Flags field above */
564
565 #define ACPI_PCCT_DOORBELL 1
566
567 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
568
569 enum AcpiPcctType
570 {
571 ACPI_PCCT_TYPE_GENERIC_SUBSPACE = 0,
572 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE = 1,
573 ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 = 2, /* ACPI 6.1 */
574 ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE = 3, /* ACPI 6.2 */
575 ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE = 4, /* ACPI 6.2 */
576 ACPI_PCCT_TYPE_RESERVED = 5 /* 5 and greater are reserved */
577 };
578
579 /*
580 * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
581 */
582
583 /* 0: Generic Communications Subspace */
584
585 typedef struct acpi_pcct_subspace
586 {
587 ACPI_SUBTABLE_HEADER Header;
588 UINT8 Reserved[6];
589 UINT64 BaseAddress;
590 UINT64 Length;
591 ACPI_GENERIC_ADDRESS DoorbellRegister;
592 UINT64 PreserveMask;
593 UINT64 WriteMask;
594 UINT32 Latency;
595 UINT32 MaxAccessRate;
596 UINT16 MinTurnaroundTime;
597
598 } ACPI_PCCT_SUBSPACE;
599
600
601 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
602
603 typedef struct acpi_pcct_hw_reduced
604 {
605 ACPI_SUBTABLE_HEADER Header;
606 UINT32 PlatformInterrupt;
607 UINT8 Flags;
608 UINT8 Reserved;
609 UINT64 BaseAddress;
610 UINT64 Length;
611 ACPI_GENERIC_ADDRESS DoorbellRegister;
612 UINT64 PreserveMask;
613 UINT64 WriteMask;
614 UINT32 Latency;
615 UINT32 MaxAccessRate;
616 UINT16 MinTurnaroundTime;
617
618 } ACPI_PCCT_HW_REDUCED;
619
620
621 /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
622
623 typedef struct acpi_pcct_hw_reduced_type2
624 {
625 ACPI_SUBTABLE_HEADER Header;
626 UINT32 PlatformInterrupt;
627 UINT8 Flags;
628 UINT8 Reserved;
629 UINT64 BaseAddress;
630 UINT64 Length;
631 ACPI_GENERIC_ADDRESS DoorbellRegister;
632 UINT64 PreserveMask;
633 UINT64 WriteMask;
634 UINT32 Latency;
635 UINT32 MaxAccessRate;
636 UINT16 MinTurnaroundTime;
637 ACPI_GENERIC_ADDRESS PlatformAckRegister;
638 UINT64 AckPreserveMask;
639 UINT64 AckWriteMask;
640
641 } ACPI_PCCT_HW_REDUCED_TYPE2;
642
643
644 /* 3: Extended PCC Master Subspace Type 3 (ACPI 6.2) */
645
646 typedef struct acpi_pcct_ext_pcc_master
647 {
648 ACPI_SUBTABLE_HEADER Header;
649 UINT32 PlatformInterrupt;
650 UINT8 Flags;
651 UINT8 Reserved1;
652 UINT64 BaseAddress;
653 UINT32 Length;
654 ACPI_GENERIC_ADDRESS DoorbellRegister;
655 UINT64 PreserveMask;
656 UINT64 WriteMask;
657 UINT32 Latency;
658 UINT32 MaxAccessRate;
659 UINT32 MinTurnaroundTime;
660 ACPI_GENERIC_ADDRESS PlatformAckRegister;
661 UINT64 AckPreserveMask;
662 UINT64 AckSetMask;
663 UINT64 Reserved2;
664 ACPI_GENERIC_ADDRESS CmdCompleteRegister;
665 UINT64 CmdCompleteMask;
666 ACPI_GENERIC_ADDRESS CmdUpdateRegister;
667 UINT64 CmdUpdatePreserveMask;
668 UINT64 CmdUpdateSetMask;
669 ACPI_GENERIC_ADDRESS ErrorStatusRegister;
670 UINT64 ErrorStatusMask;
671
672 } ACPI_PCCT_EXT_PCC_MASTER;
673
674
675 /* 4: Extended PCC Slave Subspace Type 4 (ACPI 6.2) */
676
677 typedef struct acpi_pcct_ext_pcc_slave
678 {
679 ACPI_SUBTABLE_HEADER Header;
680 UINT32 PlatformInterrupt;
681 UINT8 Flags;
682 UINT8 Reserved1;
683 UINT64 BaseAddress;
684 UINT32 Length;
685 ACPI_GENERIC_ADDRESS DoorbellRegister;
686 UINT64 PreserveMask;
687 UINT64 WriteMask;
688 UINT32 Latency;
689 UINT32 MaxAccessRate;
690 UINT32 MinTurnaroundTime;
691 ACPI_GENERIC_ADDRESS PlatformAckRegister;
692 UINT64 AckPreserveMask;
693 UINT64 AckSetMask;
694 UINT64 Reserved2;
695 ACPI_GENERIC_ADDRESS CmdCompleteRegister;
696 UINT64 CmdCompleteMask;
697 ACPI_GENERIC_ADDRESS CmdUpdateRegister;
698 UINT64 CmdUpdatePreserveMask;
699 UINT64 CmdUpdateSetMask;
700 ACPI_GENERIC_ADDRESS ErrorStatusRegister;
701 UINT64 ErrorStatusMask;
702
703 } ACPI_PCCT_EXT_PCC_SLAVE;
704
705
706 /* Values for doorbell flags above */
707
708 #define ACPI_PCCT_INTERRUPT_POLARITY (1)
709 #define ACPI_PCCT_INTERRUPT_MODE (1<<1)
710
711
712 /*
713 * PCC memory structures (not part of the ACPI table)
714 */
715
716 /* Shared Memory Region */
717
718 typedef struct acpi_pcct_shared_memory
719 {
720 UINT32 Signature;
721 UINT16 Command;
722 UINT16 Status;
723
724 } ACPI_PCCT_SHARED_MEMORY;
725
726
727 /* Extended PCC Subspace Shared Memory Region (ACPI 6.2) */
728
729 typedef struct acpi_pcct_ext_pcc_shared_memory
730 {
731 UINT32 Signature;
732 UINT32 Flags;
733 UINT32 Length;
734 UINT32 Command;
735
736 } ACPI_PCCT_EXT_PCC_SHARED_MEMORY;
737
738
739 /*******************************************************************************
740 *
741 * PMTT - Platform Memory Topology Table (ACPI 5.0)
742 * Version 1
743 *
744 ******************************************************************************/
745
746 typedef struct acpi_table_pmtt
747 {
748 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
749 UINT32 Reserved;
750
751 } ACPI_TABLE_PMTT;
752
753
754 /* Common header for PMTT subtables that follow main table */
755
756 typedef struct acpi_pmtt_header
757 {
758 UINT8 Type;
759 UINT8 Reserved1;
760 UINT16 Length;
761 UINT16 Flags;
762 UINT16 Reserved2;
763
764 } ACPI_PMTT_HEADER;
765
766 /* Values for Type field above */
767
768 #define ACPI_PMTT_TYPE_SOCKET 0
769 #define ACPI_PMTT_TYPE_CONTROLLER 1
770 #define ACPI_PMTT_TYPE_DIMM 2
771 #define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */
772
773 /* Values for Flags field above */
774
775 #define ACPI_PMTT_TOP_LEVEL 0x0001
776 #define ACPI_PMTT_PHYSICAL 0x0002
777 #define ACPI_PMTT_MEMORY_TYPE 0x000C
778
779
780 /*
781 * PMTT subtables, correspond to Type in acpi_pmtt_header
782 */
783
784
785 /* 0: Socket Structure */
786
787 typedef struct acpi_pmtt_socket
788 {
789 ACPI_PMTT_HEADER Header;
790 UINT16 SocketId;
791 UINT16 Reserved;
792
793 } ACPI_PMTT_SOCKET;
794
795
796 /* 1: Memory Controller subtable */
797
798 typedef struct acpi_pmtt_controller
799 {
800 ACPI_PMTT_HEADER Header;
801 UINT32 ReadLatency;
802 UINT32 WriteLatency;
803 UINT32 ReadBandwidth;
804 UINT32 WriteBandwidth;
805 UINT16 AccessWidth;
806 UINT16 Alignment;
807 UINT16 Reserved;
808 UINT16 DomainCount;
809
810 } ACPI_PMTT_CONTROLLER;
811
812 /* 1a: Proximity Domain substructure */
813
814 typedef struct acpi_pmtt_domain
815 {
816 UINT32 ProximityDomain;
817
818 } ACPI_PMTT_DOMAIN;
819
820
821 /* 2: Physical Component Identifier (DIMM) */
822
823 typedef struct acpi_pmtt_physical_component
824 {
825 ACPI_PMTT_HEADER Header;
826 UINT16 ComponentId;
827 UINT16 Reserved;
828 UINT32 MemorySize;
829 UINT32 BiosHandle;
830
831 } ACPI_PMTT_PHYSICAL_COMPONENT;
832
833
834 /*******************************************************************************
835 *
836 * RASF - RAS Feature Table (ACPI 5.0)
837 * Version 1
838 *
839 ******************************************************************************/
840
841 typedef struct acpi_table_rasf
842 {
843 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
844 UINT8 ChannelId[12];
845
846 } ACPI_TABLE_RASF;
847
848 /* RASF Platform Communication Channel Shared Memory Region */
849
850 typedef struct acpi_rasf_shared_memory
851 {
852 UINT32 Signature;
853 UINT16 Command;
854 UINT16 Status;
855 UINT16 Version;
856 UINT8 Capabilities[16];
857 UINT8 SetCapabilities[16];
858 UINT16 NumParameterBlocks;
859 UINT32 SetCapabilitiesStatus;
860
861 } ACPI_RASF_SHARED_MEMORY;
862
863 /* RASF Parameter Block Structure Header */
864
865 typedef struct acpi_rasf_parameter_block
866 {
867 UINT16 Type;
868 UINT16 Version;
869 UINT16 Length;
870
871 } ACPI_RASF_PARAMETER_BLOCK;
872
873 /* RASF Parameter Block Structure for PATROL_SCRUB */
874
875 typedef struct acpi_rasf_patrol_scrub_parameter
876 {
877 ACPI_RASF_PARAMETER_BLOCK Header;
878 UINT16 PatrolScrubCommand;
879 UINT64 RequestedAddressRange[2];
880 UINT64 ActualAddressRange[2];
881 UINT16 Flags;
882 UINT8 RequestedSpeed;
883
884 } ACPI_RASF_PATROL_SCRUB_PARAMETER;
885
886 /* Masks for Flags and Speed fields above */
887
888 #define ACPI_RASF_SCRUBBER_RUNNING 1
889 #define ACPI_RASF_SPEED (7<<1)
890 #define ACPI_RASF_SPEED_SLOW (0<<1)
891 #define ACPI_RASF_SPEED_MEDIUM (4<<1)
892 #define ACPI_RASF_SPEED_FAST (7<<1)
893
894 /* Channel Commands */
895
896 enum AcpiRasfCommands
897 {
898 ACPI_RASF_EXECUTE_RASF_COMMAND = 1
899 };
900
901 /* Platform RAS Capabilities */
902
903 enum AcpiRasfCapabiliities
904 {
905 ACPI_HW_PATROL_SCRUB_SUPPORTED = 0,
906 ACPI_SW_PATROL_SCRUB_EXPOSED = 1
907 };
908
909 /* Patrol Scrub Commands */
910
911 enum AcpiRasfPatrolScrubCommands
912 {
913 ACPI_RASF_GET_PATROL_PARAMETERS = 1,
914 ACPI_RASF_START_PATROL_SCRUBBER = 2,
915 ACPI_RASF_STOP_PATROL_SCRUBBER = 3
916 };
917
918 /* Channel Command flags */
919
920 #define ACPI_RASF_GENERATE_SCI (1<<15)
921
922 /* Status values */
923
924 enum AcpiRasfStatus
925 {
926 ACPI_RASF_SUCCESS = 0,
927 ACPI_RASF_NOT_VALID = 1,
928 ACPI_RASF_NOT_SUPPORTED = 2,
929 ACPI_RASF_BUSY = 3,
930 ACPI_RASF_FAILED = 4,
931 ACPI_RASF_ABORTED = 5,
932 ACPI_RASF_INVALID_DATA = 6
933 };
934
935 /* Status flags */
936
937 #define ACPI_RASF_COMMAND_COMPLETE (1)
938 #define ACPI_RASF_SCI_DOORBELL (1<<1)
939 #define ACPI_RASF_ERROR (1<<2)
940 #define ACPI_RASF_STATUS (0x1F<<3)
941
942
943 /*******************************************************************************
944 *
945 * STAO - Status Override Table (_STA override) - ACPI 6.0
946 * Version 1
947 *
948 * Conforms to "ACPI Specification for Status Override Table"
949 * 6 January 2015
950 *
951 ******************************************************************************/
952
953 typedef struct acpi_table_stao
954 {
955 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
956 UINT8 IgnoreUart;
957
958 } ACPI_TABLE_STAO;
959
960
961 /*******************************************************************************
962 *
963 * WPBT - Windows Platform Environment Table (ACPI 6.0)
964 * Version 1
965 *
966 * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
967 *
968 ******************************************************************************/
969
970 typedef struct acpi_table_wpbt
971 {
972 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
973 UINT32 HandoffSize;
974 UINT64 HandoffAddress;
975 UINT8 Layout;
976 UINT8 Type;
977 UINT16 ArgumentsLength;
978
979 } ACPI_TABLE_WPBT;
980
981
982 /*******************************************************************************
983 *
984 * XENV - Xen Environment Table (ACPI 6.0)
985 * Version 1
986 *
987 * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
988 *
989 ******************************************************************************/
990
991 typedef struct acpi_table_xenv
992 {
993 ACPI_TABLE_HEADER Header; /* Common ACPI table header */
994 UINT64 GrantTableAddress;
995 UINT64 GrantTableSize;
996 UINT32 EventInterrupt;
997 UINT8 EventFlags;
998
999 } ACPI_TABLE_XENV;
1000
1001
1002 /* Reset to default packing */
1003
1004 #pragma pack()
1005
1006 #endif /* __ACTBL3_H__ */