utresdecode.c 4.9 KB

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