iPXE
Acpi40.h
Go to the documentation of this file.
00001 /** @file
00002   ACPI 4.0 definitions from the ACPI Specification Revision 4.0a April 5, 2010
00003 
00004   Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
00005   This program and the accompanying materials
00006   are licensed and made available under the terms and conditions of the BSD License
00007   which accompanies this distribution.  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_4_0_H_
00015 #define _ACPI_4_0_H_
00016 
00017 FILE_LICENCE ( BSD3 );
00018 
00019 #include <ipxe/efi/IndustryStandard/Acpi30.h>
00020 
00021 //
00022 // Ensure proper structure formats
00023 //
00024 #pragma pack(1)
00025 
00026 ///
00027 /// ACPI 4.0 Generic Address Space definition
00028 ///
00029 typedef struct {
00030   UINT8   AddressSpaceId;
00031   UINT8   RegisterBitWidth;
00032   UINT8   RegisterBitOffset;
00033   UINT8   AccessSize;
00034   UINT64  Address;
00035 } EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE;
00036 
00037 //
00038 // Generic Address Space Address IDs
00039 //
00040 #define EFI_ACPI_4_0_SYSTEM_MEMORY              0
00041 #define EFI_ACPI_4_0_SYSTEM_IO                  1
00042 #define EFI_ACPI_4_0_PCI_CONFIGURATION_SPACE    2
00043 #define EFI_ACPI_4_0_EMBEDDED_CONTROLLER        3
00044 #define EFI_ACPI_4_0_SMBUS                      4
00045 #define EFI_ACPI_4_0_FUNCTIONAL_FIXED_HARDWARE  0x7F
00046 
00047 //
00048 // Generic Address Space Access Sizes
00049 //
00050 #define EFI_ACPI_4_0_UNDEFINED  0
00051 #define EFI_ACPI_4_0_BYTE       1
00052 #define EFI_ACPI_4_0_WORD       2
00053 #define EFI_ACPI_4_0_DWORD      3
00054 #define EFI_ACPI_4_0_QWORD      4
00055 
00056 //
00057 // ACPI 4.0 table structures
00058 //
00059 
00060 ///
00061 /// Root System Description Pointer Structure
00062 ///
00063 typedef struct {
00064   UINT64  Signature;
00065   UINT8   Checksum;
00066   UINT8   OemId[6];
00067   UINT8   Revision;
00068   UINT32  RsdtAddress;
00069   UINT32  Length;
00070   UINT64  XsdtAddress;
00071   UINT8   ExtendedChecksum;
00072   UINT8   Reserved[3];
00073 } EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
00074 
00075 ///
00076 /// RSD_PTR Revision (as defined in ACPI 4.0b spec.)
00077 ///
00078 #define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02  ///< ACPISpec (Revision 4.0a) says current value is 2
00079 
00080 ///
00081 /// Common table header, this prefaces all ACPI tables, including FACS, but
00082 /// excluding the RSD PTR structure
00083 ///
00084 typedef struct {
00085   UINT32  Signature;
00086   UINT32  Length;
00087 } EFI_ACPI_4_0_COMMON_HEADER;
00088 
00089 //
00090 // Root System Description Table
00091 // No definition needed as it is a common description table header, the same with
00092 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
00093 //
00094 
00095 ///
00096 /// RSDT Revision (as defined in ACPI 4.0 spec.)
00097 ///
00098 #define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
00099 
00100 //
00101 // Extended System Description Table
00102 // No definition needed as it is a common description table header, the same with
00103 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
00104 //
00105 
00106 ///
00107 /// XSDT Revision (as defined in ACPI 4.0 spec.)
00108 ///
00109 #define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
00110 
00111 ///
00112 /// Fixed ACPI Description Table Structure (FADT)
00113 ///
00114 typedef struct {
00115   EFI_ACPI_DESCRIPTION_HEADER             Header;
00116   UINT32                                  FirmwareCtrl;
00117   UINT32                                  Dsdt;
00118   UINT8                                   Reserved0;
00119   UINT8                                   PreferredPmProfile;
00120   UINT16                                  SciInt;
00121   UINT32                                  SmiCmd;
00122   UINT8                                   AcpiEnable;
00123   UINT8                                   AcpiDisable;
00124   UINT8                                   S4BiosReq;
00125   UINT8                                   PstateCnt;
00126   UINT32                                  Pm1aEvtBlk;
00127   UINT32                                  Pm1bEvtBlk;
00128   UINT32                                  Pm1aCntBlk;
00129   UINT32                                  Pm1bCntBlk;
00130   UINT32                                  Pm2CntBlk;
00131   UINT32                                  PmTmrBlk;
00132   UINT32                                  Gpe0Blk;
00133   UINT32                                  Gpe1Blk;
00134   UINT8                                   Pm1EvtLen;
00135   UINT8                                   Pm1CntLen;
00136   UINT8                                   Pm2CntLen;
00137   UINT8                                   PmTmrLen;
00138   UINT8                                   Gpe0BlkLen;
00139   UINT8                                   Gpe1BlkLen;
00140   UINT8                                   Gpe1Base;
00141   UINT8                                   CstCnt;
00142   UINT16                                  PLvl2Lat;
00143   UINT16                                  PLvl3Lat;
00144   UINT16                                  FlushSize;
00145   UINT16                                  FlushStride;
00146   UINT8                                   DutyOffset;
00147   UINT8                                   DutyWidth;
00148   UINT8                                   DayAlrm;
00149   UINT8                                   MonAlrm;
00150   UINT8                                   Century;
00151   UINT16                                  IaPcBootArch;
00152   UINT8                                   Reserved1;
00153   UINT32                                  Flags;
00154   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  ResetReg;
00155   UINT8                                   ResetValue;
00156   UINT8                                   Reserved2[3];
00157   UINT64                                  XFirmwareCtrl;
00158   UINT64                                  XDsdt;
00159   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm1aEvtBlk;
00160   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm1bEvtBlk;
00161   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm1aCntBlk;
00162   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm1bCntBlk;
00163   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm2CntBlk;
00164   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPmTmrBlk;
00165   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XGpe0Blk;
00166   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XGpe1Blk;
00167 } EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE;
00168 
00169 ///
00170 /// FADT Version (as defined in ACPI 4.0 spec.)
00171 ///
00172 #define EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION  0x04
00173 
00174 //
00175 // Fixed ACPI Description Table Preferred Power Management Profile
00176 //
00177 #define EFI_ACPI_4_0_PM_PROFILE_UNSPECIFIED         0
00178 #define EFI_ACPI_4_0_PM_PROFILE_DESKTOP             1
00179 #define EFI_ACPI_4_0_PM_PROFILE_MOBILE              2
00180 #define EFI_ACPI_4_0_PM_PROFILE_WORKSTATION         3
00181 #define EFI_ACPI_4_0_PM_PROFILE_ENTERPRISE_SERVER   4
00182 #define EFI_ACPI_4_0_PM_PROFILE_SOHO_SERVER         5
00183 #define EFI_ACPI_4_0_PM_PROFILE_APPLIANCE_PC        6
00184 #define EFI_ACPI_4_0_PM_PROFILE_PERFORMANCE_SERVER  7
00185 
00186 //
00187 // Fixed ACPI Description Table Boot Architecture Flags
00188 // All other bits are reserved and must be set to 0.
00189 //
00190 #define EFI_ACPI_4_0_LEGACY_DEVICES              BIT0
00191 #define EFI_ACPI_4_0_8042                        BIT1
00192 #define EFI_ACPI_4_0_VGA_NOT_PRESENT             BIT2
00193 #define EFI_ACPI_4_0_MSI_NOT_SUPPORTED           BIT3
00194 #define EFI_ACPI_4_0_PCIE_ASPM_CONTROLS          BIT4
00195 
00196 //
00197 // Fixed ACPI Description Table Fixed Feature Flags
00198 // All other bits are reserved and must be set to 0.
00199 //
00200 #define EFI_ACPI_4_0_WBINVD                                 BIT0
00201 #define EFI_ACPI_4_0_WBINVD_FLUSH                           BIT1
00202 #define EFI_ACPI_4_0_PROC_C1                                BIT2
00203 #define EFI_ACPI_4_0_P_LVL2_UP                              BIT3
00204 #define EFI_ACPI_4_0_PWR_BUTTON                             BIT4
00205 #define EFI_ACPI_4_0_SLP_BUTTON                             BIT5
00206 #define EFI_ACPI_4_0_FIX_RTC                                BIT6
00207 #define EFI_ACPI_4_0_RTC_S4                                 BIT7
00208 #define EFI_ACPI_4_0_TMR_VAL_EXT                            BIT8
00209 #define EFI_ACPI_4_0_DCK_CAP                                BIT9
00210 #define EFI_ACPI_4_0_RESET_REG_SUP                          BIT10
00211 #define EFI_ACPI_4_0_SEALED_CASE                            BIT11
00212 #define EFI_ACPI_4_0_HEADLESS                               BIT12
00213 #define EFI_ACPI_4_0_CPU_SW_SLP                             BIT13
00214 #define EFI_ACPI_4_0_PCI_EXP_WAK                            BIT14
00215 #define EFI_ACPI_4_0_USE_PLATFORM_CLOCK                     BIT15
00216 #define EFI_ACPI_4_0_S4_RTC_STS_VALID                       BIT16
00217 #define EFI_ACPI_4_0_REMOTE_POWER_ON_CAPABLE                BIT17
00218 #define EFI_ACPI_4_0_FORCE_APIC_CLUSTER_MODEL               BIT18
00219 #define EFI_ACPI_4_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE   BIT19
00220 
00221 ///
00222 /// Firmware ACPI Control Structure
00223 ///
00224 typedef struct {
00225   UINT32  Signature;
00226   UINT32  Length;
00227   UINT32  HardwareSignature;
00228   UINT32  FirmwareWakingVector;
00229   UINT32  GlobalLock;
00230   UINT32  Flags;
00231   UINT64  XFirmwareWakingVector;
00232   UINT8   Version;
00233   UINT8   Reserved0[3];
00234   UINT32  OspmFlags;
00235   UINT8   Reserved1[24];
00236 } EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
00237 
00238 ///
00239 /// FACS Version (as defined in ACPI 4.0 spec.)
00240 ///
00241 #define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION  0x02
00242 
00243 ///
00244 /// Firmware Control Structure Feature Flags
00245 /// All other bits are reserved and must be set to 0.
00246 ///
00247 #define EFI_ACPI_4_0_S4BIOS_F                     BIT0
00248 #define EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F       BIT1
00249 
00250 ///
00251 /// OSPM Enabled Firmware Control Structure Flags
00252 /// All other bits are reserved and must be set to 0.
00253 ///
00254 #define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F           BIT0
00255 
00256 //
00257 // Differentiated System Description Table,
00258 // Secondary System Description Table
00259 // and Persistent System Description Table,
00260 // no definition needed as they are common description table header, the same with
00261 // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
00262 //
00263 #define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION   0x02
00264 #define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION        0x02
00265 
00266 ///
00267 /// Multiple APIC Description Table header definition.  The rest of the table
00268 /// must be defined in a platform specific manner.
00269 ///
00270 typedef struct {
00271   EFI_ACPI_DESCRIPTION_HEADER Header;
00272   UINT32                      LocalApicAddress;
00273   UINT32                      Flags;
00274 } EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
00275 
00276 ///
00277 /// MADT Revision (as defined in ACPI 4.0 spec.)
00278 ///
00279 #define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
00280 
00281 ///
00282 /// Multiple APIC Flags
00283 /// All other bits are reserved and must be set to 0.
00284 ///
00285 #define EFI_ACPI_4_0_PCAT_COMPAT         BIT0
00286 
00287 //
00288 // Multiple APIC Description Table APIC structure types
00289 // All other values between 0x0B an 0xFF are reserved and
00290 // will be ignored by OSPM.
00291 //
00292 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC           0x00
00293 #define EFI_ACPI_4_0_IO_APIC                        0x01
00294 #define EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE      0x02
00295 #define EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE  0x03
00296 #define EFI_ACPI_4_0_LOCAL_APIC_NMI                 0x04
00297 #define EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE    0x05
00298 #define EFI_ACPI_4_0_IO_SAPIC                       0x06
00299 #define EFI_ACPI_4_0_LOCAL_SAPIC                    0x07
00300 #define EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES     0x08
00301 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC         0x09
00302 #define EFI_ACPI_4_0_LOCAL_X2APIC_NMI               0x0A
00303 
00304 //
00305 // APIC Structure Definitions
00306 //
00307 
00308 ///
00309 /// Processor Local APIC Structure Definition
00310 ///
00311 typedef struct {
00312   UINT8   Type;
00313   UINT8   Length;
00314   UINT8   AcpiProcessorId;
00315   UINT8   ApicId;
00316   UINT32  Flags;
00317 } EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
00318 
00319 ///
00320 /// Local APIC Flags.  All other bits are reserved and must be 0.
00321 ///
00322 #define EFI_ACPI_4_0_LOCAL_APIC_ENABLED        BIT0
00323 
00324 ///
00325 /// IO APIC Structure
00326 ///
00327 typedef struct {
00328   UINT8   Type;
00329   UINT8   Length;
00330   UINT8   IoApicId;
00331   UINT8   Reserved;
00332   UINT32  IoApicAddress;
00333   UINT32  GlobalSystemInterruptBase;
00334 } EFI_ACPI_4_0_IO_APIC_STRUCTURE;
00335 
00336 ///
00337 /// Interrupt Source Override Structure
00338 ///
00339 typedef struct {
00340   UINT8   Type;
00341   UINT8   Length;
00342   UINT8   Bus;
00343   UINT8   Source;
00344   UINT32  GlobalSystemInterrupt;
00345   UINT16  Flags;
00346 } EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
00347 
00348 ///
00349 /// Platform Interrupt Sources Structure Definition
00350 ///
00351 typedef struct {
00352   UINT8   Type;
00353   UINT8   Length;
00354   UINT16  Flags;
00355   UINT8   InterruptType;
00356   UINT8   ProcessorId;
00357   UINT8   ProcessorEid;
00358   UINT8   IoSapicVector;
00359   UINT32  GlobalSystemInterrupt;
00360   UINT32  PlatformInterruptSourceFlags;
00361   UINT8   CpeiProcessorOverride;
00362   UINT8   Reserved[31];
00363 } EFI_ACPI_4_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
00364 
00365 //
00366 // MPS INTI flags.
00367 // All other bits are reserved and must be set to 0.
00368 //
00369 #define EFI_ACPI_4_0_POLARITY      (3 << 0)
00370 #define EFI_ACPI_4_0_TRIGGER_MODE  (3 << 2)
00371 
00372 ///
00373 /// Non-Maskable Interrupt Source Structure
00374 ///
00375 typedef struct {
00376   UINT8   Type;
00377   UINT8   Length;
00378   UINT16  Flags;
00379   UINT32  GlobalSystemInterrupt;
00380 } EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
00381 
00382 ///
00383 /// Local APIC NMI Structure
00384 ///
00385 typedef struct {
00386   UINT8   Type;
00387   UINT8   Length;
00388   UINT8   AcpiProcessorId;
00389   UINT16  Flags;
00390   UINT8   LocalApicLint;
00391 } EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE;
00392 
00393 ///
00394 /// Local APIC Address Override Structure
00395 ///
00396 typedef struct {
00397   UINT8   Type;
00398   UINT8   Length;
00399   UINT16  Reserved;
00400   UINT64  LocalApicAddress;
00401 } EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
00402 
00403 ///
00404 /// IO SAPIC Structure
00405 ///
00406 typedef struct {
00407   UINT8   Type;
00408   UINT8   Length;
00409   UINT8   IoApicId;
00410   UINT8   Reserved;
00411   UINT32  GlobalSystemInterruptBase;
00412   UINT64  IoSapicAddress;
00413 } EFI_ACPI_4_0_IO_SAPIC_STRUCTURE;
00414 
00415 ///
00416 /// Local SAPIC Structure
00417 /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
00418 ///
00419 typedef struct {
00420   UINT8   Type;
00421   UINT8   Length;
00422   UINT8   AcpiProcessorId;
00423   UINT8   LocalSapicId;
00424   UINT8   LocalSapicEid;
00425   UINT8   Reserved[3];
00426   UINT32  Flags;
00427   UINT32  ACPIProcessorUIDValue;
00428 } EFI_ACPI_4_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
00429 
00430 ///
00431 /// Platform Interrupt Sources Structure
00432 ///
00433 typedef struct {
00434   UINT8   Type;
00435   UINT8   Length;
00436   UINT16  Flags;
00437   UINT8   InterruptType;
00438   UINT8   ProcessorId;
00439   UINT8   ProcessorEid;
00440   UINT8   IoSapicVector;
00441   UINT32  GlobalSystemInterrupt;
00442   UINT32  PlatformInterruptSourceFlags;
00443 } EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
00444 
00445 ///
00446 /// Platform Interrupt Source Flags.
00447 /// All other bits are reserved and must be set to 0.
00448 ///
00449 #define EFI_ACPI_4_0_CPEI_PROCESSOR_OVERRIDE          BIT0
00450 
00451 ///
00452 /// Processor Local x2APIC Structure Definition
00453 ///
00454 typedef struct {
00455   UINT8   Type;
00456   UINT8   Length;
00457   UINT8   Reserved[2];
00458   UINT32  X2ApicId;
00459   UINT32  Flags;
00460   UINT32  AcpiProcessorUid;
00461 } EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
00462 
00463 ///
00464 /// Local x2APIC NMI Structure
00465 ///
00466 typedef struct {
00467   UINT8   Type;
00468   UINT8   Length;
00469   UINT16  Flags;
00470   UINT32  AcpiProcessorUid;
00471   UINT8   LocalX2ApicLint;
00472   UINT8   Reserved[3];
00473 } EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE;
00474 
00475 ///
00476 /// Smart Battery Description Table (SBST)
00477 ///
00478 typedef struct {
00479   EFI_ACPI_DESCRIPTION_HEADER Header;
00480   UINT32                      WarningEnergyLevel;
00481   UINT32                      LowEnergyLevel;
00482   UINT32                      CriticalEnergyLevel;
00483 } EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE;
00484 
00485 ///
00486 /// SBST Version (as defined in ACPI 4.0 spec.)
00487 ///
00488 #define EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
00489 
00490 ///
00491 /// Embedded Controller Boot Resources Table (ECDT)
00492 /// The table is followed by a null terminated ASCII string that contains
00493 /// a fully qualified reference to the name space object.
00494 ///
00495 typedef struct {
00496   EFI_ACPI_DESCRIPTION_HEADER             Header;
00497   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  EcControl;
00498   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  EcData;
00499   UINT32                                  Uid;
00500   UINT8                                   GpeBit;
00501 } EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
00502 
00503 ///
00504 /// ECDT Version (as defined in ACPI 4.0 spec.)
00505 ///
00506 #define EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION  0x01
00507 
00508 ///
00509 /// System Resource Affinity Table (SRAT.  The rest of the table
00510 /// must be defined in a platform specific manner.
00511 ///
00512 typedef struct {
00513   EFI_ACPI_DESCRIPTION_HEADER Header;
00514   UINT32                      Reserved1;  ///< Must be set to 1
00515   UINT64                      Reserved2;
00516 } EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
00517 
00518 ///
00519 /// SRAT Version (as defined in ACPI 4.0 spec.)
00520 ///
00521 #define EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION  0x03
00522 
00523 //
00524 // SRAT structure types.
00525 // All other values between 0x03 an 0xFF are reserved and
00526 // will be ignored by OSPM.
00527 //
00528 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY  0x00
00529 #define EFI_ACPI_4_0_MEMORY_AFFINITY                      0x01
00530 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY      0x02
00531 
00532 ///
00533 /// Processor Local APIC/SAPIC Affinity Structure Definition
00534 ///
00535 typedef struct {
00536   UINT8   Type;
00537   UINT8   Length;
00538   UINT8   ProximityDomain7To0;
00539   UINT8   ApicId;
00540   UINT32  Flags;
00541   UINT8   LocalSapicEid;
00542   UINT8   ProximityDomain31To8[3];
00543   UINT32  ClockDomain;
00544 } EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
00545 
00546 ///
00547 /// Local APIC/SAPIC Flags.  All other bits are reserved and must be 0.
00548 ///
00549 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
00550 
00551 ///
00552 /// Memory Affinity Structure Definition
00553 ///
00554 typedef struct {
00555   UINT8   Type;
00556   UINT8   Length;
00557   UINT32  ProximityDomain;
00558   UINT16  Reserved1;
00559   UINT32  AddressBaseLow;
00560   UINT32  AddressBaseHigh;
00561   UINT32  LengthLow;
00562   UINT32  LengthHigh;
00563   UINT32  Reserved2;
00564   UINT32  Flags;
00565   UINT64  Reserved3;
00566 } EFI_ACPI_4_0_MEMORY_AFFINITY_STRUCTURE;
00567 
00568 //
00569 // Memory Flags.  All other bits are reserved and must be 0.
00570 //
00571 #define EFI_ACPI_4_0_MEMORY_ENABLED       (1 << 0)
00572 #define EFI_ACPI_4_0_MEMORY_HOT_PLUGGABLE (1 << 1)
00573 #define EFI_ACPI_4_0_MEMORY_NONVOLATILE   (1 << 2)
00574 
00575 ///
00576 /// Processor Local x2APIC Affinity Structure Definition
00577 ///
00578 typedef struct {
00579   UINT8   Type;
00580   UINT8   Length;
00581   UINT8   Reserved1[2];
00582   UINT32  ProximityDomain;
00583   UINT32  X2ApicId;
00584   UINT32  Flags;
00585   UINT32  ClockDomain;
00586   UINT8   Reserved2[4];
00587 } EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
00588 
00589 ///
00590 /// System Locality Distance Information Table (SLIT).
00591 /// The rest of the table is a matrix.
00592 ///
00593 typedef struct {
00594   EFI_ACPI_DESCRIPTION_HEADER Header;
00595   UINT64                      NumberOfSystemLocalities;
00596 } EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
00597 
00598 ///
00599 /// SLIT Version (as defined in ACPI 4.0 spec.)
00600 ///
00601 #define EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION  0x01
00602 
00603 ///
00604 /// Corrected Platform Error Polling Table (CPEP)
00605 ///
00606 typedef struct {
00607   EFI_ACPI_DESCRIPTION_HEADER Header;
00608   UINT8                       Reserved[8];
00609 } EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
00610 
00611 ///
00612 /// CPEP Version (as defined in ACPI 4.0 spec.)
00613 ///
00614 #define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
00615 
00616 //
00617 // CPEP processor structure types.
00618 //
00619 #define EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC  0x00
00620 
00621 ///
00622 /// Corrected Platform Error Polling Processor Structure Definition
00623 ///
00624 typedef struct {
00625   UINT8   Type;
00626   UINT8   Length;
00627   UINT8   ProcessorId;
00628   UINT8   ProcessorEid;
00629   UINT32  PollingInterval;
00630 } EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
00631 
00632 ///
00633 /// Maximum System Characteristics Table (MSCT)
00634 ///
00635 typedef struct {
00636   EFI_ACPI_DESCRIPTION_HEADER Header;
00637   UINT32                      OffsetProxDomInfo;
00638   UINT32                      MaximumNumberOfProximityDomains;
00639   UINT32                      MaximumNumberOfClockDomains;
00640   UINT64                      MaximumPhysicalAddress;
00641 } EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
00642 
00643 ///
00644 /// MSCT Version (as defined in ACPI 4.0 spec.)
00645 ///
00646 #define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
00647 
00648 ///
00649 /// Maximum Proximity Domain Information Structure Definition
00650 ///
00651 typedef struct {
00652   UINT8   Revision;
00653   UINT8   Length;
00654   UINT32  ProximityDomainRangeLow;
00655   UINT32  ProximityDomainRangeHigh;
00656   UINT32  MaximumProcessorCapacity;
00657   UINT64  MaximumMemoryCapacity;
00658 } EFI_ACPI_4_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
00659 
00660 ///
00661 /// Boot Error Record Table (BERT)
00662 ///
00663 typedef struct {
00664   EFI_ACPI_DESCRIPTION_HEADER Header;
00665   UINT32                      BootErrorRegionLength;
00666   UINT64                      BootErrorRegion;
00667 } EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_HEADER;
00668 
00669 ///
00670 /// BERT Version (as defined in ACPI 4.0 spec.)
00671 ///
00672 #define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
00673 
00674 ///
00675 /// Boot Error Region Block Status Definition
00676 ///
00677 typedef struct {
00678   UINT32       UncorrectableErrorValid:1;
00679   UINT32       CorrectableErrorValid:1;
00680   UINT32       MultipleUncorrectableErrors:1;
00681   UINT32       MultipleCorrectableErrors:1;
00682   UINT32       ErrorDataEntryCount:10;
00683   UINT32       Reserved:18;
00684 } EFI_ACPI_4_0_ERROR_BLOCK_STATUS;
00685 
00686 ///
00687 /// Boot Error Region Definition
00688 ///
00689 typedef struct {
00690   EFI_ACPI_4_0_ERROR_BLOCK_STATUS              BlockStatus;
00691   UINT32                                       RawDataOffset;
00692   UINT32                                       RawDataLength;
00693   UINT32                                       DataLength;
00694   UINT32                                       ErrorSeverity;
00695 } EFI_ACPI_4_0_BOOT_ERROR_REGION_STRUCTURE;
00696 
00697 //
00698 // Boot Error Severity types
00699 //
00700 #define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTABLE  0x00
00701 #define EFI_ACPI_4_0_ERROR_SEVERITY_FATAL        0x01
00702 #define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTED    0x02
00703 #define EFI_ACPI_4_0_ERROR_SEVERITY_NONE         0x03
00704 
00705 ///
00706 /// Generic Error Data Entry Definition
00707 ///
00708 typedef struct {
00709   UINT8    SectionType[16];
00710   UINT32   ErrorSeverity;
00711   UINT16   Revision;
00712   UINT8    ValidationBits;
00713   UINT8    Flags;
00714   UINT32   ErrorDataLength;
00715   UINT8    FruId[16];
00716   UINT8    FruText[20];
00717 } EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
00718 
00719 ///
00720 /// Generic Error Data Entry Version (as defined in ACPI 4.0 spec.)
00721 ///
00722 #define EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_REVISION  0x0201
00723 
00724 ///
00725 /// HEST - Hardware Error Source Table
00726 ///
00727 typedef struct {
00728   EFI_ACPI_DESCRIPTION_HEADER Header;
00729   UINT32                      ErrorSourceCount;
00730 } EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
00731 
00732 ///
00733 /// HEST Version (as defined in ACPI 4.0 spec.)
00734 ///
00735 #define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
00736 
00737 //
00738 // Error Source structure types.
00739 //
00740 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION  0x00
00741 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK  0x01
00742 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR                0x02
00743 #define EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER                  0x06
00744 #define EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER                     0x07
00745 #define EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER                     0x08
00746 #define EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR                     0x09
00747 
00748 //
00749 // Error Source structure flags.
00750 //
00751 #define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST       (1 << 0)
00752 #define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_GLOBAL               (1 << 1)
00753 
00754 ///
00755 /// IA-32 Architecture Machine Check Exception Structure Definition
00756 ///
00757 typedef struct {
00758   UINT16  Type;
00759   UINT16  SourceId;
00760   UINT8   Reserved0[2];
00761   UINT8   Flags;
00762   UINT8   Enabled;
00763   UINT32  NumberOfRecordsToPreAllocate;
00764   UINT32  MaxSectionsPerRecord;
00765   UINT64  GlobalCapabilityInitData;
00766   UINT64  GlobalControlInitData;
00767   UINT8   NumberOfHardwareBanks;
00768   UINT8   Reserved1[7];
00769 } EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
00770 
00771 ///
00772 /// IA-32 Architecture Machine Check Bank Structure Definition
00773 ///
00774 typedef struct {
00775   UINT8   BankNumber;
00776   UINT8   ClearStatusOnInitialization;
00777   UINT8   StatusDataFormat;
00778   UINT8   Reserved0;
00779   UINT32  ControlRegisterMsrAddress;
00780   UINT64  ControlInitData;
00781   UINT32  StatusRegisterMsrAddress;
00782   UINT32  AddressRegisterMsrAddress;
00783   UINT32  MiscRegisterMsrAddress;
00784 } EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
00785 
00786 ///
00787 /// IA-32 Architecture Machine Check Bank Structure MCA data format
00788 ///
00789 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32      0x00
00790 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64   0x01
00791 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64     0x02
00792 
00793 //
00794 // Hardware Error Notification types. All other values are reserved
00795 //
00796 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_POLLED                0x00
00797 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT    0x01
00798 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT       0x02
00799 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_SCI                   0x03
00800 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_NMI                   0x04
00801 
00802 ///
00803 /// Hardware Error Notification Configuration Write Enable Structure Definition
00804 ///
00805 typedef struct {
00806   UINT16    Type:1;
00807   UINT16    PollInterval:1;
00808   UINT16    SwitchToPollingThresholdValue:1;
00809   UINT16    SwitchToPollingThresholdWindow:1;
00810   UINT16    ErrorThresholdValue:1;
00811   UINT16    ErrorThresholdWindow:1;
00812   UINT16    Reserved:10;
00813 } EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
00814 
00815 ///
00816 /// Hardware Error Notification Structure Definition
00817 ///
00818 typedef struct {
00819   UINT8                                                                          Type;
00820   UINT8                                                                          Length;
00821   EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE  ConfigurationWriteEnable;
00822   UINT32                                                                         PollInterval;
00823   UINT32                                                                         Vector;
00824   UINT32                                                                         SwitchToPollingThresholdValue;
00825   UINT32                                                                         SwitchToPollingThresholdWindow;
00826   UINT32                                                                         ErrorThresholdValue;
00827   UINT32                                                                         ErrorThresholdWindow;
00828 } EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
00829 
00830 ///
00831 /// IA-32 Architecture Corrected Machine Check Structure Definition
00832 ///
00833 typedef struct {
00834   UINT16                                                 Type;
00835   UINT16                                                 SourceId;
00836   UINT8                                                  Reserved0[2];
00837   UINT8                                                  Flags;
00838   UINT8                                                  Enabled;
00839   UINT32                                                 NumberOfRecordsToPreAllocate;
00840   UINT32                                                 MaxSectionsPerRecord;
00841   EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE     NotificationStructure;
00842   UINT8                                                  NumberOfHardwareBanks;
00843   UINT8                                                  Reserved1[3];
00844 } EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
00845 
00846 ///
00847 /// IA-32 Architecture NMI Error Structure Definition
00848 ///
00849 typedef struct {
00850   UINT16  Type;
00851   UINT16  SourceId;
00852   UINT8   Reserved0[2];
00853   UINT32  NumberOfRecordsToPreAllocate;
00854   UINT32  MaxSectionsPerRecord;
00855   UINT32  MaxRawDataLength;
00856 } EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
00857 
00858 ///
00859 /// PCI Express Root Port AER Structure Definition
00860 ///
00861 typedef struct {
00862   UINT16  Type;
00863   UINT16  SourceId;
00864   UINT8   Reserved0[2];
00865   UINT8   Flags;
00866   UINT8   Enabled;
00867   UINT32  NumberOfRecordsToPreAllocate;
00868   UINT32  MaxSectionsPerRecord;
00869   UINT32  Bus;
00870   UINT16  Device;
00871   UINT16  Function;
00872   UINT16  DeviceControl;
00873   UINT8   Reserved1[2];
00874   UINT32  UncorrectableErrorMask;
00875   UINT32  UncorrectableErrorSeverity;
00876   UINT32  CorrectableErrorMask;
00877   UINT32  AdvancedErrorCapabilitiesAndControl;
00878   UINT32  RootErrorCommand;
00879 } EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
00880 
00881 ///
00882 /// PCI Express Device AER Structure Definition
00883 ///
00884 typedef struct {
00885   UINT16  Type;
00886   UINT16  SourceId;
00887   UINT8   Reserved0[2];
00888   UINT8   Flags;
00889   UINT8   Enabled;
00890   UINT32  NumberOfRecordsToPreAllocate;
00891   UINT32  MaxSectionsPerRecord;
00892   UINT32  Bus;
00893   UINT16  Device;
00894   UINT16  Function;
00895   UINT16  DeviceControl;
00896   UINT8   Reserved1[2];
00897   UINT32  UncorrectableErrorMask;
00898   UINT32  UncorrectableErrorSeverity;
00899   UINT32  CorrectableErrorMask;
00900   UINT32  AdvancedErrorCapabilitiesAndControl;
00901 } EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
00902 
00903 ///
00904 /// PCI Express Bridge AER Structure Definition
00905 ///
00906 typedef struct {
00907   UINT16  Type;
00908   UINT16  SourceId;
00909   UINT8   Reserved0[2];
00910   UINT8   Flags;
00911   UINT8   Enabled;
00912   UINT32  NumberOfRecordsToPreAllocate;
00913   UINT32  MaxSectionsPerRecord;
00914   UINT32  Bus;
00915   UINT16  Device;
00916   UINT16  Function;
00917   UINT16  DeviceControl;
00918   UINT8   Reserved1[2];
00919   UINT32  UncorrectableErrorMask;
00920   UINT32  UncorrectableErrorSeverity;
00921   UINT32  CorrectableErrorMask;
00922   UINT32  AdvancedErrorCapabilitiesAndControl;
00923   UINT32  SecondaryUncorrectableErrorMask;
00924   UINT32  SecondaryUncorrectableErrorSeverity;
00925   UINT32  SecondaryAdvancedErrorCapabilitiesAndControl;
00926 } EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
00927 
00928 ///
00929 /// Generic Hardware Error Source Structure Definition
00930 ///
00931 typedef struct {
00932   UINT16                                                 Type;
00933   UINT16                                                 SourceId;
00934   UINT16                                                 RelatedSourceId;
00935   UINT8                                                  Flags;
00936   UINT8                                                  Enabled;
00937   UINT32                                                 NumberOfRecordsToPreAllocate;
00938   UINT32                                                 MaxSectionsPerRecord;
00939   UINT32                                                 MaxRawDataLength;
00940   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE                 ErrorStatusAddress;
00941   EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE     NotificationStructure;
00942   UINT32                                                 ErrorStatusBlockLength;
00943 } EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
00944 
00945 ///
00946 /// Generic Error Status Definition
00947 ///
00948 typedef struct {
00949   EFI_ACPI_4_0_ERROR_BLOCK_STATUS              BlockStatus;
00950   UINT32                                       RawDataOffset;
00951   UINT32                                       RawDataLength;
00952   UINT32                                       DataLength;
00953   UINT32                                       ErrorSeverity;
00954 } EFI_ACPI_4_0_GENERIC_ERROR_STATUS_STRUCTURE;
00955 
00956 ///
00957 /// ERST - Error Record Serialization Table
00958 ///
00959 typedef struct {
00960   EFI_ACPI_DESCRIPTION_HEADER Header;
00961   UINT32                      SerializationHeaderSize;
00962   UINT8                       Reserved0[4];
00963   UINT32                      InstructionEntryCount;
00964 } EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
00965 
00966 ///
00967 /// ERST Version (as defined in ACPI 4.0 spec.)
00968 ///
00969 #define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
00970 
00971 ///
00972 /// ERST Serialization Actions
00973 ///
00974 #define EFI_ACPI_4_0_ERST_BEGIN_WRITE_OPERATION                    0x00
00975 #define EFI_ACPI_4_0_ERST_BEGIN_READ_OPERATION                     0x01
00976 #define EFI_ACPI_4_0_ERST_BEGIN_CLEAR_OPERATION                    0x02
00977 #define EFI_ACPI_4_0_ERST_END_OPERATION                            0x03
00978 #define EFI_ACPI_4_0_ERST_SET_RECORD_OFFSET                        0x04
00979 #define EFI_ACPI_4_0_ERST_EXECUTE_OPERATION                        0x05
00980 #define EFI_ACPI_4_0_ERST_CHECK_BUSY_STATUS                        0x06
00981 #define EFI_ACPI_4_0_ERST_GET_COMMAND_STATUS                       0x07
00982 #define EFI_ACPI_4_0_ERST_GET_RECORD_IDENTIFIER                    0x08
00983 #define EFI_ACPI_4_0_ERST_SET_RECORD_IDENTIFIER                    0x09
00984 #define EFI_ACPI_4_0_ERST_GET_RECORD_COUNT                         0x0A
00985 #define EFI_ACPI_4_0_ERST_BEGIN_DUMMY_WRITE_OPERATION              0x0B
00986 #define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE              0x0D
00987 #define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH       0x0E
00988 #define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES   0x0F
00989 
00990 ///
00991 /// ERST Action Command Status
00992 ///
00993 #define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS                           0x00
00994 #define EFI_ACPI_4_0_EINJ_STATUS_NOT_ENOUGH_SPACE                  0x01
00995 #define EFI_ACPI_4_0_EINJ_STATUS_HARDWARE_NOT_AVAILABLE            0x02
00996 #define EFI_ACPI_4_0_EINJ_STATUS_FAILED                            0x03
00997 #define EFI_ACPI_4_0_EINJ_STATUS_RECORD_STORE_EMPTY                0x04
00998 #define EFI_ACPI_4_0_EINJ_STATUS_RECORD_NOT_FOUND                  0x05
00999 
01000 ///
01001 /// ERST Serialization Instructions
01002 ///
01003 #define EFI_ACPI_4_0_ERST_READ_REGISTER                            0x00
01004 #define EFI_ACPI_4_0_ERST_READ_REGISTER_VALUE                      0x01
01005 #define EFI_ACPI_4_0_ERST_WRITE_REGISTER                           0x02
01006 #define EFI_ACPI_4_0_ERST_WRITE_REGISTER_VALUE                     0x03
01007 #define EFI_ACPI_4_0_ERST_NOOP                                     0x04
01008 #define EFI_ACPI_4_0_ERST_LOAD_VAR1                                0x05
01009 #define EFI_ACPI_4_0_ERST_LOAD_VAR2                                0x06
01010 #define EFI_ACPI_4_0_ERST_STORE_VAR1                               0x07
01011 #define EFI_ACPI_4_0_ERST_ADD                                      0x08
01012 #define EFI_ACPI_4_0_ERST_SUBTRACT                                 0x09
01013 #define EFI_ACPI_4_0_ERST_ADD_VALUE                                0x0A
01014 #define EFI_ACPI_4_0_ERST_SUBTRACT_VALUE                           0x0B
01015 #define EFI_ACPI_4_0_ERST_STALL                                    0x0C
01016 #define EFI_ACPI_4_0_ERST_STALL_WHILE_TRUE                         0x0D
01017 #define EFI_ACPI_4_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE            0x0E
01018 #define EFI_ACPI_4_0_ERST_GOTO                                     0x0F
01019 #define EFI_ACPI_4_0_ERST_SET_SRC_ADDRESS_BASE                     0x10
01020 #define EFI_ACPI_4_0_ERST_SET_DST_ADDRESS_BASE                     0x11
01021 #define EFI_ACPI_4_0_ERST_MOVE_DATA                                0x12
01022 
01023 ///
01024 /// ERST Instruction Flags
01025 ///
01026 #define EFI_ACPI_4_0_ERST_PRESERVE_REGISTER                        0x01
01027 
01028 ///
01029 /// ERST Serialization Instruction Entry
01030 ///
01031 typedef struct {
01032   UINT8                                    SerializationAction;
01033   UINT8                                    Instruction;
01034   UINT8                                    Flags;
01035   UINT8                                    Reserved0;
01036   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE   RegisterRegion;
01037   UINT64                                   Value;
01038   UINT64                                   Mask;
01039 } EFI_ACPI_4_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
01040 
01041 ///
01042 /// EINJ - Error Injection Table
01043 ///
01044 typedef struct {
01045   EFI_ACPI_DESCRIPTION_HEADER Header;
01046   UINT32                      InjectionHeaderSize;
01047   UINT8                       InjectionFlags;
01048   UINT8                       Reserved0[3];
01049   UINT32                      InjectionEntryCount;
01050 } EFI_ACPI_4_0_ERROR_INJECTION_TABLE_HEADER;
01051 
01052 ///
01053 /// EINJ Version (as defined in ACPI 4.0 spec.)
01054 ///
01055 #define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_REVISION 0x01
01056 
01057 ///
01058 /// EINJ Error Injection Actions
01059 ///
01060 #define EFI_ACPI_4_0_EINJ_BEGIN_INJECTION_OPERATION                0x00
01061 #define EFI_ACPI_4_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE           0x01
01062 #define EFI_ACPI_4_0_EINJ_SET_ERROR_TYPE                           0x02
01063 #define EFI_ACPI_4_0_EINJ_GET_ERROR_TYPE                           0x03
01064 #define EFI_ACPI_4_0_EINJ_END_OPERATION                            0x04
01065 #define EFI_ACPI_4_0_EINJ_EXECUTE_OPERATION                        0x05
01066 #define EFI_ACPI_4_0_EINJ_CHECK_BUSY_STATUS                        0x06
01067 #define EFI_ACPI_4_0_EINJ_GET_COMMAND_STATUS                       0x07
01068 #define EFI_ACPI_4_0_EINJ_TRIGGER_ERROR                            0xFF
01069 
01070 ///
01071 /// EINJ Action Command Status
01072 ///
01073 #define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS                           0x00
01074 #define EFI_ACPI_4_0_EINJ_STATUS_UNKNOWN_FAILURE                   0x01
01075 #define EFI_ACPI_4_0_EINJ_STATUS_INVALID_ACCESS                    0x02
01076 
01077 ///
01078 /// EINJ Error Type Definition
01079 ///
01080 #define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_CORRECTABLE                 (1 << 0)
01081 #define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL      (1 << 1)
01082 #define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL         (1 << 2)
01083 #define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_CORRECTABLE                    (1 << 3)
01084 #define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL         (1 << 4)
01085 #define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL            (1 << 5)
01086 #define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE               (1 << 6)
01087 #define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL    (1 << 7)
01088 #define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL       (1 << 8)
01089 #define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_CORRECTABLE                  (1 << 9)
01090 #define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL       (1 << 10)
01091 #define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL          (1 << 11)
01092 
01093 ///
01094 /// EINJ Injection Instructions
01095 ///
01096 #define EFI_ACPI_4_0_EINJ_READ_REGISTER                            0x00
01097 #define EFI_ACPI_4_0_EINJ_READ_REGISTER_VALUE                      0x01
01098 #define EFI_ACPI_4_0_EINJ_WRITE_REGISTER                           0x02
01099 #define EFI_ACPI_4_0_EINJ_WRITE_REGISTER_VALUE                     0x03
01100 #define EFI_ACPI_4_0_EINJ_NOOP                                     0x04
01101 
01102 ///
01103 /// EINJ Instruction Flags
01104 ///
01105 #define EFI_ACPI_4_0_EINJ_PRESERVE_REGISTER                        0x01
01106 
01107 ///
01108 /// EINJ Injection Instruction Entry
01109 ///
01110 typedef struct {
01111   UINT8                                    InjectionAction;
01112   UINT8                                    Instruction;
01113   UINT8                                    Flags;
01114   UINT8                                    Reserved0;
01115   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE   RegisterRegion;
01116   UINT64                                   Value;
01117   UINT64                                   Mask;
01118 } EFI_ACPI_4_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
01119 
01120 ///
01121 /// EINJ Trigger Action Table
01122 ///
01123 typedef struct {
01124   UINT32  HeaderSize;
01125   UINT32  Revision;
01126   UINT32  TableSize;
01127   UINT32  EntryCount;
01128 } EFI_ACPI_4_0_EINJ_TRIGGER_ACTION_TABLE;
01129 
01130 //
01131 // Known table signatures
01132 //
01133 
01134 ///
01135 /// "RSD PTR " Root System Description Pointer
01136 ///
01137 #define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE  SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
01138 
01139 ///
01140 /// "APIC" Multiple APIC Description Table
01141 ///
01142 #define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('A', 'P', 'I', 'C')
01143 
01144 ///
01145 /// "BERT" Boot Error Record Table
01146 ///
01147 #define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE  SIGNATURE_32('B', 'E', 'R', 'T')
01148 
01149 ///
01150 /// "CPEP" Corrected Platform Error Polling Table
01151 ///
01152 #define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE  SIGNATURE_32('C', 'P', 'E', 'P')
01153 
01154 ///
01155 /// "DSDT" Differentiated System Description Table
01156 ///
01157 #define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('D', 'S', 'D', 'T')
01158 
01159 ///
01160 /// "ECDT" Embedded Controller Boot Resources Table
01161 ///
01162 #define EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE  SIGNATURE_32('E', 'C', 'D', 'T')
01163 
01164 ///
01165 /// "EINJ" Error Injection Table
01166 ///
01167 #define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_SIGNATURE  SIGNATURE_32('E', 'I', 'N', 'J')
01168 
01169 ///
01170 /// "ERST" Error Record Serialization Table
01171 ///
01172 #define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE  SIGNATURE_32('E', 'R', 'S', 'T')
01173 
01174 ///
01175 /// "FACP" Fixed ACPI Description Table
01176 ///
01177 #define EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'P')
01178 
01179 ///
01180 /// "FACS" Firmware ACPI Control Structure
01181 ///
01182 #define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'S')
01183 
01184 ///
01185 /// "HEST" Hardware Error Source Table
01186 ///
01187 #define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE  SIGNATURE_32('H', 'E', 'S', 'T')
01188 
01189 ///
01190 /// "MSCT" Maximum System Characteristics Table
01191 ///
01192 #define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE  SIGNATURE_32('M', 'S', 'C', 'T')
01193 
01194 ///
01195 /// "PSDT" Persistent System Description Table
01196 ///
01197 #define EFI_ACPI_4_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('P', 'S', 'D', 'T')
01198 
01199 ///
01200 /// "RSDT" Root System Description Table
01201 ///
01202 #define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('R', 'S', 'D', 'T')
01203 
01204 ///
01205 /// "SBST" Smart Battery Specification Table
01206 ///
01207 #define EFI_ACPI_4_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'B', 'S', 'T')
01208 
01209 ///
01210 /// "SLIT" System Locality Information Table
01211 ///
01212 #define EFI_ACPI_4_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'L', 'I', 'T')
01213 
01214 ///
01215 /// "SRAT" System Resource Affinity Table
01216 ///
01217 #define EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE  SIGNATURE_32('S', 'R', 'A', 'T')
01218 
01219 ///
01220 /// "SSDT" Secondary System Description Table
01221 ///
01222 #define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'S', 'D', 'T')
01223 
01224 ///
01225 /// "XSDT" Extended System Description Table
01226 ///
01227 #define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('X', 'S', 'D', 'T')
01228 
01229 ///
01230 /// "BOOT" MS Simple Boot Spec
01231 ///
01232 #define EFI_ACPI_4_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE  SIGNATURE_32('B', 'O', 'O', 'T')
01233 
01234 ///
01235 /// "DBGP" MS Debug Port Spec
01236 ///
01237 #define EFI_ACPI_4_0_DEBUG_PORT_TABLE_SIGNATURE  SIGNATURE_32('D', 'B', 'G', 'P')
01238 
01239 ///
01240 /// "DMAR" DMA Remapping Table
01241 ///
01242 #define EFI_ACPI_4_0_DMA_REMAPPING_TABLE_SIGNATURE  SIGNATURE_32('D', 'M', 'A', 'R')
01243 
01244 ///
01245 /// "ETDT" Event Timer Description Table
01246 ///
01247 #define EFI_ACPI_4_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('E', 'T', 'D', 'T')
01248 
01249 ///
01250 /// "HPET" IA-PC High Precision Event Timer Table
01251 ///
01252 #define EFI_ACPI_4_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE  SIGNATURE_32('H', 'P', 'E', 'T')
01253 
01254 ///
01255 /// "iBFT" iSCSI Boot Firmware Table
01256 ///
01257 #define EFI_ACPI_4_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE  SIGNATURE_32('i', 'B', 'F', 'T')
01258 
01259 ///
01260 /// "IVRS" I/O Virtualization Reporting Structure
01261 ///
01262 #define EFI_ACPI_4_0_IO_VIRTUALIZATION_REPORTING_STRUCTURE_SIGNATURE  SIGNATURE_32('I', 'V', 'R', 'S')
01263 
01264 ///
01265 /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
01266 ///
01267 #define EFI_ACPI_4_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('M', 'C', 'F', 'G')
01268 
01269 ///
01270 /// "MCHI" Management Controller Host Interface Table
01271 ///
01272 #define EFI_ACPI_4_0_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE  SIGNATURE_32('M', 'C', 'H', 'I')
01273 
01274 ///
01275 /// "SPCR" Serial Port Concole Redirection Table
01276 ///
01277 #define EFI_ACPI_4_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
01278 
01279 ///
01280 /// "SPMI" Server Platform Management Interface Table
01281 ///
01282 #define EFI_ACPI_4_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'M', 'I')
01283 
01284 ///
01285 /// "TCPA" Trusted Computing Platform Alliance Capabilities Table
01286 ///
01287 #define EFI_ACPI_4_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE  SIGNATURE_32('T', 'C', 'P', 'A')
01288 
01289 ///
01290 /// "UEFI" UEFI ACPI Data Table
01291 ///
01292 #define EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE  SIGNATURE_32('U', 'E', 'F', 'I')
01293 
01294 ///
01295 /// "WAET" Windows ACPI Enlightenment Table
01296 ///
01297 #define EFI_ACPI_4_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE  SIGNATURE_32('W', 'A', 'E', 'T')
01298 
01299 ///
01300 /// "WDAT" Watchdog Action Table
01301 ///
01302 #define EFI_ACPI_4_0_WATCHDOG_ACTION_TABLE_SIGNATURE  SIGNATURE_32('W', 'D', 'A', 'T')
01303 
01304 ///
01305 /// "WDRT" Watchdog Resource Table
01306 ///
01307 #define EFI_ACPI_4_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE  SIGNATURE_32('W', 'D', 'R', 'T')
01308 
01309 #pragma pack()
01310 
01311 #endif