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