1 /** @file 2 ACPI 1.0b definitions from the ACPI Specification, revision 1.0b 3 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 6 SPDX-License-Identifier: BSD-2-Clause-Patent 7 8 **/ 9 10 #ifndef _ACPI_1_0_H_ 11 #define _ACPI_1_0_H_ 12 13 #include "IndustryStandard/Acpi.h" 14 15 // 16 // Ensure proper structure formats 17 // 18 #pragma pack(1) 19 // 20 // ACPI 1.0b table structures 21 // 22 // 23 // Root System Description Pointer Structure 24 // 25 typedef struct { 26 UINT64 Signature; 27 UINT8 Checksum; 28 UINT8 OemId[6]; 29 UINT8 Reserved; 30 UINT32 RsdtAddress; 31 } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER; 32 33 // 34 // Root System Description Table 35 // No definition needed as it is a common description table header followed by a 36 // variable number of UINT32 table pointers. 37 // 38 // 39 // RSDT Revision (as defined in ACPI 1.0b spec.) 40 // 41 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 42 43 // 44 // Fixed ACPI Description Table Structure (FADT) 45 // 46 typedef struct { 47 EFI_ACPI_DESCRIPTION_HEADER Header; 48 UINT32 FirmwareCtrl; 49 UINT32 Dsdt; 50 UINT8 IntModel; 51 UINT8 Reserved1; 52 UINT16 SciInt; 53 UINT32 SmiCmd; 54 UINT8 AcpiEnable; 55 UINT8 AcpiDisable; 56 UINT8 S4BiosReq; 57 UINT8 Reserved2; 58 UINT32 Pm1aEvtBlk; 59 UINT32 Pm1bEvtBlk; 60 UINT32 Pm1aCntBlk; 61 UINT32 Pm1bCntBlk; 62 UINT32 Pm2CntBlk; 63 UINT32 PmTmrBlk; 64 UINT32 Gpe0Blk; 65 UINT32 Gpe1Blk; 66 UINT8 Pm1EvtLen; 67 UINT8 Pm1CntLen; 68 UINT8 Pm2CntLen; 69 UINT8 PmTmLen; 70 UINT8 Gpe0BlkLen; 71 UINT8 Gpe1BlkLen; 72 UINT8 Gpe1Base; 73 UINT8 Reserved3; 74 UINT16 PLvl2Lat; 75 UINT16 PLvl3Lat; 76 UINT16 FlushSize; 77 UINT16 FlushStride; 78 UINT8 DutyOffset; 79 UINT8 DutyWidth; 80 UINT8 DayAlrm; 81 UINT8 MonAlrm; 82 UINT8 Century; 83 UINT8 Reserved4; 84 UINT8 Reserved5; 85 UINT8 Reserved6; 86 UINT32 Flags; 87 } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE; 88 89 // 90 // FADT Version (as defined in ACPI 1.0b spec.) 91 // 92 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x01 93 94 // 95 // Fixed ACPI Description Table Fixed Feature Flags 96 // All other bits are reserved and must be set to 0. 97 // 98 #define EFI_ACPI_1_0_WBINVD (1 << 0) 99 #define EFI_ACPI_1_0_WBINVD_FLUSH (1 << 1) 100 #define EFI_ACPI_1_0_PROC_C1 (1 << 2) 101 #define EFI_ACPI_1_0_P_LVL2_UP (1 << 3) 102 #define EFI_ACPI_1_0_PWR_BUTTON (1 << 4) 103 #define EFI_ACPI_1_0_SLP_BUTTON (1 << 5) 104 #define EFI_ACPI_1_0_FIX_RTC (1 << 6) 105 #define EFI_ACPI_1_0_RTC_S4 (1 << 7) 106 #define EFI_ACPI_1_0_TMR_VAL_EXT (1 << 8) 107 #define EFI_ACPI_1_0_DCK_CAP (1 << 9) 108 109 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_VERSION 0x0 110 // 111 // Firmware ACPI Control Structure 112 // 113 typedef struct { 114 UINT32 Signature; 115 UINT32 Length; 116 UINT32 HardwareSignature; 117 UINT32 FirmwareWakingVector; 118 UINT32 GlobalLock; 119 UINT32 Flags; 120 UINT8 Reserved[40]; 121 } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE; 122 123 // 124 // Firmware Control Structure Feature Flags 125 // All other bits are reserved and must be set to 0. 126 // 127 #define EFI_ACPI_1_0_S4BIOS_F (1 << 0) 128 129 // 130 // Multiple APIC Description Table header definition. The rest of the table 131 // must be defined in a platform specific manner. 132 // 133 typedef struct { 134 EFI_ACPI_DESCRIPTION_HEADER Header; 135 UINT32 LocalApicAddress; 136 UINT32 Flags; 137 } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; 138 139 // 140 // MADT Revision (as defined in ACPI 1.0b spec.) 141 // 142 #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01 143 144 // 145 // Multiple APIC Flags 146 // All other bits are reserved and must be set to 0. 147 // 148 #define EFI_ACPI_1_0_PCAT_COMPAT (1 << 0) 149 150 // 151 // Multiple APIC Description Table APIC structure types 152 // All other values between 0x09 an 0xFF are reserved and 153 // will be ignored by OSPM. 154 // 155 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC 0x00 156 #define EFI_ACPI_1_0_IO_APIC 0x01 157 #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE 0x02 158 #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03 159 #define EFI_ACPI_1_0_LOCAL_APIC_NMI 0x04 160 161 // 162 // APIC Structure Definitions 163 // 164 // 165 // Processor Local APIC Structure Definition 166 // 167 typedef struct { 168 UINT8 Type; 169 UINT8 Length; 170 UINT8 AcpiProcessorId; 171 UINT8 ApicId; 172 UINT32 Flags; 173 } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE; 174 175 // 176 // Local APIC Flags. All other bits are reserved and must be 0. 177 // 178 #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED (1 << 0) 179 180 // 181 // IO APIC Structure 182 // 183 typedef struct { 184 UINT8 Type; 185 UINT8 Length; 186 UINT8 IoApicId; 187 UINT8 Reserved; 188 UINT32 IoApicAddress; 189 UINT32 SystemVectorBase; 190 } EFI_ACPI_1_0_IO_APIC_STRUCTURE; 191 192 // 193 // Interrupt Source Override Structure 194 // 195 typedef struct { 196 UINT8 Type; 197 UINT8 Length; 198 UINT8 Bus; 199 UINT8 Source; 200 UINT32 GlobalSystemInterruptVector; 201 UINT16 Flags; 202 } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; 203 204 // 205 // Non-Maskable Interrupt Source Structure 206 // 207 typedef struct { 208 UINT8 Type; 209 UINT8 Length; 210 UINT16 Flags; 211 UINT32 GlobalSystemInterruptVector; 212 } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; 213 214 // 215 // Local APIC NMI Structure 216 // 217 typedef struct { 218 UINT8 Type; 219 UINT8 Length; 220 UINT8 AcpiProcessorId; 221 UINT16 Flags; 222 UINT8 LocalApicInti; 223 } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE; 224 225 // 226 // Smart Battery Description Table (SBST) 227 // 228 typedef struct { 229 EFI_ACPI_DESCRIPTION_HEADER Header; 230 UINT32 WarningEnergyLevel; 231 UINT32 LowEnergyLevel; 232 UINT32 CriticalEnergyLevel; 233 } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE; 234 235 // 236 // Known table signatures 237 // 238 // 239 // "RSD PTR " Root System Description Pointer 240 // 241 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE 0x2052545020445352ULL 242 243 // 244 // "APIC" Multiple APIC Description Table 245 // 246 #define EFI_ACPI_1_0_APIC_SIGNATURE 0x43495041 247 248 // 249 // "DSDT" Differentiated System Description Table 250 // 251 #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445344 252 253 // 254 // "FACS" Firmware ACPI Control Structure 255 // 256 #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE 0x53434146 257 258 // 259 // "FACP" Fixed ACPI Description Table 260 // 261 #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE 0x50434146 262 263 // 264 // "PSDT" Persistent System Description Table 265 // 266 #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445350 267 268 // 269 // "RSDT" Root System Description Table 270 // 271 #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445352 272 273 // 274 // "SBST" Smart Battery Specification Table 275 // 276 #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE 0x54534253 277 278 // 279 // "SSDT" Secondary System Description Table 280 // 281 #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE 0x54445353 282 283 #pragma pack() 284 285 #endif 286