xref: /illumos-gate/usr/src/uts/intel/sys/acpi/actbl3.h (revision 7855d95b30fd903e3918bad5a29b777e765db821)
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_HW_REDUCED_SUBSPACE_TYPE2    = 2,    /* ACPI 6.1 */
569     ACPI_PCCT_TYPE_RESERVED                     = 3     /* 3 and greater are reserved */
570 };
571 
572 /*
573  * PCCT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
574  */
575 
576 /* 0: Generic Communications Subspace */
577 
578 typedef struct acpi_pcct_subspace
579 {
580     ACPI_SUBTABLE_HEADER    Header;
581     UINT8                   Reserved[6];
582     UINT64                  BaseAddress;
583     UINT64                  Length;
584     ACPI_GENERIC_ADDRESS    DoorbellRegister;
585     UINT64                  PreserveMask;
586     UINT64                  WriteMask;
587     UINT32                  Latency;
588     UINT32                  MaxAccessRate;
589     UINT16                  MinTurnaroundTime;
590 
591 } ACPI_PCCT_SUBSPACE;
592 
593 
594 /* 1: HW-reduced Communications Subspace (ACPI 5.1) */
595 
596 typedef struct acpi_pcct_hw_reduced
597 {
598     ACPI_SUBTABLE_HEADER    Header;
599     UINT32                  DoorbellInterrupt;
600     UINT8                   Flags;
601     UINT8                   Reserved;
602     UINT64                  BaseAddress;
603     UINT64                  Length;
604     ACPI_GENERIC_ADDRESS    DoorbellRegister;
605     UINT64                  PreserveMask;
606     UINT64                  WriteMask;
607     UINT32                  Latency;
608     UINT32                  MaxAccessRate;
609     UINT16                  MinTurnaroundTime;
610 
611 } ACPI_PCCT_HW_REDUCED;
612 
613 
614 /* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
615 
616 typedef struct acpi_pcct_hw_reduced_type2
617 {
618     ACPI_SUBTABLE_HEADER    Header;
619     UINT32                  DoorbellInterrupt;
620     UINT8                   Flags;
621     UINT8                   Reserved;
622     UINT64                  BaseAddress;
623     UINT64                  Length;
624     ACPI_GENERIC_ADDRESS    DoorbellRegister;
625     UINT64                  PreserveMask;
626     UINT64                  WriteMask;
627     UINT32                  Latency;
628     UINT32                  MaxAccessRate;
629     UINT16                  MinTurnaroundTime;
630     ACPI_GENERIC_ADDRESS    DoorbellAckRegister;
631     UINT64                  AckPreserveMask;
632     UINT64                  AckWriteMask;
633 
634 } ACPI_PCCT_HW_REDUCED_TYPE2;
635 
636 
637 /* Values for doorbell flags above */
638 
639 #define ACPI_PCCT_INTERRUPT_POLARITY    (1)
640 #define ACPI_PCCT_INTERRUPT_MODE        (1<<1)
641 
642 
643 /*
644  * PCC memory structures (not part of the ACPI table)
645  */
646 
647 /* Shared Memory Region */
648 
649 typedef struct acpi_pcct_shared_memory
650 {
651     UINT32                  Signature;
652     UINT16                  Command;
653     UINT16                  Status;
654 
655 } ACPI_PCCT_SHARED_MEMORY;
656 
657 
658 /*******************************************************************************
659  *
660  * PMTT - Platform Memory Topology Table (ACPI 5.0)
661  *        Version 1
662  *
663  ******************************************************************************/
664 
665 typedef struct acpi_table_pmtt
666 {
667     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
668     UINT32                  Reserved;
669 
670 } ACPI_TABLE_PMTT;
671 
672 
673 /* Common header for PMTT subtables that follow main table */
674 
675 typedef struct acpi_pmtt_header
676 {
677     UINT8                   Type;
678     UINT8                   Reserved1;
679     UINT16                  Length;
680     UINT16                  Flags;
681     UINT16                  Reserved2;
682 
683 } ACPI_PMTT_HEADER;
684 
685 /* Values for Type field above */
686 
687 #define ACPI_PMTT_TYPE_SOCKET           0
688 #define ACPI_PMTT_TYPE_CONTROLLER       1
689 #define ACPI_PMTT_TYPE_DIMM             2
690 #define ACPI_PMTT_TYPE_RESERVED         3 /* 0x03-0xFF are reserved */
691 
692 /* Values for Flags field above */
693 
694 #define ACPI_PMTT_TOP_LEVEL             0x0001
695 #define ACPI_PMTT_PHYSICAL              0x0002
696 #define ACPI_PMTT_MEMORY_TYPE           0x000C
697 
698 
699 /*
700  * PMTT subtables, correspond to Type in acpi_pmtt_header
701  */
702 
703 
704 /* 0: Socket Structure */
705 
706 typedef struct acpi_pmtt_socket
707 {
708     ACPI_PMTT_HEADER        Header;
709     UINT16                  SocketId;
710     UINT16                  Reserved;
711 
712 } ACPI_PMTT_SOCKET;
713 
714 
715 /* 1: Memory Controller subtable */
716 
717 typedef struct acpi_pmtt_controller
718 {
719     ACPI_PMTT_HEADER        Header;
720     UINT32                  ReadLatency;
721     UINT32                  WriteLatency;
722     UINT32                  ReadBandwidth;
723     UINT32                  WriteBandwidth;
724     UINT16                  AccessWidth;
725     UINT16                  Alignment;
726     UINT16                  Reserved;
727     UINT16                  DomainCount;
728 
729 } ACPI_PMTT_CONTROLLER;
730 
731 /* 1a: Proximity Domain substructure */
732 
733 typedef struct acpi_pmtt_domain
734 {
735     UINT32                  ProximityDomain;
736 
737 } ACPI_PMTT_DOMAIN;
738 
739 
740 /* 2: Physical Component Identifier (DIMM) */
741 
742 typedef struct acpi_pmtt_physical_component
743 {
744     ACPI_PMTT_HEADER        Header;
745     UINT16                  ComponentId;
746     UINT16                  Reserved;
747     UINT32                  MemorySize;
748     UINT32                  BiosHandle;
749 
750 } ACPI_PMTT_PHYSICAL_COMPONENT;
751 
752 
753 /*******************************************************************************
754  *
755  * RASF - RAS Feature Table (ACPI 5.0)
756  *        Version 1
757  *
758  ******************************************************************************/
759 
760 typedef struct acpi_table_rasf
761 {
762     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
763     UINT8                   ChannelId[12];
764 
765 } ACPI_TABLE_RASF;
766 
767 /* RASF Platform Communication Channel Shared Memory Region */
768 
769 typedef struct acpi_rasf_shared_memory
770 {
771     UINT32                  Signature;
772     UINT16                  Command;
773     UINT16                  Status;
774     UINT16                  Version;
775     UINT8                   Capabilities[16];
776     UINT8                   SetCapabilities[16];
777     UINT16                  NumParameterBlocks;
778     UINT32                  SetCapabilitiesStatus;
779 
780 } ACPI_RASF_SHARED_MEMORY;
781 
782 /* RASF Parameter Block Structure Header */
783 
784 typedef struct acpi_rasf_parameter_block
785 {
786     UINT16                  Type;
787     UINT16                  Version;
788     UINT16                  Length;
789 
790 } ACPI_RASF_PARAMETER_BLOCK;
791 
792 /* RASF Parameter Block Structure for PATROL_SCRUB */
793 
794 typedef struct acpi_rasf_patrol_scrub_parameter
795 {
796     ACPI_RASF_PARAMETER_BLOCK   Header;
797     UINT16                      PatrolScrubCommand;
798     UINT64                      RequestedAddressRange[2];
799     UINT64                      ActualAddressRange[2];
800     UINT16                      Flags;
801     UINT8                       RequestedSpeed;
802 
803 } ACPI_RASF_PATROL_SCRUB_PARAMETER;
804 
805 /* Masks for Flags and Speed fields above */
806 
807 #define ACPI_RASF_SCRUBBER_RUNNING      1
808 #define ACPI_RASF_SPEED                 (7<<1)
809 #define ACPI_RASF_SPEED_SLOW            (0<<1)
810 #define ACPI_RASF_SPEED_MEDIUM          (4<<1)
811 #define ACPI_RASF_SPEED_FAST            (7<<1)
812 
813 /* Channel Commands */
814 
815 enum AcpiRasfCommands
816 {
817     ACPI_RASF_EXECUTE_RASF_COMMAND      = 1
818 };
819 
820 /* Platform RAS Capabilities */
821 
822 enum AcpiRasfCapabiliities
823 {
824     ACPI_HW_PATROL_SCRUB_SUPPORTED      = 0,
825     ACPI_SW_PATROL_SCRUB_EXPOSED        = 1
826 };
827 
828 /* Patrol Scrub Commands */
829 
830 enum AcpiRasfPatrolScrubCommands
831 {
832     ACPI_RASF_GET_PATROL_PARAMETERS     = 1,
833     ACPI_RASF_START_PATROL_SCRUBBER     = 2,
834     ACPI_RASF_STOP_PATROL_SCRUBBER      = 3
835 };
836 
837 /* Channel Command flags */
838 
839 #define ACPI_RASF_GENERATE_SCI          (1<<15)
840 
841 /* Status values */
842 
843 enum AcpiRasfStatus
844 {
845     ACPI_RASF_SUCCESS                   = 0,
846     ACPI_RASF_NOT_VALID                 = 1,
847     ACPI_RASF_NOT_SUPPORTED             = 2,
848     ACPI_RASF_BUSY                      = 3,
849     ACPI_RASF_FAILED                    = 4,
850     ACPI_RASF_ABORTED                   = 5,
851     ACPI_RASF_INVALID_DATA              = 6
852 };
853 
854 /* Status flags */
855 
856 #define ACPI_RASF_COMMAND_COMPLETE      (1)
857 #define ACPI_RASF_SCI_DOORBELL          (1<<1)
858 #define ACPI_RASF_ERROR                 (1<<2)
859 #define ACPI_RASF_STATUS                (0x1F<<3)
860 
861 
862 /*******************************************************************************
863  *
864  * STAO - Status Override Table (_STA override) - ACPI 6.0
865  *        Version 1
866  *
867  * Conforms to "ACPI Specification for Status Override Table"
868  * 6 January 2015
869  *
870  ******************************************************************************/
871 
872 typedef struct acpi_table_stao
873 {
874     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
875     UINT8                   IgnoreUart;
876 
877 } ACPI_TABLE_STAO;
878 
879 
880 /*******************************************************************************
881  *
882  * WPBT - Windows Platform Environment Table (ACPI 6.0)
883  *        Version 1
884  *
885  * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011
886  *
887  ******************************************************************************/
888 
889 typedef struct acpi_table_wpbt
890 {
891     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
892     UINT32                  HandoffSize;
893     UINT64                  HandoffAddress;
894     UINT8                   Layout;
895     UINT8                   Type;
896     UINT16                  ArgumentsLength;
897 
898 } ACPI_TABLE_WPBT;
899 
900 
901 /*******************************************************************************
902  *
903  * XENV - Xen Environment Table (ACPI 6.0)
904  *        Version 1
905  *
906  * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015
907  *
908  ******************************************************************************/
909 
910 typedef struct acpi_table_xenv
911 {
912     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
913     UINT64                  GrantTableAddress;
914     UINT64                  GrantTableSize;
915     UINT32                  EventInterrupt;
916     UINT8                   EventFlags;
917 
918 } ACPI_TABLE_XENV;
919 
920 
921 /* Reset to default packing */
922 
923 #pragma pack()
924 
925 #endif /* __ACTBL3_H__ */
926