Acpi2_0.h revision 40d841f6a8f84e75409178e19e69b95e01bada0f
1/** @file 2 ACPI 2.0 definitions from the ACPI Specification, revision 2.0 3 4 Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR> 5 6 This program and the accompanying materials are licensed and made available 7 under the terms and conditions of the BSD License which accompanies this 8 distribution. The full text of the license may be found at: 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 14 File Name: Acpi2_0.h 15 16**/ 17 18#ifndef _ACPI_2_0_H_ 19#define _ACPI_2_0_H_ 20 21#include "IndustryStandard/Acpi.h" 22 23// 24// Ensure proper structure formats 25// 26#pragma pack(1) 27// 28// ACPI Specification Revision 29// 30#define EFI_ACPI_2_0_REVISION 0x02 31 32// 33// BUGBUG: OEM values need to be moved somewhere else, probably read from data hub 34// and produced by a platform specific driver. 35// 36// 37// ACPI OEM ID 38// 39#define EFI_ACPI_2_0_OEM_ID "INTEL " 40#define EFI_ACPI_2_0_OEM_TABLE_ID 0x5034303738543245 // "E2T8704P" 41// 42// ACPI OEM Revision 43// 44#define EFI_ACPI_2_0_OEM_REVISION 0x00000002 45 46// 47// ACPI table creator ID 48// 49#define EFI_ACPI_2_0_CREATOR_ID 0x5446534D // TBD "MSFT" 50// 51// ACPI table creator revision 52// 53#define EFI_ACPI_2_0_CREATOR_REVISION 0x01000013 // TBD 54// 55// ACPI 2.0 Generic Address Space definition 56// 57typedef struct { 58 UINT8 AddressSpaceId; 59 UINT8 RegisterBitWidth; 60 UINT8 RegisterBitOffset; 61 UINT8 Reserved; 62 UINT64 Address; 63} EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE; 64 65// 66// Generic Address Space Address IDs 67// 68#define EFI_ACPI_2_0_SYSTEM_MEMORY 0 69#define EFI_ACPI_2_0_SYSTEM_IO 1 70#define EFI_ACPI_2_0_PCI_CONFIGURATION_SPACE 2 71#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER 3 72#define EFI_ACPI_2_0_SMBUS 4 73#define EFI_ACPI_2_0_FUNCTIONAL_FIXED_HARDWARE 0x7F 74 75// 76// ACPI 2.0 table structures 77// 78// 79// Root System Description Pointer Structure 80// 81typedef struct { 82 UINT64 Signature; 83 UINT8 Checksum; 84 UINT8 OemId[6]; 85 UINT8 Revision; 86 UINT32 RsdtAddress; 87 UINT32 Length; 88 UINT64 XsdtAddress; 89 UINT8 ExtendedChecksum; 90 UINT8 Reserved[3]; 91} EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER; 92 93// 94// RSD_PTR Revision (as defined in ACPI 2.0 spec.) 95// 96#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 97 98// 99// Common table header, this prefaces all ACPI tables, including FACS, but 100// excluding the RSD PTR structure 101// 102typedef struct { 103 UINT32 Signature; 104 UINT32 Length; 105} EFI_ACPI_2_0_COMMON_HEADER; 106 107// 108// Root System Description Table 109// No definition needed as it is a common description table header followed by a 110// variable number of UINT32 table pointers. 111// 112// 113// RSDT Revision (as defined in ACPI 2.0 spec.) 114// 115#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 116 117// 118// Extended System Description Table 119// No definition needed as it is a common description table header followed by a 120// variable number of UINT64 table pointers. 121// 122// 123// XSDT Revision (as defined in ACPI 2.0 spec.) 124// 125#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 126 127// 128// Fixed ACPI Description Table Structure (FADT) 129// 130typedef struct { 131 EFI_ACPI_DESCRIPTION_HEADER Header; 132 UINT32 FirmwareCtrl; 133 UINT32 Dsdt; 134 UINT8 Reserved0; 135 UINT8 PreferredPmProfile; 136 UINT16 SciInt; 137 UINT32 SmiCmd; 138 UINT8 AcpiEnable; 139 UINT8 AcpiDisable; 140 UINT8 S4BiosReq; 141 UINT8 PstateCnt; 142 UINT32 Pm1aEvtBlk; 143 UINT32 Pm1bEvtBlk; 144 UINT32 Pm1aCntBlk; 145 UINT32 Pm1bCntBlk; 146 UINT32 Pm2CntBlk; 147 UINT32 PmTmrBlk; 148 UINT32 Gpe0Blk; 149 UINT32 Gpe1Blk; 150 UINT8 Pm1EvtLen; 151 UINT8 Pm1CntLen; 152 UINT8 Pm2CntLen; 153 UINT8 PmTmrLen; 154 UINT8 Gpe0BlkLen; 155 UINT8 Gpe1BlkLen; 156 UINT8 Gpe1Base; 157 UINT8 CstCnt; 158 UINT16 PLvl2Lat; 159 UINT16 PLvl3Lat; 160 UINT16 FlushSize; 161 UINT16 FlushStride; 162 UINT8 DutyOffset; 163 UINT8 DutyWidth; 164 UINT8 DayAlrm; 165 UINT8 MonAlrm; 166 UINT8 Century; 167 UINT16 IaPcBootArch; 168 UINT8 Reserved1; 169 UINT32 Flags; 170 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg; 171 UINT8 ResetValue; 172 UINT8 Reserved2[3]; 173 UINT64 XFirmwareCtrl; 174 UINT64 XDsdt; 175 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; 176 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; 177 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; 178 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; 179 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; 180 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; 181 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; 182 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; 183} EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE; 184 185// 186// FADT Version (as defined in ACPI 2.0 spec.) 187// 188#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x03 189 190// 191// Fixed ACPI Description Table Boot Architecture Flags 192// All other bits are reserved and must be set to 0. 193// 194#define EFI_ACPI_2_0_LEGACY_DEVICES (1 << 0) 195#define EFI_ACPI_2_0_8042 (1 << 1) 196 197// 198// Fixed ACPI Description Table Fixed Feature Flags 199// All other bits are reserved and must be set to 0. 200// 201#define EFI_ACPI_2_0_WBINVD (1 << 0) 202#define EFI_ACPI_2_0_WBINVD_FLUSH (1 << 1) 203#define EFI_ACPI_2_0_PROC_C1 (1 << 2) 204#define EFI_ACPI_2_0_P_LVL2_UP (1 << 3) 205#define EFI_ACPI_2_0_PWR_BUTTON (1 << 4) 206#define EFI_ACPI_2_0_SLP_BUTTON (1 << 5) 207#define EFI_ACPI_2_0_FIX_RTC (1 << 6) 208#define EFI_ACPI_2_0_RTC_S4 (1 << 7) 209#define EFI_ACPI_2_0_TMR_VAL_EXT (1 << 8) 210#define EFI_ACPI_2_0_DCK_CAP (1 << 9) 211#define EFI_ACPI_2_0_RESET_REG_SUP (1 << 10) 212#define EFI_ACPI_2_0_SEALED_CASE (1 << 11) 213#define EFI_ACPI_2_0_HEADLESS (1 << 12) 214#define EFI_ACPI_2_0_CPU_SW_SLP (1 << 13) 215 216// 217// Firmware ACPI Control Structure 218// 219typedef struct { 220 UINT32 Signature; 221 UINT32 Length; 222 UINT32 HardwareSignature; 223 UINT32 FirmwareWakingVector; 224 UINT32 GlobalLock; 225 UINT32 Flags; 226 UINT64 XFirmwareWakingVector; 227 UINT8 Version; 228 UINT8 Reserved[31]; 229} EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE; 230 231// 232// FACS Version (as defined in ACPI 2.0 spec.) 233// 234#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x01 235 236// 237// Firmware Control Structure Feature Flags 238// All other bits are reserved and must be set to 0. 239// 240#define EFI_ACPI_2_0_S4BIOS_F (1 << 0) 241 242// 243// Multiple APIC Description Table header definition. The rest of the table 244// must be defined in a platform specific manner. 245// 246typedef struct { 247 EFI_ACPI_DESCRIPTION_HEADER Header; 248 UINT32 LocalApicAddress; 249 UINT32 Flags; 250} EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; 251 252// 253// MADT Revision (as defined in ACPI 2.0 spec.) 254// 255#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01 256 257// 258// Multiple APIC Flags 259// All other bits are reserved and must be set to 0. 260// 261#define EFI_ACPI_2_0_PCAT_COMPAT (1 << 0) 262 263// 264// Multiple APIC Description Table APIC structure types 265// All other values between 0x09 an 0xFF are reserved and 266// will be ignored by OSPM. 267// 268#define EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC 0x00 269#define EFI_ACPI_2_0_IO_APIC 0x01 270#define EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE 0x02 271#define EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03 272#define EFI_ACPI_2_0_LOCAL_APIC_NMI 0x04 273#define EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE 0x05 274#define EFI_ACPI_2_0_IO_SAPIC 0x06 275#define EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC 0x07 276#define EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES 0x08 277 278// 279// APIC Structure Definitions 280// 281// 282// Processor Local APIC Structure Definition 283// 284typedef struct { 285 UINT8 Type; 286 UINT8 Length; 287 UINT8 AcpiProcessorId; 288 UINT8 ApicId; 289 UINT32 Flags; 290} EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE; 291 292// 293// Local APIC Flags. All other bits are reserved and must be 0. 294// 295#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED (1 << 0) 296 297// 298// IO APIC Structure 299// 300typedef struct { 301 UINT8 Type; 302 UINT8 Length; 303 UINT8 IoApicId; 304 UINT8 Reserved; 305 UINT32 IoApicAddress; 306 UINT32 GlobalSystemInterruptBase; 307} EFI_ACPI_2_0_IO_APIC_STRUCTURE; 308 309// 310// Interrupt Source Override Structure 311// 312typedef struct { 313 UINT8 Type; 314 UINT8 Length; 315 UINT8 Bus; 316 UINT8 Source; 317 UINT32 GlobalSystemInterrupt; 318 UINT16 Flags; 319} EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; 320 321// 322// Non-Maskable Interrupt Source Structure 323// 324typedef struct { 325 UINT8 Type; 326 UINT8 Length; 327 UINT16 Flags; 328 UINT32 GlobalSystemInterrupt; 329} EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; 330 331// 332// Local APIC NMI Structure 333// 334typedef struct { 335 UINT8 Type; 336 UINT8 Length; 337 UINT8 AcpiProcessorId; 338 UINT16 Flags; 339 UINT8 LocalApicLint; 340} EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE; 341 342// 343// Local APIC Address Override Structure 344// 345typedef struct { 346 UINT8 Type; 347 UINT8 Length; 348 UINT16 Reserved; 349 UINT64 LocalApicAddress; 350} EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; 351 352// 353// IO SAPIC Structure 354// 355typedef struct { 356 UINT8 Type; 357 UINT8 Length; 358 UINT8 IoApicId; 359 UINT8 Reserved; 360 UINT32 GlobalSystemInterruptBase; 361 UINT64 IoSapicAddress; 362} EFI_ACPI_2_0_IO_SAPIC_STRUCTURE; 363 364// 365// Local SAPIC Structure 366// 367typedef struct { 368 UINT8 Type; 369 UINT8 Length; 370 UINT8 AcpiProcessorId; 371 UINT8 LocalSapicId; 372 UINT8 LocalSapicEid; 373 UINT8 Reserved[3]; 374 UINT32 Flags; 375} EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE; 376 377// 378// Platform Interrupt Sources Structure 379// 380typedef struct { 381 UINT8 Type; 382 UINT8 Length; 383 UINT16 Flags; 384 UINT8 InterruptType; 385 UINT8 ProcessorId; 386 UINT8 ProcessorEid; 387 UINT8 IoSapicVector; 388 UINT32 GlobalSystemInterrupt; 389 UINT32 Reserved; 390} EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; 391 392// 393// Smart Battery Description Table (SBST) 394// 395typedef struct { 396 EFI_ACPI_DESCRIPTION_HEADER Header; 397 UINT32 WarningEnergyLevel; 398 UINT32 LowEnergyLevel; 399 UINT32 CriticalEnergyLevel; 400} EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE; 401 402// 403// SBST Version (as defined in ACPI 2.0 spec.) 404// 405#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 406 407// 408// Embedded Controller Boot Resources Table (ECDT) 409// The table is followed by a null terminated ASCII string that contains 410// a fully qualified reference to the name space object. 411// 412typedef struct { 413 EFI_ACPI_DESCRIPTION_HEADER Header; 414 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl; 415 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData; 416 UINT32 Uid; 417 UINT8 GpeBit; 418} EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; 419 420// 421// ECDT Version (as defined in ACPI 2.0 spec.) 422// 423#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_REVISION 0x01 424 425// 426// Known table signatures 427// 428// 429// "RSD PTR " Root System Description Pointer 430// 431#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352 432 433// 434// "SPIC" Multiple SAPIC Description Table 435// 436// BUGBUG: Don't know where this came from except SR870BN4 uses it. 437// #define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495053 438// 439#define EFI_ACPI_2_0_MULTIPLE_SAPIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041 440 441// 442// "BOOT" MS Simple Boot Spec 443// 444#define EFI_ACPI_2_0_SIMPLE_BOOT_FLAG_TABLE_SIGNATURE 0x544F4F42 445 446// 447// "DBGP" MS Bebug Port Spec 448// 449#define EFI_ACPI_2_0_DEBUG_PORT_TABLE_SIGNATURE 0x50474244 450 451// 452// "DSDT" Differentiated System Description Table 453// 454#define EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344 455 456// 457// "ECDT" Embedded Controller Boot Resources Table 458// 459#define EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE_SIGNATURE 0x54444345 460 461// 462// "ETDT" Event Timer Description Table 463// 464#define EFI_ACPI_2_0_EVENT_TIMER_DESCRIPTION_TABLE_SIGNATURE 0x54445445 465 466// 467// "FACS" Firmware ACPI Control Structure 468// 469#define EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146 470 471// 472// "FACP" Fixed ACPI Description Table 473// 474#define EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146 475 476// 477// "APIC" Multiple APIC Description Table 478// 479#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE 0x43495041 480 481// 482// "PSDT" Persistent System Description Table 483// 484#define EFI_ACPI_2_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350 485 486// 487// "RSDT" Root System Description Table 488// 489#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352 490 491// 492// "SBST" Smart Battery Specification Table 493// 494#define EFI_ACPI_2_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253 495 496// 497// "SLIT" System Locality Information Table 498// 499#define EFI_ACPI_2_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE 0x54494C53 500 501// 502// "SPCR" Serial Port Concole Redirection Table 503// 504#define EFI_ACPI_2_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE 0x52435053 505 506// 507// "SRAT" Static Resource Affinity Table 508// 509#define EFI_ACPI_2_0_STATIC_RESOURCE_AFFINITY_TABLE_SIGNATURE 0x54415253 510 511// 512// "SSDT" Secondary System Description Table 513// 514#define EFI_ACPI_2_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353 515 516// 517// "SPMI" Server Platform Management Interface Table 518// 519#define EFI_ACPI_2_0_SERVER_PLATFORM_MANAGEMENT_INTERFACE_SIGNATURE 0x494D5053 520 521// 522// "XSDT" Extended System Description Table 523// 524#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445358 525 526#pragma pack() 527 528#endif 529