xref: /titanic_50/usr/src/uts/intel/sys/acpi/actbl1.h (revision ed31198c686205a26320612d2a5dd7b26ae63a15)
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	X2APIC_PROCESSOR	9
426 #define	X2APIC_LOCAL_NMI	10
427 #define	APIC_RESERVED		11	/* 11 and greater are reserved */
428 
429 
430 /* Flag definitions for MADT sub-tables */
431 
432 #define ACPI_MADT_IFLAGS /* INTI flags (16 bits) */ \
433     UINT8                   Polarity        : 2;    /* 00-01: Polarity of APIC I/O input signals */\
434     UINT8                   TriggerMode     : 2;    /* 02-03: Trigger mode of APIC input signals */\
435     UINT8                                   : 4;    /* 04-07: Reserved, must be zero */\
436     UINT8                   Reserved1;              /* 08-15: Reserved, must be zero */
437 
438 #define ACPI_MADT_LFLAGS /* Local Sapic flags (32 bits) */ \
439     UINT8                   ProcessorEnabled: 1;    /* 00:    Processor is usable if set */\
440     UINT8                                   : 7;    /* 01-07: Reserved, must be zero */\
441     UINT8                   Reserved2[3];           /* 08-31: Reserved, must be zero */
442 
443 
444 /* Values for MPS INTI flags */
445 
446 #define POLARITY_CONFORMS       0
447 #define POLARITY_ACTIVE_HIGH    1
448 #define POLARITY_RESERVED       2
449 #define POLARITY_ACTIVE_LOW     3
450 
451 #define TRIGGER_CONFORMS        0
452 #define TRIGGER_EDGE            1
453 #define TRIGGER_RESERVED        2
454 #define TRIGGER_LEVEL           3
455 
456 
457 /*
458  * MADT Sub-tables, correspond to Type in APIC_HEADER
459  */
460 
461 /* 0: processor APIC */
462 
463 typedef struct madt_processor_apic
464 {
465     APIC_HEADER_DEF
466     UINT8                   ProcessorId;        /* ACPI processor id */
467     UINT8                   LocalApicId;        /* Processor's local APIC id */
468     ACPI_MADT_LFLAGS
469 
470 } MADT_PROCESSOR_APIC;
471 
472 /* 1: IO APIC */
473 
474 typedef struct madt_io_apic
475 {
476     APIC_HEADER_DEF
477     UINT8                   IoApicId;           /* I/O APIC ID */
478     UINT8                   Reserved;           /* Reserved - must be zero */
479     UINT32                  Address;            /* APIC physical address */
480     UINT32                  Interrupt;          /* Global system interrupt where INTI lines start */
481 
482 } MADT_IO_APIC;
483 
484 /* 2: Interrupt Override */
485 
486 typedef struct madt_interrupt_override
487 {
488     APIC_HEADER_DEF
489     UINT8                   Bus;                /* 0 - ISA */
490     UINT8                   Source;             /* Interrupt source (IRQ) */
491     UINT32                  Interrupt;          /* Global system interrupt */
492     ACPI_MADT_IFLAGS
493 
494 } MADT_INTERRUPT_OVERRIDE;
495 
496 /* 3: NMI Sources */
497 
498 typedef struct madt_nmi_source
499 {
500     APIC_HEADER_DEF
501     ACPI_MADT_IFLAGS
502     UINT32                  Interrupt;          /* Global system interrupt */
503 
504 } MADT_NMI_SOURCE;
505 
506 /* 4: Local APIC NMI */
507 
508 typedef struct madt_local_apic_nmi
509 {
510     APIC_HEADER_DEF
511     UINT8                   ProcessorId;        /* ACPI processor id */
512     ACPI_MADT_IFLAGS
513     UINT8                   Lint;               /* LINTn to which NMI is connected */
514 
515 } MADT_LOCAL_APIC_NMI;
516 
517 /* 5: Address Override */
518 
519 typedef struct madt_address_override
520 {
521     APIC_HEADER_DEF
522     UINT16                  Reserved;           /* Reserved, must be zero */
523     UINT64                  Address;            /* APIC physical address */
524 
525 } MADT_ADDRESS_OVERRIDE;
526 
527 /* 6: I/O Sapic */
528 
529 typedef struct madt_io_sapic
530 {
531     APIC_HEADER_DEF
532     UINT8                   IoSapicId;          /* I/O SAPIC ID */
533     UINT8                   Reserved;           /* Reserved, must be zero */
534     UINT32                  InterruptBase;      /* Glocal interrupt for SAPIC start */
535     UINT64                  Address;            /* SAPIC physical address */
536 
537 } MADT_IO_SAPIC;
538 
539 /* 7: Local Sapic */
540 
541 typedef struct madt_local_sapic
542 {
543     APIC_HEADER_DEF
544     UINT8                   ProcessorId;        /* ACPI processor id */
545     UINT8                   LocalSapicId;       /* SAPIC ID */
546     UINT8                   LocalSapicEid;      /* SAPIC EID */
547     UINT8                   Reserved[3];        /* Reserved, must be zero */
548     ACPI_MADT_LFLAGS
549     UINT32                  ProcessorUID;           /* Numeric UID - ACPI 3.0 */
550     char                    ProcessorUIDString[1];  /* String UID  - ACPI 3.0 */
551 
552 } MADT_LOCAL_SAPIC;
553 
554 /* 8: Platform Interrupt Source */
555 
556 typedef struct madt_interrupt_source
557 {
558     APIC_HEADER_DEF
559     ACPI_MADT_IFLAGS
560     UINT8                   InterruptType;      /* 1=PMI, 2=INIT, 3=corrected */
561     UINT8                   ProcessorId;        /* Processor ID */
562     UINT8                   ProcessorEid;       /* Processor EID */
563     UINT8                   IoSapicVector;      /* Vector value for PMI interrupts */
564     UINT32                  Interrupt;          /* Global system interrupt */
565     UINT32                  Flags;              /* Interrupt Source Flags */
566 
567 } MADT_INTERRUPT_SOURCE;
568 
569 /* 9: Processor x2APIC */
570 
571 typedef	struct	madt_processor_ext_apic
572 {
573     APIC_HEADER_DEF
574     UINT16                  Reserved;		/* Reserved - must be zero */
575     UINT32                  X2LocalApicId;     /* Processor's  x2APIC ID  */
576     ACPI_MADT_LFLAGS
577     UINT32                  ProcessorUID;     /* Extended x2APIC processor ID */
578 } MADT_PROCESSOR_X2APIC;
579 
580 /* 10: Extended X2APIC NMI Structure */
581 
582 typedef struct madt_local_x2apic_nmi
583 {
584     APIC_HEADER_DEF
585     ACPI_MADT_IFLAGS
586     UINT32                  ProcessorUID;     /* Processor's x2APIC ID */
587     UINT8                   Lint;    /* LINTn to which NMI is connected */
588     UINT8                   Reserved[3];
589 } MADT_LOCAL_X2APIC_NMI;
590 
591 
592 /*******************************************************************************
593  *
594  * MCFG - PCI Memory Mapped Configuration table and sub-table
595  *
596  ******************************************************************************/
597 
598 typedef struct acpi_table_mcfg
599 {
600     ACPI_TABLE_HEADER_DEF
601     UINT8                   Reserved[8];
602 
603 } ACPI_TABLE_MCFG;
604 
605 typedef struct acpi_mcfg_allocation
606 {
607     UINT64                  BaseAddress;        /* Base address, processor-relative */
608     UINT16                  PciSegment;         /* PCI segment group number */
609     UINT8                   StartBusNumber;     /* Starting PCI Bus number */
610     UINT8                   EndBusNumber;       /* Final PCI Bus number */
611     UINT32                  Reserved;
612 
613 } ACPI_MCFG_ALLOCATION;
614 
615 
616 /*******************************************************************************
617  *
618  * SBST - Smart Battery Specification Table
619  *
620  ******************************************************************************/
621 
622 typedef struct smart_battery_table
623 {
624     ACPI_TABLE_HEADER_DEF
625     UINT32                  WarningLevel;
626     UINT32                  LowLevel;
627     UINT32                  CriticalLevel;
628 
629 } SMART_BATTERY_TABLE;
630 
631 
632 /*******************************************************************************
633  *
634  * SLIT - System Locality Distance Information Table
635  *
636  ******************************************************************************/
637 
638 typedef struct system_locality_info
639 {
640     ACPI_TABLE_HEADER_DEF
641     UINT64                  LocalityCount;
642     UINT8                   Entry[1][1];
643 
644 } SYSTEM_LOCALITY_INFO;
645 
646 
647 /*******************************************************************************
648  *
649  * SPCR - Serial Port Console Redirection table
650  *
651  ******************************************************************************/
652 
653 typedef struct acpi_table_spcr
654 {
655     ACPI_TABLE_HEADER_DEF
656     UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
657     UINT8                   Reserved[3];
658     ACPI_GENERIC_ADDRESS    SerialPort;
659     UINT8                   InterruptType;
660     UINT8                   PcInterrupt;
661     UINT32                  Interrupt;
662     UINT8                   BaudRate;
663     UINT8                   Parity;
664     UINT8                   StopBits;
665     UINT8                   FlowControl;
666     UINT8                   TerminalType;
667     UINT8                   Reserved2;
668     UINT16                  PciDeviceId;
669     UINT16                  PciVendorId;
670     UINT8                   PciBus;
671     UINT8                   PciDevice;
672     UINT8                   PciFunction;
673     UINT32                  PciFlags;
674     UINT8                   PciSegment;
675     UINT32                  Reserved3;
676 
677 } ACPI_TABLE_SPCR;
678 
679 
680 /*******************************************************************************
681  *
682  * SPMI - Server Platform Management Interface table
683  *
684  ******************************************************************************/
685 
686 typedef struct acpi_table_spmi
687 {
688     ACPI_TABLE_HEADER_DEF
689     UINT8                   Reserved;
690     UINT8                   InterfaceType;
691     UINT16                  SpecRevision;       /* Version of IPMI */
692     UINT8                   InterruptType;
693     UINT8                   GpeNumber;          /* GPE assigned */
694     UINT8                   Reserved2;
695     UINT8                   PciDeviceFlag;
696     UINT32                  Interrupt;
697     ACPI_GENERIC_ADDRESS    IpmiRegister;
698     UINT8                   PciSegment;
699     UINT8                   PciBus;
700     UINT8                   PciDevice;
701     UINT8                   PciFunction;
702 
703 } ACPI_TABLE_SPMI;
704 
705 
706 /*******************************************************************************
707  *
708  * SRAT - System Resource Affinity Table
709  *
710  ******************************************************************************/
711 
712 typedef struct system_resource_affinity
713 {
714     ACPI_TABLE_HEADER_DEF
715     UINT32                  Reserved1;          /* Must be value '1' */
716     UINT64                  Reserved2;          /* Reserved, must be zero */
717 
718 } SYSTEM_RESOURCE_AFFINITY;
719 
720 
721 /* SRAT common sub-table header */
722 
723 #define SRAT_SUBTABLE_HEADER \
724     UINT8                   Type; \
725     UINT8                   Length;
726 
727 /* Values for Type above */
728 
729 #define SRAT_CPU_AFFINITY       0
730 #define SRAT_MEMORY_AFFINITY    1
731 #define SRAT_RESERVED           2
732 
733 
734 /* SRAT sub-tables */
735 
736 typedef struct static_resource_alloc
737 {
738     SRAT_SUBTABLE_HEADER
739     UINT8                   ProximityDomainLo;
740     UINT8                   ApicId;
741 
742     /* Flags (32 bits) */
743 
744     UINT8                   Enabled         :1; /* 00:    Use affinity structure */
745     UINT8                                   :7; /* 01-07: Reserved, must be zero */
746     UINT8                   Reserved3[3];       /* 08-31: Reserved, must be zero */
747 
748     UINT8                   LocalSapicEid;
749     UINT8                   ProximityDomainHi[3];
750     UINT32                  Reserved4;          /* Reserved, must be zero */
751 
752 } STATIC_RESOURCE_ALLOC;
753 
754 typedef struct memory_affinity
755 {
756     SRAT_SUBTABLE_HEADER
757     UINT32                  ProximityDomain;
758     UINT16                  Reserved3;
759     UINT64                  BaseAddress;
760     UINT64                  AddressLength;
761     UINT32                  Reserved4;
762 
763     /* Flags (32 bits) */
764 
765     UINT8                   Enabled         :1; /* 00:    Use affinity structure */
766     UINT8                   HotPluggable    :1; /* 01:    Memory region is hot pluggable */
767     UINT8                   NonVolatile     :1; /* 02:    Memory is non-volatile */
768     UINT8                                   :5; /* 03-07: Reserved, must be zero */
769     UINT8                   Reserved5[3];       /* 08-31: Reserved, must be zero */
770 
771     UINT64                  Reserved6;          /* Reserved, must be zero */
772 
773 } MEMORY_AFFINITY;
774 
775 
776 /*******************************************************************************
777  *
778  * TCPA - Trusted Computing Platform Alliance table
779  *
780  ******************************************************************************/
781 
782 typedef struct acpi_table_tcpa
783 {
784     ACPI_TABLE_HEADER_DEF
785     UINT16                  Reserved;
786     UINT32                  MaxLogLength;       /* Maximum length for the event log area */
787     UINT64                  LogAddress;         /* Address of the event log area */
788 
789 } ACPI_TABLE_TCPA;
790 
791 
792 /*******************************************************************************
793  *
794  * WDRT - Watchdog Resource Table
795  *
796  ******************************************************************************/
797 
798 typedef struct acpi_table_wdrt
799 {
800     ACPI_TABLE_HEADER_DEF
801     UINT32                  HeaderLength;       /* Watchdog Header Length */
802     UINT8                   PciSegment;         /* PCI Segment number */
803     UINT8                   PciBus;             /* PCI Bus number */
804     UINT8                   PciDevice;          /* PCI Device number */
805     UINT8                   PciFunction;        /* PCI Function number */
806     UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
807     UINT32                  MaxCount;           /* Maximum counter value supported */
808     UINT32                  MinCount;           /* Minimum counter value */
809     UINT8                   Flags;
810     UINT8                   Reserved[3];
811     UINT32                  Entries;            /* Number of watchdog entries that follow */
812 
813 } ACPI_TABLE_WDRT;
814 
815 #if 0 /* Flags, will be converted to macros */
816     UINT8                   Enabled         :1; /* 00:    Timer enabled */
817     UINT8                                   :6; /* 01-06: Reserved */
818     UINT8                   SleepStop       :1; /* 07:    Timer stopped in sleep state */
819 #endif
820 
821 
822 /* Macros used to generate offsets to specific table fields */
823 
824 #define ACPI_ASF0_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_INFO,f)
825 #define ACPI_ASF1_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_ALERT,f)
826 #define ACPI_ASF2_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_REMOTE,f)
827 #define ACPI_ASF3_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_RMCP,f)
828 #define ACPI_ASF4_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
829 #define ACPI_BOOT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
830 #define ACPI_CPEP_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
831 #define ACPI_CPEP0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
832 #define ACPI_DBGP_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
833 #define ACPI_ECDT_OFFSET(f)             (UINT8) ACPI_OFFSET (EC_BOOT_RESOURCES,f)
834 #define ACPI_HPET_OFFSET(f)             (UINT8) ACPI_OFFSET (HPET_TABLE,f)
835 #define ACPI_MADT_OFFSET(f)             (UINT8) ACPI_OFFSET (MULTIPLE_APIC_TABLE,f)
836 #define ACPI_MADT0_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_PROCESSOR_APIC,f)
837 #define ACPI_MADT1_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_IO_APIC,f)
838 #define ACPI_MADT2_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_INTERRUPT_OVERRIDE,f)
839 #define ACPI_MADT3_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_NMI_SOURCE,f)
840 #define ACPI_MADT4_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_LOCAL_APIC_NMI,f)
841 #define ACPI_MADT5_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_ADDRESS_OVERRIDE,f)
842 #define ACPI_MADT6_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_IO_SAPIC,f)
843 #define ACPI_MADT7_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_LOCAL_SAPIC,f)
844 #define ACPI_MADT8_OFFSET(f)            (UINT8) ACPI_OFFSET (MADT_INTERRUPT_SOURCE,f)
845 #define ACPI_MADTH_OFFSET(f)            (UINT8) ACPI_OFFSET (APIC_HEADER,f)
846 #define ACPI_MCFG_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
847 #define ACPI_MCFG0_OFFSET(f)            (UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
848 #define ACPI_SBST_OFFSET(f)             (UINT8) ACPI_OFFSET (SMART_BATTERY_TABLE,f)
849 #define ACPI_SLIT_OFFSET(f)             (UINT8) ACPI_OFFSET (SYSTEM_LOCALITY_INFO,f)
850 #define ACPI_SPCR_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
851 #define ACPI_SPMI_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
852 #define ACPI_SRAT_OFFSET(f)             (UINT8) ACPI_OFFSET (SYSTEM_RESOURCE_AFFINITY,f)
853 #define ACPI_SRAT0_OFFSET(f)            (UINT8) ACPI_OFFSET (STATIC_RESOURCE_ALLOC,f)
854 #define ACPI_SRAT1_OFFSET(f)            (UINT8) ACPI_OFFSET (MEMORY_AFFINITY,f)
855 #define ACPI_TCPA_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
856 #define ACPI_WDRT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
857 
858 
859 #define ACPI_HPET_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (HPET_TABLE,f,o)
860 #define ACPI_SRAT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (STATIC_RESOURCE_ALLOC,f,o)
861 #define ACPI_SRAT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MEMORY_AFFINITY,f,o)
862 #define ACPI_MADT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (MULTIPLE_APIC_TABLE,f,o)
863 #define ACPI_MADT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_PROCESSOR_APIC,f,o)
864 #define ACPI_MADT2_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_INTERRUPT_OVERRIDE,f,o)
865 #define ACPI_MADT3_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_NMI_SOURCE,f,o)
866 #define ACPI_MADT4_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_LOCAL_APIC_NMI,f,o)
867 #define ACPI_MADT7_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_LOCAL_SAPIC,f,o)
868 #define ACPI_MADT8_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (MADT_INTERRUPT_SOURCE,f,o)
869 
870 
871 /* Reset to default packing */
872 
873 #pragma pack()
874 
875 #endif /* __ACTBL1_H__ */
876 
877 
878