xref: /illumos-gate/usr/src/uts/intel/sys/acpi/actbl1.h (revision 60405de4d8688d96dd05157c28db3ade5c9bc234)
1 /******************************************************************************
2  *
3  * Name: actbl1.h - Additional ACPI table definitions
4  *       $Revision: 1.41 $
5  *
6  *****************************************************************************/
7 
8 /******************************************************************************
9  *
10  * 1. Copyright Notice
11  *
12  * Some or all of this work - Copyright (c) 1999 - 2006, 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_ECDT           "ECDT"      /* Embedded Controller Boot Resources Table */
140 #define ACPI_SIG_HPET           "HPET"      /* High Precision Event Timer table */
141 #define ACPI_SIG_MADT           "APIC"      /* Multiple APIC Description Table */
142 #define ACPI_SIG_MCFG           "MCFG"      /* PCI Memory Mapped Configuration table */
143 #define ACPI_SIG_SBST           "SBST"      /* Smart Battery Specification Table */
144 #define ACPI_SIG_SLIT           "SLIT"      /* System Locality Distance Information Table */
145 #define ACPI_SIG_SPCR           "SPCR"      /* Serial Port Console Redirection table */
146 #define ACPI_SIG_SPMI           "SPMI"      /* Server Platform Management Interface table */
147 #define ACPI_SIG_SRAT           "SRAT"      /* System Resource Affinity Table */
148 #define ACPI_SIG_TCPA           "TCPA"      /* Trusted Computing Platform Alliance table */
149 #define ACPI_SIG_WDRT           "WDRT"      /* Watchdog Resource Table */
150 
151 /* Legacy names */
152 
153 #define APIC_SIG                "APIC"      /* Multiple APIC Description Table */
154 #define BOOT_SIG                "BOOT"      /* Simple Boot Flag Table */
155 #define SBST_SIG                "SBST"      /* Smart Battery Specification Table */
156 
157 
158 /*
159  * All tables must be byte-packed to match the ACPI specification, since
160  * the tables are provided by the system BIOS.
161  */
162 #pragma pack(1)
163 
164 /*
165  * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
166  * This is the only type that is even remotely portable. Anything else is not
167  * portable, so do not use any other bitfield types.
168  */
169 
170 
171 /*******************************************************************************
172  *
173  * ASF - Alert Standard Format table (Signature "ASF!")
174  *
175  ******************************************************************************/
176 
177 typedef struct acpi_table_asf
178 {
179     ACPI_TABLE_HEADER_DEF
180 
181 } ACPI_TABLE_ASF;
182 
183 #define ACPI_ASF_HEADER_DEF \
184     UINT8                   Type; \
185     UINT8                   Reserved; \
186     UINT16                  Length;
187 
188 typedef struct acpi_asf_header
189 {
190     ACPI_ASF_HEADER_DEF
191 
192 } ACPI_ASF_HEADER;
193 
194 
195 /* Values for Type field */
196 
197 #define ASF_INFO                0
198 #define ASF_ALERT               1
199 #define ASF_CONTROL             2
200 #define ASF_BOOT                3
201 #define ASF_ADDRESS             4
202 #define ASF_RESERVED            5
203 
204 /*
205  * ASF subtables
206  */
207 
208 /* 0: ASF Information */
209 
210 typedef struct acpi_asf_info
211 {
212     ACPI_ASF_HEADER_DEF
213     UINT8                   MinResetValue;
214     UINT8                   MinPollInterval;
215     UINT16                  SystemId;
216     UINT32                  MfgId;
217     UINT8                   Flags;
218     UINT8                   Reserved2[3];
219 
220 } ACPI_ASF_INFO;
221 
222 /* 1: ASF Alerts */
223 
224 typedef struct acpi_asf_alert
225 {
226     ACPI_ASF_HEADER_DEF
227     UINT8                   AssertMask;
228     UINT8                   DeassertMask;
229     UINT8                   Alerts;
230     UINT8                   DataLength;
231     UINT8                   Array[1];
232 
233 } ACPI_ASF_ALERT;
234 
235 /* 2: ASF Remote Control */
236 
237 typedef struct acpi_asf_remote
238 {
239     ACPI_ASF_HEADER_DEF
240     UINT8                   Controls;
241     UINT8                   DataLength;
242     UINT16                  Reserved2;
243     UINT8                   Array[1];
244 
245 } ACPI_ASF_REMOTE;
246 
247 /* 3: ASF RMCP Boot Options */
248 
249 typedef struct acpi_asf_rmcp
250 {
251     ACPI_ASF_HEADER_DEF
252     UINT8                   Capabilities[7];
253     UINT8                   CompletionCode;
254     UINT32                  EnterpriseId;
255     UINT8                   Command;
256     UINT16                  Parameter;
257     UINT16                  BootOptions;
258     UINT16                  OemParameters;
259 
260 } ACPI_ASF_RMCP;
261 
262 /* 4: ASF Address */
263 
264 typedef struct acpi_asf_address
265 {
266     ACPI_ASF_HEADER_DEF
267     UINT8                   EpromAddress;
268     UINT8                   Devices;
269     UINT8                   SmbusAddresses[1];
270 
271 } ACPI_ASF_ADDRESS;
272 
273 
274 /*******************************************************************************
275  *
276  * BOOT - Simple Boot Flag Table
277  *
278  ******************************************************************************/
279 
280 typedef struct acpi_table_boot
281 {
282     ACPI_TABLE_HEADER_DEF
283     UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
284     UINT8                   Reserved[3];
285 
286 } ACPI_TABLE_BOOT;
287 
288 
289 /*******************************************************************************
290  *
291  * CPEP - Corrected Platform Error Polling table
292  *
293  ******************************************************************************/
294 
295 typedef struct acpi_table_cpep
296 {
297     ACPI_TABLE_HEADER_DEF
298     UINT64                  Reserved;
299 
300 } ACPI_TABLE_CPEP;
301 
302 /* Subtable */
303 
304 typedef struct acpi_cpep_polling
305 {
306     UINT8                   Type;
307     UINT8                   Length;
308     UINT8                   ProcessorId;        /* Processor ID */
309     UINT8                   ProcessorEid;       /* Processor EID */
310     UINT32                  PollingInterval;    /* Polling interval (msec) */
311 
312 } ACPI_CPEP_POLLING;
313 
314 
315 /*******************************************************************************
316  *
317  * DBGP - Debug Port table
318  *
319  ******************************************************************************/
320 
321 typedef struct acpi_table_dbgp
322 {
323     ACPI_TABLE_HEADER_DEF
324     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
325     UINT8                   Reserved[3];
326     ACPI_GENERIC_ADDRESS    DebugPort;
327 
328 } ACPI_TABLE_DBGP;
329 
330 
331 /*******************************************************************************
332  *
333  * ECDT - Embedded Controller Boot Resources Table
334  *
335  ******************************************************************************/
336 
337 typedef struct ec_boot_resources
338 {
339     ACPI_TABLE_HEADER_DEF
340     ACPI_GENERIC_ADDRESS    EcControl;          /* Address of EC command/status register */
341     ACPI_GENERIC_ADDRESS    EcData;             /* Address of EC data register */
342     UINT32                  Uid;                /* Unique ID - must be same as the EC _UID method */
343     UINT8                   GpeBit;             /* The GPE for the EC */
344     UINT8                   EcId[1];            /* Full namepath of the EC in the ACPI namespace */
345 
346 } EC_BOOT_RESOURCES;
347 
348 
349 /*******************************************************************************
350  *
351  * HPET - High Precision Event Timer table
352  *
353  ******************************************************************************/
354 
355 typedef struct acpi_hpet_table
356 {
357     ACPI_TABLE_HEADER_DEF
358     UINT32                  HardwareId;         /* Hardware ID of event timer block */
359     ACPI_GENERIC_ADDRESS    BaseAddress;        /* Address of event timer block */
360     UINT8                   HpetNumber;         /* HPET sequence number */
361     UINT16                  ClockTick;          /* Main counter min tick, periodic mode */
362     UINT8                   Attributes;
363 
364 } HPET_TABLE;
365 
366 #if 0 /* HPET flags to be converted to macros */
367     struct /* Flags (8 bits) */
368     {
369         UINT8                   PageProtect     :1; /* 00:    No page protection */
370         UINT8                   PageProtect4    :1; /* 01:    4KB page protected */
371         UINT8                   PageProtect64   :1; /* 02:    64KB page protected */
372         UINT8                                   :5; /* 03-07: Reserved, must be zero */
373     } Flags;
374 #endif
375 
376 
377 /*******************************************************************************
378  *
379  * MADT - Multiple APIC Description Table
380  *
381  ******************************************************************************/
382 
383 typedef struct multiple_apic_table
384 {
385     ACPI_TABLE_HEADER_DEF
386     UINT32                  LocalApicAddress;   /* Physical address of local APIC */
387 
388     /* Flags (32 bits) */
389 
390     UINT8                   PCATCompat      : 1;    /* 00:    System also has dual 8259s */
391     UINT8                                   : 7;    /* 01-07: Reserved, must be zero */
392     UINT8                   Reserved1[3];           /* 08-31: Reserved, must be zero */
393 
394 } MULTIPLE_APIC_TABLE;
395 
396 /* Values for MADT PCATCompat */
397 
398 #define DUAL_PIC                0
399 #define MULTIPLE_APIC           1
400 
401 
402 /* Common MADT Sub-table header */
403 
404 #define APIC_HEADER_DEF \
405     UINT8                   Type; \
406     UINT8                   Length;
407 
408 typedef struct apic_header
409 {
410     APIC_HEADER_DEF
411 
412 } APIC_HEADER;
413 
414 /* Values for Type in APIC_HEADER */
415 
416 #define APIC_PROCESSOR          0
417 #define APIC_IO                 1
418 #define APIC_XRUPT_OVERRIDE     2
419 #define APIC_NMI                3
420 #define APIC_LOCAL_NMI          4
421 #define APIC_ADDRESS_OVERRIDE   5
422 #define APIC_IO_SAPIC           6
423 #define APIC_LOCAL_SAPIC        7
424 #define APIC_XRUPT_SOURCE       8
425 #define APIC_RESERVED           9           /* 9 and greater are reserved */
426 
427 
428 /* Flag definitions for MADT sub-tables */
429 
430 #define ACPI_MADT_IFLAGS /* INTI flags (16 bits) */ \
431     UINT8                   Polarity        : 2;    /* 00-01: Polarity of APIC I/O input signals */\
432     UINT8                   TriggerMode     : 2;    /* 02-03: Trigger mode of APIC input signals */\
433     UINT8                                   : 4;    /* 04-07: Reserved, must be zero */\
434     UINT8                   Reserved1;              /* 08-15: Reserved, must be zero */
435 
436 #define ACPI_MADT_LFLAGS /* Local Sapic flags (32 bits) */ \
437     UINT8                   ProcessorEnabled: 1;    /* 00:    Processor is usable if set */\
438     UINT8                                   : 7;    /* 01-07: Reserved, must be zero */\
439     UINT8                   Reserved2[3];           /* 08-31: Reserved, must be zero */
440 
441 
442 /* Values for MPS INTI flags */
443 
444 #define POLARITY_CONFORMS       0
445 #define POLARITY_ACTIVE_HIGH    1
446 #define POLARITY_RESERVED       2
447 #define POLARITY_ACTIVE_LOW     3
448 
449 #define TRIGGER_CONFORMS        0
450 #define TRIGGER_EDGE            1
451 #define TRIGGER_RESERVED        2
452 #define TRIGGER_LEVEL           3
453 
454 
455 /*
456  * MADT Sub-tables, correspond to Type in APIC_HEADER
457  */
458 
459 /* 0: processor APIC */
460 
461 typedef struct madt_processor_apic
462 {
463     APIC_HEADER_DEF
464     UINT8                   ProcessorId;        /* ACPI processor id */
465     UINT8                   LocalApicId;        /* Processor's local APIC id */
466     ACPI_MADT_LFLAGS
467 
468 } MADT_PROCESSOR_APIC;
469 
470 /* 1: IO APIC */
471 
472 typedef struct madt_io_apic
473 {
474     APIC_HEADER_DEF
475     UINT8                   IoApicId;           /* I/O APIC ID */
476     UINT8                   Reserved;           /* Reserved - must be zero */
477     UINT32                  Address;            /* APIC physical address */
478     UINT32                  Interrupt;          /* Global system interrupt where INTI lines start */
479 
480 } MADT_IO_APIC;
481 
482 /* 2: Interrupt Override */
483 
484 typedef struct madt_interrupt_override
485 {
486     APIC_HEADER_DEF
487     UINT8                   Bus;                /* 0 - ISA */
488     UINT8                   Source;             /* Interrupt source (IRQ) */
489     UINT32                  Interrupt;          /* Global system interrupt */
490     ACPI_MADT_IFLAGS
491 
492 } MADT_INTERRUPT_OVERRIDE;
493 
494 /* 3: NMI Sources */
495 
496 typedef struct madt_nmi_source
497 {
498     APIC_HEADER_DEF
499     ACPI_MADT_IFLAGS
500     UINT32                  Interrupt;          /* Global system interrupt */
501 
502 } MADT_NMI_SOURCE;
503 
504 /* 4: Local APIC NMI */
505 
506 typedef struct madt_local_apic_nmi
507 {
508     APIC_HEADER_DEF
509     UINT8                   ProcessorId;        /* ACPI processor id */
510     ACPI_MADT_IFLAGS
511     UINT8                   Lint;               /* LINTn to which NMI is connected */
512 
513 } MADT_LOCAL_APIC_NMI;
514 
515 /* 5: Address Override */
516 
517 typedef struct madt_address_override
518 {
519     APIC_HEADER_DEF
520     UINT16                  Reserved;           /* Reserved, must be zero */
521     UINT64                  Address;            /* APIC physical address */
522 
523 } MADT_ADDRESS_OVERRIDE;
524 
525 /* 6: I/O Sapic */
526 
527 typedef struct madt_io_sapic
528 {
529     APIC_HEADER_DEF
530     UINT8                   IoSapicId;          /* I/O SAPIC ID */
531     UINT8                   Reserved;           /* Reserved, must be zero */
532     UINT32                  InterruptBase;      /* Glocal interrupt for SAPIC start */
533     UINT64                  Address;            /* SAPIC physical address */
534 
535 } MADT_IO_SAPIC;
536 
537 /* 7: Local Sapic */
538 
539 typedef struct madt_local_sapic
540 {
541     APIC_HEADER_DEF
542     UINT8                   ProcessorId;        /* ACPI processor id */
543     UINT8                   LocalSapicId;       /* SAPIC ID */
544     UINT8                   LocalSapicEid;      /* SAPIC EID */
545     UINT8                   Reserved[3];        /* Reserved, must be zero */
546     ACPI_MADT_LFLAGS
547     UINT32                  ProcessorUID;           /* Numeric UID - ACPI 3.0 */
548     char                    ProcessorUIDString[1];  /* String UID  - ACPI 3.0 */
549 
550 } MADT_LOCAL_SAPIC;
551 
552 /* 8: Platform Interrupt Source */
553 
554 typedef struct madt_interrupt_source
555 {
556     APIC_HEADER_DEF
557     ACPI_MADT_IFLAGS
558     UINT8                   InterruptType;      /* 1=PMI, 2=INIT, 3=corrected */
559     UINT8                   ProcessorId;        /* Processor ID */
560     UINT8                   ProcessorEid;       /* Processor EID */
561     UINT8                   IoSapicVector;      /* Vector value for PMI interrupts */
562     UINT32                  Interrupt;          /* Global system interrupt */
563     UINT32                  Flags;              /* Interrupt Source Flags */
564 
565 } MADT_INTERRUPT_SOURCE;
566 
567 
568 /*******************************************************************************
569  *
570  * MCFG - PCI Memory Mapped Configuration table and sub-table
571  *
572  ******************************************************************************/
573 
574 typedef struct acpi_table_mcfg
575 {
576     ACPI_TABLE_HEADER_DEF
577     UINT8                   Reserved[8];
578 
579 } ACPI_TABLE_MCFG;
580 
581 typedef struct acpi_mcfg_allocation
582 {
583     UINT64                  BaseAddress;        /* Base address, processor-relative */
584     UINT16                  PciSegment;         /* PCI segment group number */
585     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
586     UINT8                   EndBusNumber;       /* Final PCI Bus number */
587     UINT32                  Reserved;
588 
589 } ACPI_MCFG_ALLOCATION;
590 
591 
592 /*******************************************************************************
593  *
594  * SBST - Smart Battery Specification Table
595  *
596  ******************************************************************************/
597 
598 typedef struct smart_battery_table
599 {
600     ACPI_TABLE_HEADER_DEF
601     UINT32                  WarningLevel;
602     UINT32                  LowLevel;
603     UINT32                  CriticalLevel;
604 
605 } SMART_BATTERY_TABLE;
606 
607 
608 /*******************************************************************************
609  *
610  * SLIT - System Locality Distance Information Table
611  *
612  ******************************************************************************/
613 
614 typedef struct system_locality_info
615 {
616     ACPI_TABLE_HEADER_DEF
617     UINT64                  LocalityCount;
618     UINT8                   Entry[1][1];
619 
620 } SYSTEM_LOCALITY_INFO;
621 
622 
623 /*******************************************************************************
624  *
625  * SPCR - Serial Port Console Redirection table
626  *
627  ******************************************************************************/
628 
629 typedef struct acpi_table_spcr
630 {
631     ACPI_TABLE_HEADER_DEF
632     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
633     UINT8                   Reserved[3];
634     ACPI_GENERIC_ADDRESS    SerialPort;
635     UINT8                   InterruptType;
636     UINT8                   PcInterrupt;
637     UINT32                  Interrupt;
638     UINT8                   BaudRate;
639     UINT8                   Parity;
640     UINT8                   StopBits;
641     UINT8                   FlowControl;
642     UINT8                   TerminalType;
643     UINT8                   Reserved2;
644     UINT16                  PciDeviceId;
645     UINT16                  PciVendorId;
646     UINT8                   PciBus;
647     UINT8                   PciDevice;
648     UINT8                   PciFunction;
649     UINT32                  PciFlags;
650     UINT8                   PciSegment;
651     UINT32                  Reserved3;
652 
653 } ACPI_TABLE_SPCR;
654 
655 
656 /*******************************************************************************
657  *
658  * SPMI - Server Platform Management Interface table
659  *
660  ******************************************************************************/
661 
662 typedef struct acpi_table_spmi
663 {
664     ACPI_TABLE_HEADER_DEF
665     UINT8                   Reserved;
666     UINT8                   InterfaceType;
667     UINT16                  SpecRevision;       /* Version of IPMI */
668     UINT8                   InterruptType;
669     UINT8                   GpeNumber;          /* GPE assigned */
670     UINT8                   Reserved2;
671     UINT8                   PciDeviceFlag;
672     UINT32                  Interrupt;
673     ACPI_GENERIC_ADDRESS    IpmiRegister;
674     UINT8                   PciSegment;
675     UINT8                   PciBus;
676     UINT8                   PciDevice;
677     UINT8                   PciFunction;
678 
679 } ACPI_TABLE_SPMI;
680 
681 
682 /*******************************************************************************
683  *
684  * SRAT - System Resource Affinity Table
685  *
686  ******************************************************************************/
687 
688 typedef struct system_resource_affinity
689 {
690     ACPI_TABLE_HEADER_DEF
691     UINT32                  Reserved1;          /* Must be value '1' */
692     UINT64                  Reserved2;          /* Reserved, must be zero */
693 
694 } SYSTEM_RESOURCE_AFFINITY;
695 
696 
697 /* SRAT common sub-table header */
698 
699 #define SRAT_SUBTABLE_HEADER \
700     UINT8                   Type; \
701     UINT8                   Length;
702 
703 /* Values for Type above */
704 
705 #define SRAT_CPU_AFFINITY       0
706 #define SRAT_MEMORY_AFFINITY    1
707 #define SRAT_RESERVED           2
708 
709 
710 /* SRAT sub-tables */
711 
712 typedef struct static_resource_alloc
713 {
714     SRAT_SUBTABLE_HEADER
715     UINT8                   ProximityDomainLo;
716     UINT8                   ApicId;
717 
718     /* Flags (32 bits) */
719 
720     UINT8                   Enabled         :1; /* 00:    Use affinity structure */
721     UINT8                                   :7; /* 01-07: Reserved, must be zero */
722     UINT8                   Reserved3[3];       /* 08-31: Reserved, must be zero */
723 
724     UINT8                   LocalSapicEid;
725     UINT8                   ProximityDomainHi[3];
726     UINT32                  Reserved4;          /* Reserved, must be zero */
727 
728 } STATIC_RESOURCE_ALLOC;
729 
730 typedef struct memory_affinity
731 {
732     SRAT_SUBTABLE_HEADER
733     UINT32                  ProximityDomain;
734     UINT16                  Reserved3;
735     UINT64                  BaseAddress;
736     UINT64                  AddressLength;
737     UINT32                  Reserved4;
738 
739     /* Flags (32 bits) */
740 
741     UINT8                   Enabled         :1; /* 00:    Use affinity structure */
742     UINT8                   HotPluggable    :1; /* 01:    Memory region is hot pluggable */
743     UINT8                   NonVolatile     :1; /* 02:    Memory is non-volatile */
744     UINT8                                   :5; /* 03-07: Reserved, must be zero */
745     UINT8                   Reserved5[3];       /* 08-31: Reserved, must be zero */
746 
747     UINT64                  Reserved6;          /* Reserved, must be zero */
748 
749 } MEMORY_AFFINITY;
750 
751 
752 /*******************************************************************************
753  *
754  * TCPA - Trusted Computing Platform Alliance table
755  *
756  ******************************************************************************/
757 
758 typedef struct acpi_table_tcpa
759 {
760     ACPI_TABLE_HEADER_DEF
761     UINT16                  Reserved;
762     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
763     UINT64                  LogAddress;         /* Address of the event log area */
764 
765 } ACPI_TABLE_TCPA;
766 
767 
768 /*******************************************************************************
769  *
770  * WDRT - Watchdog Resource Table
771  *
772  ******************************************************************************/
773 
774 typedef struct acpi_table_wdrt
775 {
776     ACPI_TABLE_HEADER_DEF
777     UINT32                  HeaderLength;       /* Watchdog Header Length */
778     UINT8                   PciSegment;         /* PCI Segment number */
779     UINT8                   PciBus;             /* PCI Bus number */
780     UINT8                   PciDevice;          /* PCI Device number */
781     UINT8                   PciFunction;        /* PCI Function number */
782     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
783     UINT32                  MaxCount;           /* Maximum counter value supported */
784     UINT32                  MinCount;           /* Minimum counter value */
785     UINT8                   Flags;
786     UINT8                   Reserved[3];
787     UINT32                  Entries;            /* Number of watchdog entries that follow */
788 
789 } ACPI_TABLE_WDRT;
790 
791 #if 0 /* Flags, will be converted to macros */
792     UINT8                   Enabled         :1; /* 00:    Timer enabled */
793     UINT8                                   :6; /* 01-06: Reserved */
794     UINT8                   SleepStop       :1; /* 07:    Timer stopped in sleep state */
795 #endif
796 
797 
798 /* Macros used to generate offsets to specific table fields */
799 
800 #define ACPI_ASF0_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_INFO,f)
801 #define ACPI_ASF1_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_ALERT,f)
802 #define ACPI_ASF2_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_REMOTE,f)
803 #define ACPI_ASF3_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_RMCP,f)
804 #define ACPI_ASF4_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
805 #define ACPI_BOOT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
806 #define ACPI_CPEP_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
807 #define ACPI_CPEP0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
808 #define ACPI_DBGP_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
809 #define ACPI_ECDT_OFFSET(f)             (UINT8) ACPI_OFFSET (EC_BOOT_RESOURCES,f)
810 #define ACPI_HPET_OFFSET(f)             (UINT8) ACPI_OFFSET (HPET_TABLE,f)
811 #define ACPI_MADT_OFFSET(f)             (UINT8) ACPI_OFFSET (MULTIPLE_APIC_TABLE,f)
812 #define ACPI_MADT0_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_PROCESSOR_APIC,f)
813 #define ACPI_MADT1_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_IO_APIC,f)
814 #define ACPI_MADT2_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_INTERRUPT_OVERRIDE,f)
815 #define ACPI_MADT3_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_NMI_SOURCE,f)
816 #define ACPI_MADT4_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_LOCAL_APIC_NMI,f)
817 #define ACPI_MADT5_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_ADDRESS_OVERRIDE,f)
818 #define ACPI_MADT6_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_IO_SAPIC,f)
819 #define ACPI_MADT7_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_LOCAL_SAPIC,f)
820 #define ACPI_MADT8_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_INTERRUPT_SOURCE,f)
821 #define ACPI_MADTH_OFFSET(f)            (UINT8) ACPI_OFFSET (APIC_HEADER,f)
822 #define ACPI_MCFG_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
823 #define ACPI_MCFG0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
824 #define ACPI_SBST_OFFSET(f)             (UINT8) ACPI_OFFSET (SMART_BATTERY_TABLE,f)
825 #define ACPI_SLIT_OFFSET(f)             (UINT8) ACPI_OFFSET (SYSTEM_LOCALITY_INFO,f)
826 #define ACPI_SPCR_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
827 #define ACPI_SPMI_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
828 #define ACPI_SRAT_OFFSET(f)             (UINT8) ACPI_OFFSET (SYSTEM_RESOURCE_AFFINITY,f)
829 #define ACPI_SRAT0_OFFSET(f)            (UINT8) ACPI_OFFSET (STATIC_RESOURCE_ALLOC,f)
830 #define ACPI_SRAT1_OFFSET(f)            (UINT8) ACPI_OFFSET (MEMORY_AFFINITY,f)
831 #define ACPI_TCPA_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
832 #define ACPI_WDRT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
833 
834 
835 #define ACPI_HPET_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (HPET_TABLE,f,o)
836 #define ACPI_SRAT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (STATIC_RESOURCE_ALLOC,f,o)
837 #define ACPI_SRAT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MEMORY_AFFINITY,f,o)
838 #define ACPI_MADT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (MULTIPLE_APIC_TABLE,f,o)
839 #define ACPI_MADT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_PROCESSOR_APIC,f,o)
840 #define ACPI_MADT2_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_INTERRUPT_OVERRIDE,f,o)
841 #define ACPI_MADT3_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_NMI_SOURCE,f,o)
842 #define ACPI_MADT4_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_LOCAL_APIC_NMI,f,o)
843 #define ACPI_MADT7_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_LOCAL_SAPIC,f,o)
844 #define ACPI_MADT8_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_INTERRUPT_SOURCE,f,o)
845 
846 
847 /* Reset to default packing */
848 
849 #pragma pack()
850 
851 #endif /* __ACTBL1_H__ */
852 
853 
854