1 /*******************************************************************************
2  *
3  * Module Name: utresdecode - Resource descriptor keyword strings
4  *
5  ******************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2019, Intel Corp.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  *    notice, this list of conditions, and the following disclaimer,
16  *    without modification.
17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18  *    substantially similar to the "NO WARRANTY" disclaimer below
19  *    ("Disclaimer") and any redistribution must be conditioned upon
20  *    including a substantially similar Disclaimer requirement for further
21  *    binary redistribution.
22  * 3. Neither the names of the above-listed copyright holders nor the names
23  *    of any contributors may be used to endorse or promote products derived
24  *    from this software without specific prior written permission.
25  *
26  * Alternatively, this software may be distributed under the terms of the
27  * GNU General Public License ("GPL") version 2 as published by the Free
28  * Software Foundation.
29  *
30  * NO WARRANTY
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGES.
42  */
43 
44 #include "acpi.h"
45 #include "accommon.h"
46 #include "acresrc.h"
47 
48 
49 #define _COMPONENT          ACPI_UTILITIES
50         ACPI_MODULE_NAME    ("utresdecode")
51 
52 
53 #if defined (ACPI_DEBUG_OUTPUT) || \
54     defined (ACPI_DISASSEMBLER) || \
55     defined (ACPI_DEBUGGER)
56 
57 /*
58  * Strings used to decode resource descriptors.
59  * Used by both the disassembler and the debugger resource dump routines
60  */
61 const char                      *AcpiGbl_BmDecode[] =
62 {
63     "NotBusMaster",
64     "BusMaster"
65 };
66 
67 const char                      *AcpiGbl_ConfigDecode[] =
68 {
69     "0 - Good Configuration",
70     "1 - Acceptable Configuration",
71     "2 - Suboptimal Configuration",
72     "3 - ***Invalid Configuration***",
73 };
74 
75 const char                      *AcpiGbl_ConsumeDecode[] =
76 {
77     "ResourceProducer",
78     "ResourceConsumer"
79 };
80 
81 const char                      *AcpiGbl_DecDecode[] =
82 {
83     "PosDecode",
84     "SubDecode"
85 };
86 
87 const char                      *AcpiGbl_HeDecode[] =
88 {
89     "Level",
90     "Edge"
91 };
92 
93 const char                      *AcpiGbl_IoDecode[] =
94 {
95     "Decode10",
96     "Decode16"
97 };
98 
99 const char                      *AcpiGbl_LlDecode[] =
100 {
101     "ActiveHigh",
102     "ActiveLow",
103     "ActiveBoth",
104     "Reserved"
105 };
106 
107 const char                      *AcpiGbl_MaxDecode[] =
108 {
109     "MaxNotFixed",
110     "MaxFixed"
111 };
112 
113 const char                      *AcpiGbl_MemDecode[] =
114 {
115     "NonCacheable",
116     "Cacheable",
117     "WriteCombining",
118     "Prefetchable"
119 };
120 
121 const char                      *AcpiGbl_MinDecode[] =
122 {
123     "MinNotFixed",
124     "MinFixed"
125 };
126 
127 const char                      *AcpiGbl_MtpDecode[] =
128 {
129     "AddressRangeMemory",
130     "AddressRangeReserved",
131     "AddressRangeACPI",
132     "AddressRangeNVS"
133 };
134 
135 const char                      *AcpiGbl_RngDecode[] =
136 {
137     "InvalidRanges",
138     "NonISAOnlyRanges",
139     "ISAOnlyRanges",
140     "EntireRange"
141 };
142 
143 const char                      *AcpiGbl_RwDecode[] =
144 {
145     "ReadOnly",
146     "ReadWrite"
147 };
148 
149 const char                      *AcpiGbl_ShrDecode[] =
150 {
151     "Exclusive",
152     "Shared",
153     "ExclusiveAndWake",         /* ACPI 5.0 */
154     "SharedAndWake"             /* ACPI 5.0 */
155 };
156 
157 const char                      *AcpiGbl_SizDecode[] =
158 {
159     "Transfer8",
160     "Transfer8_16",
161     "Transfer16",
162     "InvalidSize"
163 };
164 
165 const char                      *AcpiGbl_TrsDecode[] =
166 {
167     "DenseTranslation",
168     "SparseTranslation"
169 };
170 
171 const char                      *AcpiGbl_TtpDecode[] =
172 {
173     "TypeStatic",
174     "TypeTranslation"
175 };
176 
177 const char                      *AcpiGbl_TypDecode[] =
178 {
179     "Compatibility",
180     "TypeA",
181     "TypeB",
182     "TypeF"
183 };
184 
185 const char                      *AcpiGbl_PpcDecode[] =
186 {
187     "PullDefault",
188     "PullUp",
189     "PullDown",
190     "PullNone"
191 };
192 
193 const char                      *AcpiGbl_IorDecode[] =
194 {
195     "IoRestrictionNone",
196     "IoRestrictionInputOnly",
197     "IoRestrictionOutputOnly",
198     "IoRestrictionNoneAndPreserve"
199 };
200 
201 const char                      *AcpiGbl_DtsDecode[] =
202 {
203     "Width8bit",
204     "Width16bit",
205     "Width32bit",
206     "Width64bit",
207     "Width128bit",
208     "Width256bit",
209 };
210 
211 /* GPIO connection type */
212 
213 const char                      *AcpiGbl_CtDecode[] =
214 {
215     "Interrupt",
216     "I/O"
217 };
218 
219 /* Serial bus type */
220 
221 const char                      *AcpiGbl_SbtDecode[] =
222 {
223     "/* UNKNOWN serial bus type */",
224     "I2C",
225     "SPI",
226     "UART"
227 };
228 
229 /* I2C serial bus access mode */
230 
231 const char                      *AcpiGbl_AmDecode[] =
232 {
233     "AddressingMode7Bit",
234     "AddressingMode10Bit"
235 };
236 
237 /* I2C serial bus slave mode */
238 
239 const char                      *AcpiGbl_SmDecode[] =
240 {
241     "ControllerInitiated",
242     "DeviceInitiated"
243 };
244 
245 /* SPI serial bus wire mode */
246 
247 const char                      *AcpiGbl_WmDecode[] =
248 {
249     "FourWireMode",
250     "ThreeWireMode"
251 };
252 
253 /* SPI serial clock phase */
254 
255 const char                      *AcpiGbl_CphDecode[] =
256 {
257     "ClockPhaseFirst",
258     "ClockPhaseSecond"
259 };
260 
261 /* SPI serial bus clock polarity */
262 
263 const char                      *AcpiGbl_CpoDecode[] =
264 {
265     "ClockPolarityLow",
266     "ClockPolarityHigh"
267 };
268 
269 /* SPI serial bus device polarity */
270 
271 const char                      *AcpiGbl_DpDecode[] =
272 {
273     "PolarityLow",
274     "PolarityHigh"
275 };
276 
277 /* UART serial bus endian */
278 
279 const char                      *AcpiGbl_EdDecode[] =
280 {
281     "LittleEndian",
282     "BigEndian"
283 };
284 
285 /* UART serial bus bits per byte */
286 
287 const char                      *AcpiGbl_BpbDecode[] =
288 {
289     "DataBitsFive",
290     "DataBitsSix",
291     "DataBitsSeven",
292     "DataBitsEight",
293     "DataBitsNine",
294     "/* UNKNOWN Bits per byte */",
295     "/* UNKNOWN Bits per byte */",
296     "/* UNKNOWN Bits per byte */"
297 };
298 
299 /* UART serial bus stop bits */
300 
301 const char                      *AcpiGbl_SbDecode[] =
302 {
303     "StopBitsZero",
304     "StopBitsOne",
305     "StopBitsOnePlusHalf",
306     "StopBitsTwo"
307 };
308 
309 /* UART serial bus flow control */
310 
311 const char                      *AcpiGbl_FcDecode[] =
312 {
313     "FlowControlNone",
314     "FlowControlHardware",
315     "FlowControlXON",
316     "/* UNKNOWN flow control keyword */"
317 };
318 
319 /* UART serial bus parity type */
320 
321 const char                      *AcpiGbl_PtDecode[] =
322 {
323     "ParityTypeNone",
324     "ParityTypeEven",
325     "ParityTypeOdd",
326     "ParityTypeMark",
327     "ParityTypeSpace",
328     "/* UNKNOWN parity keyword */",
329     "/* UNKNOWN parity keyword */",
330     "/* UNKNOWN parity keyword */"
331 };
332 
333 /* PinConfig type */
334 
335 const char                      *AcpiGbl_PtypDecode[] =
336 {
337     "Default",
338     "Bias Pull-up",
339     "Bias Pull-down",
340     "Bias Default",
341     "Bias Disable",
342     "Bias High Impedance",
343     "Bias Bus Hold",
344     "Drive Open Drain",
345     "Drive Open Source",
346     "Drive Push Pull",
347     "Drive Strength",
348     "Slew Rate",
349     "Input Debounce",
350     "Input Schmitt Trigger",
351 };
352 
353 #endif
354