xref: /haiku/src/add-ons/kernel/bus_managers/acpi/acpica/include/actbl3.h (revision 986e4abce4efeccd9418eb8cdc7a710487f093b9)
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 - 2013, 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  * The tables in this file are fully defined within the ACPI specification.
128  *
129  ******************************************************************************/
130 
131 
132 /*
133  * Values for description table header signatures for tables defined in this
134  * file. Useful because they make it more difficult to inadvertently type in
135  * the wrong signature.
136  */
137 #define ACPI_SIG_BGRT           "BGRT"      /* Boot Graphics Resource Table */
138 #define ACPI_SIG_DRTM           "DRTM"      /* Dynamic Root of Trust for Measurement table */
139 #define ACPI_SIG_FPDT           "FPDT"      /* Firmware Performance Data Table */
140 #define ACPI_SIG_GTDT           "GTDT"      /* Generic Timer Description Table */
141 #define ACPI_SIG_MPST           "MPST"      /* Memory Power State Table */
142 #define ACPI_SIG_PCCT           "PCCT"      /* Platform Communications Channel Table */
143 #define ACPI_SIG_PMTT           "PMTT"      /* Platform Memory Topology Table */
144 #define ACPI_SIG_RASF           "RASF"      /* RAS Feature table */
145 #define ACPI_SIG_TPM2           "TPM2"      /* Trusted Platform Module 2.0 H/W interface table */
146 
147 #define ACPI_SIG_S3PT           "S3PT"      /* S3 Performance (sub)Table */
148 #define ACPI_SIG_PCCS           "PCC"       /* PCC Shared Memory Region */
149 
150 /* Reserved table signatures */
151 
152 #define ACPI_SIG_MATR           "MATR"      /* Memory Address Translation Table */
153 #define ACPI_SIG_MSDM           "MSDM"      /* Microsoft Data Management Table */
154 #define ACPI_SIG_WPBT           "WPBT"      /* Windows Platform Binary Table */
155 
156 /*
157  * All tables must be byte-packed to match the ACPI specification, since
158  * the tables are provided by the system BIOS.
159  */
160 #pragma pack(1)
161 
162 /*
163  * Note: C bitfields are not used for this reason:
164  *
165  * "Bitfields are great and easy to read, but unfortunately the C language
166  * does not specify the layout of bitfields in memory, which means they are
167  * essentially useless for dealing with packed data in on-disk formats or
168  * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
169  * this decision was a design error in C. Ritchie could have picked an order
170  * and stuck with it." Norman Ramsey.
171  * See http://stackoverflow.com/a/1053662/41661
172  */
173 
174 
175 /*******************************************************************************
176  *
177  * BGRT - Boot Graphics Resource Table (ACPI 5.0)
178  *        Version 1
179  *
180  ******************************************************************************/
181 
182 typedef struct acpi_table_bgrt
183 {
184     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
185     UINT16                  Version;
186     UINT8                   Status;
187     UINT8                   ImageType;
188     UINT64                  ImageAddress;
189     UINT32                  ImageOffsetX;
190     UINT32                  ImageOffsetY;
191 
192 } ACPI_TABLE_BGRT;
193 
194 
195 /*******************************************************************************
196  *
197  * DRTM - Dynamic Root of Trust for Measurement table
198  *
199  ******************************************************************************/
200 
201 typedef struct acpi_table_drtm
202 {
203     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
204     UINT64                  EntryBaseAddress;
205     UINT64                  EntryLength;
206     UINT32                  EntryAddress32;
207     UINT64                  EntryAddress64;
208     UINT64                  ExitAddress;
209     UINT64                  LogAreaAddress;
210     UINT32                  LogAreaLength;
211     UINT64                  ArchDependentAddress;
212     UINT32                  Flags;
213 
214 } ACPI_TABLE_DRTM;
215 
216 /* 1) Validated Tables List */
217 
218 typedef struct acpi_drtm_vtl_list
219 {
220     UINT32                  ValidatedTableListCount;
221 
222 } ACPI_DRTM_VTL_LIST;
223 
224 /* 2) Resources List */
225 
226 typedef struct acpi_drtm_resource_list
227 {
228     UINT32                  ResourceListCount;
229 
230 } ACPI_DRTM_RESOURCE_LIST;
231 
232 /* 3) Platform-specific Identifiers List */
233 
234 typedef struct acpi_drtm_id_list
235 {
236     UINT32                  IdListCount;
237 
238 } ACPI_DRTM_ID_LIST;
239 
240 
241 /*******************************************************************************
242  *
243  * FPDT - Firmware Performance Data Table (ACPI 5.0)
244  *        Version 1
245  *
246  ******************************************************************************/
247 
248 typedef struct acpi_table_fpdt
249 {
250     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
251 
252 } ACPI_TABLE_FPDT;
253 
254 
255 /* FPDT subtable header */
256 
257 typedef struct acpi_fpdt_header
258 {
259     UINT16                  Type;
260     UINT8                   Length;
261     UINT8                   Revision;
262 
263 } ACPI_FPDT_HEADER;
264 
265 /* Values for Type field above */
266 
267 enum AcpiFpdtType
268 {
269     ACPI_FPDT_TYPE_BOOT                 = 0,
270     ACPI_FPDT_TYPE_S3PERF               = 1
271 };
272 
273 
274 /*
275  * FPDT subtables
276  */
277 
278 /* 0: Firmware Basic Boot Performance Record */
279 
280 typedef struct acpi_fpdt_boot
281 {
282     ACPI_FPDT_HEADER        Header;
283     UINT8                   Reserved[4];
284     UINT64                  ResetEnd;
285     UINT64                  LoadStart;
286     UINT64                  StartupStart;
287     UINT64                  ExitServicesEntry;
288     UINT64                  ExitServicesExit;
289 
290 } ACPI_FPDT_BOOT;
291 
292 
293 /* 1: S3 Performance Table Pointer Record */
294 
295 typedef struct acpi_fpdt_s3pt_ptr
296 {
297     ACPI_FPDT_HEADER        Header;
298     UINT8                   Reserved[4];
299     UINT64                  Address;
300 
301 } ACPI_FPDT_S3PT_PTR;
302 
303 
304 /*
305  * S3PT - S3 Performance Table. This table is pointed to by the
306  * FPDT S3 Pointer Record above.
307  */
308 typedef struct acpi_table_s3pt
309 {
310     UINT8                   Signature[4]; /* "S3PT" */
311     UINT32                  Length;
312 
313 } ACPI_TABLE_S3PT;
314 
315 
316 /*
317  * S3PT Subtables
318  */
319 typedef struct acpi_s3pt_header
320 {
321     UINT16                  Type;
322     UINT8                   Length;
323     UINT8                   Revision;
324 
325 } ACPI_S3PT_HEADER;
326 
327 /* Values for Type field above */
328 
329 enum AcpiS3ptType
330 {
331     ACPI_S3PT_TYPE_RESUME               = 0,
332     ACPI_S3PT_TYPE_SUSPEND              = 1
333 };
334 
335 typedef struct acpi_s3pt_resume
336 {
337     ACPI_S3PT_HEADER        Header;
338     UINT32                  ResumeCount;
339     UINT64                  FullResume;
340     UINT64                  AverageResume;
341 
342 } ACPI_S3PT_RESUME;
343 
344 typedef struct acpi_s3pt_suspend
345 {
346     ACPI_S3PT_HEADER        Header;
347     UINT64                  SuspendStart;
348     UINT64                  SuspendEnd;
349 
350 } ACPI_S3PT_SUSPEND;
351 
352 
353 /*******************************************************************************
354  *
355  * GTDT - Generic Timer Description Table (ACPI 5.0)
356  *        Version 1
357  *
358  ******************************************************************************/
359 
360 typedef struct acpi_table_gtdt
361 {
362     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
363     UINT64                  Address;
364     UINT32                  Flags;
365     UINT32                  SecurePl1Interrupt;
366     UINT32                  SecurePl1Flags;
367     UINT32                  NonSecurePl1Interrupt;
368     UINT32                  NonSecurePl1Flags;
369     UINT32                  VirtualTimerInterrupt;
370     UINT32                  VirtualTimerFlags;
371     UINT32                  NonSecurePl2Interrupt;
372     UINT32                  NonSecurePl2Flags;
373 
374 } ACPI_TABLE_GTDT;
375 
376 /* Values for Flags field above */
377 
378 #define ACPI_GTDT_MAPPED_BLOCK_PRESENT      1
379 
380 /* Values for all "TimerFlags" fields above */
381 
382 #define ACPI_GTDT_INTERRUPT_MODE            1
383 #define ACPI_GTDT_INTERRUPT_POLARITY        2
384 
385 
386 /*******************************************************************************
387  *
388  * MPST - Memory Power State Table (ACPI 5.0)
389  *        Version 1
390  *
391  ******************************************************************************/
392 
393 #define ACPI_MPST_CHANNEL_INFO \
394     UINT8                   ChannelId; \
395     UINT8                   Reserved1[3]; \
396     UINT16                  PowerNodeCount; \
397     UINT16                  Reserved2;
398 
399 /* Main table */
400 
401 typedef struct acpi_table_mpst
402 {
403     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
404     ACPI_MPST_CHANNEL_INFO                      /* Platform Communication Channel */
405 
406 } ACPI_TABLE_MPST;
407 
408 
409 /* Memory Platform Communication Channel Info */
410 
411 typedef struct acpi_mpst_channel
412 {
413     ACPI_MPST_CHANNEL_INFO                      /* Platform Communication Channel */
414 
415 } ACPI_MPST_CHANNEL;
416 
417 
418 /* Memory Power Node Structure */
419 
420 typedef struct acpi_mpst_power_node
421 {
422     UINT8                   Flags;
423     UINT8                   Reserved1;
424     UINT16                  NodeId;
425     UINT32                  Length;
426     UINT64                  RangeAddress;
427     UINT64                  RangeLength;
428     UINT32                  NumPowerStates;
429     UINT32                  NumPhysicalComponents;
430 
431 } ACPI_MPST_POWER_NODE;
432 
433 /* Values for Flags field above */
434 
435 #define ACPI_MPST_ENABLED               1
436 #define ACPI_MPST_POWER_MANAGED         2
437 #define ACPI_MPST_HOT_PLUG_CAPABLE      4
438 
439 
440 /* Memory Power State Structure (follows POWER_NODE above) */
441 
442 typedef struct acpi_mpst_power_state
443 {
444     UINT8                   PowerState;
445     UINT8                   InfoIndex;
446 
447 } ACPI_MPST_POWER_STATE;
448 
449 
450 /* Physical Component ID Structure (follows POWER_STATE above) */
451 
452 typedef struct acpi_mpst_component
453 {
454     UINT16                  ComponentId;
455 
456 } ACPI_MPST_COMPONENT;
457 
458 
459 /* Memory Power State Characteristics Structure (follows all POWER_NODEs) */
460 
461 typedef struct acpi_mpst_data_hdr
462 {
463     UINT16                  CharacteristicsCount;
464     UINT16                  Reserved;
465 
466 } ACPI_MPST_DATA_HDR;
467 
468 typedef struct acpi_mpst_power_data
469 {
470     UINT8                   StructureId;
471     UINT8                   Flags;
472     UINT16                  Reserved1;
473     UINT32                  AveragePower;
474     UINT32                  PowerSaving;
475     UINT64                  ExitLatency;
476     UINT64                  Reserved2;
477 
478 } ACPI_MPST_POWER_DATA;
479 
480 /* Values for Flags field above */
481 
482 #define ACPI_MPST_PRESERVE              1
483 #define ACPI_MPST_AUTOENTRY             2
484 #define ACPI_MPST_AUTOEXIT              4
485 
486 
487 /* Shared Memory Region (not part of an ACPI table) */
488 
489 typedef struct acpi_mpst_shared
490 {
491     UINT32                  Signature;
492     UINT16                  PccCommand;
493     UINT16                  PccStatus;
494     UINT32                  CommandRegister;
495     UINT32                  StatusRegister;
496     UINT32                  PowerStateId;
497     UINT32                  PowerNodeId;
498     UINT64                  EnergyConsumed;
499     UINT64                  AveragePower;
500 
501 } ACPI_MPST_SHARED;
502 
503 
504 /*******************************************************************************
505  *
506  * PCCT - Platform Communications Channel Table (ACPI 5.0)
507  *        Version 1
508  *
509  ******************************************************************************/
510 
511 typedef struct acpi_table_pcct
512 {
513     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
514     UINT32                  Flags;
515     UINT32                  Latency;
516     UINT32                  Reserved;
517 
518 } ACPI_TABLE_PCCT;
519 
520 /* Values for Flags field above */
521 
522 #define ACPI_PCCT_DOORBELL              1
523 
524 /*
525  * PCCT subtables
526  */
527 
528 /* 0: Generic Communications Subspace */
529 
530 typedef struct acpi_pcct_subspace
531 {
532     ACPI_SUBTABLE_HEADER    Header;
533     UINT8                   Reserved[6];
534     UINT64                  BaseAddress;
535     UINT64                  Length;
536     ACPI_GENERIC_ADDRESS    DoorbellRegister;
537     UINT64                  PreserveMask;
538     UINT64                  WriteMask;
539 
540 } ACPI_PCCT_SUBSPACE;
541 
542 
543 /*
544  * PCC memory structures (not part of the ACPI table)
545  */
546 
547 /* Shared Memory Region */
548 
549 typedef struct acpi_pcct_shared_memory
550 {
551     UINT32                  Signature;
552     UINT16                  Command;
553     UINT16                  Status;
554 
555 } ACPI_PCCT_SHARED_MEMORY;
556 
557 
558 /*******************************************************************************
559  *
560  * PMTT - Platform Memory Topology Table (ACPI 5.0)
561  *        Version 1
562  *
563  ******************************************************************************/
564 
565 typedef struct acpi_table_pmtt
566 {
567     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
568     UINT32                  Reserved;
569 
570 } ACPI_TABLE_PMTT;
571 
572 
573 /* Common header for PMTT subtables that follow main table */
574 
575 typedef struct acpi_pmtt_header
576 {
577     UINT8                   Type;
578     UINT8                   Reserved1;
579     UINT16                  Length;
580     UINT16                  Flags;
581     UINT16                  Reserved2;
582 
583 } ACPI_PMTT_HEADER;
584 
585 /* Values for Type field above */
586 
587 #define ACPI_PMTT_TYPE_SOCKET           0
588 #define ACPI_PMTT_TYPE_CONTROLLER       1
589 #define ACPI_PMTT_TYPE_DIMM             2
590 #define ACPI_PMTT_TYPE_RESERVED         3 /* 0x03-0xFF are reserved */
591 
592 /* Values for Flags field above */
593 
594 #define ACPI_PMTT_TOP_LEVEL             0x0001
595 #define ACPI_PMTT_PHYSICAL              0x0002
596 #define ACPI_PMTT_MEMORY_TYPE           0x000C
597 
598 
599 /*
600  * PMTT subtables, correspond to Type in acpi_pmtt_header
601  */
602 
603 
604 /* 0: Socket Structure */
605 
606 typedef struct acpi_pmtt_socket
607 {
608     ACPI_PMTT_HEADER        Header;
609     UINT16                  SocketId;
610     UINT16                  Reserved;
611 
612 } ACPI_PMTT_SOCKET;
613 
614 
615 /* 1: Memory Controller subtable */
616 
617 typedef struct acpi_pmtt_controller
618 {
619     ACPI_PMTT_HEADER        Header;
620     UINT32                  ReadLatency;
621     UINT32                  WriteLatency;
622     UINT32                  ReadBandwidth;
623     UINT32                  WriteBandwidth;
624     UINT16                  AccessWidth;
625     UINT16                  Alignment;
626     UINT16                  Reserved;
627     UINT16                  DomainCount;
628 
629 } ACPI_PMTT_CONTROLLER;
630 
631 /* 1a: Proximity Domain substructure */
632 
633 typedef struct acpi_pmtt_domain
634 {
635     UINT32                  ProximityDomain;
636 
637 } ACPI_PMTT_DOMAIN;
638 
639 
640 /* 2: Physical Component Identifier (DIMM) */
641 
642 typedef struct acpi_pmtt_physical_component
643 {
644     ACPI_PMTT_HEADER        Header;
645     UINT16                  ComponentId;
646     UINT16                  Reserved;
647     UINT32                  MemorySize;
648     UINT32                  BiosHandle;
649 
650 } ACPI_PMTT_PHYSICAL_COMPONENT;
651 
652 
653 /*******************************************************************************
654  *
655  * RASF - RAS Feature Table (ACPI 5.0)
656  *        Version 1
657  *
658  ******************************************************************************/
659 
660 typedef struct acpi_table_rasf
661 {
662     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
663     UINT8                   ChannelId[12];
664 
665 } ACPI_TABLE_RASF;
666 
667 /* RASF Platform Communication Channel Shared Memory Region */
668 
669 typedef struct acpi_rasf_shared_memory
670 {
671     UINT32                  Signature;
672     UINT16                  Command;
673     UINT16                  Status;
674     UINT16                  Version;
675     UINT8                   Capabilities[16];
676     UINT8                   SetCapabilities[16];
677     UINT16                  NumParameterBlocks;
678     UINT32                  SetCapabilitiesStatus;
679 
680 } ACPI_RASF_SHARED_MEMORY;
681 
682 /* RASF Parameter Block Structure Header */
683 
684 typedef struct acpi_rasf_parameter_block
685 {
686     UINT16                  Type;
687     UINT16                  Version;
688     UINT16                  Length;
689 
690 } ACPI_RASF_PARAMETER_BLOCK;
691 
692 /* RASF Parameter Block Structure for PATROL_SCRUB */
693 
694 typedef struct acpi_rasf_patrol_scrub_parameter
695 {
696     ACPI_RASF_PARAMETER_BLOCK   Header;
697     UINT16                      PatrolScrubCommand;
698     UINT64                      RequestedAddressRange[2];
699     UINT64                      ActualAddressRange[2];
700     UINT16                      Flags;
701     UINT8                       RequestedSpeed;
702 
703 } ACPI_RASF_PATROL_SCRUB_PARAMETER;
704 
705 /* Masks for Flags and Speed fields above */
706 
707 #define ACPI_RASF_SCRUBBER_RUNNING      1
708 #define ACPI_RASF_SPEED                 (7<<1)
709 #define ACPI_RASF_SPEED_SLOW            (0<<1)
710 #define ACPI_RASF_SPEED_MEDIUM          (4<<1)
711 #define ACPI_RASF_SPEED_FAST            (7<<1)
712 
713 /* Channel Commands */
714 
715 enum AcpiRasfCommands
716 {
717     ACPI_RASF_EXECUTE_RASF_COMMAND      = 1
718 };
719 
720 /* Platform RAS Capabilities */
721 
722 enum AcpiRasfCapabiliities
723 {
724     ACPI_HW_PATROL_SCRUB_SUPPORTED      = 0,
725     ACPI_SW_PATROL_SCRUB_EXPOSED        = 1
726 };
727 
728 /* Patrol Scrub Commands */
729 
730 enum AcpiRasfPatrolScrubCommands
731 {
732     ACPI_RASF_GET_PATROL_PARAMETERS     = 1,
733     ACPI_RASF_START_PATROL_SCRUBBER     = 2,
734     ACPI_RASF_STOP_PATROL_SCRUBBER      = 3
735 };
736 
737 /* Channel Command flags */
738 
739 #define ACPI_RASF_GENERATE_SCI          (1<<15)
740 
741 /* Status values */
742 
743 enum AcpiRasfStatus
744 {
745     ACPI_RASF_SUCCESS                   = 0,
746     ACPI_RASF_NOT_VALID                 = 1,
747     ACPI_RASF_NOT_SUPPORTED             = 2,
748     ACPI_RASF_BUSY                      = 3,
749     ACPI_RASF_FAILED                    = 4,
750     ACPI_RASF_ABORTED                   = 5,
751     ACPI_RASF_INVALID_DATA              = 6
752 };
753 
754 /* Status flags */
755 
756 #define ACPI_RASF_COMMAND_COMPLETE      (1)
757 #define ACPI_RASF_SCI_DOORBELL          (1<<1)
758 #define ACPI_RASF_ERROR                 (1<<2)
759 #define ACPI_RASF_STATUS                (0x1F<<3)
760 
761 
762 /*******************************************************************************
763  *
764  * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
765  *        Version 3
766  *
767  * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011
768  *
769  ******************************************************************************/
770 
771 typedef struct acpi_table_tpm2
772 {
773     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
774     UINT32                  Flags;
775     UINT64                  ControlAddress;
776     UINT32                  StartMethod;
777 
778 } ACPI_TABLE_TPM2;
779 
780 /* Control area structure (not part of table, pointed to by ControlAddress) */
781 
782 typedef struct acpi_tpm2_control
783 {
784     UINT32                  Reserved;
785     UINT32                  Error;
786     UINT32                  Cancel;
787     UINT32                  Start;
788     UINT64                  InterruptControl;
789     UINT32                  CommandSize;
790     UINT64                  CommandAddress;
791     UINT32                  ResponseSize;
792     UINT64                  ResponseAddress;
793 
794 } ACPI_TPM2_CONTROL;
795 
796 
797 /* Reset to default packing */
798 
799 #pragma pack()
800 
801 #endif /* __ACTBL3_H__ */
802