1 /******************************************************************************
2  *
3  * Name: actbl3.h - ACPI Table Definitions
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2016, 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 
125 /*******************************************************************************
126  *
127  * DRTM - Dynamic Root of Trust for Measurement table
128  * Conforms to "TCG D-RTM Architecture" June 17 2013, Version 1.0.0
129  * Table version 1
130  *
131  ******************************************************************************/
132 
133 typedef struct acpi_table_drtm
134 {
135     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
136     UINT64                  EntryBaseAddress;
137     UINT64                  EntryLength;
138     UINT32                  EntryAddress32;
139     UINT64                  EntryAddress64;
140     UINT64                  ExitAddress;
141     UINT64                  LogAreaAddress;
142     UINT32                  LogAreaLength;
143     UINT64                  ArchDependentAddress;
144     UINT32                  Flags;
145 
146 } ACPI_TABLE_DRTM;
147 
148 /* Flag Definitions for above */
149 
150 #define ACPI_DRTM_ACCESS_ALLOWED            (1)
151 #define ACPI_DRTM_ENABLE_GAP_CODE           (1<<1)
152 #define ACPI_DRTM_INCOMPLETE_MEASUREMENTS   (1<<2)
153 #define ACPI_DRTM_AUTHORITY_ORDER           (1<<3)
154 
155 
156 /* 1) Validated Tables List (64-bit addresses) */
157 
158 typedef struct acpi_drtm_vtable_list
159 {
160     UINT32                  ValidatedTableCount;
161     UINT64                  ValidatedTables[1];
162 
163 } ACPI_DRTM_VTABLE_LIST;
164 
165 /* 2) Resources List (of Resource Descriptors) */
166 
167 /* Resource Descriptor */
168 
169 typedef struct acpi_drtm_resource
170 {
171     UINT8                   Size[7];
172     UINT8                   Type;
173     UINT64                  Address;
174 
175 } ACPI_DRTM_RESOURCE;
176 
177 typedef struct acpi_drtm_resource_list
178 {
179     UINT32                  ResourceCount;
180     ACPI_DRTM_RESOURCE      Resources[1];
181 
182 } ACPI_DRTM_RESOURCE_LIST;
183 
184 /* 3) Platform-specific Identifiers List */
185 
186 typedef struct acpi_drtm_dps_id
187 {
188     UINT32                  DpsIdLength;
189     UINT8                   DpsId[16];
190 
191 } ACPI_DRTM_DPS_ID;
192 
193 
194 /*******************************************************************************
195  *
196  * FPDT - Firmware Performance Data Table (ACPI 5.0)
197  *        Version 1
198  *
199  ******************************************************************************/
200 
201 typedef struct acpi_table_fpdt
202 {
203     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
204 
205 } ACPI_TABLE_FPDT;
206 
207 
208 /* FPDT subtable header (Performance Record Structure) */
209 
210 typedef struct acpi_fpdt_header
211 {
212     UINT16                  Type;
213     UINT8                   Length;
214     UINT8                   Revision;
215 
216 } ACPI_FPDT_HEADER;
217 
218 /* Values for Type field above */
219 
220 enum AcpiFpdtType
221 {
222     ACPI_FPDT_TYPE_BOOT                 = 0,
223     ACPI_FPDT_TYPE_S3PERF               = 1
224 };
225 
226 
227 /*
228  * FPDT subtables
229  */
230 
231 /* 0: Firmware Basic Boot Performance Record */
232 
233 typedef struct acpi_fpdt_boot_pointer
234 {
235     ACPI_FPDT_HEADER        Header;
236     UINT8                   Reserved[4];
237     UINT64                  Address;
238 
239 } ACPI_FPDT_BOOT_POINTER;
240 
241 
242 /* 1: S3 Performance Table Pointer Record */
243 
244 typedef struct acpi_fpdt_s3pt_pointer
245 {
246     ACPI_FPDT_HEADER        Header;
247     UINT8                   Reserved[4];
248     UINT64                  Address;
249 
250 } ACPI_FPDT_S3PT_POINTER;
251 
252 
253 /*
254  * S3PT - S3 Performance Table. This table is pointed to by the
255  * S3 Pointer Record above.
256  */
257 typedef struct acpi_table_s3pt
258 {
259     UINT8                   Signature[4]; /* "S3PT" */
260     UINT32                  Length;
261 
262 } ACPI_TABLE_S3PT;
263 
264 
265 /*
266  * S3PT Subtables (Not part of the actual FPDT)
267  */
268 
269 /* Values for Type field in S3PT header */
270 
271 enum AcpiS3ptType
272 {
273     ACPI_S3PT_TYPE_RESUME               = 0,
274     ACPI_S3PT_TYPE_SUSPEND              = 1,
275     ACPI_FPDT_BOOT_PERFORMANCE          = 2
276 };
277 
278 typedef struct acpi_s3pt_resume
279 {
280     ACPI_FPDT_HEADER        Header;
281     UINT32                  ResumeCount;
282     UINT64                  FullResume;
283     UINT64                  AverageResume;
284 
285 } ACPI_S3PT_RESUME;
286 
287 typedef struct acpi_s3pt_suspend
288 {
289     ACPI_FPDT_HEADER        Header;
290     UINT64                  SuspendStart;
291     UINT64                  SuspendEnd;
292 
293 } ACPI_S3PT_SUSPEND;
294 
295 
296 /*
297  * FPDT Boot Performance Record (Not part of the actual FPDT)
298  */
299 typedef struct acpi_fpdt_boot
300 {
301     ACPI_FPDT_HEADER        Header;
302     UINT8                   Reserved[4];
303     UINT64                  ResetEnd;
304     UINT64                  LoadStart;
305     UINT64                  StartupStart;
306     UINT64                  ExitServicesEntry;
307     UINT64                  ExitServicesExit;
308 
309 } ACPI_FPDT_BOOT;
310 
311 
312 /*******************************************************************************
313  *
314  * GTDT - Generic Timer Description Table (ACPI 5.1)
315  *        Version 2
316  *
317  ******************************************************************************/
318 
319 typedef struct acpi_table_gtdt
320 {
321     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
322     UINT64                  CounterBlockAddresss;
323     UINT32                  Reserved;
324     UINT32                  SecureEl1Interrupt;
325     UINT32                  SecureEl1Flags;
326     UINT32                  NonSecureEl1Interrupt;
327     UINT32                  NonSecureEl1Flags;
328     UINT32                  VirtualTimerInterrupt;
329     UINT32                  VirtualTimerFlags;
330     UINT32                  NonSecureEl2Interrupt;
331     UINT32                  NonSecureEl2Flags;
332     UINT64                  CounterReadBlockAddress;
333     UINT32                  PlatformTimerCount;
334     UINT32                  PlatformTimerOffset;
335 
336 } ACPI_TABLE_GTDT;
337 
338 /* Flag Definitions: Timer Block Physical Timers and Virtual timers */
339 
340 #define ACPI_GTDT_INTERRUPT_MODE        (1)
341 #define ACPI_GTDT_INTERRUPT_POLARITY    (1<<1)
342 #define ACPI_GTDT_ALWAYS_ON             (1<<2)
343 
344 
345 /* Common GTDT subtable header */
346 
347 typedef struct acpi_gtdt_header
348 {
349     UINT8                   Type;
350     UINT16                  Length;
351 
352 } ACPI_GTDT_HEADER;
353 
354 /* Values for GTDT subtable type above */
355 
356 enum AcpiGtdtType
357 {
358     ACPI_GTDT_TYPE_TIMER_BLOCK      = 0,
359     ACPI_GTDT_TYPE_WATCHDOG         = 1,
360     ACPI_GTDT_TYPE_RESERVED         = 2    /* 2 and greater are reserved */
361 };
362 
363 
364 /* GTDT Subtables, correspond to Type in acpi_gtdt_header */
365 
366 /* 0: Generic Timer Block */
367 
368 typedef struct acpi_gtdt_timer_block
369 {
370     ACPI_GTDT_HEADER        Header;
371     UINT8                   Reserved;
372     UINT64                  BlockAddress;
373     UINT32                  TimerCount;
374     UINT32                  TimerOffset;
375 
376 } ACPI_GTDT_TIMER_BLOCK;
377 
378 /* Timer Sub-Structure, one per timer */
379 
380 typedef struct acpi_gtdt_timer_entry
381 {
382     UINT8                   FrameNumber;
383     UINT8                   Reserved[3];
384     UINT64                  BaseAddress;
385     UINT64                  El0BaseAddress;
386     UINT32                  TimerInterrupt;
387     UINT32                  TimerFlags;
388     UINT32                  VirtualTimerInterrupt;
389     UINT32                  VirtualTimerFlags;
390     UINT32                  CommonFlags;
391 
392 } ACPI_GTDT_TIMER_ENTRY;
393 
394 /* Flag Definitions: TimerFlags and VirtualTimerFlags above */
395 
396 #define ACPI_GTDT_GT_IRQ_MODE               (1)
397 #define ACPI_GTDT_GT_IRQ_POLARITY           (1<<1)
398 
399 /* Flag Definitions: CommonFlags above */
400 
401 #define ACPI_GTDT_GT_IS_SECURE_TIMER        (1)
402 #define ACPI_GTDT_GT_ALWAYS_ON              (1<<1)
403 
404 
405 /* 1: SBSA Generic Watchdog Structure */
406 
407 typedef struct acpi_gtdt_watchdog
408 {
409     ACPI_GTDT_HEADER        Header;
410     UINT8                   Reserved;
411     UINT64                  RefreshFrameAddress;
412     UINT64                  ControlFrameAddress;
413     UINT32                  TimerInterrupt;
414     UINT32                  TimerFlags;
415 
416 } ACPI_GTDT_WATCHDOG;
417 
418 /* Flag Definitions: TimerFlags above */
419 
420 #define ACPI_GTDT_WATCHDOG_IRQ_MODE         (1)
421 #define ACPI_GTDT_WATCHDOG_IRQ_POLARITY     (1<<1)
422 #define ACPI_GTDT_WATCHDOG_SECURE           (1<<2)
423 
424 
425 /*******************************************************************************
426  *
427  * MPST - Memory Power State Table (ACPI 5.0)
428  *        Version 1
429  *
430  ******************************************************************************/
431 
432 #define ACPI_MPST_CHANNEL_INFO \
433     UINT8                   ChannelId; \
434     UINT8                   Reserved1[3]; \
435     UINT16                  PowerNodeCount; \
436     UINT16                  Reserved2;
437 
438 /* Main table */
439 
440 typedef struct acpi_table_mpst
441 {
442     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
443     ACPI_MPST_CHANNEL_INFO                      /* Platform Communication Channel */
444 
445 } ACPI_TABLE_MPST;
446 
447 
448 /* Memory Platform Communication Channel Info */
449 
450 typedef struct acpi_mpst_channel
451 {
452     ACPI_MPST_CHANNEL_INFO                      /* Platform Communication Channel */
453 
454 } ACPI_MPST_CHANNEL;
455 
456 
457 /* Memory Power Node Structure */
458 
459 typedef struct acpi_mpst_power_node
460 {
461     UINT8                   Flags;
462     UINT8                   Reserved1;
463     UINT16                  NodeId;
464     UINT32                  Length;
465     UINT64                  RangeAddress;
466     UINT64                  RangeLength;
467     UINT32                  NumPowerStates;
468     UINT32                  NumPhysicalComponents;
469 
470 } ACPI_MPST_POWER_NODE;
471 
472 /* Values for Flags field above */
473 
474 #define ACPI_MPST_ENABLED               1
475 #define ACPI_MPST_POWER_MANAGED         2
476 #define ACPI_MPST_HOT_PLUG_CAPABLE      4
477 
478 
479 /* Memory Power State Structure (follows POWER_NODE above) */
480 
481 typedef struct acpi_mpst_power_state
482 {
483     UINT8                   PowerState;
484     UINT8                   InfoIndex;
485 
486 } ACPI_MPST_POWER_STATE;
487 
488 
489 /* Physical Component ID Structure (follows POWER_STATE above) */
490 
491 typedef struct acpi_mpst_component
492 {
493     UINT16                  ComponentId;
494 
495 } ACPI_MPST_COMPONENT;
496 
497 
498 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
499 
500 typedef struct acpi_mpst_data_hdr
501 {
502     UINT16                  CharacteristicsCount;
503     UINT16                  Reserved;
504 
505 } ACPI_MPST_DATA_HDR;
506 
507 typedef struct acpi_mpst_power_data
508 {
509     UINT8                   StructureId;
510     UINT8                   Flags;
511     UINT16                  Reserved1;
512     UINT32                  AveragePower;
513     UINT32                  PowerSaving;
514     UINT64                  ExitLatency;
515     UINT64                  Reserved2;
516 
517 } ACPI_MPST_POWER_DATA;
518 
519 /* Values for Flags field above */
520 
521 #define ACPI_MPST_PRESERVE              1
522 #define ACPI_MPST_AUTOENTRY             2
523 #define ACPI_MPST_AUTOEXIT              4
524 
525 
526 /* Shared Memory Region (not part of an ACPI table) */
527 
528 typedef struct acpi_mpst_shared
529 {
530     UINT32                  Signature;
531     UINT16                  PccCommand;
532     UINT16                  PccStatus;
533     UINT32                  CommandRegister;
534     UINT32                  StatusRegister;
535     UINT32                  PowerStateId;
536     UINT32                  PowerNodeId;
537     UINT64                  EnergyConsumed;
538     UINT64                  AveragePower;
539 
540 } ACPI_MPST_SHARED;
541 
542 
543 /*******************************************************************************
544  *
545  * PCCT - Platform Communications Channel Table (ACPI 5.0)
546  *        Version 1
547  *
548  ******************************************************************************/
549 
550 typedef struct acpi_table_pcct
551 {
552     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
553     UINT32                  Flags;
554     UINT64                  Reserved;
555 
556 } ACPI_TABLE_PCCT;
557 
558 /* Values for Flags field above */
559 
560 #define ACPI_PCCT_DOORBELL              1
561 
562 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
563 
564 enum AcpiPcctType
565 {
566     ACPI_PCCT_TYPE_GENERIC_SUBSPACE     = 0,
567     ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE  = 1,
568     ACPI_PCCT_TYPE_RESERVED             = 2     /* 2 and greater are reserved */
569 };
570 
571 /*
572  * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
573  */
574 
575 /* 0: Generic Communications Subspace */
576 
577 typedef struct acpi_pcct_subspace
578 {
579     ACPI_SUBTABLE_HEADER    Header;
580     UINT8                   Reserved[6];
581     UINT64                  BaseAddress;
582     UINT64                  Length;
583     ACPI_GENERIC_ADDRESS    DoorbellRegister;
584     UINT64                  PreserveMask;
585     UINT64                  WriteMask;
586     UINT32                  Latency;
587     UINT32                  MaxAccessRate;
588     UINT16                  MinTurnaroundTime;
589 
590 } ACPI_PCCT_SUBSPACE;
591 
592 
593 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
594 
595 typedef struct acpi_pcct_hw_reduced
596 {
597     ACPI_SUBTABLE_HEADER    Header;
598     UINT32                  DoorbellInterrupt;
599     UINT8                   Flags;
600     UINT8                   Reserved;
601     UINT64                  BaseAddress;
602     UINT64                  Length;
603     ACPI_GENERIC_ADDRESS    DoorbellRegister;
604     UINT64                  PreserveMask;
605     UINT64                  WriteMask;
606     UINT32                  Latency;
607     UINT32                  MaxAccessRate;
608     UINT16                  MinTurnaroundTime;
609 
610 } ACPI_PCCT_HW_REDUCED;
611 
612 /* Values for doorbell flags above */
613 
614 #define ACPI_PCCT_INTERRUPT_POLARITY    (1)
615 #define ACPI_PCCT_INTERRUPT_MODE        (1<<1)
616 
617 
618 /*
619  * PCC memory structures (not part of the ACPI table)
620  */
621 
622 /* Shared Memory Region */
623 
624 typedef struct acpi_pcct_shared_memory
625 {
626     UINT32                  Signature;
627     UINT16                  Command;
628     UINT16                  Status;
629 
630 } ACPI_PCCT_SHARED_MEMORY;
631 
632 
633 /*******************************************************************************
634  *
635  * PMTT - Platform Memory Topology Table (ACPI 5.0)
636  *        Version 1
637  *
638  ******************************************************************************/
639 
640 typedef struct acpi_table_pmtt
641 {
642     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
643     UINT32                  Reserved;
644 
645 } ACPI_TABLE_PMTT;
646 
647 
648 /* Common header for PMTT subtables that follow main table */
649 
650 typedef struct acpi_pmtt_header
651 {
652     UINT8                   Type;
653     UINT8                   Reserved1;
654     UINT16                  Length;
655     UINT16                  Flags;
656     UINT16                  Reserved2;
657 
658 } ACPI_PMTT_HEADER;
659 
660 /* Values for Type field above */
661 
662 #define ACPI_PMTT_TYPE_SOCKET           0
663 #define ACPI_PMTT_TYPE_CONTROLLER       1
664 #define ACPI_PMTT_TYPE_DIMM             2
665 #define ACPI_PMTT_TYPE_RESERVED         3 /* 0x03-0xFF are reserved */
666 
667 /* Values for Flags field above */
668 
669 #define ACPI_PMTT_TOP_LEVEL             0x0001
670 #define ACPI_PMTT_PHYSICAL              0x0002
671 #define ACPI_PMTT_MEMORY_TYPE           0x000C
672 
673 
674 /*
675  * PMTT subtables, correspond to Type in acpi_pmtt_header
676  */
677 
678 
679 /* 0: Socket Structure */
680 
681 typedef struct acpi_pmtt_socket
682 {
683     ACPI_PMTT_HEADER        Header;
684     UINT16                  SocketId;
685     UINT16                  Reserved;
686 
687 } ACPI_PMTT_SOCKET;
688 
689 
690 /* 1: Memory Controller subtable */
691 
692 typedef struct acpi_pmtt_controller
693 {
694     ACPI_PMTT_HEADER        Header;
695     UINT32                  ReadLatency;
696     UINT32                  WriteLatency;
697     UINT32                  ReadBandwidth;
698     UINT32                  WriteBandwidth;
699     UINT16                  AccessWidth;
700     UINT16                  Alignment;
701     UINT16                  Reserved;
702     UINT16                  DomainCount;
703 
704 } ACPI_PMTT_CONTROLLER;
705 
706 /* 1a: Proximity Domain substructure */
707 
708 typedef struct acpi_pmtt_domain
709 {
710     UINT32                  ProximityDomain;
711 
712 } ACPI_PMTT_DOMAIN;
713 
714 
715 /* 2: Physical Component Identifier (DIMM) */
716 
717 typedef struct acpi_pmtt_physical_component
718 {
719     ACPI_PMTT_HEADER        Header;
720     UINT16                  ComponentId;
721     UINT16                  Reserved;
722     UINT32                  MemorySize;
723     UINT32                  BiosHandle;
724 
725 } ACPI_PMTT_PHYSICAL_COMPONENT;
726 
727 
728 /*******************************************************************************
729  *
730  * RASF - RAS Feature Table (ACPI 5.0)
731  *        Version 1
732  *
733  ******************************************************************************/
734 
735 typedef struct acpi_table_rasf
736 {
737     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
738     UINT8                   ChannelId[12];
739 
740 } ACPI_TABLE_RASF;
741 
742 /* RASF Platform Communication Channel Shared Memory Region */
743 
744 typedef struct acpi_rasf_shared_memory
745 {
746     UINT32                  Signature;
747     UINT16                  Command;
748     UINT16                  Status;
749     UINT16                  Version;
750     UINT8                   Capabilities[16];
751     UINT8                   SetCapabilities[16];
752     UINT16                  NumParameterBlocks;
753     UINT32                  SetCapabilitiesStatus;
754 
755 } ACPI_RASF_SHARED_MEMORY;
756 
757 /* RASF Parameter Block Structure Header */
758 
759 typedef struct acpi_rasf_parameter_block
760 {
761     UINT16                  Type;
762     UINT16                  Version;
763     UINT16                  Length;
764 
765 } ACPI_RASF_PARAMETER_BLOCK;
766 
767 /* RASF Parameter Block Structure for PATROL_SCRUB */
768 
769 typedef struct acpi_rasf_patrol_scrub_parameter
770 {
771     ACPI_RASF_PARAMETER_BLOCK   Header;
772     UINT16                      PatrolScrubCommand;
773     UINT64                      RequestedAddressRange[2];
774     UINT64                      ActualAddressRange[2];
775     UINT16                      Flags;
776     UINT8                       RequestedSpeed;
777 
778 } ACPI_RASF_PATROL_SCRUB_PARAMETER;
779 
780 /* Masks for Flags and Speed fields above */
781 
782 #define ACPI_RASF_SCRUBBER_RUNNING      1
783 #define ACPI_RASF_SPEED                 (7<<1)
784 #define ACPI_RASF_SPEED_SLOW            (0<<1)
785 #define ACPI_RASF_SPEED_MEDIUM          (4<<1)
786 #define ACPI_RASF_SPEED_FAST            (7<<1)
787 
788 /* Channel Commands */
789 
790 enum AcpiRasfCommands
791 {
792     ACPI_RASF_EXECUTE_RASF_COMMAND      = 1
793 };
794 
795 /* Platform RAS Capabilities */
796 
797 enum AcpiRasfCapabiliities
798 {
799     ACPI_HW_PATROL_SCRUB_SUPPORTED      = 0,
800     ACPI_SW_PATROL_SCRUB_EXPOSED        = 1
801 };
802 
803 /* Patrol Scrub Commands */
804 
805 enum AcpiRasfPatrolScrubCommands
806 {
807     ACPI_RASF_GET_PATROL_PARAMETERS     = 1,
808     ACPI_RASF_START_PATROL_SCRUBBER     = 2,
809     ACPI_RASF_STOP_PATROL_SCRUBBER      = 3
810 };
811 
812 /* Channel Command flags */
813 
814 #define ACPI_RASF_GENERATE_SCI          (1<<15)
815 
816 /* Status values */
817 
818 enum AcpiRasfStatus
819 {
820     ACPI_RASF_SUCCESS                   = 0,
821     ACPI_RASF_NOT_VALID                 = 1,
822     ACPI_RASF_NOT_SUPPORTED             = 2,
823     ACPI_RASF_BUSY                      = 3,
824     ACPI_RASF_FAILED                    = 4,
825     ACPI_RASF_ABORTED                   = 5,
826     ACPI_RASF_INVALID_DATA              = 6
827 };
828 
829 /* Status flags */
830 
831 #define ACPI_RASF_COMMAND_COMPLETE      (1)
832 #define ACPI_RASF_SCI_DOORBELL          (1<<1)
833 #define ACPI_RASF_ERROR                 (1<<2)
834 #define ACPI_RASF_STATUS                (0x1F<<3)
835 
836 
837 /*******************************************************************************
838  *
839  * STAO - Status Override Table (_STA override) - ACPI 6.0
840  *        Version 1
841  *
842  * Conforms to "ACPI Specification for Status Override Table"
843  * 6 January 2015
844  *
845  ******************************************************************************/
846 
847 typedef struct acpi_table_stao
848 {
849     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
850     UINT8                   IgnoreUart;
851 
852 } ACPI_TABLE_STAO;
853 
854 
855 /*******************************************************************************
856  *
857  * WPBT - Windows Platform Environment Table (ACPI 6.0)
858  *        Version 1
859  *
860  * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
861  *
862  ******************************************************************************/
863 
864 typedef struct acpi_table_wpbt
865 {
866     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
867     UINT32                  HandoffSize;
868     UINT64                  HandoffAddress;
869     UINT8                   Layout;
870     UINT8                   Type;
871     UINT16                  ArgumentsLength;
872 
873 } ACPI_TABLE_WPBT;
874 
875 
876 /*******************************************************************************
877  *
878  * XENV - Xen Environment Table (ACPI 6.0)
879  *        Version 1
880  *
881  * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
882  *
883  ******************************************************************************/
884 
885 typedef struct acpi_table_xenv
886 {
887     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
888     UINT64                  GrantTableAddress;
889     UINT64                  GrantTableSize;
890     UINT32                  EventInterrupt;
891     UINT8                   EventFlags;
892 
893 } ACPI_TABLE_XENV;
894 
895 
896 /* Reset to default packing */
897 
898 #pragma pack()
899 
900 #endif /* __ACTBL3_H__ */
901