iPXE
Acpi10.h
Go to the documentation of this file.
00001 /** @file
00002   ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
00003 
00004 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
00005 This program and the accompanying materials are licensed and made available under
00006 the terms and conditions of the BSD License that accompanies this distribution.
00007 The full text of the license may be found at
00008 http://opensource.org/licenses/bsd-license.php.
00009 
00010 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00011 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00012 **/
00013 
00014 #ifndef _ACPI_1_0_H_
00015 #define _ACPI_1_0_H_
00016 
00017 FILE_LICENCE ( BSD3 );
00018 
00019 #include <ipxe/efi/IndustryStandard/AcpiAml.h>
00020 
00021 ///
00022 /// Common table header, this prefaces all ACPI tables, including FACS, but
00023 /// excluding the RSD PTR structure.
00024 ///
00025 typedef struct {
00026   UINT32  Signature;
00027   UINT32  Length;
00028 } EFI_ACPI_COMMON_HEADER;
00029 
00030 #pragma pack(1)
00031 ///
00032 /// The common ACPI description table header.  This structure prefaces most ACPI tables.
00033 ///
00034 typedef struct {
00035   UINT32  Signature;
00036   UINT32  Length;
00037   UINT8   Revision;
00038   UINT8   Checksum;
00039   UINT8   OemId[6];
00040   UINT64  OemTableId;
00041   UINT32  OemRevision;
00042   UINT32  CreatorId;
00043   UINT32  CreatorRevision;
00044 } EFI_ACPI_DESCRIPTION_HEADER;
00045 #pragma pack()
00046 
00047 //
00048 // Define for Desriptor
00049 //
00050 #define ACPI_SMALL_ITEM_FLAG                   0x00
00051 #define ACPI_LARGE_ITEM_FLAG                   0x01
00052 
00053 //
00054 // Small Item Descriptor Name
00055 //
00056 #define ACPI_SMALL_IRQ_DESCRIPTOR_NAME                       0x04
00057 #define ACPI_SMALL_DMA_DESCRIPTOR_NAME                       0x05
00058 #define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME           0x06
00059 #define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME             0x07
00060 #define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME                   0x08
00061 #define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME             0x09
00062 #define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME            0x0E
00063 #define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME                   0x0F
00064 
00065 //
00066 // Large Item Descriptor Name
00067 //
00068 #define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME       0x01
00069 #define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME            0x04
00070 #define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME       0x05
00071 #define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME 0x06
00072 #define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME       0x07
00073 #define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME        0x08
00074 #define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME              0x09
00075 #define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME       0x0A
00076 
00077 //
00078 // Small Item Descriptor Value
00079 //
00080 #define ACPI_IRQ_NOFLAG_DESCRIPTOR                0x22
00081 #define ACPI_IRQ_DESCRIPTOR                       0x23
00082 #define ACPI_DMA_DESCRIPTOR                       0x2A
00083 #define ACPI_START_DEPENDENT_DESCRIPTOR           0x30
00084 #define ACPI_START_DEPENDENT_EX_DESCRIPTOR        0x31
00085 #define ACPI_END_DEPENDENT_DESCRIPTOR             0x38
00086 #define ACPI_IO_PORT_DESCRIPTOR                   0x47
00087 #define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR    0x4B
00088 #define ACPI_END_TAG_DESCRIPTOR                   0x79
00089 
00090 //
00091 // Large Item Descriptor Value
00092 //
00093 #define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR       0x81
00094 #define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR       0x85
00095 #define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR 0x86
00096 #define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR       0x87
00097 #define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR        0x88
00098 #define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR        0x89
00099 #define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR       0x8A
00100 #define ACPI_ADDRESS_SPACE_DESCRIPTOR             0x8A
00101 
00102 //
00103 // Resource Type
00104 //
00105 #define ACPI_ADDRESS_SPACE_TYPE_MEM   0x00
00106 #define ACPI_ADDRESS_SPACE_TYPE_IO    0x01
00107 #define ACPI_ADDRESS_SPACE_TYPE_BUS   0x02
00108 
00109 ///
00110 /// Power Management Timer frequency is fixed at 3.579545MHz.
00111 ///
00112 #define ACPI_TIMER_FREQUENCY       3579545
00113 
00114 //
00115 // Ensure proper structure formats
00116 //
00117 #pragma pack(1)
00118 
00119 ///
00120 /// The commond definition of QWORD, DWORD, and WORD
00121 /// Address Space Descriptors.
00122 ///
00123 typedef PACKED struct {
00124   UINT8   Desc;
00125   UINT16  Len;
00126   UINT8   ResType;
00127   UINT8   GenFlag;
00128   UINT8   SpecificFlag;
00129   UINT64  AddrSpaceGranularity;
00130   UINT64  AddrRangeMin;
00131   UINT64  AddrRangeMax;
00132   UINT64  AddrTranslationOffset;
00133   UINT64  AddrLen;
00134 } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR;
00135 
00136 typedef PACKED union {
00137   UINT8     Byte;
00138   PACKED struct {
00139     UINT8 Length : 3;
00140     UINT8 Name : 4;
00141     UINT8 Type : 1;
00142   } Bits;
00143 } ACPI_SMALL_RESOURCE_HEADER;
00144 
00145 typedef PACKED struct {
00146   PACKED union {
00147     UINT8 Byte;
00148     PACKED struct {
00149       UINT8 Name : 7;
00150       UINT8 Type : 1;
00151     }Bits;
00152   } Header;
00153   UINT16 Length;
00154 } ACPI_LARGE_RESOURCE_HEADER;
00155 
00156 ///
00157 /// IRQ Descriptor.
00158 ///
00159 typedef PACKED struct {
00160   ACPI_SMALL_RESOURCE_HEADER   Header;
00161   UINT16                       Mask;
00162 } EFI_ACPI_IRQ_NOFLAG_DESCRIPTOR;
00163 
00164 ///
00165 /// IRQ Descriptor.
00166 ///
00167 typedef PACKED struct {
00168   ACPI_SMALL_RESOURCE_HEADER   Header;
00169   UINT16                       Mask;
00170   UINT8                        Information;
00171 } EFI_ACPI_IRQ_DESCRIPTOR;
00172 
00173 ///
00174 /// DMA Descriptor.
00175 ///
00176 typedef PACKED struct {
00177   ACPI_SMALL_RESOURCE_HEADER   Header;
00178   UINT8                        ChannelMask;
00179   UINT8                        Information;
00180 } EFI_ACPI_DMA_DESCRIPTOR;
00181 
00182 ///
00183 /// I/O Port Descriptor
00184 ///
00185 typedef PACKED struct {
00186   ACPI_SMALL_RESOURCE_HEADER   Header;
00187   UINT8                        Information;
00188   UINT16                       BaseAddressMin;
00189   UINT16                       BaseAddressMax;
00190   UINT8                        Alignment;
00191   UINT8                        Length;
00192 } EFI_ACPI_IO_PORT_DESCRIPTOR;
00193 
00194 ///
00195 /// Fixed Location I/O Port Descriptor.
00196 ///
00197 typedef PACKED struct {
00198   ACPI_SMALL_RESOURCE_HEADER   Header;
00199   UINT16                       BaseAddress;
00200   UINT8                        Length;
00201 } EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR;
00202 
00203 ///
00204 /// 24-Bit Memory Range Descriptor
00205 ///
00206 typedef PACKED struct {
00207   ACPI_LARGE_RESOURCE_HEADER    Header;
00208   UINT8                         Information;
00209   UINT16                        BaseAddressMin;
00210   UINT16                        BaseAddressMax;
00211   UINT16                        Alignment;
00212   UINT16                        Length;
00213 } EFI_ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR;
00214 
00215 ///
00216 /// 32-Bit Memory Range Descriptor
00217 ///
00218 typedef PACKED struct {
00219   ACPI_LARGE_RESOURCE_HEADER    Header;
00220   UINT8                         Information;
00221   UINT32                        BaseAddressMin;
00222   UINT32                        BaseAddressMax;
00223   UINT32                        Alignment;
00224   UINT32                        Length;
00225 } EFI_ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR;
00226 
00227 ///
00228 /// Fixed 32-Bit Fixed Memory Range Descriptor
00229 ///
00230 typedef PACKED struct {
00231   ACPI_LARGE_RESOURCE_HEADER    Header;
00232   UINT8                         Information;
00233   UINT32                        BaseAddress;
00234   UINT32                        Length;
00235 } EFI_ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR;
00236 
00237 ///
00238 /// QWORD Address Space Descriptor
00239 ///
00240 typedef PACKED struct {
00241   ACPI_LARGE_RESOURCE_HEADER    Header;
00242   UINT8                         ResType;
00243   UINT8                         GenFlag;
00244   UINT8                         SpecificFlag;
00245   UINT64                        AddrSpaceGranularity;
00246   UINT64                        AddrRangeMin;
00247   UINT64                        AddrRangeMax;
00248   UINT64                        AddrTranslationOffset;
00249   UINT64                        AddrLen;
00250 } EFI_ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR;
00251 
00252 ///
00253 /// DWORD Address Space Descriptor
00254 ///
00255 typedef PACKED struct {
00256   ACPI_LARGE_RESOURCE_HEADER    Header;
00257   UINT8                         ResType;
00258   UINT8                         GenFlag;
00259   UINT8                         SpecificFlag;
00260   UINT32                        AddrSpaceGranularity;
00261   UINT32                        AddrRangeMin;
00262   UINT32                        AddrRangeMax;
00263   UINT32                        AddrTranslationOffset;
00264   UINT32                        AddrLen;
00265 } EFI_ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR;
00266 
00267 ///
00268 /// WORD Address Space Descriptor
00269 ///
00270 typedef PACKED struct {
00271   ACPI_LARGE_RESOURCE_HEADER    Header;
00272   UINT8                         ResType;
00273   UINT8                         GenFlag;
00274   UINT8                         SpecificFlag;
00275   UINT16                        AddrSpaceGranularity;
00276   UINT16                        AddrRangeMin;
00277   UINT16                        AddrRangeMax;
00278   UINT16                        AddrTranslationOffset;
00279   UINT16                        AddrLen;
00280 } EFI_ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR;
00281 
00282 ///
00283 /// Extended Interrupt Descriptor
00284 ///
00285 typedef PACKED struct {
00286   ACPI_LARGE_RESOURCE_HEADER    Header;
00287   UINT8                         InterruptVectorFlags;
00288   UINT8                         InterruptTableLength;
00289   UINT32                        InterruptNumber[1];
00290 } EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR;
00291 
00292 #pragma pack()
00293 
00294 ///
00295 /// The End tag identifies an end of resource data.
00296 ///
00297 typedef struct {
00298   UINT8 Desc;
00299   UINT8 Checksum;
00300 } EFI_ACPI_END_TAG_DESCRIPTOR;
00301 
00302 //
00303 // General use definitions
00304 //
00305 #define EFI_ACPI_RESERVED_BYTE  0x00
00306 #define EFI_ACPI_RESERVED_WORD  0x0000
00307 #define EFI_ACPI_RESERVED_DWORD 0x00000000
00308 #define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
00309 
00310 //
00311 // Resource Type Specific Flags
00312 // Ref ACPI specification 6.4.3.5.5
00313 //
00314 // Bit [0]    : Write Status, _RW
00315 //
00316 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE                (1 << 0)
00317 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY                 (0 << 0)
00318 //
00319 // Bit [2:1]  : Memory Attributes, _MEM
00320 //
00321 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE             (0 << 1)
00322 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE                 (1 << 1)
00323 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
00324 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE    (3 << 1)
00325 //
00326 // Bit [4:3]  : Memory Attributes, _MTP
00327 //
00328 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY      (0 << 3)
00329 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED    (1 << 3)
00330 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI        (2 << 3)
00331 #define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS         (3 << 3)
00332 //
00333 // Bit [5]    : Memory to I/O Translation, _TTP
00334 //
00335 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION          (1 << 5)
00336 #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC               (0 << 5)
00337 
00338 //
00339 // IRQ Information
00340 // Ref ACPI specification 6.4.2.1
00341 //
00342 #define EFI_ACPI_IRQ_SHARABLE_MASK                      0x10
00343 #define   EFI_ACPI_IRQ_SHARABLE                         0x10
00344 
00345 #define EFI_ACPI_IRQ_POLARITY_MASK                      0x08
00346 #define   EFI_ACPI_IRQ_HIGH_TRUE                        0x00
00347 #define   EFI_ACPI_IRQ_LOW_FALSE                        0x08
00348 
00349 #define EFI_ACPI_IRQ_MODE                               0x01
00350 #define   EFI_ACPI_IRQ_LEVEL_TRIGGERED                  0x00
00351 #define   EFI_ACPI_IRQ_EDGE_TRIGGERED                   0x01
00352 
00353 //
00354 // DMA Information
00355 // Ref ACPI specification 6.4.2.2
00356 //
00357 #define EFI_ACPI_DMA_SPEED_TYPE_MASK                    0x60
00358 #define   EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY         0x00
00359 #define   EFI_ACPI_DMA_SPEED_TYPE_A                     0x20
00360 #define   EFI_ACPI_DMA_SPEED_TYPE_B                     0x40
00361 #define   EFI_ACPI_DMA_SPEED_TYPE_F                     0x60
00362 
00363 #define EFI_ACPI_DMA_BUS_MASTER_MASK                    0x04
00364 #define   EFI_ACPI_DMA_BUS_MASTER                       0x04
00365 
00366 #define EFI_ACPI_DMA_TRANSFER_TYPE_MASK                 0x03
00367 #define   EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT              0x00
00368 #define   EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT   0x01
00369 #define   EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT             0x10
00370 
00371 //
00372 // IO Information
00373 // Ref ACPI specification 6.4.2.5
00374 //
00375 #define EFI_ACPI_IO_DECODE_MASK                         0x01
00376 #define   EFI_ACPI_IO_DECODE_16_BIT                     0x01
00377 #define   EFI_ACPI_IO_DECODE_10_BIT                     0x00
00378 
00379 //
00380 // Memory Information
00381 // Ref ACPI specification 6.4.3.4
00382 //
00383 #define EFI_ACPI_MEMORY_WRITE_STATUS_MASK               0x01
00384 #define   EFI_ACPI_MEMORY_WRITABLE                      0x01
00385 #define   EFI_ACPI_MEMORY_NON_WRITABLE                  0x00
00386 
00387 //
00388 // Ensure proper structure formats
00389 //
00390 #pragma pack(1)
00391 //
00392 // ACPI 1.0b table structures
00393 //
00394 
00395 ///
00396 /// Root System Description Pointer Structure.
00397 ///
00398 typedef struct {
00399   UINT64  Signature;
00400   UINT8   Checksum;
00401   UINT8   OemId[6];
00402   UINT8   Reserved;
00403   UINT32  RsdtAddress;
00404 } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
00405 
00406 //
00407 // Root System Description Table
00408 // No definition needed as it is a common description table header, the same with
00409 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
00410 //
00411 
00412 ///
00413 /// RSDT Revision (as defined in ACPI 1.0b specification).
00414 ///
00415 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
00416 
00417 ///
00418 /// Fixed ACPI Description Table Structure (FADT).
00419 ///
00420 typedef struct {
00421   EFI_ACPI_DESCRIPTION_HEADER Header;
00422   UINT32                      FirmwareCtrl;
00423   UINT32                      Dsdt;
00424   UINT8                       IntModel;
00425   UINT8                       Reserved1;
00426   UINT16                      SciInt;
00427   UINT32                      SmiCmd;
00428   UINT8                       AcpiEnable;
00429   UINT8                       AcpiDisable;
00430   UINT8                       S4BiosReq;
00431   UINT8                       Reserved2;
00432   UINT32                      Pm1aEvtBlk;
00433   UINT32                      Pm1bEvtBlk;
00434   UINT32                      Pm1aCntBlk;
00435   UINT32                      Pm1bCntBlk;
00436   UINT32                      Pm2CntBlk;
00437   UINT32                      PmTmrBlk;
00438   UINT32                      Gpe0Blk;
00439   UINT32                      Gpe1Blk;
00440   UINT8                       Pm1EvtLen;
00441   UINT8                       Pm1CntLen;
00442   UINT8                       Pm2CntLen;
00443   UINT8                       PmTmLen;
00444   UINT8                       Gpe0BlkLen;
00445   UINT8                       Gpe1BlkLen;
00446   UINT8                       Gpe1Base;
00447   UINT8                       Reserved3;
00448   UINT16                      PLvl2Lat;
00449   UINT16                      PLvl3Lat;
00450   UINT16                      FlushSize;
00451   UINT16                      FlushStride;
00452   UINT8                       DutyOffset;
00453   UINT8                       DutyWidth;
00454   UINT8                       DayAlrm;
00455   UINT8                       MonAlrm;
00456   UINT8                       Century;
00457   UINT8                       Reserved4;
00458   UINT8                       Reserved5;
00459   UINT8                       Reserved6;
00460   UINT32                      Flags;
00461 } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE;
00462 
00463 ///
00464 /// FADT Version (as defined in ACPI 1.0b specification).
00465 ///
00466 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION  0x01
00467 
00468 #define EFI_ACPI_1_0_INT_MODE_DUAL_PIC         0
00469 #define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC    1
00470 
00471 //
00472 // Fixed ACPI Description Table Fixed Feature Flags
00473 // All other bits are reserved and must be set to 0.
00474 //
00475 #define EFI_ACPI_1_0_WBINVD               BIT0
00476 #define EFI_ACPI_1_0_WBINVD_FLUSH         BIT1
00477 #define EFI_ACPI_1_0_PROC_C1              BIT2
00478 #define EFI_ACPI_1_0_P_LVL2_UP            BIT3
00479 #define EFI_ACPI_1_0_PWR_BUTTON           BIT4
00480 #define EFI_ACPI_1_0_SLP_BUTTON           BIT5
00481 #define EFI_ACPI_1_0_FIX_RTC              BIT6
00482 #define EFI_ACPI_1_0_RTC_S4               BIT7
00483 #define EFI_ACPI_1_0_TMR_VAL_EXT          BIT8
00484 #define EFI_ACPI_1_0_DCK_CAP              BIT9
00485 
00486 ///
00487 /// Firmware ACPI Control Structure.
00488 ///
00489 typedef struct {
00490   UINT32  Signature;
00491   UINT32  Length;
00492   UINT32  HardwareSignature;
00493   UINT32  FirmwareWakingVector;
00494   UINT32  GlobalLock;
00495   UINT32  Flags;
00496   UINT8   Reserved[40];
00497 } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
00498 
00499 ///
00500 /// Firmware Control Structure Feature Flags.
00501 /// All other bits are reserved and must be set to 0.
00502 ///
00503 #define EFI_ACPI_1_0_S4BIOS_F             BIT0
00504 
00505 ///
00506 /// Multiple APIC Description Table header definition.  The rest of the table
00507 /// must be defined in a platform-specific manner.
00508 ///
00509 typedef struct {
00510   EFI_ACPI_DESCRIPTION_HEADER Header;
00511   UINT32                      LocalApicAddress;
00512   UINT32                      Flags;
00513 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
00514 
00515 ///
00516 /// MADT Revision (as defined in ACPI 1.0b specification).
00517 ///
00518 #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
00519 
00520 ///
00521 /// Multiple APIC Flags
00522 /// All other bits are reserved and must be set to 0.
00523 ///
00524 #define EFI_ACPI_1_0_PCAT_COMPAT           BIT0
00525 
00526 //
00527 // Multiple APIC Description Table APIC structure types
00528 // All other values between 0x05 an 0xFF are reserved and
00529 // will be ignored by OSPM.
00530 //
00531 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC           0x00
00532 #define EFI_ACPI_1_0_IO_APIC                        0x01
00533 #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE      0x02
00534 #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE  0x03
00535 #define EFI_ACPI_1_0_LOCAL_APIC_NMI                 0x04
00536 
00537 //
00538 // APIC Structure Definitions
00539 //
00540 
00541 ///
00542 /// Processor Local APIC Structure Definition.
00543 ///
00544 typedef struct {
00545   UINT8   Type;
00546   UINT8   Length;
00547   UINT8   AcpiProcessorId;
00548   UINT8   ApicId;
00549   UINT32  Flags;
00550 } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
00551 
00552 ///
00553 /// Local APIC Flags.  All other bits are reserved and must be 0.
00554 ///
00555 #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED      BIT0
00556 
00557 ///
00558 /// IO APIC Structure.
00559 ///
00560 typedef struct {
00561   UINT8   Type;
00562   UINT8   Length;
00563   UINT8   IoApicId;
00564   UINT8   Reserved;
00565   UINT32  IoApicAddress;
00566   UINT32  SystemVectorBase;
00567 } EFI_ACPI_1_0_IO_APIC_STRUCTURE;
00568 
00569 ///
00570 /// Interrupt Source Override Structure.
00571 ///
00572 typedef struct {
00573   UINT8   Type;
00574   UINT8   Length;
00575   UINT8   Bus;
00576   UINT8   Source;
00577   UINT32  GlobalSystemInterruptVector;
00578   UINT16  Flags;
00579 } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
00580 
00581 ///
00582 /// Non-Maskable Interrupt Source Structure.
00583 ///
00584 typedef struct {
00585   UINT8   Type;
00586   UINT8   Length;
00587   UINT16  Flags;
00588   UINT32  GlobalSystemInterruptVector;
00589 } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
00590 
00591 ///
00592 /// Local APIC NMI Structure.
00593 ///
00594 typedef struct {
00595   UINT8   Type;
00596   UINT8   Length;
00597   UINT8   AcpiProcessorId;
00598   UINT16  Flags;
00599   UINT8   LocalApicInti;
00600 } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE;
00601 
00602 ///
00603 /// Smart Battery Description Table (SBST)
00604 ///
00605 typedef struct {
00606   EFI_ACPI_DESCRIPTION_HEADER Header;
00607   UINT32                      WarningEnergyLevel;
00608   UINT32                      LowEnergyLevel;
00609   UINT32                      CriticalEnergyLevel;
00610 } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE;
00611 
00612 //
00613 // Known table signatures
00614 //
00615 
00616 ///
00617 /// "RSD PTR " Root System Description Pointer.
00618 ///
00619 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE  SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
00620 
00621 ///
00622 /// "APIC" Multiple APIC Description Table.
00623 ///
00624 #define EFI_ACPI_1_0_APIC_SIGNATURE  SIGNATURE_32('A', 'P', 'I', 'C')
00625 
00626 ///
00627 /// "DSDT" Differentiated System Description Table.
00628 ///
00629 #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('D', 'S', 'D', 'T')
00630 
00631 ///
00632 /// "FACS" Firmware ACPI Control Structure.
00633 ///
00634 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'S')
00635 
00636 ///
00637 /// "FACP" Fixed ACPI Description Table.
00638 ///
00639 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'P')
00640 
00641 ///
00642 /// "PSDT" Persistent System Description Table.
00643 ///
00644 #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('P', 'S', 'D', 'T')
00645 
00646 ///
00647 /// "RSDT" Root System Description Table.
00648 ///
00649 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('R', 'S', 'D', 'T')
00650 
00651 ///
00652 /// "SBST" Smart Battery Specification Table.
00653 ///
00654 #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'B', 'S', 'T')
00655 
00656 ///
00657 /// "SSDT" Secondary System Description Table.
00658 ///
00659 #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'S', 'D', 'T')
00660 
00661 #pragma pack()
00662 
00663 #endif