]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - sys/contrib/dev/acpica/actbl1.h
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / sys / contrib / dev / acpica / actbl1.h
1 /******************************************************************************
2  *
3  * Name: actbl1.h - Additional ACPI table definitions
4  *       $Revision: 1.47 $
5  *
6  *****************************************************************************/
7
8 /******************************************************************************
9  *
10  * 1. Copyright Notice
11  *
12  * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
13  * All rights reserved.
14  *
15  * 2. License
16  *
17  * 2.1. This is your license from Intel Corp. under its intellectual property
18  * rights.  You may have additional license terms from the party that provided
19  * you this software, covering your right to use that party's intellectual
20  * property rights.
21  *
22  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23  * copy of the source code appearing in this file ("Covered Code") an
24  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25  * base code distributed originally by Intel ("Original Intel Code") to copy,
26  * make derivatives, distribute, use and display any portion of the Covered
27  * Code in any form, with the right to sublicense such rights; and
28  *
29  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30  * license (with the right to sublicense), under only those claims of Intel
31  * patents that are infringed by the Original Intel Code, to make, use, sell,
32  * offer to sell, and import the Covered Code and derivative works thereof
33  * solely to the minimum extent necessary to exercise the above copyright
34  * license, and in no event shall the patent license extend to any additions
35  * to or modifications of the Original Intel Code.  No other license or right
36  * is granted directly or by implication, estoppel or otherwise;
37  *
38  * The above copyright and patent license is granted only if the following
39  * conditions are met:
40  *
41  * 3. Conditions
42  *
43  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44  * Redistribution of source code of any substantial portion of the Covered
45  * Code or modification with rights to further distribute source must include
46  * the above Copyright Notice, the above License, this list of Conditions,
47  * and the following Disclaimer and Export Compliance provision.  In addition,
48  * Licensee must cause all Covered Code to which Licensee contributes to
49  * contain a file documenting the changes Licensee made to create that Covered
50  * Code and the date of any change.  Licensee must include in that file the
51  * documentation of any changes made by any predecessor Licensee.  Licensee
52  * must include a prominent statement that the modification is derived,
53  * directly or indirectly, from Original Intel Code.
54  *
55  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56  * Redistribution of source code of any substantial portion of the Covered
57  * Code or modification without rights to further distribute source must
58  * include the following Disclaimer and Export Compliance provision in the
59  * documentation and/or other materials provided with distribution.  In
60  * addition, Licensee may not authorize further sublicense of source of any
61  * portion of the Covered Code, and must include terms to the effect that the
62  * license from Licensee to its licensee is limited to the intellectual
63  * property embodied in the software Licensee provides to its licensee, and
64  * not to intellectual property embodied in modifications its licensee may
65  * make.
66  *
67  * 3.3. Redistribution of Executable. Redistribution in executable form of any
68  * substantial portion of the Covered Code or modification must reproduce the
69  * above Copyright Notice, and the following Disclaimer and Export Compliance
70  * provision in the documentation and/or other materials provided with the
71  * distribution.
72  *
73  * 3.4. Intel retains all right, title, and interest in and to the Original
74  * Intel Code.
75  *
76  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77  * Intel shall be used in advertising or otherwise to promote the sale, use or
78  * other dealings in products derived from or relating to the Covered Code
79  * without prior written authorization from Intel.
80  *
81  * 4. Disclaimer and Export Compliance
82  *
83  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89  * PARTICULAR PURPOSE.
90  *
91  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98  * LIMITED REMEDY.
99  *
100  * 4.3. Licensee shall not export, either directly or indirectly, any of this
101  * software or system incorporating such software without first obtaining any
102  * required license or other approval from the U. S. Department of Commerce or
103  * any other agency or department of the United States Government.  In the
104  * event Licensee exports any such software from the United States or
105  * re-exports any such software from a foreign destination, Licensee shall
106  * ensure that the distribution and export/re-export of the software is in
107  * compliance with all laws, regulations, orders, or other restrictions of the
108  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109  * any of its subsidiaries will export/re-export any technical data, process,
110  * software, or service, directly or indirectly, to any country for which the
111  * United States government or any agency thereof requires an export license,
112  * other governmental approval, or letter of assurance, without first obtaining
113  * such license, approval or letter.
114  *
115  *****************************************************************************/
116
117 #ifndef __ACTBL1_H__
118 #define __ACTBL1_H__
119
120
121 /*******************************************************************************
122  *
123  * Additional ACPI Tables
124  *
125  * These tables are not consumed directly by the ACPICA subsystem, but are
126  * included here to support device drivers and the AML disassembler.
127  *
128  ******************************************************************************/
129
130
131 /*
132  * Values for description table header signatures. Useful because they make
133  * it more difficult to inadvertently type in the wrong signature.
134  */
135 #define ACPI_SIG_ASF            "ASF!"      /* Alert Standard Format table */
136 #define ACPI_SIG_BOOT           "BOOT"      /* Simple Boot Flag Table */
137 #define ACPI_SIG_CPEP           "CPEP"      /* Corrected Platform Error Polling table */
138 #define ACPI_SIG_DBGP           "DBGP"      /* Debug Port table */
139 #define ACPI_SIG_DMAR           "DMAR"      /* DMA Remapping table */
140 #define ACPI_SIG_ECDT           "ECDT"      /* Embedded Controller Boot Resources Table */
141 #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
142 #define ACPI_SIG_MADT           "APIC"      /* Multiple APIC Description Table */
143 #define ACPI_SIG_MCFG           "MCFG"      /* PCI Memory Mapped Configuration table */
144 #define ACPI_SIG_SBST           "SBST"      /* Smart Battery Specification Table */
145 #define ACPI_SIG_SLIT           "SLIT"      /* System Locality Distance Information Table */
146 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
147 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
148 #define ACPI_SIG_SRAT           "SRAT"      /* System Resource Affinity Table */
149 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
150 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
151
152
153 /*
154  * All tables must be byte-packed to match the ACPI specification, since
155  * the tables are provided by the system BIOS.
156  */
157 #pragma pack(1)
158
159 /*
160  * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
161  * This is the only type that is even remotely portable. Anything else is not
162  * portable, so do not use any other bitfield types.
163  */
164
165
166 /* Common Sub-table header (used in MADT, SRAT, etc.) */
167
168 typedef struct acpi_subtable_header
169 {
170     UINT8                   Type;
171     UINT8                   Length;
172
173 } ACPI_SUBTABLE_HEADER;
174
175
176 /*******************************************************************************
177  *
178  * ASF - Alert Standard Format table (Signature "ASF!")
179  *
180  * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
181  *
182  ******************************************************************************/
183
184 typedef struct acpi_table_asf
185 {
186     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
187
188 } ACPI_TABLE_ASF;
189
190
191 /* ASF subtable header */
192
193 typedef struct acpi_asf_header
194 {
195     UINT8                   Type;
196     UINT8                   Reserved;
197     UINT16                  Length;
198
199 } ACPI_ASF_HEADER;
200
201
202 /* Values for Type field above */
203
204 enum AcpiAsfType
205 {
206     ACPI_ASF_TYPE_INFO          = 0,
207     ACPI_ASF_TYPE_ALERT         = 1,
208     ACPI_ASF_TYPE_CONTROL       = 2,
209     ACPI_ASF_TYPE_BOOT          = 3,
210     ACPI_ASF_TYPE_ADDRESS       = 4,
211     ACPI_ASF_TYPE_RESERVED      = 5
212 };
213
214 /*
215  * ASF subtables
216  */
217
218 /* 0: ASF Information */
219
220 typedef struct acpi_asf_info
221 {
222     ACPI_ASF_HEADER         Header;
223     UINT8                   MinResetValue;
224     UINT8                   MinPollInterval;
225     UINT16                  SystemId;
226     UINT32                  MfgId;
227     UINT8                   Flags;
228     UINT8                   Reserved2[3];
229
230 } ACPI_ASF_INFO;
231
232 /* 1: ASF Alerts */
233
234 typedef struct acpi_asf_alert
235 {
236     ACPI_ASF_HEADER         Header;
237     UINT8                   AssertMask;
238     UINT8                   DeassertMask;
239     UINT8                   Alerts;
240     UINT8                   DataLength;
241
242 } ACPI_ASF_ALERT;
243
244 typedef struct acpi_asf_alert_data
245 {
246     UINT8                   Address;
247     UINT8                   Command;
248     UINT8                   Mask;
249     UINT8                   Value;
250     UINT8                   SensorType;
251     UINT8                   Type;
252     UINT8                   Offset;
253     UINT8                   SourceType;
254     UINT8                   Severity;
255     UINT8                   SensorNumber;
256     UINT8                   Entity;
257     UINT8                   Instance;
258
259 } ACPI_ASF_ALERT_DATA;
260
261 /* 2: ASF Remote Control */
262
263 typedef struct acpi_asf_remote
264 {
265     ACPI_ASF_HEADER         Header;
266     UINT8                   Controls;
267     UINT8                   DataLength;
268     UINT16                  Reserved2;
269
270 } ACPI_ASF_REMOTE;
271
272 typedef struct acpi_asf_control_data
273 {
274     UINT8                   Function;
275     UINT8                   Address;
276     UINT8                   Command;
277     UINT8                   Value;
278
279 } ACPI_ASF_CONTROL_DATA;
280
281 /* 3: ASF RMCP Boot Options */
282
283 typedef struct acpi_asf_rmcp
284 {
285     ACPI_ASF_HEADER         Header;
286     UINT8                   Capabilities[7];
287     UINT8                   CompletionCode;
288     UINT32                  EnterpriseId;
289     UINT8                   Command;
290     UINT16                  Parameter;
291     UINT16                  BootOptions;
292     UINT16                  OemParameters;
293
294 } ACPI_ASF_RMCP;
295
296 /* 4: ASF Address */
297
298 typedef struct acpi_asf_address
299 {
300     ACPI_ASF_HEADER         Header;
301     UINT8                   EpromAddress;
302     UINT8                   Devices;
303
304 } ACPI_ASF_ADDRESS;
305
306
307 /*******************************************************************************
308  *
309  * BOOT - Simple Boot Flag Table
310  *
311  ******************************************************************************/
312
313 typedef struct acpi_table_boot
314 {
315     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
316     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
317     UINT8                   Reserved[3];
318
319 } ACPI_TABLE_BOOT;
320
321
322 /*******************************************************************************
323  *
324  * CPEP - Corrected Platform Error Polling table
325  *
326  ******************************************************************************/
327
328 typedef struct acpi_table_cpep
329 {
330     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
331     UINT64                  Reserved;
332
333 } ACPI_TABLE_CPEP;
334
335
336 /* Subtable */
337
338 typedef struct acpi_cpep_polling
339 {
340     UINT8                   Type;
341     UINT8                   Length;
342     UINT8                   Id;                 /* Processor ID */
343     UINT8                   Eid;                /* Processor EID */
344     UINT32                  Interval;           /* Polling interval (msec) */
345
346 } ACPI_CPEP_POLLING;
347
348
349 /*******************************************************************************
350  *
351  * DBGP - Debug Port table
352  *
353  ******************************************************************************/
354
355 typedef struct acpi_table_dbgp
356 {
357     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
358     UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
359     UINT8                   Reserved[3];
360     ACPI_GENERIC_ADDRESS    DebugPort;
361
362 } ACPI_TABLE_DBGP;
363
364
365 /*******************************************************************************
366  *
367  * DMAR - DMA Remapping table
368  *
369  ******************************************************************************/
370
371 typedef struct acpi_table_dmar
372 {
373     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
374     UINT8                   Width;              /* Host Address Width */
375     UINT8                   Reserved[11];
376
377 } ACPI_TABLE_DMAR;
378
379 /* DMAR subtable header */
380
381 typedef struct acpi_dmar_header
382 {
383     UINT16                  Type;
384     UINT16                  Length;
385     UINT8                   Flags;
386     UINT8                   Reserved[3];
387
388 } ACPI_DMAR_HEADER;
389
390 /* Values for subtable type in ACPI_DMAR_HEADER */
391
392 enum AcpiDmarType
393 {
394     ACPI_DMAR_TYPE_HARDWARE_UNIT        = 0,
395     ACPI_DMAR_TYPE_RESERVED_MEMORY      = 1,
396     ACPI_DMAR_TYPE_RESERVED             = 2     /* 2 and greater are reserved */
397 };
398
399 typedef struct acpi_dmar_device_scope
400 {
401     UINT8                   EntryType;
402     UINT8                   Length;
403     UINT8                   Segment;
404     UINT8                   Bus;
405
406 } ACPI_DMAR_DEVICE_SCOPE;
407
408 /* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */
409
410 enum AcpiDmarScopeType
411 {
412     ACPI_DMAR_SCOPE_TYPE_NOT_USED       = 0,
413     ACPI_DMAR_SCOPE_TYPE_ENDPOINT       = 1,
414     ACPI_DMAR_SCOPE_TYPE_BRIDGE         = 2,
415     ACPI_DMAR_SCOPE_TYPE_RESERVED       = 3     /* 3 and greater are reserved */
416 };
417
418
419 /*
420  * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
421  */
422
423 /* 0: Hardware Unit Definition */
424
425 typedef struct acpi_dmar_hardware_unit
426 {
427     ACPI_DMAR_HEADER        Header;
428     UINT64                  Address;            /* Register Base Address */
429
430 } ACPI_DMAR_HARDWARE_UNIT;
431
432 /* Flags */
433
434 #define ACPI_DMAR_INCLUDE_ALL       (1)
435
436 /* 1: Reserved Memory Defininition */
437
438 typedef struct acpi_dmar_reserved_memory
439 {
440     ACPI_DMAR_HEADER        Header;
441     UINT64                  Address;            /* 4K aligned base address */
442     UINT64                  EndAddress;         /* 4K aligned limit address */
443
444 } ACPI_DMAR_RESERVED_MEMORY;
445
446 /* Flags */
447
448 #define ACPI_DMAR_ALLOW_ALL         (1)
449
450
451 /*******************************************************************************
452  *
453  * ECDT - Embedded Controller Boot Resources Table
454  *
455  ******************************************************************************/
456
457 typedef struct acpi_table_ecdt
458 {
459     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
460     ACPI_GENERIC_ADDRESS    Control;            /* Address of EC command/status register */
461     ACPI_GENERIC_ADDRESS    Data;               /* Address of EC data register */
462     UINT32                  Uid;                /* Unique ID - must be same as the EC _UID method */
463     UINT8                   Gpe;                /* The GPE for the EC */
464     UINT8                   Id[1];              /* Full namepath of the EC in the ACPI namespace */
465
466 } ACPI_TABLE_ECDT;
467
468
469 /*******************************************************************************
470  *
471  * HPET - High Precision Event Timer table
472  *
473  ******************************************************************************/
474
475 typedef struct acpi_table_hpet
476 {
477     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
478     UINT32                  Id;                 /* Hardware ID of event timer block */
479     ACPI_GENERIC_ADDRESS    Address;            /* Address of event timer block */
480     UINT8                   Sequence;           /* HPET sequence number */
481     UINT16                  MinimumTick;        /* Main counter min tick, periodic mode */
482     UINT8                   Flags;
483
484 } ACPI_TABLE_HPET;
485
486 /*! Flags */
487
488 #define ACPI_HPET_PAGE_PROTECT      (1)         /* 00: No page protection */
489 #define ACPI_HPET_PAGE_PROTECT_4    (1<<1)      /* 01: 4KB page protected */
490 #define ACPI_HPET_PAGE_PROTECT_64   (1<<2)      /* 02: 64KB page protected */
491
492 /*! [End] no source code translation !*/
493
494
495 /*******************************************************************************
496  *
497  * MADT - Multiple APIC Description Table
498  *
499  ******************************************************************************/
500
501 typedef struct acpi_table_madt
502 {
503     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
504     UINT32                  Address;            /* Physical address of local APIC */
505     UINT32                  Flags;
506
507 } ACPI_TABLE_MADT;
508
509 /* Flags */
510
511 #define ACPI_MADT_PCAT_COMPAT       (1)         /* 00:    System also has dual 8259s */
512
513 /* Values for PCATCompat flag */
514
515 #define ACPI_MADT_DUAL_PIC          0
516 #define ACPI_MADT_MULTIPLE_APIC     1
517
518
519 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
520
521 enum AcpiMadtType
522 {
523     ACPI_MADT_TYPE_LOCAL_APIC           = 0,
524     ACPI_MADT_TYPE_IO_APIC              = 1,
525     ACPI_MADT_TYPE_INTERRUPT_OVERRIDE   = 2,
526     ACPI_MADT_TYPE_NMI_SOURCE           = 3,
527     ACPI_MADT_TYPE_LOCAL_APIC_NMI       = 4,
528     ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE  = 5,
529     ACPI_MADT_TYPE_IO_SAPIC             = 6,
530     ACPI_MADT_TYPE_LOCAL_SAPIC          = 7,
531     ACPI_MADT_TYPE_INTERRUPT_SOURCE     = 8,
532     ACPI_MADT_TYPE_RESERVED             = 9     /* 9 and greater are reserved */
533 };
534
535
536 /*
537  * MADT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
538  */
539
540 /* 0: Processor Local APIC */
541
542 typedef struct acpi_madt_local_apic
543 {
544     ACPI_SUBTABLE_HEADER    Header;
545     UINT8                   ProcessorId;        /* ACPI processor id */
546     UINT8                   Id;                 /* Processor's local APIC id */
547     UINT32                  LapicFlags;
548
549 } ACPI_MADT_LOCAL_APIC;
550
551 /* 1: IO APIC */
552
553 typedef struct acpi_madt_io_apic
554 {
555     ACPI_SUBTABLE_HEADER    Header;
556     UINT8                   Id;                 /* I/O APIC ID */
557     UINT8                   Reserved;           /* Reserved - must be zero */
558     UINT32                  Address;            /* APIC physical address */
559     UINT32                  GlobalIrqBase;      /* Global system interrupt where INTI lines start */
560
561 } ACPI_MADT_IO_APIC;
562
563 /* 2: Interrupt Override */
564
565 typedef struct acpi_madt_interrupt_override
566 {
567     ACPI_SUBTABLE_HEADER    Header;
568     UINT8                   Bus;                /* 0 - ISA */
569     UINT8                   SourceIrq;          /* Interrupt source (IRQ) */
570     UINT32                  GlobalIrq;          /* Global system interrupt */
571     UINT16                  IntiFlags;
572
573 } ACPI_MADT_INTERRUPT_OVERRIDE;
574
575 /* 3: NMI Source */
576
577 typedef struct acpi_madt_nmi_source
578 {
579     ACPI_SUBTABLE_HEADER    Header;
580     UINT16                  IntiFlags;
581     UINT32                  GlobalIrq;          /* Global system interrupt */
582
583 } ACPI_MADT_NMI_SOURCE;
584
585 /* 4: Local APIC NMI */
586
587 typedef struct acpi_madt_local_apic_nmi
588 {
589     ACPI_SUBTABLE_HEADER    Header;
590     UINT8                   ProcessorId;        /* ACPI processor id */
591     UINT16                  IntiFlags;
592     UINT8                   Lint;               /* LINTn to which NMI is connected */
593
594 } ACPI_MADT_LOCAL_APIC_NMI;
595
596 /* 5: Address Override */
597
598 typedef struct acpi_madt_local_apic_override
599 {
600     ACPI_SUBTABLE_HEADER    Header;
601     UINT16                  Reserved;           /* Reserved, must be zero */
602     UINT64                  Address;            /* APIC physical address */
603
604 } ACPI_MADT_LOCAL_APIC_OVERRIDE;
605
606 /* 6: I/O Sapic */
607
608 typedef struct acpi_madt_io_sapic
609 {
610     ACPI_SUBTABLE_HEADER    Header;
611     UINT8                   Id;                 /* I/O SAPIC ID */
612     UINT8                   Reserved;           /* Reserved, must be zero */
613     UINT32                  GlobalIrqBase;      /* Global interrupt for SAPIC start */
614     UINT64                  Address;            /* SAPIC physical address */
615
616 } ACPI_MADT_IO_SAPIC;
617
618 /* 7: Local Sapic */
619
620 typedef struct acpi_madt_local_sapic
621 {
622     ACPI_SUBTABLE_HEADER    Header;
623     UINT8                   ProcessorId;        /* ACPI processor id */
624     UINT8                   Id;                 /* SAPIC ID */
625     UINT8                   Eid;                /* SAPIC EID */
626     UINT8                   Reserved[3];        /* Reserved, must be zero */
627     UINT32                  LapicFlags;
628     UINT32                  Uid;                /* Numeric UID - ACPI 3.0 */
629     char                    UidString[1];       /* String UID  - ACPI 3.0 */
630
631 } ACPI_MADT_LOCAL_SAPIC;
632
633 /* 8: Platform Interrupt Source */
634
635 typedef struct acpi_madt_interrupt_source
636 {
637     ACPI_SUBTABLE_HEADER    Header;
638     UINT16                  IntiFlags;
639     UINT8                   Type;               /* 1=PMI, 2=INIT, 3=corrected */
640     UINT8                   Id;                 /* Processor ID */
641     UINT8                   Eid;                /* Processor EID */
642     UINT8                   IoSapicVector;      /* Vector value for PMI interrupts */
643     UINT32                  GlobalIrq;          /* Global system interrupt */
644     UINT32                  Flags;              /* Interrupt Source Flags */
645
646 } ACPI_MADT_INTERRUPT_SOURCE;
647
648 /* Flags field above */
649
650 #define ACPI_MADT_CPEI_OVERRIDE     (1)
651
652
653 /*
654  * Common flags fields for MADT subtables
655  */
656
657 /* MADT Local APIC flags (LapicFlags) */
658
659 #define ACPI_MADT_ENABLED           (1)         /* 00: Processor is usable if set */
660
661 /* MADT MPS INTI flags (IntiFlags) */
662
663 #define ACPI_MADT_POLARITY_MASK     (3)         /* 00-01: Polarity of APIC I/O input signals */
664 #define ACPI_MADT_TRIGGER_MASK      (3<<2)      /* 02-03: Trigger mode of APIC input signals */
665
666 /* Values for MPS INTI flags */
667
668 #define ACPI_MADT_POLARITY_CONFORMS       0
669 #define ACPI_MADT_POLARITY_ACTIVE_HIGH    1
670 #define ACPI_MADT_POLARITY_RESERVED       2
671 #define ACPI_MADT_POLARITY_ACTIVE_LOW     3
672
673 #define ACPI_MADT_TRIGGER_CONFORMS        (0)
674 #define ACPI_MADT_TRIGGER_EDGE            (1<<2)
675 #define ACPI_MADT_TRIGGER_RESERVED        (2<<2)
676 #define ACPI_MADT_TRIGGER_LEVEL           (3<<2)
677
678
679 /*******************************************************************************
680  *
681  * MCFG - PCI Memory Mapped Configuration table and sub-table
682  *
683  ******************************************************************************/
684
685 typedef struct acpi_table_mcfg
686 {
687     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
688     UINT8                   Reserved[8];
689
690 } ACPI_TABLE_MCFG;
691
692
693 /* Subtable */
694
695 typedef struct acpi_mcfg_allocation
696 {
697     UINT64                  Address;            /* Base address, processor-relative */
698     UINT16                  PciSegment;         /* PCI segment group number */
699     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
700     UINT8                   EndBusNumber;       /* Final PCI Bus number */
701     UINT32                  Reserved;
702
703 } ACPI_MCFG_ALLOCATION;
704
705
706 /*******************************************************************************
707  *
708  * SBST - Smart Battery Specification Table
709  *
710  ******************************************************************************/
711
712 typedef struct acpi_table_sbst
713 {
714     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
715     UINT32                  WarningLevel;
716     UINT32                  LowLevel;
717     UINT32                  CriticalLevel;
718
719 } ACPI_TABLE_SBST;
720
721
722 /*******************************************************************************
723  *
724  * SLIT - System Locality Distance Information Table
725  *
726  ******************************************************************************/
727
728 typedef struct acpi_table_slit
729 {
730     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
731     UINT64                  LocalityCount;
732     UINT8                   Entry[1];           /* Real size = localities^2 */
733
734 } ACPI_TABLE_SLIT;
735
736
737 /*******************************************************************************
738  *
739  * SPCR - Serial Port Console Redirection table
740  *
741  ******************************************************************************/
742
743 typedef struct acpi_table_spcr
744 {
745     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
746     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
747     UINT8                   Reserved[3];
748     ACPI_GENERIC_ADDRESS    SerialPort;
749     UINT8                   InterruptType;
750     UINT8                   PcInterrupt;
751     UINT32                  Interrupt;
752     UINT8                   BaudRate;
753     UINT8                   Parity;
754     UINT8                   StopBits;
755     UINT8                   FlowControl;
756     UINT8                   TerminalType;
757     UINT8                   Reserved1;
758     UINT16                  PciDeviceId;
759     UINT16                  PciVendorId;
760     UINT8                   PciBus;
761     UINT8                   PciDevice;
762     UINT8                   PciFunction;
763     UINT32                  PciFlags;
764     UINT8                   PciSegment;
765     UINT32                  Reserved2;
766
767 } ACPI_TABLE_SPCR;
768
769
770 /*******************************************************************************
771  *
772  * SPMI - Server Platform Management Interface table
773  *
774  ******************************************************************************/
775
776 typedef struct acpi_table_spmi
777 {
778     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
779     UINT8                   Reserved;
780     UINT8                   InterfaceType;
781     UINT16                  SpecRevision;       /* Version of IPMI */
782     UINT8                   InterruptType;
783     UINT8                   GpeNumber;          /* GPE assigned */
784     UINT8                   Reserved1;
785     UINT8                   PciDeviceFlag;
786     UINT32                  Interrupt;
787     ACPI_GENERIC_ADDRESS    IpmiRegister;
788     UINT8                   PciSegment;
789     UINT8                   PciBus;
790     UINT8                   PciDevice;
791     UINT8                   PciFunction;
792
793 } ACPI_TABLE_SPMI;
794
795
796 /*******************************************************************************
797  *
798  * SRAT - System Resource Affinity Table
799  *
800  ******************************************************************************/
801
802 typedef struct acpi_table_srat
803 {
804     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
805     UINT32                  TableRevision;      /* Must be value '1' */
806     UINT64                  Reserved;           /* Reserved, must be zero */
807
808 } ACPI_TABLE_SRAT;
809
810 /* Values for subtable type in ACPI_SUBTABLE_HEADER */
811
812 enum AcpiSratType
813 {
814     ACPI_SRAT_TYPE_CPU_AFFINITY     = 0,
815     ACPI_SRAT_TYPE_MEMORY_AFFINITY  = 1,
816     ACPI_SRAT_TYPE_RESERVED         = 2
817 };
818
819 /* SRAT sub-tables */
820
821 typedef struct acpi_srat_cpu_affinity
822 {
823     ACPI_SUBTABLE_HEADER    Header;
824     UINT8                   ProximityDomainLo;
825     UINT8                   ApicId;
826     UINT32                  Flags;
827     UINT8                   LocalSapicEid;
828     UINT8                   ProximityDomainHi[3];
829     UINT32                  Reserved;           /* Reserved, must be zero */
830
831 } ACPI_SRAT_CPU_AFFINITY;
832
833 /* Flags */
834
835 #define ACPI_SRAT_CPU_ENABLED       (1)         /* 00: Use affinity structure */
836
837
838 typedef struct acpi_srat_mem_affinity
839 {
840     ACPI_SUBTABLE_HEADER    Header;
841     UINT32                  ProximityDomain;
842     UINT16                  Reserved;           /* Reserved, must be zero */
843     UINT64                  BaseAddress;
844     UINT64                  Length;
845     UINT32                  MemoryType;         /* See acpi_address_range_id */
846     UINT32                  Flags;
847     UINT64                  Reserved1;          /* Reserved, must be zero */
848
849 } ACPI_SRAT_MEM_AFFINITY;
850
851 /* Flags */
852
853 #define ACPI_SRAT_MEM_ENABLED       (1)         /* 00: Use affinity structure */
854 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)      /* 01: Memory region is hot pluggable */
855 #define ACPI_SRAT_MEM_NON_VOLATILE  (1<<2)      /* 02: Memory region is non-volatile */
856
857 /* Memory types */
858
859 enum acpi_address_range_id
860 {
861     ACPI_ADDRESS_RANGE_MEMORY   = 1,
862     ACPI_ADDRESS_RANGE_RESERVED = 2,
863     ACPI_ADDRESS_RANGE_ACPI     = 3,
864     ACPI_ADDRESS_RANGE_NVS      = 4,
865     ACPI_ADDRESS_RANGE_COUNT    = 5
866 };
867
868
869 /*******************************************************************************
870  *
871  * TCPA - Trusted Computing Platform Alliance table
872  *
873  ******************************************************************************/
874
875 typedef struct acpi_table_tcpa
876 {
877     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
878     UINT16                  Reserved;
879     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
880     UINT64                  LogAddress;         /* Address of the event log area */
881
882 } ACPI_TABLE_TCPA;
883
884
885 /*******************************************************************************
886  *
887  * WDRT - Watchdog Resource Table
888  *
889  ******************************************************************************/
890
891 typedef struct acpi_table_wdrt
892 {
893     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
894     UINT32                  HeaderLength;       /* Watchdog Header Length */
895     UINT8                   PciSegment;         /* PCI Segment number */
896     UINT8                   PciBus;             /* PCI Bus number */
897     UINT8                   PciDevice;          /* PCI Device number */
898     UINT8                   PciFunction;        /* PCI Function number */
899     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
900     UINT32                  MaxCount;           /* Maximum counter value supported */
901     UINT32                  MinCount;           /* Minimum counter value */
902     UINT8                   Flags;
903     UINT8                   Reserved[3];
904     UINT32                  Entries;            /* Number of watchdog entries that follow */
905
906 } ACPI_TABLE_WDRT;
907
908 /* Flags */
909
910 #define ACPI_WDRT_TIMER_ENABLED     (1)         /* 00: Timer enabled */
911
912
913 /* Reset to default packing */
914
915 #pragma pack()
916
917 #endif /* __ACTBL1_H__ */