amlresrc.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. /******************************************************************************
  2. *
  3. * Module Name: amlresrc.h - AML resource descriptors
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2015, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. /* acpisrc:StructDefs -- for acpisrc conversion */
  43. #ifndef __AMLRESRC_H
  44. #define __AMLRESRC_H
  45. /*
  46. * Resource descriptor tags, as defined in the ACPI specification.
  47. * Used to symbolically reference fields within a descriptor.
  48. */
  49. #define ACPI_RESTAG_ADDRESS "_ADR"
  50. #define ACPI_RESTAG_ALIGNMENT "_ALN"
  51. #define ACPI_RESTAG_ADDRESSSPACE "_ASI"
  52. #define ACPI_RESTAG_ACCESSSIZE "_ASZ"
  53. #define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT"
  54. #define ACPI_RESTAG_BASEADDRESS "_BAS"
  55. #define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */
  56. #define ACPI_RESTAG_DEBOUNCETIME "_DBT"
  57. #define ACPI_RESTAG_DECODE "_DEC"
  58. #define ACPI_RESTAG_DEVICEPOLARITY "_DPL"
  59. #define ACPI_RESTAG_DMA "_DMA"
  60. #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */
  61. #define ACPI_RESTAG_DRIVESTRENGTH "_DRS"
  62. #define ACPI_RESTAG_ENDIANNESS "_END"
  63. #define ACPI_RESTAG_FLOWCONTROL "_FLC"
  64. #define ACPI_RESTAG_GRANULARITY "_GRA"
  65. #define ACPI_RESTAG_INTERRUPT "_INT"
  66. #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* ActiveLo(1), ActiveHi(0) */
  67. #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), NoShare(0) */
  68. #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */
  69. #define ACPI_RESTAG_IORESTRICTION "_IOR"
  70. #define ACPI_RESTAG_LENGTH "_LEN"
  71. #define ACPI_RESTAG_LINE "_LIN"
  72. #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
  73. #define ACPI_RESTAG_MEMTYPE "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
  74. #define ACPI_RESTAG_MAXADDR "_MAX"
  75. #define ACPI_RESTAG_MINADDR "_MIN"
  76. #define ACPI_RESTAG_MAXTYPE "_MAF"
  77. #define ACPI_RESTAG_MINTYPE "_MIF"
  78. #define ACPI_RESTAG_MODE "_MOD"
  79. #define ACPI_RESTAG_PARITY "_PAR"
  80. #define ACPI_RESTAG_PHASE "_PHA"
  81. #define ACPI_RESTAG_PIN "_PIN"
  82. #define ACPI_RESTAG_PINCONFIG "_PPI"
  83. #define ACPI_RESTAG_POLARITY "_POL"
  84. #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO"
  85. #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW"
  86. #define ACPI_RESTAG_RANGETYPE "_RNG"
  87. #define ACPI_RESTAG_READWRITETYPE "_RW_" /* ReadOnly(0), Writeable (1) */
  88. #define ACPI_RESTAG_LENGTH_RX "_RXL"
  89. #define ACPI_RESTAG_LENGTH_TX "_TXL"
  90. #define ACPI_RESTAG_SLAVEMODE "_SLV"
  91. #define ACPI_RESTAG_SPEED "_SPE"
  92. #define ACPI_RESTAG_STOPBITS "_STB"
  93. #define ACPI_RESTAG_TRANSLATION "_TRA"
  94. #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */
  95. #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */
  96. #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */
  97. #define ACPI_RESTAG_VENDORDATA "_VEN"
  98. /* Default sizes for "small" resource descriptors */
  99. #define ASL_RDESC_IRQ_SIZE 0x02
  100. #define ASL_RDESC_DMA_SIZE 0x02
  101. #define ASL_RDESC_ST_DEPEND_SIZE 0x00
  102. #define ASL_RDESC_END_DEPEND_SIZE 0x00
  103. #define ASL_RDESC_IO_SIZE 0x07
  104. #define ASL_RDESC_FIXED_IO_SIZE 0x03
  105. #define ASL_RDESC_FIXED_DMA_SIZE 0x05
  106. #define ASL_RDESC_END_TAG_SIZE 0x01
  107. typedef struct asl_resource_node
  108. {
  109. UINT32 BufferLength;
  110. void *Buffer;
  111. struct asl_resource_node *Next;
  112. } ASL_RESOURCE_NODE;
  113. typedef struct asl_resource_info
  114. {
  115. ACPI_PARSE_OBJECT *DescriptorTypeOp; /* Resource descriptor parse node */
  116. ACPI_PARSE_OBJECT *MappingOp; /* Used for mapfile support */
  117. UINT32 CurrentByteOffset; /* Offset in resource template */
  118. } ASL_RESOURCE_INFO;
  119. /* Macros used to generate AML resource length fields */
  120. #define ACPI_AML_SIZE_LARGE(r) (sizeof (r) - sizeof (AML_RESOURCE_LARGE_HEADER))
  121. #define ACPI_AML_SIZE_SMALL(r) (sizeof (r) - sizeof (AML_RESOURCE_SMALL_HEADER))
  122. /*
  123. * Resource descriptors defined in the ACPI specification.
  124. *
  125. * Packing/alignment must be BYTE because these descriptors
  126. * are used to overlay the raw AML byte stream.
  127. */
  128. #pragma pack(1)
  129. /*
  130. * SMALL descriptors
  131. */
  132. #define AML_RESOURCE_SMALL_HEADER_COMMON \
  133. UINT8 DescriptorType;
  134. typedef struct aml_resource_small_header
  135. {
  136. AML_RESOURCE_SMALL_HEADER_COMMON
  137. } AML_RESOURCE_SMALL_HEADER;
  138. typedef struct aml_resource_irq
  139. {
  140. AML_RESOURCE_SMALL_HEADER_COMMON
  141. UINT16 IrqMask;
  142. UINT8 Flags;
  143. } AML_RESOURCE_IRQ;
  144. typedef struct aml_resource_irq_noflags
  145. {
  146. AML_RESOURCE_SMALL_HEADER_COMMON
  147. UINT16 IrqMask;
  148. } AML_RESOURCE_IRQ_NOFLAGS;
  149. typedef struct aml_resource_dma
  150. {
  151. AML_RESOURCE_SMALL_HEADER_COMMON
  152. UINT8 DmaChannelMask;
  153. UINT8 Flags;
  154. } AML_RESOURCE_DMA;
  155. typedef struct aml_resource_start_dependent
  156. {
  157. AML_RESOURCE_SMALL_HEADER_COMMON
  158. UINT8 Flags;
  159. } AML_RESOURCE_START_DEPENDENT;
  160. typedef struct aml_resource_start_dependent_noprio
  161. {
  162. AML_RESOURCE_SMALL_HEADER_COMMON
  163. } AML_RESOURCE_START_DEPENDENT_NOPRIO;
  164. typedef struct aml_resource_end_dependent
  165. {
  166. AML_RESOURCE_SMALL_HEADER_COMMON
  167. } AML_RESOURCE_END_DEPENDENT;
  168. typedef struct aml_resource_io
  169. {
  170. AML_RESOURCE_SMALL_HEADER_COMMON
  171. UINT8 Flags;
  172. UINT16 Minimum;
  173. UINT16 Maximum;
  174. UINT8 Alignment;
  175. UINT8 AddressLength;
  176. } AML_RESOURCE_IO;
  177. typedef struct aml_resource_fixed_io
  178. {
  179. AML_RESOURCE_SMALL_HEADER_COMMON
  180. UINT16 Address;
  181. UINT8 AddressLength;
  182. } AML_RESOURCE_FIXED_IO;
  183. typedef struct aml_resource_vendor_small
  184. {
  185. AML_RESOURCE_SMALL_HEADER_COMMON
  186. } AML_RESOURCE_VENDOR_SMALL;
  187. typedef struct aml_resource_end_tag
  188. {
  189. AML_RESOURCE_SMALL_HEADER_COMMON
  190. UINT8 Checksum;
  191. } AML_RESOURCE_END_TAG;
  192. typedef struct aml_resource_fixed_dma
  193. {
  194. AML_RESOURCE_SMALL_HEADER_COMMON
  195. UINT16 RequestLines;
  196. UINT16 Channels;
  197. UINT8 Width;
  198. } AML_RESOURCE_FIXED_DMA;
  199. /*
  200. * LARGE descriptors
  201. */
  202. #define AML_RESOURCE_LARGE_HEADER_COMMON \
  203. UINT8 DescriptorType;\
  204. UINT16 ResourceLength;
  205. typedef struct aml_resource_large_header
  206. {
  207. AML_RESOURCE_LARGE_HEADER_COMMON
  208. } AML_RESOURCE_LARGE_HEADER;
  209. /* General Flags for address space resource descriptors */
  210. #define ACPI_RESOURCE_FLAG_DEC 2
  211. #define ACPI_RESOURCE_FLAG_MIF 4
  212. #define ACPI_RESOURCE_FLAG_MAF 8
  213. typedef struct aml_resource_memory24
  214. {
  215. AML_RESOURCE_LARGE_HEADER_COMMON
  216. UINT8 Flags;
  217. UINT16 Minimum;
  218. UINT16 Maximum;
  219. UINT16 Alignment;
  220. UINT16 AddressLength;
  221. } AML_RESOURCE_MEMORY24;
  222. typedef struct aml_resource_vendor_large
  223. {
  224. AML_RESOURCE_LARGE_HEADER_COMMON
  225. } AML_RESOURCE_VENDOR_LARGE;
  226. typedef struct aml_resource_memory32
  227. {
  228. AML_RESOURCE_LARGE_HEADER_COMMON
  229. UINT8 Flags;
  230. UINT32 Minimum;
  231. UINT32 Maximum;
  232. UINT32 Alignment;
  233. UINT32 AddressLength;
  234. } AML_RESOURCE_MEMORY32;
  235. typedef struct aml_resource_fixed_memory32
  236. {
  237. AML_RESOURCE_LARGE_HEADER_COMMON
  238. UINT8 Flags;
  239. UINT32 Address;
  240. UINT32 AddressLength;
  241. } AML_RESOURCE_FIXED_MEMORY32;
  242. #define AML_RESOURCE_ADDRESS_COMMON \
  243. UINT8 ResourceType; \
  244. UINT8 Flags; \
  245. UINT8 SpecificFlags;
  246. typedef struct aml_resource_address
  247. {
  248. AML_RESOURCE_LARGE_HEADER_COMMON
  249. AML_RESOURCE_ADDRESS_COMMON
  250. } AML_RESOURCE_ADDRESS;
  251. typedef struct aml_resource_extended_address64
  252. {
  253. AML_RESOURCE_LARGE_HEADER_COMMON
  254. AML_RESOURCE_ADDRESS_COMMON
  255. UINT8 RevisionID;
  256. UINT8 Reserved;
  257. UINT64 Granularity;
  258. UINT64 Minimum;
  259. UINT64 Maximum;
  260. UINT64 TranslationOffset;
  261. UINT64 AddressLength;
  262. UINT64 TypeSpecific;
  263. } AML_RESOURCE_EXTENDED_ADDRESS64;
  264. #define AML_RESOURCE_EXTENDED_ADDRESS_REVISION 1 /* ACPI 3.0 */
  265. typedef struct aml_resource_address64
  266. {
  267. AML_RESOURCE_LARGE_HEADER_COMMON
  268. AML_RESOURCE_ADDRESS_COMMON
  269. UINT64 Granularity;
  270. UINT64 Minimum;
  271. UINT64 Maximum;
  272. UINT64 TranslationOffset;
  273. UINT64 AddressLength;
  274. } AML_RESOURCE_ADDRESS64;
  275. typedef struct aml_resource_address32
  276. {
  277. AML_RESOURCE_LARGE_HEADER_COMMON
  278. AML_RESOURCE_ADDRESS_COMMON
  279. UINT32 Granularity;
  280. UINT32 Minimum;
  281. UINT32 Maximum;
  282. UINT32 TranslationOffset;
  283. UINT32 AddressLength;
  284. } AML_RESOURCE_ADDRESS32;
  285. typedef struct aml_resource_address16
  286. {
  287. AML_RESOURCE_LARGE_HEADER_COMMON
  288. AML_RESOURCE_ADDRESS_COMMON
  289. UINT16 Granularity;
  290. UINT16 Minimum;
  291. UINT16 Maximum;
  292. UINT16 TranslationOffset;
  293. UINT16 AddressLength;
  294. } AML_RESOURCE_ADDRESS16;
  295. typedef struct aml_resource_extended_irq
  296. {
  297. AML_RESOURCE_LARGE_HEADER_COMMON
  298. UINT8 Flags;
  299. UINT8 InterruptCount;
  300. UINT32 Interrupts[1];
  301. /* ResSourceIndex, ResSource optional fields follow */
  302. } AML_RESOURCE_EXTENDED_IRQ;
  303. typedef struct aml_resource_generic_register
  304. {
  305. AML_RESOURCE_LARGE_HEADER_COMMON
  306. UINT8 AddressSpaceId;
  307. UINT8 BitWidth;
  308. UINT8 BitOffset;
  309. UINT8 AccessSize; /* ACPI 3.0, was previously Reserved */
  310. UINT64 Address;
  311. } AML_RESOURCE_GENERIC_REGISTER;
  312. /* Common descriptor for GpioInt and GpioIo (ACPI 5.0) */
  313. typedef struct aml_resource_gpio
  314. {
  315. AML_RESOURCE_LARGE_HEADER_COMMON
  316. UINT8 RevisionId;
  317. UINT8 ConnectionType;
  318. UINT16 Flags;
  319. UINT16 IntFlags;
  320. UINT8 PinConfig;
  321. UINT16 DriveStrength;
  322. UINT16 DebounceTimeout;
  323. UINT16 PinTableOffset;
  324. UINT8 ResSourceIndex;
  325. UINT16 ResSourceOffset;
  326. UINT16 VendorOffset;
  327. UINT16 VendorLength;
  328. /*
  329. * Optional fields follow immediately:
  330. * 1) PIN list (Words)
  331. * 2) Resource Source String
  332. * 3) Vendor Data bytes
  333. */
  334. } AML_RESOURCE_GPIO;
  335. #define AML_RESOURCE_GPIO_REVISION 1 /* ACPI 5.0 */
  336. /* Values for ConnectionType above */
  337. #define AML_RESOURCE_GPIO_TYPE_INT 0
  338. #define AML_RESOURCE_GPIO_TYPE_IO 1
  339. #define AML_RESOURCE_MAX_GPIOTYPE 1
  340. /* Common preamble for all serial descriptors (ACPI 5.0) */
  341. #define AML_RESOURCE_SERIAL_COMMON \
  342. UINT8 RevisionId; \
  343. UINT8 ResSourceIndex; \
  344. UINT8 Type; \
  345. UINT8 Flags; \
  346. UINT16 TypeSpecificFlags; \
  347. UINT8 TypeRevisionId; \
  348. UINT16 TypeDataLength; \
  349. /* Values for the type field above */
  350. #define AML_RESOURCE_I2C_SERIALBUSTYPE 1
  351. #define AML_RESOURCE_SPI_SERIALBUSTYPE 2
  352. #define AML_RESOURCE_UART_SERIALBUSTYPE 3
  353. #define AML_RESOURCE_MAX_SERIALBUSTYPE 3
  354. #define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */
  355. typedef struct aml_resource_common_serialbus
  356. {
  357. AML_RESOURCE_LARGE_HEADER_COMMON
  358. AML_RESOURCE_SERIAL_COMMON
  359. } AML_RESOURCE_COMMON_SERIALBUS;
  360. typedef struct aml_resource_i2c_serialbus
  361. {
  362. AML_RESOURCE_LARGE_HEADER_COMMON
  363. AML_RESOURCE_SERIAL_COMMON
  364. UINT32 ConnectionSpeed;
  365. UINT16 SlaveAddress;
  366. /*
  367. * Optional fields follow immediately:
  368. * 1) Vendor Data bytes
  369. * 2) Resource Source String
  370. */
  371. } AML_RESOURCE_I2C_SERIALBUS;
  372. #define AML_RESOURCE_I2C_REVISION 1 /* ACPI 5.0 */
  373. #define AML_RESOURCE_I2C_TYPE_REVISION 1 /* ACPI 5.0 */
  374. #define AML_RESOURCE_I2C_MIN_DATA_LEN 6
  375. typedef struct aml_resource_spi_serialbus
  376. {
  377. AML_RESOURCE_LARGE_HEADER_COMMON
  378. AML_RESOURCE_SERIAL_COMMON
  379. UINT32 ConnectionSpeed;
  380. UINT8 DataBitLength;
  381. UINT8 ClockPhase;
  382. UINT8 ClockPolarity;
  383. UINT16 DeviceSelection;
  384. /*
  385. * Optional fields follow immediately:
  386. * 1) Vendor Data bytes
  387. * 2) Resource Source String
  388. */
  389. } AML_RESOURCE_SPI_SERIALBUS;
  390. #define AML_RESOURCE_SPI_REVISION 1 /* ACPI 5.0 */
  391. #define AML_RESOURCE_SPI_TYPE_REVISION 1 /* ACPI 5.0 */
  392. #define AML_RESOURCE_SPI_MIN_DATA_LEN 9
  393. typedef struct aml_resource_uart_serialbus
  394. {
  395. AML_RESOURCE_LARGE_HEADER_COMMON
  396. AML_RESOURCE_SERIAL_COMMON
  397. UINT32 DefaultBaudRate;
  398. UINT16 RxFifoSize;
  399. UINT16 TxFifoSize;
  400. UINT8 Parity;
  401. UINT8 LinesEnabled;
  402. /*
  403. * Optional fields follow immediately:
  404. * 1) Vendor Data bytes
  405. * 2) Resource Source String
  406. */
  407. } AML_RESOURCE_UART_SERIALBUS;
  408. #define AML_RESOURCE_UART_REVISION 1 /* ACPI 5.0 */
  409. #define AML_RESOURCE_UART_TYPE_REVISION 1 /* ACPI 5.0 */
  410. #define AML_RESOURCE_UART_MIN_DATA_LEN 10
  411. /* restore default alignment */
  412. #pragma pack()
  413. /* Union of all resource descriptors, so we can allocate the worst case */
  414. typedef union aml_resource
  415. {
  416. /* Descriptor headers */
  417. UINT8 DescriptorType;
  418. AML_RESOURCE_SMALL_HEADER SmallHeader;
  419. AML_RESOURCE_LARGE_HEADER LargeHeader;
  420. /* Small resource descriptors */
  421. AML_RESOURCE_IRQ Irq;
  422. AML_RESOURCE_DMA Dma;
  423. AML_RESOURCE_START_DEPENDENT StartDpf;
  424. AML_RESOURCE_END_DEPENDENT EndDpf;
  425. AML_RESOURCE_IO Io;
  426. AML_RESOURCE_FIXED_IO FixedIo;
  427. AML_RESOURCE_FIXED_DMA FixedDma;
  428. AML_RESOURCE_VENDOR_SMALL VendorSmall;
  429. AML_RESOURCE_END_TAG EndTag;
  430. /* Large resource descriptors */
  431. AML_RESOURCE_MEMORY24 Memory24;
  432. AML_RESOURCE_GENERIC_REGISTER GenericReg;
  433. AML_RESOURCE_VENDOR_LARGE VendorLarge;
  434. AML_RESOURCE_MEMORY32 Memory32;
  435. AML_RESOURCE_FIXED_MEMORY32 FixedMemory32;
  436. AML_RESOURCE_ADDRESS16 Address16;
  437. AML_RESOURCE_ADDRESS32 Address32;
  438. AML_RESOURCE_ADDRESS64 Address64;
  439. AML_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64;
  440. AML_RESOURCE_EXTENDED_IRQ ExtendedIrq;
  441. AML_RESOURCE_GPIO Gpio;
  442. AML_RESOURCE_I2C_SERIALBUS I2cSerialBus;
  443. AML_RESOURCE_SPI_SERIALBUS SpiSerialBus;
  444. AML_RESOURCE_UART_SERIALBUS UartSerialBus;
  445. AML_RESOURCE_COMMON_SERIALBUS CommonSerialBus;
  446. /* Utility overlays */
  447. AML_RESOURCE_ADDRESS Address;
  448. UINT32 DwordItem;
  449. UINT16 WordItem;
  450. UINT8 ByteItem;
  451. } AML_RESOURCE;
  452. /* Interfaces used by both the disassembler and compiler */
  453. void
  454. MpSaveGpioInfo (
  455. ACPI_PARSE_OBJECT *Op,
  456. AML_RESOURCE *Resource,
  457. UINT32 PinCount,
  458. UINT16 *PinList,
  459. char *DeviceName);
  460. void
  461. MpSaveSerialInfo (
  462. ACPI_PARSE_OBJECT *Op,
  463. AML_RESOURCE *Resource,
  464. char *DeviceName);
  465. char *
  466. MpGetHidFromParseTree (
  467. ACPI_NAMESPACE_NODE *HidNode);
  468. char *
  469. MpGetHidViaNamestring (
  470. char *DeviceName);
  471. char *
  472. MpGetConnectionInfo (
  473. ACPI_PARSE_OBJECT *Op,
  474. UINT32 PinIndex,
  475. ACPI_NAMESPACE_NODE **TargetNode,
  476. char **TargetName);
  477. char *
  478. MpGetParentDeviceHid (
  479. ACPI_PARSE_OBJECT *Op,
  480. ACPI_NAMESPACE_NODE **TargetNode,
  481. char **ParentDeviceName);
  482. char *
  483. MpGetDdnValue (
  484. char *DeviceName);
  485. char *
  486. MpGetHidValue (
  487. ACPI_NAMESPACE_NODE *DeviceNode);
  488. #endif