You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Acpi10.h 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. /** @file
  2. ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
  3. Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
  4. This program and the accompanying materials are licensed and made available under
  5. the terms and conditions of the BSD License that accompanies this distribution.
  6. The full text of the license may be found at
  7. http://opensource.org/licenses/bsd-license.php.
  8. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  10. **/
  11. #ifndef _ACPI_1_0_H_
  12. #define _ACPI_1_0_H_
  13. FILE_LICENCE ( BSD3 );
  14. #include <ipxe/efi/IndustryStandard/AcpiAml.h>
  15. ///
  16. /// Common table header, this prefaces all ACPI tables, including FACS, but
  17. /// excluding the RSD PTR structure.
  18. ///
  19. typedef struct {
  20. UINT32 Signature;
  21. UINT32 Length;
  22. } EFI_ACPI_COMMON_HEADER;
  23. #pragma pack(1)
  24. ///
  25. /// The common ACPI description table header. This structure prefaces most ACPI tables.
  26. ///
  27. typedef struct {
  28. UINT32 Signature;
  29. UINT32 Length;
  30. UINT8 Revision;
  31. UINT8 Checksum;
  32. UINT8 OemId[6];
  33. UINT64 OemTableId;
  34. UINT32 OemRevision;
  35. UINT32 CreatorId;
  36. UINT32 CreatorRevision;
  37. } EFI_ACPI_DESCRIPTION_HEADER;
  38. #pragma pack()
  39. //
  40. // Define for Desriptor
  41. //
  42. #define ACPI_SMALL_ITEM_FLAG 0x00
  43. #define ACPI_LARGE_ITEM_FLAG 0x01
  44. //
  45. // Small Item Descriptor Name
  46. //
  47. #define ACPI_SMALL_IRQ_DESCRIPTOR_NAME 0x04
  48. #define ACPI_SMALL_DMA_DESCRIPTOR_NAME 0x05
  49. #define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME 0x06
  50. #define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME 0x07
  51. #define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME 0x08
  52. #define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME 0x09
  53. #define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME 0x0E
  54. #define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME 0x0F
  55. //
  56. // Large Item Descriptor Name
  57. //
  58. #define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x01
  59. #define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME 0x04
  60. #define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x05
  61. #define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME 0x06
  62. #define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x07
  63. #define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x08
  64. #define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME 0x09
  65. #define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0A
  66. //
  67. // Small Item Descriptor Value
  68. //
  69. #define ACPI_IRQ_NOFLAG_DESCRIPTOR 0x22
  70. #define ACPI_IRQ_DESCRIPTOR 0x23
  71. #define ACPI_DMA_DESCRIPTOR 0x2A
  72. #define ACPI_START_DEPENDENT_DESCRIPTOR 0x30
  73. #define ACPI_START_DEPENDENT_EX_DESCRIPTOR 0x31
  74. #define ACPI_END_DEPENDENT_DESCRIPTOR 0x38
  75. #define ACPI_IO_PORT_DESCRIPTOR 0x47
  76. #define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR 0x4B
  77. #define ACPI_END_TAG_DESCRIPTOR 0x79
  78. //
  79. // Large Item Descriptor Value
  80. //
  81. #define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR 0x81
  82. #define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR 0x85
  83. #define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR 0x86
  84. #define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR 0x87
  85. #define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR 0x88
  86. #define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR 0x89
  87. #define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR 0x8A
  88. #define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A
  89. //
  90. // Resource Type
  91. //
  92. #define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00
  93. #define ACPI_ADDRESS_SPACE_TYPE_IO 0x01
  94. #define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02
  95. ///
  96. /// Power Management Timer frequency is fixed at 3.579545MHz.
  97. ///
  98. #define ACPI_TIMER_FREQUENCY 3579545
  99. //
  100. // Ensure proper structure formats
  101. //
  102. #pragma pack(1)
  103. ///
  104. /// The commond definition of QWORD, DWORD, and WORD
  105. /// Address Space Descriptors.
  106. ///
  107. typedef PACKED struct {
  108. UINT8 Desc;
  109. UINT16 Len;
  110. UINT8 ResType;
  111. UINT8 GenFlag;
  112. UINT8 SpecificFlag;
  113. UINT64 AddrSpaceGranularity;
  114. UINT64 AddrRangeMin;
  115. UINT64 AddrRangeMax;
  116. UINT64 AddrTranslationOffset;
  117. UINT64 AddrLen;
  118. } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR;
  119. typedef PACKED union {
  120. UINT8 Byte;
  121. PACKED struct {
  122. UINT8 Length : 3;
  123. UINT8 Name : 4;
  124. UINT8 Type : 1;
  125. } Bits;
  126. } ACPI_SMALL_RESOURCE_HEADER;
  127. typedef PACKED struct {
  128. PACKED union {
  129. UINT8 Byte;
  130. PACKED struct {
  131. UINT8 Name : 7;
  132. UINT8 Type : 1;
  133. }Bits;
  134. } Header;
  135. UINT16 Length;
  136. } ACPI_LARGE_RESOURCE_HEADER;
  137. ///
  138. /// IRQ Descriptor.
  139. ///
  140. typedef PACKED struct {
  141. ACPI_SMALL_RESOURCE_HEADER Header;
  142. UINT16 Mask;
  143. } EFI_ACPI_IRQ_NOFLAG_DESCRIPTOR;
  144. ///
  145. /// IRQ Descriptor.
  146. ///
  147. typedef PACKED struct {
  148. ACPI_SMALL_RESOURCE_HEADER Header;
  149. UINT16 Mask;
  150. UINT8 Information;
  151. } EFI_ACPI_IRQ_DESCRIPTOR;
  152. ///
  153. /// DMA Descriptor.
  154. ///
  155. typedef PACKED struct {
  156. ACPI_SMALL_RESOURCE_HEADER Header;
  157. UINT8 ChannelMask;
  158. UINT8 Information;
  159. } EFI_ACPI_DMA_DESCRIPTOR;
  160. ///
  161. /// I/O Port Descriptor
  162. ///
  163. typedef PACKED struct {
  164. ACPI_SMALL_RESOURCE_HEADER Header;
  165. UINT8 Information;
  166. UINT16 BaseAddressMin;
  167. UINT16 BaseAddressMax;
  168. UINT8 Alignment;
  169. UINT8 Length;
  170. } EFI_ACPI_IO_PORT_DESCRIPTOR;
  171. ///
  172. /// Fixed Location I/O Port Descriptor.
  173. ///
  174. typedef PACKED struct {
  175. ACPI_SMALL_RESOURCE_HEADER Header;
  176. UINT16 BaseAddress;
  177. UINT8 Length;
  178. } EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR;
  179. ///
  180. /// 24-Bit Memory Range Descriptor
  181. ///
  182. typedef PACKED struct {
  183. ACPI_LARGE_RESOURCE_HEADER Header;
  184. UINT8 Information;
  185. UINT16 BaseAddressMin;
  186. UINT16 BaseAddressMax;
  187. UINT16 Alignment;
  188. UINT16 Length;
  189. } EFI_ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR;
  190. ///
  191. /// 32-Bit Memory Range Descriptor
  192. ///
  193. typedef PACKED struct {
  194. ACPI_LARGE_RESOURCE_HEADER Header;
  195. UINT8 Information;
  196. UINT32 BaseAddressMin;
  197. UINT32 BaseAddressMax;
  198. UINT32 Alignment;
  199. UINT32 Length;
  200. } EFI_ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR;
  201. ///
  202. /// Fixed 32-Bit Fixed Memory Range Descriptor
  203. ///
  204. typedef PACKED struct {
  205. ACPI_LARGE_RESOURCE_HEADER Header;
  206. UINT8 Information;
  207. UINT32 BaseAddress;
  208. UINT32 Length;
  209. } EFI_ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR;
  210. ///
  211. /// QWORD Address Space Descriptor
  212. ///
  213. typedef PACKED struct {
  214. ACPI_LARGE_RESOURCE_HEADER Header;
  215. UINT8 ResType;
  216. UINT8 GenFlag;
  217. UINT8 SpecificFlag;
  218. UINT64 AddrSpaceGranularity;
  219. UINT64 AddrRangeMin;
  220. UINT64 AddrRangeMax;
  221. UINT64 AddrTranslationOffset;
  222. UINT64 AddrLen;
  223. } EFI_ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR;
  224. ///
  225. /// DWORD Address Space Descriptor
  226. ///
  227. typedef PACKED struct {
  228. ACPI_LARGE_RESOURCE_HEADER Header;
  229. UINT8 ResType;
  230. UINT8 GenFlag;
  231. UINT8 SpecificFlag;
  232. UINT32 AddrSpaceGranularity;
  233. UINT32 AddrRangeMin;
  234. UINT32 AddrRangeMax;
  235. UINT32 AddrTranslationOffset;
  236. UINT32 AddrLen;
  237. } EFI_ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR;
  238. ///
  239. /// WORD Address Space Descriptor
  240. ///
  241. typedef PACKED struct {
  242. ACPI_LARGE_RESOURCE_HEADER Header;
  243. UINT8 ResType;
  244. UINT8 GenFlag;
  245. UINT8 SpecificFlag;
  246. UINT16 AddrSpaceGranularity;
  247. UINT16 AddrRangeMin;
  248. UINT16 AddrRangeMax;
  249. UINT16 AddrTranslationOffset;
  250. UINT16 AddrLen;
  251. } EFI_ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR;
  252. ///
  253. /// Extended Interrupt Descriptor
  254. ///
  255. typedef PACKED struct {
  256. ACPI_LARGE_RESOURCE_HEADER Header;
  257. UINT8 InterruptVectorFlags;
  258. UINT8 InterruptTableLength;
  259. UINT32 InterruptNumber[1];
  260. } EFI_ACPI_EXTENDED_INTERRUPT_DESCRIPTOR;
  261. #pragma pack()
  262. ///
  263. /// The End tag identifies an end of resource data.
  264. ///
  265. typedef struct {
  266. UINT8 Desc;
  267. UINT8 Checksum;
  268. } EFI_ACPI_END_TAG_DESCRIPTOR;
  269. //
  270. // General use definitions
  271. //
  272. #define EFI_ACPI_RESERVED_BYTE 0x00
  273. #define EFI_ACPI_RESERVED_WORD 0x0000
  274. #define EFI_ACPI_RESERVED_DWORD 0x00000000
  275. #define EFI_ACPI_RESERVED_QWORD 0x0000000000000000
  276. //
  277. // Resource Type Specific Flags
  278. // Ref ACPI specification 6.4.3.5.5
  279. //
  280. // Bit [0] : Write Status, _RW
  281. //
  282. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0)
  283. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0)
  284. //
  285. // Bit [2:1] : Memory Attributes, _MEM
  286. //
  287. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1)
  288. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1)
  289. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1)
  290. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1)
  291. //
  292. // Bit [4:3] : Memory Attributes, _MTP
  293. //
  294. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3)
  295. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3)
  296. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3)
  297. #define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3)
  298. //
  299. // Bit [5] : Memory to I/O Translation, _TTP
  300. //
  301. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5)
  302. #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5)
  303. //
  304. // IRQ Information
  305. // Ref ACPI specification 6.4.2.1
  306. //
  307. #define EFI_ACPI_IRQ_SHARABLE_MASK 0x10
  308. #define EFI_ACPI_IRQ_SHARABLE 0x10
  309. #define EFI_ACPI_IRQ_POLARITY_MASK 0x08
  310. #define EFI_ACPI_IRQ_HIGH_TRUE 0x00
  311. #define EFI_ACPI_IRQ_LOW_FALSE 0x08
  312. #define EFI_ACPI_IRQ_MODE 0x01
  313. #define EFI_ACPI_IRQ_LEVEL_TRIGGERED 0x00
  314. #define EFI_ACPI_IRQ_EDGE_TRIGGERED 0x01
  315. //
  316. // DMA Information
  317. // Ref ACPI specification 6.4.2.2
  318. //
  319. #define EFI_ACPI_DMA_SPEED_TYPE_MASK 0x60
  320. #define EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00
  321. #define EFI_ACPI_DMA_SPEED_TYPE_A 0x20
  322. #define EFI_ACPI_DMA_SPEED_TYPE_B 0x40
  323. #define EFI_ACPI_DMA_SPEED_TYPE_F 0x60
  324. #define EFI_ACPI_DMA_BUS_MASTER_MASK 0x04
  325. #define EFI_ACPI_DMA_BUS_MASTER 0x04
  326. #define EFI_ACPI_DMA_TRANSFER_TYPE_MASK 0x03
  327. #define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x00
  328. #define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x01
  329. #define EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x10
  330. //
  331. // IO Information
  332. // Ref ACPI specification 6.4.2.5
  333. //
  334. #define EFI_ACPI_IO_DECODE_MASK 0x01
  335. #define EFI_ACPI_IO_DECODE_16_BIT 0x01
  336. #define EFI_ACPI_IO_DECODE_10_BIT 0x00
  337. //
  338. // Memory Information
  339. // Ref ACPI specification 6.4.3.4
  340. //
  341. #define EFI_ACPI_MEMORY_WRITE_STATUS_MASK 0x01
  342. #define EFI_ACPI_MEMORY_WRITABLE 0x01
  343. #define EFI_ACPI_MEMORY_NON_WRITABLE 0x00
  344. //
  345. // Ensure proper structure formats
  346. //
  347. #pragma pack(1)
  348. //
  349. // ACPI 1.0b table structures
  350. //
  351. ///
  352. /// Root System Description Pointer Structure.
  353. ///
  354. typedef struct {
  355. UINT64 Signature;
  356. UINT8 Checksum;
  357. UINT8 OemId[6];
  358. UINT8 Reserved;
  359. UINT32 RsdtAddress;
  360. } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
  361. //
  362. // Root System Description Table
  363. // No definition needed as it is a common description table header, the same with
  364. // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
  365. //
  366. ///
  367. /// RSDT Revision (as defined in ACPI 1.0b specification).
  368. ///
  369. #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01
  370. ///
  371. /// Fixed ACPI Description Table Structure (FADT).
  372. ///
  373. typedef struct {
  374. EFI_ACPI_DESCRIPTION_HEADER Header;
  375. UINT32 FirmwareCtrl;
  376. UINT32 Dsdt;
  377. UINT8 IntModel;
  378. UINT8 Reserved1;
  379. UINT16 SciInt;
  380. UINT32 SmiCmd;
  381. UINT8 AcpiEnable;
  382. UINT8 AcpiDisable;
  383. UINT8 S4BiosReq;
  384. UINT8 Reserved2;
  385. UINT32 Pm1aEvtBlk;
  386. UINT32 Pm1bEvtBlk;
  387. UINT32 Pm1aCntBlk;
  388. UINT32 Pm1bCntBlk;
  389. UINT32 Pm2CntBlk;
  390. UINT32 PmTmrBlk;
  391. UINT32 Gpe0Blk;
  392. UINT32 Gpe1Blk;
  393. UINT8 Pm1EvtLen;
  394. UINT8 Pm1CntLen;
  395. UINT8 Pm2CntLen;
  396. UINT8 PmTmLen;
  397. UINT8 Gpe0BlkLen;
  398. UINT8 Gpe1BlkLen;
  399. UINT8 Gpe1Base;
  400. UINT8 Reserved3;
  401. UINT16 PLvl2Lat;
  402. UINT16 PLvl3Lat;
  403. UINT16 FlushSize;
  404. UINT16 FlushStride;
  405. UINT8 DutyOffset;
  406. UINT8 DutyWidth;
  407. UINT8 DayAlrm;
  408. UINT8 MonAlrm;
  409. UINT8 Century;
  410. UINT8 Reserved4;
  411. UINT8 Reserved5;
  412. UINT8 Reserved6;
  413. UINT32 Flags;
  414. } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE;
  415. ///
  416. /// FADT Version (as defined in ACPI 1.0b specification).
  417. ///
  418. #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x01
  419. #define EFI_ACPI_1_0_INT_MODE_DUAL_PIC 0
  420. #define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC 1
  421. //
  422. // Fixed ACPI Description Table Fixed Feature Flags
  423. // All other bits are reserved and must be set to 0.
  424. //
  425. #define EFI_ACPI_1_0_WBINVD BIT0
  426. #define EFI_ACPI_1_0_WBINVD_FLUSH BIT1
  427. #define EFI_ACPI_1_0_PROC_C1 BIT2
  428. #define EFI_ACPI_1_0_P_LVL2_UP BIT3
  429. #define EFI_ACPI_1_0_PWR_BUTTON BIT4
  430. #define EFI_ACPI_1_0_SLP_BUTTON BIT5
  431. #define EFI_ACPI_1_0_FIX_RTC BIT6
  432. #define EFI_ACPI_1_0_RTC_S4 BIT7
  433. #define EFI_ACPI_1_0_TMR_VAL_EXT BIT8
  434. #define EFI_ACPI_1_0_DCK_CAP BIT9
  435. ///
  436. /// Firmware ACPI Control Structure.
  437. ///
  438. typedef struct {
  439. UINT32 Signature;
  440. UINT32 Length;
  441. UINT32 HardwareSignature;
  442. UINT32 FirmwareWakingVector;
  443. UINT32 GlobalLock;
  444. UINT32 Flags;
  445. UINT8 Reserved[40];
  446. } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE;
  447. ///
  448. /// Firmware Control Structure Feature Flags.
  449. /// All other bits are reserved and must be set to 0.
  450. ///
  451. #define EFI_ACPI_1_0_S4BIOS_F BIT0
  452. ///
  453. /// Multiple APIC Description Table header definition. The rest of the table
  454. /// must be defined in a platform-specific manner.
  455. ///
  456. typedef struct {
  457. EFI_ACPI_DESCRIPTION_HEADER Header;
  458. UINT32 LocalApicAddress;
  459. UINT32 Flags;
  460. } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER;
  461. ///
  462. /// MADT Revision (as defined in ACPI 1.0b specification).
  463. ///
  464. #define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01
  465. ///
  466. /// Multiple APIC Flags
  467. /// All other bits are reserved and must be set to 0.
  468. ///
  469. #define EFI_ACPI_1_0_PCAT_COMPAT BIT0
  470. //
  471. // Multiple APIC Description Table APIC structure types
  472. // All other values between 0x05 an 0xFF are reserved and
  473. // will be ignored by OSPM.
  474. //
  475. #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC 0x00
  476. #define EFI_ACPI_1_0_IO_APIC 0x01
  477. #define EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE 0x02
  478. #define EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE 0x03
  479. #define EFI_ACPI_1_0_LOCAL_APIC_NMI 0x04
  480. //
  481. // APIC Structure Definitions
  482. //
  483. ///
  484. /// Processor Local APIC Structure Definition.
  485. ///
  486. typedef struct {
  487. UINT8 Type;
  488. UINT8 Length;
  489. UINT8 AcpiProcessorId;
  490. UINT8 ApicId;
  491. UINT32 Flags;
  492. } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE;
  493. ///
  494. /// Local APIC Flags. All other bits are reserved and must be 0.
  495. ///
  496. #define EFI_ACPI_1_0_LOCAL_APIC_ENABLED BIT0
  497. ///
  498. /// IO APIC Structure.
  499. ///
  500. typedef struct {
  501. UINT8 Type;
  502. UINT8 Length;
  503. UINT8 IoApicId;
  504. UINT8 Reserved;
  505. UINT32 IoApicAddress;
  506. UINT32 SystemVectorBase;
  507. } EFI_ACPI_1_0_IO_APIC_STRUCTURE;
  508. ///
  509. /// Interrupt Source Override Structure.
  510. ///
  511. typedef struct {
  512. UINT8 Type;
  513. UINT8 Length;
  514. UINT8 Bus;
  515. UINT8 Source;
  516. UINT32 GlobalSystemInterruptVector;
  517. UINT16 Flags;
  518. } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE;
  519. ///
  520. /// Non-Maskable Interrupt Source Structure.
  521. ///
  522. typedef struct {
  523. UINT8 Type;
  524. UINT8 Length;
  525. UINT16 Flags;
  526. UINT32 GlobalSystemInterruptVector;
  527. } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE;
  528. ///
  529. /// Local APIC NMI Structure.
  530. ///
  531. typedef struct {
  532. UINT8 Type;
  533. UINT8 Length;
  534. UINT8 AcpiProcessorId;
  535. UINT16 Flags;
  536. UINT8 LocalApicInti;
  537. } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE;
  538. ///
  539. /// Smart Battery Description Table (SBST)
  540. ///
  541. typedef struct {
  542. EFI_ACPI_DESCRIPTION_HEADER Header;
  543. UINT32 WarningEnergyLevel;
  544. UINT32 LowEnergyLevel;
  545. UINT32 CriticalEnergyLevel;
  546. } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE;
  547. //
  548. // Known table signatures
  549. //
  550. ///
  551. /// "RSD PTR " Root System Description Pointer.
  552. ///
  553. #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE SIGNATURE_64('R', 'S', 'D', ' ', 'P', 'T', 'R', ' ')
  554. ///
  555. /// "APIC" Multiple APIC Description Table.
  556. ///
  557. #define EFI_ACPI_1_0_APIC_SIGNATURE SIGNATURE_32('A', 'P', 'I', 'C')
  558. ///
  559. /// "DSDT" Differentiated System Description Table.
  560. ///
  561. #define EFI_ACPI_1_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('D', 'S', 'D', 'T')
  562. ///
  563. /// "FACS" Firmware ACPI Control Structure.
  564. ///
  565. #define EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'S')
  566. ///
  567. /// "FACP" Fixed ACPI Description Table.
  568. ///
  569. #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('F', 'A', 'C', 'P')
  570. ///
  571. /// "PSDT" Persistent System Description Table.
  572. ///
  573. #define EFI_ACPI_1_0_PERSISTENT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('P', 'S', 'D', 'T')
  574. ///
  575. /// "RSDT" Root System Description Table.
  576. ///
  577. #define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('R', 'S', 'D', 'T')
  578. ///
  579. /// "SBST" Smart Battery Specification Table.
  580. ///
  581. #define EFI_ACPI_1_0_SMART_BATTERY_SPECIFICATION_TABLE_SIGNATURE SIGNATURE_32('S', 'B', 'S', 'T')
  582. ///
  583. /// "SSDT" Secondary System Description Table.
  584. ///
  585. #define EFI_ACPI_1_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_SIGNATURE SIGNATURE_32('S', 'S', 'D', 'T')
  586. #pragma pack()
  587. #endif