The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/edk2/Include/IndustryStandard/Acpi40.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /** @file
    2   ACPI 4.0 definitions from the ACPI Specification Revision 4.0a April 5, 2010
    3 
    4   Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
    5   SPDX-License-Identifier: BSD-2-Clause-Patent
    6 **/
    7 
    8 #ifndef _ACPI_4_0_H_
    9 #define _ACPI_4_0_H_
   10 
   11 #include <IndustryStandard/Acpi30.h>
   12 
   13 //
   14 // Ensure proper structure formats
   15 //
   16 #pragma pack(1)
   17 
   18 ///
   19 /// ACPI 4.0 Generic Address Space definition
   20 ///
   21 typedef struct {
   22   UINT8   AddressSpaceId;
   23   UINT8   RegisterBitWidth;
   24   UINT8   RegisterBitOffset;
   25   UINT8   AccessSize;
   26   UINT64  Address;
   27 } EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE;
   28 
   29 //
   30 // Generic Address Space Address IDs
   31 //
   32 #define EFI_ACPI_4_0_SYSTEM_MEMORY              0
   33 #define EFI_ACPI_4_0_SYSTEM_IO                  1
   34 #define EFI_ACPI_4_0_PCI_CONFIGURATION_SPACE    2
   35 #define EFI_ACPI_4_0_EMBEDDED_CONTROLLER        3
   36 #define EFI_ACPI_4_0_SMBUS                      4
   37 #define EFI_ACPI_4_0_FUNCTIONAL_FIXED_HARDWARE  0x7F
   38 
   39 //
   40 // Generic Address Space Access Sizes
   41 //
   42 #define EFI_ACPI_4_0_UNDEFINED  0
   43 #define EFI_ACPI_4_0_BYTE       1
   44 #define EFI_ACPI_4_0_WORD       2
   45 #define EFI_ACPI_4_0_DWORD      3
   46 #define EFI_ACPI_4_0_QWORD      4
   47 
   48 //
   49 // ACPI 4.0 table structures
   50 //
   51 
   52 ///
   53 /// Root System Description Pointer Structure
   54 ///
   55 typedef struct {
   56   UINT64  Signature;
   57   UINT8   Checksum;
   58   UINT8   OemId[6];
   59   UINT8   Revision;
   60   UINT32  RsdtAddress;
   61   UINT32  Length;
   62   UINT64  XsdtAddress;
   63   UINT8   ExtendedChecksum;
   64   UINT8   Reserved[3];
   65 } EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
   66 
   67 ///
   68 /// RSD_PTR Revision (as defined in ACPI 4.0b spec.)
   69 ///
   70 #define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02  ///< ACPISpec (Revision 4.0a) says current value is 2
   71 
   72 ///
   73 /// Common table header, this prefaces all ACPI tables, including FACS, but
   74 /// excluding the RSD PTR structure
   75 ///
   76 typedef struct {
   77   UINT32  Signature;
   78   UINT32  Length;
   79 } EFI_ACPI_4_0_COMMON_HEADER;
   80 
   81 //
   82 // Root System Description Table
   83 // No definition needed as it is a common description table header, the same with
   84 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
   85 //
   86 
   87 ///
   88 /// RSDT Revision (as defined in ACPI 4.0 spec.)
   89 ///
   90 #define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
   91 
   92 //
   93 // Extended System Description Table
   94 // No definition needed as it is a common description table header, the same with
   95 // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
   96 //
   97 
   98 ///
   99 /// XSDT Revision (as defined in ACPI 4.0 spec.)
  100 ///
  101 #define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
  102 
  103 ///
  104 /// Fixed ACPI Description Table Structure (FADT)
  105 ///
  106 typedef struct {
  107   EFI_ACPI_DESCRIPTION_HEADER             Header;
  108   UINT32                                  FirmwareCtrl;
  109   UINT32                                  Dsdt;
  110   UINT8                                   Reserved0;
  111   UINT8                                   PreferredPmProfile;
  112   UINT16                                  SciInt;
  113   UINT32                                  SmiCmd;
  114   UINT8                                   AcpiEnable;
  115   UINT8                                   AcpiDisable;
  116   UINT8                                   S4BiosReq;
  117   UINT8                                   PstateCnt;
  118   UINT32                                  Pm1aEvtBlk;
  119   UINT32                                  Pm1bEvtBlk;
  120   UINT32                                  Pm1aCntBlk;
  121   UINT32                                  Pm1bCntBlk;
  122   UINT32                                  Pm2CntBlk;
  123   UINT32                                  PmTmrBlk;
  124   UINT32                                  Gpe0Blk;
  125   UINT32                                  Gpe1Blk;
  126   UINT8                                   Pm1EvtLen;
  127   UINT8                                   Pm1CntLen;
  128   UINT8                                   Pm2CntLen;
  129   UINT8                                   PmTmrLen;
  130   UINT8                                   Gpe0BlkLen;
  131   UINT8                                   Gpe1BlkLen;
  132   UINT8                                   Gpe1Base;
  133   UINT8                                   CstCnt;
  134   UINT16                                  PLvl2Lat;
  135   UINT16                                  PLvl3Lat;
  136   UINT16                                  FlushSize;
  137   UINT16                                  FlushStride;
  138   UINT8                                   DutyOffset;
  139   UINT8                                   DutyWidth;
  140   UINT8                                   DayAlrm;
  141   UINT8                                   MonAlrm;
  142   UINT8                                   Century;
  143   UINT16                                  IaPcBootArch;
  144   UINT8                                   Reserved1;
  145   UINT32                                  Flags;
  146   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  ResetReg;
  147   UINT8                                   ResetValue;
  148   UINT8                                   Reserved2[3];
  149   UINT64                                  XFirmwareCtrl;
  150   UINT64                                  XDsdt;
  151   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm1aEvtBlk;
  152   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm1bEvtBlk;
  153   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm1aCntBlk;
  154   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm1bCntBlk;
  155   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPm2CntBlk;
  156   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XPmTmrBlk;
  157   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XGpe0Blk;
  158   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  XGpe1Blk;
  159 } EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE;
  160 
  161 ///
  162 /// FADT Version (as defined in ACPI 4.0 spec.)
  163 ///
  164 #define EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION  0x04
  165 
  166 //
  167 // Fixed ACPI Description Table Preferred Power Management Profile
  168 //
  169 #define EFI_ACPI_4_0_PM_PROFILE_UNSPECIFIED         0
  170 #define EFI_ACPI_4_0_PM_PROFILE_DESKTOP             1
  171 #define EFI_ACPI_4_0_PM_PROFILE_MOBILE              2
  172 #define EFI_ACPI_4_0_PM_PROFILE_WORKSTATION         3
  173 #define EFI_ACPI_4_0_PM_PROFILE_ENTERPRISE_SERVER   4
  174 #define EFI_ACPI_4_0_PM_PROFILE_SOHO_SERVER         5
  175 #define EFI_ACPI_4_0_PM_PROFILE_APPLIANCE_PC        6
  176 #define EFI_ACPI_4_0_PM_PROFILE_PERFORMANCE_SERVER  7
  177 
  178 //
  179 // Fixed ACPI Description Table Boot Architecture Flags
  180 // All other bits are reserved and must be set to 0.
  181 //
  182 #define EFI_ACPI_4_0_LEGACY_DEVICES              BIT0
  183 #define EFI_ACPI_4_0_8042                        BIT1
  184 #define EFI_ACPI_4_0_VGA_NOT_PRESENT             BIT2
  185 #define EFI_ACPI_4_0_MSI_NOT_SUPPORTED           BIT3
  186 #define EFI_ACPI_4_0_PCIE_ASPM_CONTROLS          BIT4
  187 
  188 //
  189 // Fixed ACPI Description Table Fixed Feature Flags
  190 // All other bits are reserved and must be set to 0.
  191 //
  192 #define EFI_ACPI_4_0_WBINVD                                 BIT0
  193 #define EFI_ACPI_4_0_WBINVD_FLUSH                           BIT1
  194 #define EFI_ACPI_4_0_PROC_C1                                BIT2
  195 #define EFI_ACPI_4_0_P_LVL2_UP                              BIT3
  196 #define EFI_ACPI_4_0_PWR_BUTTON                             BIT4
  197 #define EFI_ACPI_4_0_SLP_BUTTON                             BIT5
  198 #define EFI_ACPI_4_0_FIX_RTC                                BIT6
  199 #define EFI_ACPI_4_0_RTC_S4                                 BIT7
  200 #define EFI_ACPI_4_0_TMR_VAL_EXT                            BIT8
  201 #define EFI_ACPI_4_0_DCK_CAP                                BIT9
  202 #define EFI_ACPI_4_0_RESET_REG_SUP                          BIT10
  203 #define EFI_ACPI_4_0_SEALED_CASE                            BIT11
  204 #define EFI_ACPI_4_0_HEADLESS                               BIT12
  205 #define EFI_ACPI_4_0_CPU_SW_SLP                             BIT13
  206 #define EFI_ACPI_4_0_PCI_EXP_WAK                            BIT14
  207 #define EFI_ACPI_4_0_USE_PLATFORM_CLOCK                     BIT15
  208 #define EFI_ACPI_4_0_S4_RTC_STS_VALID                       BIT16
  209 #define EFI_ACPI_4_0_REMOTE_POWER_ON_CAPABLE                BIT17
  210 #define EFI_ACPI_4_0_FORCE_APIC_CLUSTER_MODEL               BIT18
  211 #define EFI_ACPI_4_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE   BIT19
  212 
  213 ///
  214 /// Firmware ACPI Control Structure
  215 ///
  216 typedef struct {
  217   UINT32  Signature;
  218   UINT32  Length;
  219   UINT32  HardwareSignature;
  220   UINT32  FirmwareWakingVector;
  221   UINT32  GlobalLock;
  222   UINT32  Flags;
  223   UINT64  XFirmwareWakingVector;
  224   UINT8   Version;
  225   UINT8   Reserved0[3];
  226   UINT32  OspmFlags;
  227   UINT8   Reserved1[24];
  228 } EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
  229 
  230 ///
  231 /// FACS Version (as defined in ACPI 4.0 spec.)
  232 ///
  233 #define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION  0x02
  234 
  235 ///
  236 /// Firmware Control Structure Feature Flags
  237 /// All other bits are reserved and must be set to 0.
  238 ///
  239 #define EFI_ACPI_4_0_S4BIOS_F                     BIT0
  240 #define EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F       BIT1
  241 
  242 ///
  243 /// OSPM Enabled Firmware Control Structure Flags
  244 /// All other bits are reserved and must be set to 0.
  245 ///
  246 #define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F           BIT0
  247 
  248 //
  249 // Differentiated System Description Table,
  250 // Secondary System Description Table
  251 // and Persistent System Description Table,
  252 // no definition needed as they are common description table header, the same with
  253 // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
  254 //
  255 #define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION   0x02
  256 #define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION        0x02
  257 
  258 ///
  259 /// Multiple APIC Description Table header definition.  The rest of the table
  260 /// must be defined in a platform specific manner.
  261 ///
  262 typedef struct {
  263   EFI_ACPI_DESCRIPTION_HEADER Header;
  264   UINT32                      LocalApicAddress;
  265   UINT32                      Flags;
  266 } EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
  267 
  268 ///
  269 /// MADT Revision (as defined in ACPI 4.0 spec.)
  270 ///
  271 #define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03
  272 
  273 ///
  274 /// Multiple APIC Flags
  275 /// All other bits are reserved and must be set to 0.
  276 ///
  277 #define EFI_ACPI_4_0_PCAT_COMPAT         BIT0
  278 
  279 //
  280 // Multiple APIC Description Table APIC structure types
  281 // All other values between 0x0B an 0xFF are reserved and
  282 // will be ignored by OSPM.
  283 //
  284 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC           0x00
  285 #define EFI_ACPI_4_0_IO_APIC                        0x01
  286 #define EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE      0x02
  287 #define EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE  0x03
  288 #define EFI_ACPI_4_0_LOCAL_APIC_NMI                 0x04
  289 #define EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE    0x05
  290 #define EFI_ACPI_4_0_IO_SAPIC                       0x06
  291 #define EFI_ACPI_4_0_LOCAL_SAPIC                    0x07
  292 #define EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES     0x08
  293 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC         0x09
  294 #define EFI_ACPI_4_0_LOCAL_X2APIC_NMI               0x0A
  295 
  296 //
  297 // APIC Structure Definitions
  298 //
  299 
  300 ///
  301 /// Processor Local APIC Structure Definition
  302 ///
  303 typedef struct {
  304   UINT8   Type;
  305   UINT8   Length;
  306   UINT8   AcpiProcessorId;
  307   UINT8   ApicId;
  308   UINT32  Flags;
  309 } EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
  310 
  311 ///
  312 /// Local APIC Flags.  All other bits are reserved and must be 0.
  313 ///
  314 #define EFI_ACPI_4_0_LOCAL_APIC_ENABLED        BIT0
  315 
  316 ///
  317 /// IO APIC Structure
  318 ///
  319 typedef struct {
  320   UINT8   Type;
  321   UINT8   Length;
  322   UINT8   IoApicId;
  323   UINT8   Reserved;
  324   UINT32  IoApicAddress;
  325   UINT32  GlobalSystemInterruptBase;
  326 } EFI_ACPI_4_0_IO_APIC_STRUCTURE;
  327 
  328 ///
  329 /// Interrupt Source Override Structure
  330 ///
  331 typedef struct {
  332   UINT8   Type;
  333   UINT8   Length;
  334   UINT8   Bus;
  335   UINT8   Source;
  336   UINT32  GlobalSystemInterrupt;
  337   UINT16  Flags;
  338 } EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
  339 
  340 ///
  341 /// Platform Interrupt Sources Structure Definition
  342 ///
  343 typedef struct {
  344   UINT8   Type;
  345   UINT8   Length;
  346   UINT16  Flags;
  347   UINT8   InterruptType;
  348   UINT8   ProcessorId;
  349   UINT8   ProcessorEid;
  350   UINT8   IoSapicVector;
  351   UINT32  GlobalSystemInterrupt;
  352   UINT32  PlatformInterruptSourceFlags;
  353   UINT8   CpeiProcessorOverride;
  354   UINT8   Reserved[31];
  355 } EFI_ACPI_4_0_PLATFORM_INTERRUPT_APIC_STRUCTURE;
  356 
  357 //
  358 // MPS INTI flags.
  359 // All other bits are reserved and must be set to 0.
  360 //
  361 #define EFI_ACPI_4_0_POLARITY      (3 << 0)
  362 #define EFI_ACPI_4_0_TRIGGER_MODE  (3 << 2)
  363 
  364 ///
  365 /// Non-Maskable Interrupt Source Structure
  366 ///
  367 typedef struct {
  368   UINT8   Type;
  369   UINT8   Length;
  370   UINT16  Flags;
  371   UINT32  GlobalSystemInterrupt;
  372 } EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
  373 
  374 ///
  375 /// Local APIC NMI Structure
  376 ///
  377 typedef struct {
  378   UINT8   Type;
  379   UINT8   Length;
  380   UINT8   AcpiProcessorId;
  381   UINT16  Flags;
  382   UINT8   LocalApicLint;
  383 } EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE;
  384 
  385 ///
  386 /// Local APIC Address Override Structure
  387 ///
  388 typedef struct {
  389   UINT8   Type;
  390   UINT8   Length;
  391   UINT16  Reserved;
  392   UINT64  LocalApicAddress;
  393 } EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE;
  394 
  395 ///
  396 /// IO SAPIC Structure
  397 ///
  398 typedef struct {
  399   UINT8   Type;
  400   UINT8   Length;
  401   UINT8   IoApicId;
  402   UINT8   Reserved;
  403   UINT32  GlobalSystemInterruptBase;
  404   UINT64  IoSapicAddress;
  405 } EFI_ACPI_4_0_IO_SAPIC_STRUCTURE;
  406 
  407 ///
  408 /// Local SAPIC Structure
  409 /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String
  410 ///
  411 typedef struct {
  412   UINT8   Type;
  413   UINT8   Length;
  414   UINT8   AcpiProcessorId;
  415   UINT8   LocalSapicId;
  416   UINT8   LocalSapicEid;
  417   UINT8   Reserved[3];
  418   UINT32  Flags;
  419   UINT32  ACPIProcessorUIDValue;
  420 } EFI_ACPI_4_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE;
  421 
  422 ///
  423 /// Platform Interrupt Sources Structure
  424 ///
  425 typedef struct {
  426   UINT8   Type;
  427   UINT8   Length;
  428   UINT16  Flags;
  429   UINT8   InterruptType;
  430   UINT8   ProcessorId;
  431   UINT8   ProcessorEid;
  432   UINT8   IoSapicVector;
  433   UINT32  GlobalSystemInterrupt;
  434   UINT32  PlatformInterruptSourceFlags;
  435 } EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE;
  436 
  437 ///
  438 /// Platform Interrupt Source Flags.
  439 /// All other bits are reserved and must be set to 0.
  440 ///
  441 #define EFI_ACPI_4_0_CPEI_PROCESSOR_OVERRIDE          BIT0
  442 
  443 ///
  444 /// Processor Local x2APIC Structure Definition
  445 ///
  446 typedef struct {
  447   UINT8   Type;
  448   UINT8   Length;
  449   UINT8   Reserved[2];
  450   UINT32  X2ApicId;
  451   UINT32  Flags;
  452   UINT32  AcpiProcessorUid;
  453 } EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE;
  454 
  455 ///
  456 /// Local x2APIC NMI Structure
  457 ///
  458 typedef struct {
  459   UINT8   Type;
  460   UINT8   Length;
  461   UINT16  Flags;
  462   UINT32  AcpiProcessorUid;
  463   UINT8   LocalX2ApicLint;
  464   UINT8   Reserved[3];
  465 } EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE;
  466 
  467 ///
  468 /// Smart Battery Description Table (SBST)
  469 ///
  470 typedef struct {
  471   EFI_ACPI_DESCRIPTION_HEADER Header;
  472   UINT32                      WarningEnergyLevel;
  473   UINT32                      LowEnergyLevel;
  474   UINT32                      CriticalEnergyLevel;
  475 } EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE;
  476 
  477 ///
  478 /// SBST Version (as defined in ACPI 4.0 spec.)
  479 ///
  480 #define EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01
  481 
  482 ///
  483 /// Embedded Controller Boot Resources Table (ECDT)
  484 /// The table is followed by a null terminated ASCII string that contains
  485 /// a fully qualified reference to the name space object.
  486 ///
  487 typedef struct {
  488   EFI_ACPI_DESCRIPTION_HEADER             Header;
  489   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  EcControl;
  490   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE  EcData;
  491   UINT32                                  Uid;
  492   UINT8                                   GpeBit;
  493 } EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE;
  494 
  495 ///
  496 /// ECDT Version (as defined in ACPI 4.0 spec.)
  497 ///
  498 #define EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION  0x01
  499 
  500 ///
  501 /// System Resource Affinity Table (SRAT.  The rest of the table
  502 /// must be defined in a platform specific manner.
  503 ///
  504 typedef struct {
  505   EFI_ACPI_DESCRIPTION_HEADER Header;
  506   UINT32                      Reserved1;  ///< Must be set to 1
  507   UINT64                      Reserved2;
  508 } EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER;
  509 
  510 ///
  511 /// SRAT Version (as defined in ACPI 4.0 spec.)
  512 ///
  513 #define EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_REVISION  0x03
  514 
  515 //
  516 // SRAT structure types.
  517 // All other values between 0x03 an 0xFF are reserved and
  518 // will be ignored by OSPM.
  519 //
  520 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY  0x00
  521 #define EFI_ACPI_4_0_MEMORY_AFFINITY                      0x01
  522 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY      0x02
  523 
  524 ///
  525 /// Processor Local APIC/SAPIC Affinity Structure Definition
  526 ///
  527 typedef struct {
  528   UINT8   Type;
  529   UINT8   Length;
  530   UINT8   ProximityDomain7To0;
  531   UINT8   ApicId;
  532   UINT32  Flags;
  533   UINT8   LocalSapicEid;
  534   UINT8   ProximityDomain31To8[3];
  535   UINT32  ClockDomain;
  536 } EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE;
  537 
  538 ///
  539 /// Local APIC/SAPIC Flags.  All other bits are reserved and must be 0.
  540 ///
  541 #define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0)
  542 
  543 ///
  544 /// Memory Affinity Structure Definition
  545 ///
  546 typedef struct {
  547   UINT8   Type;
  548   UINT8   Length;
  549   UINT32  ProximityDomain;
  550   UINT16  Reserved1;
  551   UINT32  AddressBaseLow;
  552   UINT32  AddressBaseHigh;
  553   UINT32  LengthLow;
  554   UINT32  LengthHigh;
  555   UINT32  Reserved2;
  556   UINT32  Flags;
  557   UINT64  Reserved3;
  558 } EFI_ACPI_4_0_MEMORY_AFFINITY_STRUCTURE;
  559 
  560 //
  561 // Memory Flags.  All other bits are reserved and must be 0.
  562 //
  563 #define EFI_ACPI_4_0_MEMORY_ENABLED       (1 << 0)
  564 #define EFI_ACPI_4_0_MEMORY_HOT_PLUGGABLE (1 << 1)
  565 #define EFI_ACPI_4_0_MEMORY_NONVOLATILE   (1 << 2)
  566 
  567 ///
  568 /// Processor Local x2APIC Affinity Structure Definition
  569 ///
  570 typedef struct {
  571   UINT8   Type;
  572   UINT8   Length;
  573   UINT8   Reserved1[2];
  574   UINT32  ProximityDomain;
  575   UINT32  X2ApicId;
  576   UINT32  Flags;
  577   UINT32  ClockDomain;
  578   UINT8   Reserved2[4];
  579 } EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE;
  580 
  581 ///
  582 /// System Locality Distance Information Table (SLIT).
  583 /// The rest of the table is a matrix.
  584 ///
  585 typedef struct {
  586   EFI_ACPI_DESCRIPTION_HEADER Header;
  587   UINT64                      NumberOfSystemLocalities;
  588 } EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER;
  589 
  590 ///
  591 /// SLIT Version (as defined in ACPI 4.0 spec.)
  592 ///
  593 #define EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_REVISION  0x01
  594 
  595 ///
  596 /// Corrected Platform Error Polling Table (CPEP)
  597 ///
  598 typedef struct {
  599   EFI_ACPI_DESCRIPTION_HEADER Header;
  600   UINT8                       Reserved[8];
  601 } EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER;
  602 
  603 ///
  604 /// CPEP Version (as defined in ACPI 4.0 spec.)
  605 ///
  606 #define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01
  607 
  608 //
  609 // CPEP processor structure types.
  610 //
  611 #define EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC  0x00
  612 
  613 ///
  614 /// Corrected Platform Error Polling Processor Structure Definition
  615 ///
  616 typedef struct {
  617   UINT8   Type;
  618   UINT8   Length;
  619   UINT8   ProcessorId;
  620   UINT8   ProcessorEid;
  621   UINT32  PollingInterval;
  622 } EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE;
  623 
  624 ///
  625 /// Maximum System Characteristics Table (MSCT)
  626 ///
  627 typedef struct {
  628   EFI_ACPI_DESCRIPTION_HEADER Header;
  629   UINT32                      OffsetProxDomInfo;
  630   UINT32                      MaximumNumberOfProximityDomains;
  631   UINT32                      MaximumNumberOfClockDomains;
  632   UINT64                      MaximumPhysicalAddress;
  633 } EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER;
  634 
  635 ///
  636 /// MSCT Version (as defined in ACPI 4.0 spec.)
  637 ///
  638 #define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01
  639 
  640 ///
  641 /// Maximum Proximity Domain Information Structure Definition
  642 ///
  643 typedef struct {
  644   UINT8   Revision;
  645   UINT8   Length;
  646   UINT32  ProximityDomainRangeLow;
  647   UINT32  ProximityDomainRangeHigh;
  648   UINT32  MaximumProcessorCapacity;
  649   UINT64  MaximumMemoryCapacity;
  650 } EFI_ACPI_4_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE;
  651 
  652 ///
  653 /// Boot Error Record Table (BERT)
  654 ///
  655 typedef struct {
  656   EFI_ACPI_DESCRIPTION_HEADER Header;
  657   UINT32                      BootErrorRegionLength;
  658   UINT64                      BootErrorRegion;
  659 } EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_HEADER;
  660 
  661 ///
  662 /// BERT Version (as defined in ACPI 4.0 spec.)
  663 ///
  664 #define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01
  665 
  666 ///
  667 /// Boot Error Region Block Status Definition
  668 ///
  669 typedef struct {
  670   UINT32       UncorrectableErrorValid:1;
  671   UINT32       CorrectableErrorValid:1;
  672   UINT32       MultipleUncorrectableErrors:1;
  673   UINT32       MultipleCorrectableErrors:1;
  674   UINT32       ErrorDataEntryCount:10;
  675   UINT32       Reserved:18;
  676 } EFI_ACPI_4_0_ERROR_BLOCK_STATUS;
  677 
  678 ///
  679 /// Boot Error Region Definition
  680 ///
  681 typedef struct {
  682   EFI_ACPI_4_0_ERROR_BLOCK_STATUS              BlockStatus;
  683   UINT32                                       RawDataOffset;
  684   UINT32                                       RawDataLength;
  685   UINT32                                       DataLength;
  686   UINT32                                       ErrorSeverity;
  687 } EFI_ACPI_4_0_BOOT_ERROR_REGION_STRUCTURE;
  688 
  689 //
  690 // Boot Error Severity types
  691 //
  692 #define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTABLE  0x00
  693 #define EFI_ACPI_4_0_ERROR_SEVERITY_FATAL        0x01
  694 #define EFI_ACPI_4_0_ERROR_SEVERITY_CORRECTED    0x02
  695 #define EFI_ACPI_4_0_ERROR_SEVERITY_NONE         0x03
  696 
  697 ///
  698 /// Generic Error Data Entry Definition
  699 ///
  700 typedef struct {
  701   UINT8    SectionType[16];
  702   UINT32   ErrorSeverity;
  703   UINT16   Revision;
  704   UINT8    ValidationBits;
  705   UINT8    Flags;
  706   UINT32   ErrorDataLength;
  707   UINT8    FruId[16];
  708   UINT8    FruText[20];
  709 } EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE;
  710 
  711 ///
  712 /// Generic Error Data Entry Version (as defined in ACPI 4.0 spec.)
  713 ///
  714 #define EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_REVISION  0x0201
  715 
  716 ///
  717 /// HEST - Hardware Error Source Table
  718 ///
  719 typedef struct {
  720   EFI_ACPI_DESCRIPTION_HEADER Header;
  721   UINT32                      ErrorSourceCount;
  722 } EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER;
  723 
  724 ///
  725 /// HEST Version (as defined in ACPI 4.0 spec.)
  726 ///
  727 #define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01
  728 
  729 //
  730 // Error Source structure types.
  731 //
  732 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION  0x00
  733 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK  0x01
  734 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR                0x02
  735 #define EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER                  0x06
  736 #define EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER                     0x07
  737 #define EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER                     0x08
  738 #define EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR                     0x09
  739 
  740 //
  741 // Error Source structure flags.
  742 //
  743 #define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST       (1 << 0)
  744 #define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_GLOBAL               (1 << 1)
  745 
  746 ///
  747 /// IA-32 Architecture Machine Check Exception Structure Definition
  748 ///
  749 typedef struct {
  750   UINT16  Type;
  751   UINT16  SourceId;
  752   UINT8   Reserved0[2];
  753   UINT8   Flags;
  754   UINT8   Enabled;
  755   UINT32  NumberOfRecordsToPreAllocate;
  756   UINT32  MaxSectionsPerRecord;
  757   UINT64  GlobalCapabilityInitData;
  758   UINT64  GlobalControlInitData;
  759   UINT8   NumberOfHardwareBanks;
  760   UINT8   Reserved1[7];
  761 } EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE;
  762 
  763 ///
  764 /// IA-32 Architecture Machine Check Bank Structure Definition
  765 ///
  766 typedef struct {
  767   UINT8   BankNumber;
  768   UINT8   ClearStatusOnInitialization;
  769   UINT8   StatusDataFormat;
  770   UINT8   Reserved0;
  771   UINT32  ControlRegisterMsrAddress;
  772   UINT64  ControlInitData;
  773   UINT32  StatusRegisterMsrAddress;
  774   UINT32  AddressRegisterMsrAddress;
  775   UINT32  MiscRegisterMsrAddress;
  776 } EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE;
  777 
  778 ///
  779 /// IA-32 Architecture Machine Check Bank Structure MCA data format
  780 ///
  781 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32      0x00
  782 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64   0x01
  783 #define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64     0x02
  784 
  785 //
  786 // Hardware Error Notification types. All other values are reserved
  787 //
  788 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_POLLED                0x00
  789 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT    0x01
  790 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT       0x02
  791 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_SCI                   0x03
  792 #define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_NMI                   0x04
  793 
  794 ///
  795 /// Hardware Error Notification Configuration Write Enable Structure Definition
  796 ///
  797 typedef struct {
  798   UINT16    Type:1;
  799   UINT16    PollInterval:1;
  800   UINT16    SwitchToPollingThresholdValue:1;
  801   UINT16    SwitchToPollingThresholdWindow:1;
  802   UINT16    ErrorThresholdValue:1;
  803   UINT16    ErrorThresholdWindow:1;
  804   UINT16    Reserved:10;
  805 } EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE;
  806 
  807 ///
  808 /// Hardware Error Notification Structure Definition
  809 ///
  810 typedef struct {
  811   UINT8                                                                          Type;
  812   UINT8                                                                          Length;
  813   EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE  ConfigurationWriteEnable;
  814   UINT32                                                                         PollInterval;
  815   UINT32                                                                         Vector;
  816   UINT32                                                                         SwitchToPollingThresholdValue;
  817   UINT32                                                                         SwitchToPollingThresholdWindow;
  818   UINT32                                                                         ErrorThresholdValue;
  819   UINT32                                                                         ErrorThresholdWindow;
  820 } EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE;
  821 
  822 ///
  823 /// IA-32 Architecture Corrected Machine Check Structure Definition
  824 ///
  825 typedef struct {
  826   UINT16                                                 Type;
  827   UINT16                                                 SourceId;
  828   UINT8                                                  Reserved0[2];
  829   UINT8                                                  Flags;
  830   UINT8                                                  Enabled;
  831   UINT32                                                 NumberOfRecordsToPreAllocate;
  832   UINT32                                                 MaxSectionsPerRecord;
  833   EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE     NotificationStructure;
  834   UINT8                                                  NumberOfHardwareBanks;
  835   UINT8                                                  Reserved1[3];
  836 } EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE;
  837 
  838 ///
  839 /// IA-32 Architecture NMI Error Structure Definition
  840 ///
  841 typedef struct {
  842   UINT16  Type;
  843   UINT16  SourceId;
  844   UINT8   Reserved0[2];
  845   UINT32  NumberOfRecordsToPreAllocate;
  846   UINT32  MaxSectionsPerRecord;
  847   UINT32  MaxRawDataLength;
  848 } EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE;
  849 
  850 ///
  851 /// PCI Express Root Port AER Structure Definition
  852 ///
  853 typedef struct {
  854   UINT16  Type;
  855   UINT16  SourceId;
  856   UINT8   Reserved0[2];
  857   UINT8   Flags;
  858   UINT8   Enabled;
  859   UINT32  NumberOfRecordsToPreAllocate;
  860   UINT32  MaxSectionsPerRecord;
  861   UINT32  Bus;
  862   UINT16  Device;
  863   UINT16  Function;
  864   UINT16  DeviceControl;
  865   UINT8   Reserved1[2];
  866   UINT32  UncorrectableErrorMask;
  867   UINT32  UncorrectableErrorSeverity;
  868   UINT32  CorrectableErrorMask;
  869   UINT32  AdvancedErrorCapabilitiesAndControl;
  870   UINT32  RootErrorCommand;
  871 } EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE;
  872 
  873 ///
  874 /// PCI Express Device AER Structure Definition
  875 ///
  876 typedef struct {
  877   UINT16  Type;
  878   UINT16  SourceId;
  879   UINT8   Reserved0[2];
  880   UINT8   Flags;
  881   UINT8   Enabled;
  882   UINT32  NumberOfRecordsToPreAllocate;
  883   UINT32  MaxSectionsPerRecord;
  884   UINT32  Bus;
  885   UINT16  Device;
  886   UINT16  Function;
  887   UINT16  DeviceControl;
  888   UINT8   Reserved1[2];
  889   UINT32  UncorrectableErrorMask;
  890   UINT32  UncorrectableErrorSeverity;
  891   UINT32  CorrectableErrorMask;
  892   UINT32  AdvancedErrorCapabilitiesAndControl;
  893 } EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE;
  894 
  895 ///
  896 /// PCI Express Bridge AER Structure Definition
  897 ///
  898 typedef struct {
  899   UINT16  Type;
  900   UINT16  SourceId;
  901   UINT8   Reserved0[2];
  902   UINT8   Flags;
  903   UINT8   Enabled;
  904   UINT32  NumberOfRecordsToPreAllocate;
  905   UINT32  MaxSectionsPerRecord;
  906   UINT32  Bus;
  907   UINT16  Device;
  908   UINT16  Function;
  909   UINT16  DeviceControl;
  910   UINT8   Reserved1[2];
  911   UINT32  UncorrectableErrorMask;
  912   UINT32  UncorrectableErrorSeverity;
  913   UINT32  CorrectableErrorMask;
  914   UINT32  AdvancedErrorCapabilitiesAndControl;
  915   UINT32  SecondaryUncorrectableErrorMask;
  916   UINT32  SecondaryUncorrectableErrorSeverity;
  917   UINT32  SecondaryAdvancedErrorCapabilitiesAndControl;
  918 } EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE;
  919 
  920 ///
  921 /// Generic Hardware Error Source Structure Definition
  922 ///
  923 typedef struct {
  924   UINT16                                                 Type;
  925   UINT16                                                 SourceId;
  926   UINT16                                                 RelatedSourceId;
  927   UINT8                                                  Flags;
  928   UINT8                                                  Enabled;
  929   UINT32                                                 NumberOfRecordsToPreAllocate;
  930   UINT32                                                 MaxSectionsPerRecord;
  931   UINT32                                                 MaxRawDataLength;
  932   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE                 ErrorStatusAddress;
  933   EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE     NotificationStructure;
  934   UINT32                                                 ErrorStatusBlockLength;
  935 } EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE;
  936 
  937 ///
  938 /// Generic Error Status Definition
  939 ///
  940 typedef struct {
  941   EFI_ACPI_4_0_ERROR_BLOCK_STATUS              BlockStatus;
  942   UINT32                                       RawDataOffset;
  943   UINT32                                       RawDataLength;
  944   UINT32                                       DataLength;
  945   UINT32                                       ErrorSeverity;
  946 } EFI_ACPI_4_0_GENERIC_ERROR_STATUS_STRUCTURE;
  947 
  948 ///
  949 /// ERST - Error Record Serialization Table
  950 ///
  951 typedef struct {
  952   EFI_ACPI_DESCRIPTION_HEADER Header;
  953   UINT32                      SerializationHeaderSize;
  954   UINT8                       Reserved0[4];
  955   UINT32                      InstructionEntryCount;
  956 } EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER;
  957 
  958 ///
  959 /// ERST Version (as defined in ACPI 4.0 spec.)
  960 ///
  961 #define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01
  962 
  963 ///
  964 /// ERST Serialization Actions
  965 ///
  966 #define EFI_ACPI_4_0_ERST_BEGIN_WRITE_OPERATION                    0x00
  967 #define EFI_ACPI_4_0_ERST_BEGIN_READ_OPERATION                     0x01
  968 #define EFI_ACPI_4_0_ERST_BEGIN_CLEAR_OPERATION                    0x02
  969 #define EFI_ACPI_4_0_ERST_END_OPERATION                            0x03
  970 #define EFI_ACPI_4_0_ERST_SET_RECORD_OFFSET                        0x04
  971 #define EFI_ACPI_4_0_ERST_EXECUTE_OPERATION                        0x05
  972 #define EFI_ACPI_4_0_ERST_CHECK_BUSY_STATUS                        0x06
  973 #define EFI_ACPI_4_0_ERST_GET_COMMAND_STATUS                       0x07
  974 #define EFI_ACPI_4_0_ERST_GET_RECORD_IDENTIFIER                    0x08
  975 #define EFI_ACPI_4_0_ERST_SET_RECORD_IDENTIFIER                    0x09
  976 #define EFI_ACPI_4_0_ERST_GET_RECORD_COUNT                         0x0A
  977 #define EFI_ACPI_4_0_ERST_BEGIN_DUMMY_WRITE_OPERATION              0x0B
  978 #define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE              0x0D
  979 #define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH       0x0E
  980 #define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES   0x0F
  981 
  982 ///
  983 /// ERST Action Command Status
  984 ///
  985 #define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS                           0x00
  986 #define EFI_ACPI_4_0_EINJ_STATUS_NOT_ENOUGH_SPACE                  0x01
  987 #define EFI_ACPI_4_0_EINJ_STATUS_HARDWARE_NOT_AVAILABLE            0x02
  988 #define EFI_ACPI_4_0_EINJ_STATUS_FAILED                            0x03
  989 #define EFI_ACPI_4_0_EINJ_STATUS_RECORD_STORE_EMPTY                0x04
  990 #define EFI_ACPI_4_0_EINJ_STATUS_RECORD_NOT_FOUND                  0x05
  991 
  992 ///
  993 /// ERST Serialization Instructions
  994 ///
  995 #define EFI_ACPI_4_0_ERST_READ_REGISTER                            0x00
  996 #define EFI_ACPI_4_0_ERST_READ_REGISTER_VALUE                      0x01
  997 #define EFI_ACPI_4_0_ERST_WRITE_REGISTER                           0x02
  998 #define EFI_ACPI_4_0_ERST_WRITE_REGISTER_VALUE                     0x03
  999 #define EFI_ACPI_4_0_ERST_NOOP                                     0x04
 1000 #define EFI_ACPI_4_0_ERST_LOAD_VAR1                                0x05
 1001 #define EFI_ACPI_4_0_ERST_LOAD_VAR2                                0x06
 1002 #define EFI_ACPI_4_0_ERST_STORE_VAR1                               0x07
 1003 #define EFI_ACPI_4_0_ERST_ADD                                      0x08
 1004 #define EFI_ACPI_4_0_ERST_SUBTRACT                                 0x09
 1005 #define EFI_ACPI_4_0_ERST_ADD_VALUE                                0x0A
 1006 #define EFI_ACPI_4_0_ERST_SUBTRACT_VALUE                           0x0B
 1007 #define EFI_ACPI_4_0_ERST_STALL                                    0x0C
 1008 #define EFI_ACPI_4_0_ERST_STALL_WHILE_TRUE                         0x0D
 1009 #define EFI_ACPI_4_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE            0x0E
 1010 #define EFI_ACPI_4_0_ERST_GOTO                                     0x0F
 1011 #define EFI_ACPI_4_0_ERST_SET_SRC_ADDRESS_BASE                     0x10
 1012 #define EFI_ACPI_4_0_ERST_SET_DST_ADDRESS_BASE                     0x11
 1013 #define EFI_ACPI_4_0_ERST_MOVE_DATA                                0x12
 1014 
 1015 ///
 1016 /// ERST Instruction Flags
 1017 ///
 1018 #define EFI_ACPI_4_0_ERST_PRESERVE_REGISTER                        0x01
 1019 
 1020 ///
 1021 /// ERST Serialization Instruction Entry
 1022 ///
 1023 typedef struct {
 1024   UINT8                                    SerializationAction;
 1025   UINT8                                    Instruction;
 1026   UINT8                                    Flags;
 1027   UINT8                                    Reserved0;
 1028   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE   RegisterRegion;
 1029   UINT64                                   Value;
 1030   UINT64                                   Mask;
 1031 } EFI_ACPI_4_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY;
 1032 
 1033 ///
 1034 /// EINJ - Error Injection Table
 1035 ///
 1036 typedef struct {
 1037   EFI_ACPI_DESCRIPTION_HEADER Header;
 1038   UINT32                      InjectionHeaderSize;
 1039   UINT8                       InjectionFlags;
 1040   UINT8                       Reserved0[3];
 1041   UINT32                      InjectionEntryCount;
 1042 } EFI_ACPI_4_0_ERROR_INJECTION_TABLE_HEADER;
 1043 
 1044 ///
 1045 /// EINJ Version (as defined in ACPI 4.0 spec.)
 1046 ///
 1047 #define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_REVISION 0x01
 1048 
 1049 ///
 1050 /// EINJ Error Injection Actions
 1051 ///
 1052 #define EFI_ACPI_4_0_EINJ_BEGIN_INJECTION_OPERATION                0x00
 1053 #define EFI_ACPI_4_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE           0x01
 1054 #define EFI_ACPI_4_0_EINJ_SET_ERROR_TYPE                           0x02
 1055 #define EFI_ACPI_4_0_EINJ_GET_ERROR_TYPE                           0x03
 1056 #define EFI_ACPI_4_0_EINJ_END_OPERATION                            0x04
 1057 #define EFI_ACPI_4_0_EINJ_EXECUTE_OPERATION                        0x05
 1058 #define EFI_ACPI_4_0_EINJ_CHECK_BUSY_STATUS                        0x06
 1059 #define EFI_ACPI_4_0_EINJ_GET_COMMAND_STATUS                       0x07
 1060 #define EFI_ACPI_4_0_EINJ_TRIGGER_ERROR                            0xFF
 1061 
 1062 ///
 1063 /// EINJ Action Command Status
 1064 ///
 1065 #define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS                           0x00
 1066 #define EFI_ACPI_4_0_EINJ_STATUS_UNKNOWN_FAILURE                   0x01
 1067 #define EFI_ACPI_4_0_EINJ_STATUS_INVALID_ACCESS                    0x02
 1068 
 1069 ///
 1070 /// EINJ Error Type Definition
 1071 ///
 1072 #define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_CORRECTABLE                 (1 << 0)
 1073 #define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL      (1 << 1)
 1074 #define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL         (1 << 2)
 1075 #define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_CORRECTABLE                    (1 << 3)
 1076 #define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL         (1 << 4)
 1077 #define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL            (1 << 5)
 1078 #define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE               (1 << 6)
 1079 #define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL    (1 << 7)
 1080 #define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL       (1 << 8)
 1081 #define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_CORRECTABLE                  (1 << 9)
 1082 #define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL       (1 << 10)
 1083 #define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL          (1 << 11)
 1084 
 1085 ///
 1086 /// EINJ Injection Instructions
 1087 ///
 1088 #define EFI_ACPI_4_0_EINJ_READ_REGISTER                            0x00
 1089 #define EFI_ACPI_4_0_EINJ_READ_REGISTER_VALUE                      0x01
 1090 #define EFI_ACPI_4_0_EINJ_WRITE_REGISTER                           0x02
 1091 #define EFI_ACPI_4_0_EINJ_WRITE_REGISTER_VALUE                     0x03
 1092 #define EFI_ACPI_4_0_EINJ_NOOP                                     0x04
 1093 
 1094 ///
 1095 /// EINJ Instruction Flags
 1096 ///
 1097 #define EFI_ACPI_4_0_EINJ_PRESERVE_REGISTER                        0x01
 1098 
 1099 ///
 1100 /// EINJ Injection Instruction Entry
 1101 ///
 1102 typedef struct {
 1103   UINT8                                    InjectionAction;
 1104   UINT8                                    Instruction;
 1105   UINT8                                    Flags;
 1106   UINT8                                    Reserved0;
 1107   EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE   RegisterRegion;
 1108   UINT64                                   Value;
 1109   UINT64                                   Mask;
 1110 } EFI_ACPI_4_0_EINJ_INJECTION_INSTRUCTION_ENTRY;
 1111 
 1112 ///
 1113 /// EINJ Trigger Action Table
 1114 ///
 1115 typedef struct {
 1116   UINT32  HeaderSize;
 1117   UINT32  Revision;
 1118   UINT32  TableSize;
 1119   UINT32  EntryCount;
 1120 } EFI_ACPI_4_0_EINJ_TRIGGER_ACTION_TABLE;
 1121 
 1122 //
 1123 // Known table signatures
 1124 //
 1125 
 1126 ///
 1127 /// "RSD PTR " Root System Description Pointer
 1128 ///
 1129 #define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE  SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
 1130 
 1131 ///
 1132 /// "APIC" Multiple APIC Description Table
 1133 ///
 1134 #define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('A', 'P', 'I', 'C')
 1135 
 1136 ///
 1137 /// "BERT" Boot Error Record Table
 1138 ///
 1139 #define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_SIGNATURE  SIGNATURE_32('B', 'E', 'R', 'T')
 1140 
 1141 ///
 1142 /// "CPEP" Corrected Platform Error Polling Table
 1143 ///
 1144 #define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_SIGNATURE  SIGNATURE_32('C', 'P', 'E', 'P')
 1145 
 1146 ///
 1147 /// "DSDT" Differentiated System Description Table
 1148 ///
 1149 #define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('D', 'S', 'D', 'T')
 1150 
 1151 ///
 1152 /// "ECDT" Embedded Controller Boot Resources Table
 1153 ///
 1154 #define EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE  SIGNATURE_32('E', 'C', 'D', 'T')
 1155 
 1156 ///
 1157 /// "EINJ" Error Injection Table
 1158 ///
 1159 #define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_SIGNATURE  SIGNATURE_32('E', 'I', 'N', 'J')
 1160 
 1161 ///
 1162 /// "ERST" Error Record Serialization Table
 1163 ///
 1164 #define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_SIGNATURE  SIGNATURE_32('E', 'R', 'S', 'T')
 1165 
 1166 ///
 1167 /// "FACP" Fixed ACPI Description Table
 1168 ///
 1169 #define EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'P')
 1170 
 1171 ///
 1172 /// "FACS" Firmware ACPI Control Structure
 1173 ///
 1174 #define EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE  SIGNATURE_32('F', 'A', 'C', 'S')
 1175 
 1176 ///
 1177 /// "HEST" Hardware Error Source Table
 1178 ///
 1179 #define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_SIGNATURE  SIGNATURE_32('H', 'E', 'S', 'T')
 1180 
 1181 ///
 1182 /// "MSCT" Maximum System Characteristics Table
 1183 ///
 1184 #define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_SIGNATURE  SIGNATURE_32('M', 'S', 'C', 'T')
 1185 
 1186 ///
 1187 /// "PSDT" Persistent System Description Table
 1188 ///
 1189 #define EFI_ACPI_4_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('P', 'S', 'D', 'T')
 1190 
 1191 ///
 1192 /// "RSDT" Root System Description Table
 1193 ///
 1194 #define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('R', 'S', 'D', 'T')
 1195 
 1196 ///
 1197 /// "SBST" Smart Battery Specification Table
 1198 ///
 1199 #define EFI_ACPI_4_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'B', 'S', 'T')
 1200 
 1201 ///
 1202 /// "SLIT" System Locality Information Table
 1203 ///
 1204 #define EFI_ACPI_4_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE  SIGNATURE_32('S', 'L', 'I', 'T')
 1205 
 1206 ///
 1207 /// "SRAT" System Resource Affinity Table
 1208 ///
 1209 #define EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_SIGNATURE  SIGNATURE_32('S', 'R', 'A', 'T')
 1210 
 1211 ///
 1212 /// "SSDT" Secondary System Description Table
 1213 ///
 1214 #define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'S', 'D', 'T')
 1215 
 1216 ///
 1217 /// "XSDT" Extended System Description Table
 1218 ///
 1219 #define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('X', 'S', 'D', 'T')
 1220 
 1221 ///
 1222 /// "BOOT" MS Simple Boot Spec
 1223 ///
 1224 #define EFI_ACPI_4_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE  SIGNATURE_32('B', 'O', 'O', 'T')
 1225 
 1226 ///
 1227 /// "DBGP" MS Debug Port Spec
 1228 ///
 1229 #define EFI_ACPI_4_0_DEBUG_PORT_TABLE_SIGNATURE  SIGNATURE_32('D', 'B', 'G', 'P')
 1230 
 1231 ///
 1232 /// "DMAR" DMA Remapping Table
 1233 ///
 1234 #define EFI_ACPI_4_0_DMA_REMAPPING_TABLE_SIGNATURE  SIGNATURE_32('D', 'M', 'A', 'R')
 1235 
 1236 ///
 1237 /// "ETDT" Event Timer Description Table
 1238 ///
 1239 #define EFI_ACPI_4_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('E', 'T', 'D', 'T')
 1240 
 1241 ///
 1242 /// "HPET" IA-PC High Precision Event Timer Table
 1243 ///
 1244 #define EFI_ACPI_4_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE  SIGNATURE_32('H', 'P', 'E', 'T')
 1245 
 1246 ///
 1247 /// "iBFT" iSCSI Boot Firmware Table
 1248 ///
 1249 #define EFI_ACPI_4_0_ISCSI_BOOT_FIRMWARE_TABLE_SIGNATURE  SIGNATURE_32('i', 'B', 'F', 'T')
 1250 
 1251 ///
 1252 /// "IVRS" I/O Virtualization Reporting Structure
 1253 ///
 1254 #define EFI_ACPI_4_0_IO_VIRTUALIZATION_REPORTING_STRUCTURE_SIGNATURE  SIGNATURE_32('I', 'V', 'R', 'S')
 1255 
 1256 ///
 1257 /// "MCFG" PCI Express Memory Mapped Configuration Space Base Address Description Table
 1258 ///
 1259 #define EFI_ACPI_4_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE  SIGNATURE_32('M', 'C', 'F', 'G')
 1260 
 1261 ///
 1262 /// "MCHI" Management Controller Host Interface Table
 1263 ///
 1264 #define EFI_ACPI_4_0_MANAGEMENT_CONTROLLER_HOST_INTERFACE_TABLE_SIGNATURE  SIGNATURE_32('M', 'C', 'H', 'I')
 1265 
 1266 ///
 1267 /// "SPCR" Serial Port Console Redirection Table
 1268 ///
 1269 #define EFI_ACPI_4_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'C', 'R')
 1270 
 1271 ///
 1272 /// "SPMI" Server Platform Management Interface Table
 1273 ///
 1274 #define EFI_ACPI_4_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_TABLE_SIGNATURE  SIGNATURE_32('S', 'P', 'M', 'I')
 1275 
 1276 ///
 1277 /// "TCPA" Trusted Computing Platform Alliance Capabilities Table
 1278 ///
 1279 #define EFI_ACPI_4_0_TRUSTED_COMPUTING_PLATFORM_ALLIANCE_CAPABILITIES_TABLE_SIGNATURE  SIGNATURE_32('T', 'C', 'P', 'A')
 1280 
 1281 ///
 1282 /// "UEFI" UEFI ACPI Data Table
 1283 ///
 1284 #define EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE  SIGNATURE_32('U', 'E', 'F', 'I')
 1285 
 1286 ///
 1287 /// "WAET" Windows ACPI Enlightenment Table
 1288 ///
 1289 #define EFI_ACPI_4_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE  SIGNATURE_32('W', 'A', 'E', 'T')
 1290 
 1291 ///
 1292 /// "WDAT" Watchdog Action Table
 1293 ///
 1294 #define EFI_ACPI_4_0_WATCHDOG_ACTION_TABLE_SIGNATURE  SIGNATURE_32('W', 'D', 'A', 'T')
 1295 
 1296 ///
 1297 /// "WDRT" Watchdog Resource Table
 1298 ///
 1299 #define EFI_ACPI_4_0_WATCHDOG_RESOURCE_TABLE_SIGNATURE  SIGNATURE_32('W', 'D', 'R', 'T')
 1300 
 1301 #pragma pack()
 1302 
 1303 #endif

Cache object: 9fbd3997589c46efc5e164ac7ebc4446


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.