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