utresdecode.c 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. /*******************************************************************************
  2. *
  3. * Module Name: utresdecode - Resource descriptor keyword strings
  4. *
  5. ******************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2017, 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. #include <acpi/acpi.h>
  43. #include "accommon.h"
  44. #include "acresrc.h"
  45. #define _COMPONENT ACPI_UTILITIES
  46. ACPI_MODULE_NAME("utresdecode")
  47. #if defined (ACPI_DEBUG_OUTPUT) || \
  48. defined (ACPI_DISASSEMBLER) || \
  49. defined (ACPI_DEBUGGER)
  50. /*
  51. * Strings used to decode resource descriptors.
  52. * Used by both the disassembler and the debugger resource dump routines
  53. */
  54. const char *acpi_gbl_bm_decode[] = {
  55. "NotBusMaster",
  56. "BusMaster"
  57. };
  58. const char *acpi_gbl_config_decode[] = {
  59. "0 - Good Configuration",
  60. "1 - Acceptable Configuration",
  61. "2 - Suboptimal Configuration",
  62. "3 - ***Invalid Configuration***",
  63. };
  64. const char *acpi_gbl_consume_decode[] = {
  65. "ResourceProducer",
  66. "ResourceConsumer"
  67. };
  68. const char *acpi_gbl_dec_decode[] = {
  69. "PosDecode",
  70. "SubDecode"
  71. };
  72. const char *acpi_gbl_he_decode[] = {
  73. "Level",
  74. "Edge"
  75. };
  76. const char *acpi_gbl_io_decode[] = {
  77. "Decode10",
  78. "Decode16"
  79. };
  80. const char *acpi_gbl_ll_decode[] = {
  81. "ActiveHigh",
  82. "ActiveLow",
  83. "ActiveBoth",
  84. "Reserved"
  85. };
  86. const char *acpi_gbl_max_decode[] = {
  87. "MaxNotFixed",
  88. "MaxFixed"
  89. };
  90. const char *acpi_gbl_mem_decode[] = {
  91. "NonCacheable",
  92. "Cacheable",
  93. "WriteCombining",
  94. "Prefetchable"
  95. };
  96. const char *acpi_gbl_min_decode[] = {
  97. "MinNotFixed",
  98. "MinFixed"
  99. };
  100. const char *acpi_gbl_mtp_decode[] = {
  101. "AddressRangeMemory",
  102. "AddressRangeReserved",
  103. "AddressRangeACPI",
  104. "AddressRangeNVS"
  105. };
  106. const char *acpi_gbl_rng_decode[] = {
  107. "InvalidRanges",
  108. "NonISAOnlyRanges",
  109. "ISAOnlyRanges",
  110. "EntireRange"
  111. };
  112. const char *acpi_gbl_rw_decode[] = {
  113. "ReadOnly",
  114. "ReadWrite"
  115. };
  116. const char *acpi_gbl_shr_decode[] = {
  117. "Exclusive",
  118. "Shared",
  119. "ExclusiveAndWake", /* ACPI 5.0 */
  120. "SharedAndWake" /* ACPI 5.0 */
  121. };
  122. const char *acpi_gbl_siz_decode[] = {
  123. "Transfer8",
  124. "Transfer8_16",
  125. "Transfer16",
  126. "InvalidSize"
  127. };
  128. const char *acpi_gbl_trs_decode[] = {
  129. "DenseTranslation",
  130. "SparseTranslation"
  131. };
  132. const char *acpi_gbl_ttp_decode[] = {
  133. "TypeStatic",
  134. "TypeTranslation"
  135. };
  136. const char *acpi_gbl_typ_decode[] = {
  137. "Compatibility",
  138. "TypeA",
  139. "TypeB",
  140. "TypeF"
  141. };
  142. const char *acpi_gbl_ppc_decode[] = {
  143. "PullDefault",
  144. "PullUp",
  145. "PullDown",
  146. "PullNone"
  147. };
  148. const char *acpi_gbl_ior_decode[] = {
  149. "IoRestrictionNone",
  150. "IoRestrictionInputOnly",
  151. "IoRestrictionOutputOnly",
  152. "IoRestrictionNoneAndPreserve"
  153. };
  154. const char *acpi_gbl_dts_decode[] = {
  155. "Width8bit",
  156. "Width16bit",
  157. "Width32bit",
  158. "Width64bit",
  159. "Width128bit",
  160. "Width256bit",
  161. };
  162. /* GPIO connection type */
  163. const char *acpi_gbl_ct_decode[] = {
  164. "Interrupt",
  165. "I/O"
  166. };
  167. /* Serial bus type */
  168. const char *acpi_gbl_sbt_decode[] = {
  169. "/* UNKNOWN serial bus type */",
  170. "I2C",
  171. "SPI",
  172. "UART"
  173. };
  174. /* I2C serial bus access mode */
  175. const char *acpi_gbl_am_decode[] = {
  176. "AddressingMode7Bit",
  177. "AddressingMode10Bit"
  178. };
  179. /* I2C serial bus slave mode */
  180. const char *acpi_gbl_sm_decode[] = {
  181. "ControllerInitiated",
  182. "DeviceInitiated"
  183. };
  184. /* SPI serial bus wire mode */
  185. const char *acpi_gbl_wm_decode[] = {
  186. "FourWireMode",
  187. "ThreeWireMode"
  188. };
  189. /* SPI serial clock phase */
  190. const char *acpi_gbl_cph_decode[] = {
  191. "ClockPhaseFirst",
  192. "ClockPhaseSecond"
  193. };
  194. /* SPI serial bus clock polarity */
  195. const char *acpi_gbl_cpo_decode[] = {
  196. "ClockPolarityLow",
  197. "ClockPolarityHigh"
  198. };
  199. /* SPI serial bus device polarity */
  200. const char *acpi_gbl_dp_decode[] = {
  201. "PolarityLow",
  202. "PolarityHigh"
  203. };
  204. /* UART serial bus endian */
  205. const char *acpi_gbl_ed_decode[] = {
  206. "LittleEndian",
  207. "BigEndian"
  208. };
  209. /* UART serial bus bits per byte */
  210. const char *acpi_gbl_bpb_decode[] = {
  211. "DataBitsFive",
  212. "DataBitsSix",
  213. "DataBitsSeven",
  214. "DataBitsEight",
  215. "DataBitsNine",
  216. "/* UNKNOWN Bits per byte */",
  217. "/* UNKNOWN Bits per byte */",
  218. "/* UNKNOWN Bits per byte */"
  219. };
  220. /* UART serial bus stop bits */
  221. const char *acpi_gbl_sb_decode[] = {
  222. "StopBitsZero",
  223. "StopBitsOne",
  224. "StopBitsOnePlusHalf",
  225. "StopBitsTwo"
  226. };
  227. /* UART serial bus flow control */
  228. const char *acpi_gbl_fc_decode[] = {
  229. "FlowControlNone",
  230. "FlowControlHardware",
  231. "FlowControlXON",
  232. "/* UNKNOWN flow control keyword */"
  233. };
  234. /* UART serial bus parity type */
  235. const char *acpi_gbl_pt_decode[] = {
  236. "ParityTypeNone",
  237. "ParityTypeEven",
  238. "ParityTypeOdd",
  239. "ParityTypeMark",
  240. "ParityTypeSpace",
  241. "/* UNKNOWN parity keyword */",
  242. "/* UNKNOWN parity keyword */",
  243. "/* UNKNOWN parity keyword */"
  244. };
  245. /* pin_config type */
  246. const char *acpi_gbl_ptyp_decode[] = {
  247. "Default",
  248. "Bias Pull-up",
  249. "Bias Pull-down",
  250. "Bias Default",
  251. "Bias Disable",
  252. "Bias High Impedance",
  253. "Bias Bus Hold",
  254. "Drive Open Drain",
  255. "Drive Open Source",
  256. "Drive Push Pull",
  257. "Drive Strength",
  258. "Slew Rate",
  259. "Input Debounce",
  260. "Input Schmitt Trigger",
  261. };
  262. #endif