dmtable.c revision 1.1.1.22 1 1.1 jruoho /******************************************************************************
2 1.1 jruoho *
3 1.1 jruoho * Module Name: dmtable - Support for ACPI tables that contain no AML code
4 1.1 jruoho *
5 1.1 jruoho *****************************************************************************/
6 1.1 jruoho
7 1.1.1.2 jruoho /*
8 1.1.1.22 christos * Copyright (C) 2000 - 2022, Intel Corp.
9 1.1 jruoho * All rights reserved.
10 1.1 jruoho *
11 1.1.1.2 jruoho * Redistribution and use in source and binary forms, with or without
12 1.1.1.2 jruoho * modification, are permitted provided that the following conditions
13 1.1.1.2 jruoho * are met:
14 1.1.1.2 jruoho * 1. Redistributions of source code must retain the above copyright
15 1.1.1.2 jruoho * notice, this list of conditions, and the following disclaimer,
16 1.1.1.2 jruoho * without modification.
17 1.1.1.2 jruoho * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1.1.2 jruoho * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1.1.2 jruoho * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1.1.2 jruoho * including a substantially similar Disclaimer requirement for further
21 1.1.1.2 jruoho * binary redistribution.
22 1.1.1.2 jruoho * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1.1.2 jruoho * of any contributors may be used to endorse or promote products derived
24 1.1.1.2 jruoho * from this software without specific prior written permission.
25 1.1.1.2 jruoho *
26 1.1.1.2 jruoho * Alternatively, this software may be distributed under the terms of the
27 1.1.1.2 jruoho * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1.1.2 jruoho * Software Foundation.
29 1.1.1.2 jruoho *
30 1.1.1.2 jruoho * NO WARRANTY
31 1.1.1.2 jruoho * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1.1.2 jruoho * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1.1.18 christos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 1.1.1.2 jruoho * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1.1.2 jruoho * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1.1.2 jruoho * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1.1.2 jruoho * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1.1.2 jruoho * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1.1.2 jruoho * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1.1.2 jruoho * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1.1.2 jruoho * POSSIBILITY OF SUCH DAMAGES.
42 1.1.1.2 jruoho */
43 1.1 jruoho
44 1.1 jruoho #include "acpi.h"
45 1.1 jruoho #include "accommon.h"
46 1.1 jruoho #include "acdisasm.h"
47 1.1 jruoho #include "actables.h"
48 1.1.1.2 jruoho #include "aslcompiler.h"
49 1.1 jruoho
50 1.1 jruoho /* This module used for application-level code only */
51 1.1 jruoho
52 1.1 jruoho #define _COMPONENT ACPI_CA_DISASSEMBLER
53 1.1 jruoho ACPI_MODULE_NAME ("dmtable")
54 1.1 jruoho
55 1.1.1.7 christos const AH_TABLE *
56 1.1.1.7 christos AcpiAhGetTableInfo (
57 1.1.1.7 christos char *Signature);
58 1.1.1.7 christos
59 1.1.1.7 christos
60 1.1.1.3 jruoho /* Common format strings for commented values */
61 1.1.1.3 jruoho
62 1.1.1.21 christos #define UINT8_FORMAT "%2.2X [%s]\n"
63 1.1.1.21 christos #define UINT8_FORMAT_NO_NEWLINE "%2.2X [%s]"
64 1.1.1.21 christos #define UINT16_FORMAT "%4.4X [%s]\n"
65 1.1.1.21 christos #define UINT32_FORMAT "%8.8X [%s]\n"
66 1.1.1.21 christos #define STRING_FORMAT "[%s]\n"
67 1.1.1.3 jruoho
68 1.1 jruoho /* These tables map a subtable type to a description string */
69 1.1 jruoho
70 1.1.1.20 christos static const char *AcpiDmAestResourceNames[] =
71 1.1.1.20 christos {
72 1.1.1.20 christos "Cache Resource",
73 1.1.1.20 christos "TLB Resource",
74 1.1.1.20 christos "Generic Resource",
75 1.1.1.20 christos "Unknown Resource Type" /* Reserved */
76 1.1.1.20 christos };
77 1.1.1.20 christos
78 1.1.1.20 christos static const char *AcpiDmAestSubnames[] =
79 1.1.1.20 christos {
80 1.1.1.20 christos "Processor Error Node",
81 1.1.1.20 christos "Memory Error Node",
82 1.1.1.20 christos "SMMU Error Node",
83 1.1.1.20 christos "Vendor-defined Error Node",
84 1.1.1.20 christos "GIC Error Node",
85 1.1.1.20 christos "Unknown Subtable Type" /* Reserved */
86 1.1.1.20 christos };
87 1.1.1.20 christos
88 1.1.1.20 christos static const char *AcpiDmAestCacheNames[] =
89 1.1.1.20 christos {
90 1.1.1.20 christos "Data Cache",
91 1.1.1.20 christos "Instruction Cache",
92 1.1.1.20 christos "Unified Cache",
93 1.1.1.20 christos "Unknown Cache Type" /* Reserved */
94 1.1.1.20 christos };
95 1.1.1.20 christos
96 1.1.1.20 christos static const char *AcpiDmAestGicNames[] =
97 1.1.1.20 christos {
98 1.1.1.20 christos "GIC CPU",
99 1.1.1.20 christos "GIC Distributor",
100 1.1.1.20 christos "GIC Redistributor",
101 1.1.1.20 christos "GIC ITS",
102 1.1.1.20 christos "Unknown GIC Interface Type" /* Reserved */
103 1.1.1.20 christos };
104 1.1.1.20 christos
105 1.1.1.20 christos static const char *AcpiDmAestXfaceNames[] =
106 1.1.1.20 christos {
107 1.1.1.20 christos "System Register Interface",
108 1.1.1.20 christos "Memory Mapped Interface",
109 1.1.1.20 christos "Unknown Interface Type" /* Reserved */
110 1.1.1.20 christos };
111 1.1.1.20 christos
112 1.1.1.20 christos static const char *AcpiDmAestXruptNames[] =
113 1.1.1.20 christos {
114 1.1.1.20 christos "Fault Handling Interrupt",
115 1.1.1.20 christos "Error Recovery Interrupt",
116 1.1.1.20 christos "Unknown Interrupt Type" /* Reserved */
117 1.1.1.20 christos };
118 1.1.1.20 christos
119 1.1 jruoho static const char *AcpiDmAsfSubnames[] =
120 1.1 jruoho {
121 1.1 jruoho "ASF Information",
122 1.1 jruoho "ASF Alerts",
123 1.1 jruoho "ASF Remote Control",
124 1.1 jruoho "ASF RMCP Boot Options",
125 1.1 jruoho "ASF Address",
126 1.1.1.7 christos "Unknown Subtable Type" /* Reserved */
127 1.1 jruoho };
128 1.1 jruoho
129 1.1.1.18 christos static const char *AcpiDmCedtSubnames[] =
130 1.1.1.18 christos {
131 1.1.1.18 christos "CXL Host Bridge Structure",
132 1.1.1.19 christos "CXL Fixed Memory Window Structure",
133 1.1.1.18 christos "Unknown Subtable Type" /* Reserved */
134 1.1.1.18 christos };
135 1.1.1.18 christos
136 1.1 jruoho static const char *AcpiDmDmarSubnames[] =
137 1.1 jruoho {
138 1.1 jruoho "Hardware Unit Definition",
139 1.1 jruoho "Reserved Memory Region",
140 1.1 jruoho "Root Port ATS Capability",
141 1.1 jruoho "Remapping Hardware Static Affinity",
142 1.1.1.5 christos "ACPI Namespace Device Declaration",
143 1.1.1.22 christos "SoC Integrated Address Translation Cache",
144 1.1.1.7 christos "Unknown Subtable Type" /* Reserved */
145 1.1 jruoho };
146 1.1 jruoho
147 1.1.1.5 christos static const char *AcpiDmDmarScope[] =
148 1.1.1.5 christos {
149 1.1.1.5 christos "Reserved value",
150 1.1.1.5 christos "PCI Endpoint Device",
151 1.1.1.5 christos "PCI Bridge Device",
152 1.1.1.5 christos "IOAPIC Device",
153 1.1.1.5 christos "Message-capable HPET Device",
154 1.1.1.5 christos "Namespace Device",
155 1.1.1.5 christos "Unknown Scope Type" /* Reserved */
156 1.1.1.5 christos };
157 1.1.1.5 christos
158 1.1.1.2 jruoho static const char *AcpiDmEinjActions[] =
159 1.1.1.2 jruoho {
160 1.1.1.2 jruoho "Begin Operation",
161 1.1.1.2 jruoho "Get Trigger Table",
162 1.1.1.2 jruoho "Set Error Type",
163 1.1.1.2 jruoho "Get Error Type",
164 1.1.1.2 jruoho "End Operation",
165 1.1.1.2 jruoho "Execute Operation",
166 1.1.1.2 jruoho "Check Busy Status",
167 1.1.1.2 jruoho "Get Command Status",
168 1.1.1.4 christos "Set Error Type With Address",
169 1.1.1.9 christos "Get Execute Timings",
170 1.1.1.2 jruoho "Unknown Action"
171 1.1.1.2 jruoho };
172 1.1.1.2 jruoho
173 1.1.1.2 jruoho static const char *AcpiDmEinjInstructions[] =
174 1.1.1.2 jruoho {
175 1.1.1.2 jruoho "Read Register",
176 1.1.1.2 jruoho "Read Register Value",
177 1.1.1.2 jruoho "Write Register",
178 1.1.1.2 jruoho "Write Register Value",
179 1.1.1.2 jruoho "Noop",
180 1.1.1.4 christos "Flush Cacheline",
181 1.1.1.2 jruoho "Unknown Instruction"
182 1.1.1.2 jruoho };
183 1.1.1.2 jruoho
184 1.1.1.2 jruoho static const char *AcpiDmErstActions[] =
185 1.1.1.2 jruoho {
186 1.1.1.2 jruoho "Begin Write Operation",
187 1.1.1.2 jruoho "Begin Read Operation",
188 1.1.1.2 jruoho "Begin Clear Operation",
189 1.1.1.2 jruoho "End Operation",
190 1.1.1.2 jruoho "Set Record Offset",
191 1.1.1.2 jruoho "Execute Operation",
192 1.1.1.2 jruoho "Check Busy Status",
193 1.1.1.2 jruoho "Get Command Status",
194 1.1.1.2 jruoho "Get Record Identifier",
195 1.1.1.2 jruoho "Set Record Identifier",
196 1.1.1.2 jruoho "Get Record Count",
197 1.1.1.2 jruoho "Begin Dummy Write",
198 1.1.1.2 jruoho "Unused/Unknown Action",
199 1.1.1.2 jruoho "Get Error Address Range",
200 1.1.1.2 jruoho "Get Error Address Length",
201 1.1.1.2 jruoho "Get Error Attributes",
202 1.1.1.9 christos "Execute Timings",
203 1.1.1.2 jruoho "Unknown Action"
204 1.1.1.2 jruoho };
205 1.1.1.2 jruoho
206 1.1.1.2 jruoho static const char *AcpiDmErstInstructions[] =
207 1.1.1.2 jruoho {
208 1.1.1.2 jruoho "Read Register",
209 1.1.1.2 jruoho "Read Register Value",
210 1.1.1.2 jruoho "Write Register",
211 1.1.1.2 jruoho "Write Register Value",
212 1.1.1.2 jruoho "Noop",
213 1.1.1.2 jruoho "Load Var1",
214 1.1.1.2 jruoho "Load Var2",
215 1.1.1.2 jruoho "Store Var1",
216 1.1.1.2 jruoho "Add",
217 1.1.1.2 jruoho "Subtract",
218 1.1.1.2 jruoho "Add Value",
219 1.1.1.2 jruoho "Subtract Value",
220 1.1.1.2 jruoho "Stall",
221 1.1.1.2 jruoho "Stall While True",
222 1.1.1.2 jruoho "Skip Next If True",
223 1.1.1.2 jruoho "GoTo",
224 1.1.1.2 jruoho "Set Source Address",
225 1.1.1.2 jruoho "Set Destination Address",
226 1.1.1.2 jruoho "Move Data",
227 1.1.1.2 jruoho "Unknown Instruction"
228 1.1.1.2 jruoho };
229 1.1.1.2 jruoho
230 1.1.1.5 christos static const char *AcpiDmGtdtSubnames[] =
231 1.1.1.5 christos {
232 1.1.1.5 christos "Generic Timer Block",
233 1.1.1.5 christos "Generic Watchdog Timer",
234 1.1.1.7 christos "Unknown Subtable Type" /* Reserved */
235 1.1.1.5 christos };
236 1.1.1.5 christos
237 1.1 jruoho static const char *AcpiDmHestSubnames[] =
238 1.1 jruoho {
239 1.1 jruoho "IA-32 Machine Check Exception",
240 1.1 jruoho "IA-32 Corrected Machine Check",
241 1.1 jruoho "IA-32 Non-Maskable Interrupt",
242 1.1.1.13 christos "Unknown Subtable Type", /* 3 - Reserved */
243 1.1.1.13 christos "Unknown Subtable Type", /* 4 - Reserved */
244 1.1.1.13 christos "Unknown Subtable Type", /* 5 - Reserved */
245 1.1 jruoho "PCI Express Root Port AER",
246 1.1 jruoho "PCI Express AER (AER Endpoint)",
247 1.1 jruoho "PCI Express/PCI-X Bridge AER",
248 1.1 jruoho "Generic Hardware Error Source",
249 1.1.1.9 christos "Generic Hardware Error Source V2",
250 1.1.1.12 christos "IA-32 Deferred Machine Check",
251 1.1.1.7 christos "Unknown Subtable Type" /* Reserved */
252 1.1 jruoho };
253 1.1 jruoho
254 1.1 jruoho static const char *AcpiDmHestNotifySubnames[] =
255 1.1 jruoho {
256 1.1 jruoho "Polled",
257 1.1 jruoho "External Interrupt",
258 1.1 jruoho "Local Interrupt",
259 1.1 jruoho "SCI",
260 1.1 jruoho "NMI",
261 1.1.1.4 christos "CMCI", /* ACPI 5.0 */
262 1.1.1.4 christos "MCE", /* ACPI 5.0 */
263 1.1.1.9 christos "GPIO", /* ACPI 6.0 */
264 1.1.1.9 christos "SEA", /* ACPI 6.1 */
265 1.1.1.9 christos "SEI", /* ACPI 6.1 */
266 1.1.1.9 christos "GSIV", /* ACPI 6.1 */
267 1.1.1.12 christos "Software Delegated Exception", /* ACPI 6.2 */
268 1.1 jruoho "Unknown Notify Type" /* Reserved */
269 1.1 jruoho };
270 1.1 jruoho
271 1.1.1.12 christos static const char *AcpiDmHmatSubnames[] =
272 1.1.1.12 christos {
273 1.1.1.16 christos "Memory Proximity Domain Attributes",
274 1.1.1.12 christos "System Locality Latency and Bandwidth Information",
275 1.1.1.12 christos "Memory Side Cache Information",
276 1.1.1.12 christos "Unknown Structure Type" /* Reserved */
277 1.1.1.12 christos };
278 1.1.1.12 christos
279 1.1 jruoho static const char *AcpiDmMadtSubnames[] =
280 1.1 jruoho {
281 1.1.1.5 christos "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
282 1.1.1.5 christos "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */
283 1.1.1.5 christos "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */
284 1.1.1.5 christos "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */
285 1.1.1.5 christos "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */
286 1.1.1.5 christos "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */
287 1.1.1.5 christos "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */
288 1.1.1.5 christos "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */
289 1.1.1.5 christos "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */
290 1.1.1.5 christos "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */
291 1.1.1.5 christos "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */
292 1.1.1.5 christos "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */
293 1.1.1.5 christos "Generic Interrupt Distributor", /* ACPI_MADT_GENERIC_DISTRIBUTOR */
294 1.1.1.5 christos "Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */
295 1.1.1.5 christos "Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */
296 1.1.1.7 christos "Generic Interrupt Translator", /* ACPI_MADT_GENERIC_TRANSLATOR */
297 1.1.1.19 christos "Mutiprocessor Wakeup", /* ACPI_MADT_TYPE_MULTIPROC_WAKEUP */
298 1.1.1.22 christos "Unknown Subtable Type", /* Reserved */
299 1.1.1.22 christos "Types 80-FF are used for OEM data" /* Reserved for OEM data */
300 1.1.1.7 christos };
301 1.1.1.7 christos
302 1.1.1.7 christos static const char *AcpiDmNfitSubnames[] =
303 1.1.1.7 christos {
304 1.1.1.7 christos "System Physical Address Range", /* ACPI_NFIT_TYPE_SYSTEM_ADDRESS */
305 1.1.1.7 christos "Memory Range Map", /* ACPI_NFIT_TYPE_MEMORY_MAP */
306 1.1.1.7 christos "Interleave Info", /* ACPI_NFIT_TYPE_INTERLEAVE */
307 1.1.1.7 christos "SMBIOS Information", /* ACPI_NFIT_TYPE_SMBIOS */
308 1.1.1.7 christos "NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */
309 1.1.1.7 christos "NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */
310 1.1.1.7 christos "Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
311 1.1.1.13 christos "Platform Capabilities", /* ACPI_NFIT_TYPE_CAPABILITIES */
312 1.1.1.7 christos "Unknown Subtable Type" /* Reserved */
313 1.1.1.4 christos };
314 1.1.1.4 christos
315 1.1.1.20 christos static const char *AcpiDmNhltLinkTypeNames[] =
316 1.1.1.20 christos {
317 1.1.1.20 christos "Reserved for HD-Audio", /* ACPI_NHLT_RESERVED_HD_AUDIO */
318 1.1.1.20 christos "Reserved for DSP", /* ACPI_NHLT_RESERVED_DSP */
319 1.1.1.20 christos "Type PDM", /* ACPI_NHLT_PDM */
320 1.1.1.20 christos "Type SSP", /* ACPI_NHLT_SSP */
321 1.1.1.20 christos "Reserved for SlimBus", /* ACPI_NHLT_RESERVED_SLIMBUS */
322 1.1.1.20 christos "Reserved for SoundWire", /* ACPI_NHLT_RESERVED_SOUNDWIRE */
323 1.1.1.20 christos "Unknown Link Type" /* Reserved */
324 1.1.1.20 christos };
325 1.1.1.20 christos
326 1.1.1.20 christos static const char *AcpiDmNhltDirectionNames[] =
327 1.1.1.20 christos {
328 1.1.1.20 christos "Render", /* ACPI_NHLT_DIR_RENDER */
329 1.1.1.20 christos "Capture", /* ACPI_NHLT_DIR_CAPTURE */
330 1.1.1.20 christos "Render with Loopback", /* ACPI_NHLT_DIR_RENDER_LOOPBACK */
331 1.1.1.20 christos "Feedback for Render", /* ACPI_NHLT_DIR_RENDER_FEEDBACK */
332 1.1.1.20 christos "Unknown Direction" /* Reserved */
333 1.1.1.20 christos };
334 1.1.1.20 christos
335 1.1.1.21 christos static const char *AcpiDmNhltMicTypeNames[] =
336 1.1.1.21 christos {
337 1.1.1.21 christos "Omnidirectional", /* ACPI_NHLT_MIC_OMNIDIRECTIONAL */
338 1.1.1.21 christos "Subcardioid", /* ACPI_NHLT_MIC_SUBCARDIOID */
339 1.1.1.21 christos "Cardioid", /* ACPI_NHLT_MIC_CARDIOID */
340 1.1.1.21 christos "SuperCardioid", /* ACPI_NHLT_MIC_SUPER_CARDIOID */
341 1.1.1.21 christos "HyperCardioid", /* ACPI_NHLT_MIC_HYPER_CARDIOID */
342 1.1.1.21 christos "8 Shaped", /* ACPI_NHLT_MIC_8_SHAPED */
343 1.1.1.21 christos "Reserved Mic Type", /* Reserved */
344 1.1.1.21 christos "Vendor Defined", /* ACPI_NHLT_MIC_VENDOR_DEFINED */
345 1.1.1.21 christos "Unknown Mic Type" /* ACPI_NHLT_MIC_RESERVED */
346 1.1.1.21 christos };
347 1.1.1.21 christos
348 1.1.1.21 christos static const char *AcpiDmNhltMicPositionNames[] =
349 1.1.1.21 christos {
350 1.1.1.21 christos "Top", /* ACPI_NHLT_MIC_POSITION_TOP */
351 1.1.1.21 christos "Bottom", /* ACPI_NHLT_MIC_POSITION_BOTTOM */
352 1.1.1.21 christos "Left", /* ACPI_NHLT_MIC_POSITION_LEFT */
353 1.1.1.21 christos "Right", /* ACPI_NHLT_MIC_POSITION_RIGHT */
354 1.1.1.21 christos "Front", /* ACPI_NHLT_MIC_POSITION_FRONT */
355 1.1.1.21 christos "Back", /* ACPI_NHLT_MIC_POSITION_BACK */
356 1.1.1.21 christos "Unknown Mic Position" /* 6 and above are reserved */
357 1.1.1.21 christos };
358 1.1.1.21 christos
359 1.1.1.21 christos static const char *AcpiDmNhltMicArrayTypeNames[] =
360 1.1.1.21 christos {
361 1.1.1.21 christos "Unknown Array Type", /* ACPI_NHLT_ARRAY_TYPE_RESERVED */
362 1.1.1.21 christos "Small Linear 2-element", /* ACPI_NHLT_SMALL_LINEAR_2ELEMENT */
363 1.1.1.21 christos "Big Linear 2-element", /* ACPI_NHLT_BIG_LINEAR_2ELEMENT */
364 1.1.1.21 christos "Linear 4-element 1st Geometry", /* ACPI_NHLT_FIRST_GEOMETRY_LINEAR_4ELEMENT */
365 1.1.1.21 christos "Planar L-shaped 4-element", /* ACPI_NHLT_PLANAR_LSHAPED_4ELEMENT */
366 1.1.1.21 christos "Linear 4-element 2nd Geometry", /* ACPI_NHLT_SECOND_GEOMETRY_LINEAR_4ELEMENT */
367 1.1.1.21 christos "Vendor Defined" /* ACPI_NHLT_VENDOR_DEFINED */
368 1.1.1.21 christos };
369 1.1.1.21 christos
370 1.1.1.21 christos static const char *AcpiDmNhltConfigTypeNames[] =
371 1.1.1.21 christos {
372 1.1.1.21 christos "Generic Type", /* ACPI_NHLT_CONFIG_TYPE_GENERIC */
373 1.1.1.21 christos "Microphone Array", /* ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY */
374 1.1.1.21 christos "Reserved", /* ACPI_NHLT_CONFIG_TYPE_RESERVED */
375 1.1.1.21 christos "Render Feedback", /* ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK */
376 1.1.1.21 christos "Unknown Config Type" /* ACPI_NHLT_CONFIG_TYPE_RESERVED */
377 1.1.1.21 christos };
378 1.1.1.21 christos
379 1.1.1.4 christos static const char *AcpiDmPcctSubnames[] =
380 1.1.1.4 christos {
381 1.1.1.4 christos "Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
382 1.1.1.7 christos "HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
383 1.1.1.9 christos "HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
384 1.1.1.12 christos "Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */
385 1.1.1.12 christos "Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */
386 1.1.1.18 christos "HW Registers based Comm Subspace", /* ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE */
387 1.1.1.7 christos "Unknown Subtable Type" /* Reserved */
388 1.1.1.4 christos };
389 1.1.1.4 christos
390 1.1.1.18 christos static const char *AcpiDmPhatSubnames[] =
391 1.1.1.18 christos {
392 1.1.1.18 christos "Firmware Version Data", /* ACPI_PHAT_TYPE_FW_VERSION_DATA */
393 1.1.1.18 christos "Firmware Health Data", /* ACPI_PHAT_TYPE_FW_HEALTH_DATA */
394 1.1.1.18 christos "Unknown Subtable Type" /* Reserved */
395 1.1.1.18 christos };
396 1.1.1.18 christos
397 1.1.1.4 christos static const char *AcpiDmPmttSubnames[] =
398 1.1.1.4 christos {
399 1.1.1.4 christos "Socket", /* ACPI_PMTT_TYPE_SOCKET */
400 1.1.1.4 christos "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */
401 1.1.1.13 christos "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */
402 1.1.1.18 christos "Unknown Subtable Type", /* Reserved */
403 1.1.1.18 christos "Vendor Specific" /* ACPI_PMTT_TYPE_VENDOR */
404 1.1 jruoho };
405 1.1 jruoho
406 1.1.1.12 christos static const char *AcpiDmPpttSubnames[] =
407 1.1.1.12 christos {
408 1.1.1.12 christos "Processor Hierarchy Node", /* ACPI_PPTT_TYPE_PROCESSOR */
409 1.1.1.12 christos "Cache Type", /* ACPI_PPTT_TYPE_CACHE */
410 1.1.1.13 christos "ID", /* ACPI_PPTT_TYPE_ID */
411 1.1.1.13 christos "Unknown Subtable Type" /* Reserved */
412 1.1.1.13 christos };
413 1.1.1.13 christos
414 1.1.1.19 christos static const char *AcpiDmRgrtSubnames[] =
415 1.1.1.19 christos {
416 1.1.1.19 christos "Unknown/Reserved Image Type", /* ACPI_RGRT_TYPE_RESERVED0 */
417 1.1.1.19 christos "Type PNG" /* ACPI_RGRT_IMAGE_TYPE_PNG */
418 1.1.1.19 christos };
419 1.1.1.19 christos
420 1.1.1.13 christos static const char *AcpiDmSdevSubnames[] =
421 1.1.1.13 christos {
422 1.1.1.13 christos "Namespace Device", /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */
423 1.1.1.13 christos "PCIe Endpoint Device", /* ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE */
424 1.1.1.12 christos "Unknown Subtable Type" /* Reserved */
425 1.1.1.12 christos };
426 1.1.1.12 christos
427 1.1 jruoho static const char *AcpiDmSratSubnames[] =
428 1.1 jruoho {
429 1.1 jruoho "Processor Local APIC/SAPIC Affinity",
430 1.1 jruoho "Memory Affinity",
431 1.1 jruoho "Processor Local x2APIC Affinity",
432 1.1.1.5 christos "GICC Affinity",
433 1.1.1.12 christos "GIC ITS Affinity", /* Acpi 6.2 */
434 1.1.1.16 christos "Generic Initiator Affinity", /* Acpi 6.3 */
435 1.1.1.20 christos "Generic Port Affinity", /* Acpi 6.4 */
436 1.1.1.7 christos "Unknown Subtable Type" /* Reserved */
437 1.1 jruoho };
438 1.1 jruoho
439 1.1.1.13 christos static const char *AcpiDmTpm2Subnames[] =
440 1.1.1.13 christos {
441 1.1.1.13 christos "Illegal Start Method value",
442 1.1.1.13 christos "Reserved",
443 1.1.1.13 christos "ACPI Start Method",
444 1.1.1.13 christos "Reserved",
445 1.1.1.13 christos "Reserved",
446 1.1.1.13 christos "Reserved",
447 1.1.1.13 christos "Memory Mapped I/O",
448 1.1.1.13 christos "Command Response Buffer",
449 1.1.1.13 christos "Command Response Buffer with ACPI Start Method",
450 1.1.1.13 christos "Reserved",
451 1.1.1.13 christos "Reserved",
452 1.1.1.13 christos "Command Response Buffer with ARM SMC",
453 1.1.1.13 christos "Unknown Subtable Type" /* Reserved */
454 1.1.1.13 christos };
455 1.1.1.13 christos
456 1.1 jruoho static const char *AcpiDmIvrsSubnames[] =
457 1.1 jruoho {
458 1.1.1.19 christos "Hardware Definition Block (IVHD)",
459 1.1.1.19 christos "Hardware Definition Block - Mixed Format (IVHD)",
460 1.1.1.19 christos "Memory Definition Block (IVMD)",
461 1.1.1.19 christos "Unknown/Reserved Subtable Type" /* Reserved */
462 1.1.1.19 christos };
463 1.1.1.19 christos
464 1.1.1.19 christos static const char *AcpiDmIvrsDevEntryNames[] =
465 1.1.1.19 christos {
466 1.1.1.19 christos "Unknown/Reserved Device Entry Type", /* 0- Reserved */
467 1.1.1.19 christos "Device Entry: Select All Devices", /* 1 */
468 1.1.1.19 christos "Device Entry: Select One Device", /* 2 */
469 1.1.1.19 christos "Device Entry: Start of Range", /* 3 */
470 1.1.1.19 christos "Device Entry: End of Range", /* 4 */
471 1.1.1.19 christos "Device Entry: Alias Select", /* 66 */
472 1.1.1.19 christos "Device Entry: Alias Start of Range", /* 67 */
473 1.1.1.19 christos "Unknown/Reserved Device Entry Type", /* 68- Reserved */
474 1.1.1.19 christos "Unknown/Reserved Device Entry Type", /* 69- Reserved */
475 1.1.1.19 christos "Device Entry: Extended Select", /* 70 */
476 1.1.1.19 christos "Device Entry: Extended Start of Range", /* 71 */
477 1.1.1.19 christos "Device Entry: Special Device", /* 72 */
478 1.1.1.19 christos "Device Entry: ACPI HID Named Device", /* 240 */
479 1.1.1.19 christos "Unknown/Reserved Device Entry Type" /* Reserved */
480 1.1 jruoho };
481 1.1 jruoho
482 1.1.1.5 christos static const char *AcpiDmLpitSubnames[] =
483 1.1.1.5 christos {
484 1.1.1.5 christos "Native C-state Idle Structure",
485 1.1.1.7 christos "Unknown Subtable Type" /* Reserved */
486 1.1.1.5 christos };
487 1.1 jruoho
488 1.1.1.18 christos static const char *AcpiDmViotSubnames[] =
489 1.1.1.18 christos {
490 1.1.1.18 christos "Unknown Subtable Type", /* 0 -Reserved */
491 1.1.1.18 christos "PCI Range",
492 1.1.1.18 christos "MMIO Endpoint",
493 1.1.1.18 christos "VirtIO-PCI IOMMU",
494 1.1.1.18 christos "VirtIO-MMIO IOMMU",
495 1.1.1.18 christos "Unknown Subtable Type" /* Reserved */
496 1.1.1.18 christos };
497 1.1.1.18 christos
498 1.1.1.4 christos #define ACPI_FADT_PM_RESERVED 9
499 1.1 jruoho
500 1.1 jruoho static const char *AcpiDmFadtProfiles[] =
501 1.1 jruoho {
502 1.1 jruoho "Unspecified",
503 1.1 jruoho "Desktop",
504 1.1 jruoho "Mobile",
505 1.1 jruoho "Workstation",
506 1.1 jruoho "Enterprise Server",
507 1.1 jruoho "SOHO Server",
508 1.1 jruoho "Appliance PC",
509 1.1 jruoho "Performance Server",
510 1.1.1.4 christos "Tablet",
511 1.1 jruoho "Unknown Profile Type"
512 1.1 jruoho };
513 1.1 jruoho
514 1.1.1.2 jruoho #define ACPI_GAS_WIDTH_RESERVED 5
515 1.1.1.2 jruoho
516 1.1.1.2 jruoho static const char *AcpiDmGasAccessWidth[] =
517 1.1.1.2 jruoho {
518 1.1.1.2 jruoho "Undefined/Legacy",
519 1.1.1.2 jruoho "Byte Access:8",
520 1.1.1.2 jruoho "Word Access:16",
521 1.1.1.2 jruoho "DWord Access:32",
522 1.1.1.2 jruoho "QWord Access:64",
523 1.1.1.2 jruoho "Unknown Width Encoding"
524 1.1.1.2 jruoho };
525 1.1.1.2 jruoho
526 1.1.1.2 jruoho
527 1.1 jruoho /*******************************************************************************
528 1.1 jruoho *
529 1.1 jruoho * ACPI Table Data, indexed by signature.
530 1.1 jruoho *
531 1.1.1.2 jruoho * Each entry contains: Signature, Table Info, Handler, DtHandler,
532 1.1.1.2 jruoho * Template, Description
533 1.1 jruoho *
534 1.1.1.2 jruoho * Simple tables have only a TableInfo structure, complex tables have a
535 1.1.1.2 jruoho * handler. This table must be NULL terminated. RSDP and FACS are
536 1.1.1.2 jruoho * special-cased elsewhere.
537 1.1 jruoho *
538 1.1.1.18 christos * Note: Any tables added here should be duplicated within
539 1.1.1.18 christos * AcpiGbl_SupportedTables in the file common/ahtable.c
540 1.1.1.7 christos *
541 1.1 jruoho ******************************************************************************/
542 1.1 jruoho
543 1.1.1.7 christos const ACPI_DMTABLE_DATA AcpiDmTableData[] =
544 1.1 jruoho {
545 1.1.1.20 christos {ACPI_SIG_AEST, NULL, AcpiDmDumpAest, DtCompileAest, TemplateAest},
546 1.1.1.21 christos {ACPI_SIG_AGDI, AcpiDmTableInfoAgdi, NULL, NULL, TemplateAgdi},
547 1.1.1.22 christos {ACPI_SIG_APMT, NULL, AcpiDmDumpApmt, DtCompileApmt, TemplateApmt},
548 1.1.1.7 christos {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf},
549 1.1.1.19 christos {ACPI_SIG_BDAT, AcpiDmTableInfoBdat, NULL, NULL, TemplateBdat},
550 1.1.1.7 christos {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert},
551 1.1.1.7 christos {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt},
552 1.1.1.7 christos {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot},
553 1.1.1.18 christos {ACPI_SIG_CEDT, NULL, AcpiDmDumpCedt, DtCompileCedt, TemplateCedt},
554 1.1.1.7 christos {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep},
555 1.1.1.7 christos {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt},
556 1.1.1.7 christos {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2},
557 1.1.1.7 christos {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp},
558 1.1.1.7 christos {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar},
559 1.1.1.7 christos {ACPI_SIG_DRTM, NULL, AcpiDmDumpDrtm, DtCompileDrtm, TemplateDrtm},
560 1.1.1.7 christos {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt},
561 1.1.1.7 christos {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj},
562 1.1.1.7 christos {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst},
563 1.1.1.7 christos {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt},
564 1.1.1.7 christos {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt},
565 1.1.1.7 christos {ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt},
566 1.1.1.7 christos {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest},
567 1.1.1.12 christos {ACPI_SIG_HMAT, NULL, AcpiDmDumpHmat, DtCompileHmat, TemplateHmat},
568 1.1.1.7 christos {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet},
569 1.1.1.7 christos {ACPI_SIG_IORT, NULL, AcpiDmDumpIort, DtCompileIort, TemplateIort},
570 1.1.1.7 christos {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs},
571 1.1.1.7 christos {ACPI_SIG_LPIT, NULL, AcpiDmDumpLpit, DtCompileLpit, TemplateLpit},
572 1.1.1.7 christos {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt},
573 1.1.1.7 christos {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg},
574 1.1.1.7 christos {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi},
575 1.1.1.7 christos {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst},
576 1.1.1.7 christos {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct},
577 1.1.1.7 christos {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm},
578 1.1.1.7 christos {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
579 1.1.1.21 christos {ACPI_SIG_NHLT, AcpiDmTableInfoNhlt, AcpiDmDumpNhlt, DtCompileNhlt, TemplateNhlt},
580 1.1.1.7 christos {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
581 1.1.1.13 christos {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt},
582 1.1.1.18 christos {ACPI_SIG_PHAT, NULL, AcpiDmDumpPhat, DtCompilePhat, TemplatePhat},
583 1.1.1.7 christos {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt},
584 1.1.1.12 christos {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt},
585 1.1.1.19 christos {ACPI_SIG_PRMT, NULL, AcpiDmDumpPrmt, DtCompilePrmt, TemplatePrmt},
586 1.1.1.10 christos {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf},
587 1.1.1.19 christos {ACPI_SIG_RGRT, NULL, AcpiDmDumpRgrt, DtCompileRgrt, TemplateRgrt},
588 1.1.1.7 christos {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt},
589 1.1.1.7 christos {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt},
590 1.1.1.7 christos {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst},
591 1.1.1.12 christos {ACPI_SIG_SDEI, AcpiDmTableInfoSdei, NULL, NULL, TemplateSdei},
592 1.1.1.13 christos {ACPI_SIG_SDEV, AcpiDmTableInfoSdev, AcpiDmDumpSdev, DtCompileSdev, TemplateSdev},
593 1.1.1.7 christos {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic},
594 1.1.1.7 christos {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit},
595 1.1.1.7 christos {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr},
596 1.1.1.7 christos {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi},
597 1.1.1.7 christos {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat},
598 1.1.1.7 christos {ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao},
599 1.1.1.19 christos {ACPI_SIG_SVKL, AcpiDmTableInfoSvkl, AcpiDmDumpSvkl, DtCompileSvkl, TemplateSvkl},
600 1.1.1.7 christos {ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa},
601 1.1.1.21 christos {ACPI_SIG_TDEL, AcpiDmTableInfoTdel, NULL, NULL, TemplateTdel},
602 1.1.1.13 christos {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2},
603 1.1.1.7 christos {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi},
604 1.1.1.18 christos {ACPI_SIG_VIOT, AcpiDmTableInfoViot, AcpiDmDumpViot, DtCompileViot, TemplateViot},
605 1.1.1.7 christos {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet},
606 1.1.1.7 christos {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat},
607 1.1.1.7 christos {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt},
608 1.1.1.7 christos {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt},
609 1.1.1.7 christos {ACPI_SIG_WPBT, NULL, AcpiDmDumpWpbt, DtCompileWpbt, TemplateWpbt},
610 1.1.1.12 christos {ACPI_SIG_WSMT, AcpiDmTableInfoWsmt, NULL, NULL, TemplateWsmt},
611 1.1.1.7 christos {ACPI_SIG_XENV, AcpiDmTableInfoXenv, NULL, NULL, TemplateXenv},
612 1.1.1.7 christos {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt},
613 1.1.1.7 christos {NULL, NULL, NULL, NULL, NULL}
614 1.1 jruoho };
615 1.1 jruoho
616 1.1 jruoho
617 1.1 jruoho /*******************************************************************************
618 1.1 jruoho *
619 1.1.1.2 jruoho * FUNCTION: AcpiDmGenerateChecksum
620 1.1 jruoho *
621 1.1.1.2 jruoho * PARAMETERS: Table - Pointer to table to be checksummed
622 1.1.1.2 jruoho * Length - Length of the table
623 1.1.1.2 jruoho * OriginalChecksum - Value of the checksum field
624 1.1 jruoho *
625 1.1 jruoho * RETURN: 8 bit checksum of buffer
626 1.1 jruoho *
627 1.1 jruoho * DESCRIPTION: Computes an 8 bit checksum of the table.
628 1.1 jruoho *
629 1.1 jruoho ******************************************************************************/
630 1.1 jruoho
631 1.1 jruoho UINT8
632 1.1.1.2 jruoho AcpiDmGenerateChecksum (
633 1.1.1.2 jruoho void *Table,
634 1.1.1.2 jruoho UINT32 Length,
635 1.1.1.2 jruoho UINT8 OriginalChecksum)
636 1.1 jruoho {
637 1.1 jruoho UINT8 Checksum;
638 1.1 jruoho
639 1.1 jruoho
640 1.1 jruoho /* Sum the entire table as-is */
641 1.1 jruoho
642 1.1.1.2 jruoho Checksum = AcpiTbChecksum ((UINT8 *) Table, Length);
643 1.1 jruoho
644 1.1 jruoho /* Subtract off the existing checksum value in the table */
645 1.1 jruoho
646 1.1.1.2 jruoho Checksum = (UINT8) (Checksum - OriginalChecksum);
647 1.1 jruoho
648 1.1 jruoho /* Compute the final checksum */
649 1.1 jruoho
650 1.1 jruoho Checksum = (UINT8) (0 - Checksum);
651 1.1 jruoho return (Checksum);
652 1.1 jruoho }
653 1.1 jruoho
654 1.1 jruoho
655 1.1 jruoho /*******************************************************************************
656 1.1 jruoho *
657 1.1 jruoho * FUNCTION: AcpiDmGetTableData
658 1.1 jruoho *
659 1.1 jruoho * PARAMETERS: Signature - ACPI signature (4 chars) to match
660 1.1 jruoho *
661 1.1 jruoho * RETURN: Pointer to a valid ACPI_DMTABLE_DATA. Null if no match found.
662 1.1 jruoho *
663 1.1 jruoho * DESCRIPTION: Find a match in the global table of supported ACPI tables
664 1.1 jruoho *
665 1.1 jruoho ******************************************************************************/
666 1.1 jruoho
667 1.1.1.7 christos const ACPI_DMTABLE_DATA *
668 1.1 jruoho AcpiDmGetTableData (
669 1.1 jruoho char *Signature)
670 1.1 jruoho {
671 1.1.1.7 christos const ACPI_DMTABLE_DATA *Info;
672 1.1 jruoho
673 1.1 jruoho
674 1.1.1.7 christos for (Info = AcpiDmTableData; Info->Signature; Info++)
675 1.1 jruoho {
676 1.1.1.16 christos if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature))
677 1.1 jruoho {
678 1.1.1.7 christos return (Info);
679 1.1 jruoho }
680 1.1 jruoho }
681 1.1 jruoho
682 1.1 jruoho return (NULL);
683 1.1 jruoho }
684 1.1 jruoho
685 1.1 jruoho
686 1.1 jruoho /*******************************************************************************
687 1.1 jruoho *
688 1.1 jruoho * FUNCTION: AcpiDmDumpDataTable
689 1.1 jruoho *
690 1.1 jruoho * PARAMETERS: Table - An ACPI table
691 1.1 jruoho *
692 1.1 jruoho * RETURN: None.
693 1.1 jruoho *
694 1.1 jruoho * DESCRIPTION: Format the contents of an ACPI data table (any table other
695 1.1 jruoho * than an SSDT or DSDT that does not contain executable AML code)
696 1.1 jruoho *
697 1.1 jruoho ******************************************************************************/
698 1.1 jruoho
699 1.1 jruoho void
700 1.1 jruoho AcpiDmDumpDataTable (
701 1.1 jruoho ACPI_TABLE_HEADER *Table)
702 1.1 jruoho {
703 1.1 jruoho ACPI_STATUS Status;
704 1.1.1.7 christos const ACPI_DMTABLE_DATA *TableData;
705 1.1 jruoho UINT32 Length;
706 1.1 jruoho
707 1.1 jruoho
708 1.1 jruoho /* Ignore tables that contain AML */
709 1.1 jruoho
710 1.1 jruoho if (AcpiUtIsAmlTable (Table))
711 1.1 jruoho {
712 1.1.1.15 christos if (AslGbl_VerboseTemplates)
713 1.1.1.4 christos {
714 1.1.1.4 christos /* Dump the raw table data */
715 1.1.1.4 christos
716 1.1.1.4 christos Length = Table->Length;
717 1.1.1.4 christos
718 1.1.1.4 christos AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n",
719 1.1.1.4 christos ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
720 1.1.1.4 christos AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
721 1.1.1.4 christos Length, DB_BYTE_DISPLAY, 0);
722 1.1.1.4 christos AcpiOsPrintf (" */\n");
723 1.1.1.4 christos }
724 1.1 jruoho return;
725 1.1 jruoho }
726 1.1 jruoho
727 1.1 jruoho /*
728 1.1 jruoho * Handle tables that don't use the common ACPI table header structure.
729 1.1.1.4 christos * Currently, these are the FACS, RSDP, and S3PT.
730 1.1 jruoho */
731 1.1.1.16 christos if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
732 1.1 jruoho {
733 1.1 jruoho Length = Table->Length;
734 1.1.1.7 christos Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs);
735 1.1.1.7 christos if (ACPI_FAILURE (Status))
736 1.1.1.7 christos {
737 1.1.1.7 christos return;
738 1.1.1.7 christos }
739 1.1 jruoho }
740 1.1.1.21 christos else if (ACPI_VALIDATE_RSDP_SIG (ACPI_CAST_PTR (ACPI_TABLE_RSDP,
741 1.1.1.21 christos Table)->Signature))
742 1.1 jruoho {
743 1.1 jruoho Length = AcpiDmDumpRsdp (Table);
744 1.1 jruoho }
745 1.1.1.16 christos else if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT))
746 1.1.1.4 christos {
747 1.1.1.4 christos Length = AcpiDmDumpS3pt (Table);
748 1.1.1.4 christos }
749 1.1 jruoho else
750 1.1 jruoho {
751 1.1 jruoho /*
752 1.1 jruoho * All other tables must use the common ACPI table header, dump it now
753 1.1 jruoho */
754 1.1 jruoho Length = Table->Length;
755 1.1 jruoho Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
756 1.1 jruoho if (ACPI_FAILURE (Status))
757 1.1 jruoho {
758 1.1 jruoho return;
759 1.1 jruoho }
760 1.1 jruoho AcpiOsPrintf ("\n");
761 1.1 jruoho
762 1.1 jruoho /* Match signature and dispatch appropriately */
763 1.1 jruoho
764 1.1 jruoho TableData = AcpiDmGetTableData (Table->Signature);
765 1.1 jruoho if (!TableData)
766 1.1 jruoho {
767 1.1.1.7 christos if (!strncmp (Table->Signature, "OEM", 3))
768 1.1 jruoho {
769 1.1 jruoho AcpiOsPrintf ("\n**** OEM-defined ACPI table [%4.4s], unknown contents\n\n",
770 1.1 jruoho Table->Signature);
771 1.1 jruoho }
772 1.1 jruoho else
773 1.1 jruoho {
774 1.1.1.6 christos AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
775 1.1 jruoho Table->Signature);
776 1.1.1.6 christos
777 1.1.1.6 christos fprintf (stderr, "Unknown ACPI table signature [%4.4s], ",
778 1.1.1.4 christos Table->Signature);
779 1.1.1.6 christos
780 1.1.1.6 christos if (!AcpiGbl_ForceAmlDisassembly)
781 1.1.1.6 christos {
782 1.1.1.6 christos fprintf (stderr, "decoding ACPI table header only\n");
783 1.1.1.6 christos }
784 1.1.1.6 christos else
785 1.1.1.6 christos {
786 1.1.1.6 christos fprintf (stderr, "assuming table contains valid AML code\n");
787 1.1.1.6 christos }
788 1.1 jruoho }
789 1.1 jruoho }
790 1.1 jruoho else if (TableData->TableHandler)
791 1.1 jruoho {
792 1.1 jruoho /* Complex table, has a handler */
793 1.1 jruoho
794 1.1 jruoho TableData->TableHandler (Table);
795 1.1 jruoho }
796 1.1 jruoho else if (TableData->TableInfo)
797 1.1 jruoho {
798 1.1 jruoho /* Simple table, just walk the info table */
799 1.1 jruoho
800 1.1.1.7 christos Status = AcpiDmDumpTable (Length, 0, Table, 0, TableData->TableInfo);
801 1.1.1.7 christos if (ACPI_FAILURE (Status))
802 1.1.1.7 christos {
803 1.1.1.7 christos return;
804 1.1.1.7 christos }
805 1.1 jruoho }
806 1.1 jruoho }
807 1.1 jruoho
808 1.1.1.15 christos if (!AslGbl_DoTemplates || AslGbl_VerboseTemplates)
809 1.1.1.2 jruoho {
810 1.1.1.2 jruoho /* Dump the raw table data */
811 1.1 jruoho
812 1.1.1.2 jruoho AcpiOsPrintf ("\n%s: Length %d (0x%X)\n\n",
813 1.1.1.2 jruoho ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
814 1.1.1.4 christos AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
815 1.1.1.4 christos Length, DB_BYTE_DISPLAY, 0);
816 1.1.1.2 jruoho }
817 1.1 jruoho }
818 1.1 jruoho
819 1.1 jruoho
820 1.1 jruoho /*******************************************************************************
821 1.1 jruoho *
822 1.1 jruoho * FUNCTION: AcpiDmLineHeader
823 1.1 jruoho *
824 1.1 jruoho * PARAMETERS: Offset - Current byte offset, from table start
825 1.1 jruoho * ByteLength - Length of the field in bytes, 0 for flags
826 1.1 jruoho * Name - Name of this field
827 1.1 jruoho *
828 1.1 jruoho * RETURN: None
829 1.1 jruoho *
830 1.1 jruoho * DESCRIPTION: Utility routines for formatting output lines. Displays the
831 1.1 jruoho * current table offset in hex and decimal, the field length,
832 1.1 jruoho * and the field name.
833 1.1 jruoho *
834 1.1 jruoho ******************************************************************************/
835 1.1 jruoho
836 1.1 jruoho void
837 1.1 jruoho AcpiDmLineHeader (
838 1.1 jruoho UINT32 Offset,
839 1.1 jruoho UINT32 ByteLength,
840 1.1 jruoho char *Name)
841 1.1 jruoho {
842 1.1 jruoho
843 1.1.1.3 jruoho /* Allow a null name for fields that span multiple lines (large buffers) */
844 1.1.1.3 jruoho
845 1.1.1.3 jruoho if (!Name)
846 1.1.1.3 jruoho {
847 1.1.1.3 jruoho Name = "";
848 1.1.1.3 jruoho }
849 1.1.1.3 jruoho
850 1.1.1.15 christos if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
851 1.1 jruoho {
852 1.1.1.2 jruoho if (ByteLength)
853 1.1.1.2 jruoho {
854 1.1.1.3 jruoho AcpiOsPrintf ("[%.4d] %34s : ", ByteLength, Name);
855 1.1.1.2 jruoho }
856 1.1.1.2 jruoho else
857 1.1.1.2 jruoho {
858 1.1.1.3 jruoho if (*Name)
859 1.1.1.3 jruoho {
860 1.1.1.3 jruoho AcpiOsPrintf ("%41s : ", Name);
861 1.1.1.3 jruoho }
862 1.1.1.3 jruoho else
863 1.1.1.3 jruoho {
864 1.1.1.3 jruoho AcpiOsPrintf ("%41s ", Name);
865 1.1.1.3 jruoho }
866 1.1.1.2 jruoho }
867 1.1 jruoho }
868 1.1.1.2 jruoho else /* Normal disassembler or verbose template */
869 1.1 jruoho {
870 1.1.1.2 jruoho if (ByteLength)
871 1.1.1.2 jruoho {
872 1.1.1.3 jruoho AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
873 1.1.1.2 jruoho Offset, Offset, ByteLength, Name);
874 1.1.1.2 jruoho }
875 1.1.1.2 jruoho else
876 1.1.1.2 jruoho {
877 1.1.1.3 jruoho if (*Name)
878 1.1.1.3 jruoho {
879 1.1.1.3 jruoho AcpiOsPrintf ("%44s : ", Name);
880 1.1.1.3 jruoho }
881 1.1.1.3 jruoho else
882 1.1.1.3 jruoho {
883 1.1.1.3 jruoho AcpiOsPrintf ("%44s ", Name);
884 1.1.1.3 jruoho }
885 1.1.1.2 jruoho }
886 1.1 jruoho }
887 1.1 jruoho }
888 1.1 jruoho
889 1.1 jruoho void
890 1.1 jruoho AcpiDmLineHeader2 (
891 1.1 jruoho UINT32 Offset,
892 1.1 jruoho UINT32 ByteLength,
893 1.1 jruoho char *Name,
894 1.1 jruoho UINT32 Value)
895 1.1 jruoho {
896 1.1 jruoho
897 1.1.1.15 christos if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
898 1.1 jruoho {
899 1.1.1.2 jruoho if (ByteLength)
900 1.1.1.2 jruoho {
901 1.1.1.3 jruoho AcpiOsPrintf ("[%.4d] %30s %3d : ",
902 1.1.1.2 jruoho ByteLength, Name, Value);
903 1.1.1.2 jruoho }
904 1.1.1.2 jruoho else
905 1.1.1.2 jruoho {
906 1.1.1.2 jruoho AcpiOsPrintf ("%36s % 3d : ",
907 1.1.1.2 jruoho Name, Value);
908 1.1.1.2 jruoho }
909 1.1 jruoho }
910 1.1.1.2 jruoho else /* Normal disassembler or verbose template */
911 1.1 jruoho {
912 1.1.1.2 jruoho if (ByteLength)
913 1.1.1.2 jruoho {
914 1.1.1.3 jruoho AcpiOsPrintf ("[%3.3Xh %4.4d %3d] %24s %3d : ",
915 1.1.1.2 jruoho Offset, Offset, ByteLength, Name, Value);
916 1.1.1.2 jruoho }
917 1.1.1.2 jruoho else
918 1.1.1.2 jruoho {
919 1.1.1.3 jruoho AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s %3d : ",
920 1.1.1.2 jruoho Offset, Offset, Name, Value);
921 1.1.1.2 jruoho }
922 1.1 jruoho }
923 1.1 jruoho }
924 1.1 jruoho
925 1.1 jruoho
926 1.1 jruoho /*******************************************************************************
927 1.1 jruoho *
928 1.1 jruoho * FUNCTION: AcpiDmDumpTable
929 1.1 jruoho *
930 1.1 jruoho * PARAMETERS: TableLength - Length of the entire ACPI table
931 1.1 jruoho * TableOffset - Starting offset within the table for this
932 1.1 jruoho * sub-descriptor (0 if main table)
933 1.1 jruoho * Table - The ACPI table
934 1.1 jruoho * SubtableLength - Length of this sub-descriptor
935 1.1 jruoho * Info - Info table for this ACPI table
936 1.1 jruoho *
937 1.1.1.8 christos * RETURN: Status
938 1.1 jruoho *
939 1.1 jruoho * DESCRIPTION: Display ACPI table contents by walking the Info table.
940 1.1 jruoho *
941 1.1.1.2 jruoho * Note: This function must remain in sync with DtGetFieldLength.
942 1.1.1.2 jruoho *
943 1.1 jruoho ******************************************************************************/
944 1.1 jruoho
945 1.1 jruoho ACPI_STATUS
946 1.1 jruoho AcpiDmDumpTable (
947 1.1 jruoho UINT32 TableLength,
948 1.1 jruoho UINT32 TableOffset,
949 1.1 jruoho void *Table,
950 1.1 jruoho UINT32 SubtableLength,
951 1.1 jruoho ACPI_DMTABLE_INFO *Info)
952 1.1 jruoho {
953 1.1 jruoho UINT8 *Target;
954 1.1 jruoho UINT32 CurrentOffset;
955 1.1 jruoho UINT32 ByteLength;
956 1.1 jruoho UINT8 Temp8;
957 1.1 jruoho UINT16 Temp16;
958 1.1.1.6 christos UINT32 Temp32;
959 1.1.1.4 christos UINT64 Value;
960 1.1.1.7 christos const AH_TABLE *TableData;
961 1.1 jruoho const char *Name;
962 1.1 jruoho BOOLEAN LastOutputBlankLine = FALSE;
963 1.1.1.7 christos ACPI_STATUS Status;
964 1.1 jruoho char RepairedName[8];
965 1.1 jruoho
966 1.1 jruoho
967 1.1 jruoho if (!Info)
968 1.1 jruoho {
969 1.1 jruoho AcpiOsPrintf ("Display not implemented\n");
970 1.1 jruoho return (AE_NOT_IMPLEMENTED);
971 1.1 jruoho }
972 1.1 jruoho
973 1.1 jruoho /* Walk entire Info table; Null name terminates */
974 1.1 jruoho
975 1.1 jruoho for (; Info->Name; Info++)
976 1.1 jruoho {
977 1.1 jruoho /*
978 1.1 jruoho * Target points to the field within the ACPI Table. CurrentOffset is
979 1.1 jruoho * the offset of the field from the start of the main table.
980 1.1 jruoho */
981 1.1 jruoho Target = ACPI_ADD_PTR (UINT8, Table, Info->Offset);
982 1.1 jruoho CurrentOffset = TableOffset + Info->Offset;
983 1.1 jruoho
984 1.1.1.7 christos /* Check for beyond subtable end or (worse) beyond EOT */
985 1.1.1.7 christos
986 1.1.1.21 christos if (SubtableLength && (Info->Offset > SubtableLength))
987 1.1.1.7 christos {
988 1.1.1.7 christos AcpiOsPrintf (
989 1.1.1.19 christos "/**** ACPI subtable terminates early (Len %u) - "
990 1.1.1.19 christos "may be older version (dump table) */\n", SubtableLength);
991 1.1.1.7 christos
992 1.1.1.7 christos /* Move on to next subtable */
993 1.1.1.7 christos
994 1.1.1.7 christos return (AE_OK);
995 1.1.1.7 christos }
996 1.1 jruoho
997 1.1.1.7 christos if (CurrentOffset >= TableLength)
998 1.1 jruoho {
999 1.1.1.6 christos AcpiOsPrintf (
1000 1.1.1.7 christos "/**** ACPI table terminates "
1001 1.1.1.7 christos "in the middle of a data structure! (dump table) */\n");
1002 1.1 jruoho return (AE_BAD_DATA);
1003 1.1 jruoho }
1004 1.1 jruoho
1005 1.1 jruoho /* Generate the byte length for this field */
1006 1.1 jruoho
1007 1.1 jruoho switch (Info->Opcode)
1008 1.1 jruoho {
1009 1.1 jruoho case ACPI_DMT_UINT8:
1010 1.1 jruoho case ACPI_DMT_CHKSUM:
1011 1.1 jruoho case ACPI_DMT_SPACEID:
1012 1.1.1.2 jruoho case ACPI_DMT_ACCWIDTH:
1013 1.1.1.18 christos case ACPI_DMT_CEDT:
1014 1.1 jruoho case ACPI_DMT_IVRS:
1015 1.1.1.19 christos case ACPI_DMT_IVRS_DE:
1016 1.1.1.5 christos case ACPI_DMT_GTDT:
1017 1.1 jruoho case ACPI_DMT_MADT:
1018 1.1.1.20 christos case ACPI_DMT_NHLT1:
1019 1.1.1.20 christos case ACPI_DMT_NHLT1a:
1020 1.1.1.21 christos case ACPI_DMT_NHLT1b:
1021 1.1.1.21 christos case ACPI_DMT_NHLT1c:
1022 1.1.1.21 christos case ACPI_DMT_NHLT1d:
1023 1.1.1.21 christos case ACPI_DMT_NHLT1f:
1024 1.1.1.4 christos case ACPI_DMT_PCCT:
1025 1.1.1.4 christos case ACPI_DMT_PMTT:
1026 1.1.1.12 christos case ACPI_DMT_PPTT:
1027 1.1.1.19 christos case ACPI_DMT_RGRT:
1028 1.1.1.13 christos case ACPI_DMT_SDEV:
1029 1.1 jruoho case ACPI_DMT_SRAT:
1030 1.1.1.20 christos case ACPI_DMT_AEST:
1031 1.1.1.20 christos case ACPI_DMT_AEST_RES:
1032 1.1.1.20 christos case ACPI_DMT_AEST_XFACE:
1033 1.1.1.20 christos case ACPI_DMT_AEST_XRUPT:
1034 1.1 jruoho case ACPI_DMT_ASF:
1035 1.1 jruoho case ACPI_DMT_HESTNTYP:
1036 1.1 jruoho case ACPI_DMT_FADTPM:
1037 1.1.1.2 jruoho case ACPI_DMT_EINJACT:
1038 1.1.1.2 jruoho case ACPI_DMT_EINJINST:
1039 1.1.1.2 jruoho case ACPI_DMT_ERSTACT:
1040 1.1.1.2 jruoho case ACPI_DMT_ERSTINST:
1041 1.1.1.5 christos case ACPI_DMT_DMAR_SCOPE:
1042 1.1.1.18 christos case ACPI_DMT_VIOT:
1043 1.1.1.4 christos
1044 1.1 jruoho ByteLength = 1;
1045 1.1 jruoho break;
1046 1.1.1.4 christos
1047 1.1 jruoho case ACPI_DMT_UINT16:
1048 1.1 jruoho case ACPI_DMT_DMAR:
1049 1.1 jruoho case ACPI_DMT_HEST:
1050 1.1.1.12 christos case ACPI_DMT_HMAT:
1051 1.1.1.7 christos case ACPI_DMT_NFIT:
1052 1.1.1.21 christos case ACPI_DMT_NHLT1e:
1053 1.1.1.18 christos case ACPI_DMT_PHAT:
1054 1.1.1.4 christos
1055 1.1 jruoho ByteLength = 2;
1056 1.1 jruoho break;
1057 1.1.1.4 christos
1058 1.1 jruoho case ACPI_DMT_UINT24:
1059 1.1.1.4 christos
1060 1.1 jruoho ByteLength = 3;
1061 1.1 jruoho break;
1062 1.1.1.4 christos
1063 1.1 jruoho case ACPI_DMT_UINT32:
1064 1.1.1.20 christos case ACPI_DMT_AEST_CACHE:
1065 1.1.1.20 christos case ACPI_DMT_AEST_GIC:
1066 1.1 jruoho case ACPI_DMT_NAME4:
1067 1.1 jruoho case ACPI_DMT_SIG:
1068 1.1.1.5 christos case ACPI_DMT_LPIT:
1069 1.1.1.13 christos case ACPI_DMT_TPM2:
1070 1.1.1.4 christos
1071 1.1 jruoho ByteLength = 4;
1072 1.1 jruoho break;
1073 1.1.1.4 christos
1074 1.1.1.4 christos case ACPI_DMT_UINT40:
1075 1.1.1.4 christos
1076 1.1.1.4 christos ByteLength = 5;
1077 1.1.1.4 christos break;
1078 1.1.1.4 christos
1079 1.1.1.4 christos case ACPI_DMT_UINT48:
1080 1.1 jruoho case ACPI_DMT_NAME6:
1081 1.1.1.4 christos
1082 1.1 jruoho ByteLength = 6;
1083 1.1 jruoho break;
1084 1.1.1.4 christos
1085 1.1 jruoho case ACPI_DMT_UINT56:
1086 1.1.1.2 jruoho case ACPI_DMT_BUF7:
1087 1.1.1.4 christos
1088 1.1 jruoho ByteLength = 7;
1089 1.1 jruoho break;
1090 1.1.1.4 christos
1091 1.1 jruoho case ACPI_DMT_UINT64:
1092 1.1 jruoho case ACPI_DMT_NAME8:
1093 1.1.1.4 christos
1094 1.1 jruoho ByteLength = 8;
1095 1.1 jruoho break;
1096 1.1.1.4 christos
1097 1.1.1.4 christos case ACPI_DMT_BUF10:
1098 1.1.1.4 christos
1099 1.1.1.4 christos ByteLength = 10;
1100 1.1.1.4 christos break;
1101 1.1.1.4 christos
1102 1.1.1.10 christos case ACPI_DMT_BUF12:
1103 1.1.1.10 christos
1104 1.1.1.10 christos ByteLength = 12;
1105 1.1.1.10 christos break;
1106 1.1.1.10 christos
1107 1.1 jruoho case ACPI_DMT_BUF16:
1108 1.1.1.2 jruoho case ACPI_DMT_UUID:
1109 1.1.1.4 christos
1110 1.1 jruoho ByteLength = 16;
1111 1.1 jruoho break;
1112 1.1.1.4 christos
1113 1.1.1.20 christos case ACPI_DMT_BUF18:
1114 1.1.1.20 christos
1115 1.1.1.20 christos ByteLength = 18;
1116 1.1.1.20 christos break;
1117 1.1.1.20 christos
1118 1.1.1.3 jruoho case ACPI_DMT_BUF128:
1119 1.1.1.4 christos
1120 1.1.1.3 jruoho ByteLength = 128;
1121 1.1.1.3 jruoho break;
1122 1.1.1.4 christos
1123 1.1.1.20 christos case ACPI_DMT_WPBT_UNICODE:
1124 1.1.1.20 christos
1125 1.1.1.20 christos ByteLength = SubtableLength;
1126 1.1.1.20 christos CurrentOffset = sizeof (ACPI_TABLE_WPBT);
1127 1.1.1.20 christos break;
1128 1.1.1.20 christos
1129 1.1.1.7 christos case ACPI_DMT_UNICODE:
1130 1.1.1.6 christos case ACPI_DMT_BUFFER:
1131 1.1.1.6 christos case ACPI_DMT_RAW_BUFFER:
1132 1.1.1.6 christos
1133 1.1.1.6 christos ByteLength = SubtableLength;
1134 1.1.1.6 christos break;
1135 1.1.1.6 christos
1136 1.1.1.18 christos case ACPI_DMT_PMTT_VENDOR:
1137 1.1.1.18 christos /*
1138 1.1.1.18 christos * Calculate the length of the vendor data for the PMTT table:
1139 1.1.1.18 christos * Length = (Current Subtable ptr + Subtable length) -
1140 1.1.1.18 christos * Start of the vendor data (Target)
1141 1.1.1.18 christos */
1142 1.1.1.18 christos ByteLength = ((ACPI_CAST_PTR (char, Table) +
1143 1.1.1.18 christos (ACPI_CAST_PTR (ACPI_PMTT_HEADER, Table)->Length)) -
1144 1.1.1.18 christos ACPI_CAST_PTR (char, Target));
1145 1.1.1.18 christos break;
1146 1.1.1.18 christos
1147 1.1 jruoho case ACPI_DMT_STRING:
1148 1.1.1.4 christos
1149 1.1.1.7 christos ByteLength = strlen (ACPI_CAST_PTR (char, Target)) + 1;
1150 1.1 jruoho break;
1151 1.1.1.4 christos
1152 1.1.1.19 christos case ACPI_DMT_IVRS_UNTERMINATED_STRING:
1153 1.1.1.19 christos
1154 1.1.1.19 christos ByteLength = ((ACPI_CAST_PTR (ACPI_IVRS_DEVICE_HID, Target) -1)->UidLength);
1155 1.1.1.19 christos break;
1156 1.1.1.19 christos
1157 1.1 jruoho case ACPI_DMT_GAS:
1158 1.1.1.4 christos
1159 1.1 jruoho if (!LastOutputBlankLine)
1160 1.1 jruoho {
1161 1.1 jruoho AcpiOsPrintf ("\n");
1162 1.1 jruoho LastOutputBlankLine = TRUE;
1163 1.1 jruoho }
1164 1.1.1.8 christos
1165 1.1 jruoho ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
1166 1.1 jruoho break;
1167 1.1.1.4 christos
1168 1.1 jruoho case ACPI_DMT_HESTNTFY:
1169 1.1.1.4 christos
1170 1.1 jruoho if (!LastOutputBlankLine)
1171 1.1 jruoho {
1172 1.1 jruoho AcpiOsPrintf ("\n");
1173 1.1 jruoho LastOutputBlankLine = TRUE;
1174 1.1 jruoho }
1175 1.1.1.8 christos
1176 1.1 jruoho ByteLength = sizeof (ACPI_HEST_NOTIFY);
1177 1.1 jruoho break;
1178 1.1.1.4 christos
1179 1.1.1.7 christos case ACPI_DMT_IORTMEM:
1180 1.1.1.7 christos
1181 1.1.1.7 christos if (!LastOutputBlankLine)
1182 1.1.1.7 christos {
1183 1.1.1.7 christos LastOutputBlankLine = FALSE;
1184 1.1.1.7 christos }
1185 1.1.1.8 christos
1186 1.1.1.7 christos ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS);
1187 1.1.1.7 christos break;
1188 1.1.1.7 christos
1189 1.1 jruoho default:
1190 1.1.1.4 christos
1191 1.1 jruoho ByteLength = 0;
1192 1.1 jruoho break;
1193 1.1 jruoho }
1194 1.1 jruoho
1195 1.1.1.7 christos /* Check if we are beyond a subtable, or (worse) beyond EOT */
1196 1.1.1.7 christos
1197 1.1 jruoho if (CurrentOffset + ByteLength > TableLength)
1198 1.1 jruoho {
1199 1.1.1.7 christos if (SubtableLength)
1200 1.1.1.7 christos {
1201 1.1.1.7 christos AcpiOsPrintf (
1202 1.1.1.7 christos "/**** ACPI subtable terminates early - "
1203 1.1.1.7 christos "may be older version (dump table) */\n");
1204 1.1.1.7 christos
1205 1.1.1.7 christos /* Move on to next subtable */
1206 1.1.1.7 christos
1207 1.1.1.7 christos return (AE_OK);
1208 1.1.1.7 christos }
1209 1.1.1.7 christos
1210 1.1.1.6 christos AcpiOsPrintf (
1211 1.1.1.7 christos "/**** ACPI table terminates "
1212 1.1.1.7 christos "in the middle of a data structure! */\n");
1213 1.1 jruoho return (AE_BAD_DATA);
1214 1.1 jruoho }
1215 1.1 jruoho
1216 1.1.1.4 christos if (Info->Opcode == ACPI_DMT_EXTRA_TEXT)
1217 1.1.1.4 christos {
1218 1.1.1.4 christos AcpiOsPrintf ("%s", Info->Name);
1219 1.1.1.4 christos continue;
1220 1.1.1.4 christos }
1221 1.1.1.4 christos
1222 1.1 jruoho /* Start a new line and decode the opcode */
1223 1.1 jruoho
1224 1.1 jruoho AcpiDmLineHeader (CurrentOffset, ByteLength, Info->Name);
1225 1.1 jruoho
1226 1.1 jruoho switch (Info->Opcode)
1227 1.1 jruoho {
1228 1.1 jruoho /* Single-bit Flag fields. Note: Opcode is the bit position */
1229 1.1 jruoho
1230 1.1 jruoho case ACPI_DMT_FLAG0:
1231 1.1 jruoho case ACPI_DMT_FLAG1:
1232 1.1 jruoho case ACPI_DMT_FLAG2:
1233 1.1 jruoho case ACPI_DMT_FLAG3:
1234 1.1 jruoho case ACPI_DMT_FLAG4:
1235 1.1 jruoho case ACPI_DMT_FLAG5:
1236 1.1 jruoho case ACPI_DMT_FLAG6:
1237 1.1 jruoho case ACPI_DMT_FLAG7:
1238 1.1 jruoho
1239 1.1 jruoho AcpiOsPrintf ("%1.1X\n", (*Target >> Info->Opcode) & 0x01);
1240 1.1 jruoho break;
1241 1.1 jruoho
1242 1.1 jruoho /* 2-bit Flag fields */
1243 1.1 jruoho
1244 1.1 jruoho case ACPI_DMT_FLAGS0:
1245 1.1 jruoho
1246 1.1 jruoho AcpiOsPrintf ("%1.1X\n", *Target & 0x03);
1247 1.1 jruoho break;
1248 1.1 jruoho
1249 1.1.1.4 christos case ACPI_DMT_FLAGS1:
1250 1.1 jruoho
1251 1.1.1.4 christos AcpiOsPrintf ("%1.1X\n", (*Target >> 1) & 0x03);
1252 1.1 jruoho break;
1253 1.1 jruoho
1254 1.1.1.4 christos case ACPI_DMT_FLAGS2:
1255 1.1 jruoho
1256 1.1.1.4 christos AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03);
1257 1.1 jruoho break;
1258 1.1 jruoho
1259 1.1.1.22 christos case ACPI_DMT_FLAGS8_2:
1260 1.1.1.22 christos
1261 1.1.1.22 christos AcpiOsPrintf ("%2.2X\n", (*Target >> 2) & 0xFF);
1262 1.1.1.22 christos break;
1263 1.1.1.22 christos
1264 1.1.1.22 christos case ACPI_DMT_FLAGS4:
1265 1.1 jruoho
1266 1.1.1.4 christos AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
1267 1.1 jruoho break;
1268 1.1 jruoho
1269 1.1.1.12 christos case ACPI_DMT_FLAGS4_0:
1270 1.1.1.12 christos
1271 1.1.1.12 christos AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target) & 0x0F);
1272 1.1.1.12 christos break;
1273 1.1.1.12 christos
1274 1.1.1.12 christos case ACPI_DMT_FLAGS4_4:
1275 1.1.1.12 christos
1276 1.1.1.12 christos AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 4) & 0x0F);
1277 1.1.1.12 christos break;
1278 1.1.1.12 christos
1279 1.1.1.12 christos case ACPI_DMT_FLAGS4_8:
1280 1.1.1.12 christos
1281 1.1.1.12 christos AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 8) & 0x0F);
1282 1.1.1.12 christos break;
1283 1.1.1.12 christos
1284 1.1.1.12 christos case ACPI_DMT_FLAGS4_12:
1285 1.1.1.12 christos
1286 1.1.1.12 christos AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 12) & 0x0F);
1287 1.1.1.12 christos break;
1288 1.1.1.12 christos
1289 1.1.1.12 christos case ACPI_DMT_FLAGS16_16:
1290 1.1.1.12 christos
1291 1.1.1.12 christos AcpiOsPrintf ("%4.4X\n", (*(UINT32 *)Target >> 16) & 0xFFFF);
1292 1.1.1.12 christos break;
1293 1.1.1.12 christos
1294 1.1.1.4 christos /* Integer Data Types */
1295 1.1 jruoho
1296 1.1.1.4 christos case ACPI_DMT_UINT8:
1297 1.1.1.4 christos case ACPI_DMT_UINT16:
1298 1.1.1.4 christos case ACPI_DMT_UINT24:
1299 1.1 jruoho case ACPI_DMT_UINT32:
1300 1.1.1.4 christos case ACPI_DMT_UINT40:
1301 1.1.1.4 christos case ACPI_DMT_UINT48:
1302 1.1 jruoho case ACPI_DMT_UINT56:
1303 1.1.1.4 christos case ACPI_DMT_UINT64:
1304 1.1.1.4 christos /*
1305 1.1.1.4 christos * Dump bytes - high byte first, low byte last.
1306 1.1.1.4 christos * Note: All ACPI tables are little-endian.
1307 1.1.1.4 christos */
1308 1.1.1.4 christos Value = 0;
1309 1.1.1.4 christos for (Temp8 = (UINT8) ByteLength; Temp8 > 0; Temp8--)
1310 1.1 jruoho {
1311 1.1.1.4 christos AcpiOsPrintf ("%2.2X", Target[Temp8 - 1]);
1312 1.1.1.4 christos Value |= Target[Temp8 - 1];
1313 1.1.1.4 christos Value <<= 8;
1314 1.1 jruoho }
1315 1.1 jruoho
1316 1.1.1.4 christos if (!Value && (Info->Flags & DT_DESCRIBES_OPTIONAL))
1317 1.1.1.4 christos {
1318 1.1.1.4 christos AcpiOsPrintf (" [Optional field not present]");
1319 1.1.1.4 christos }
1320 1.1 jruoho
1321 1.1.1.4 christos AcpiOsPrintf ("\n");
1322 1.1 jruoho break;
1323 1.1 jruoho
1324 1.1.1.2 jruoho case ACPI_DMT_BUF7:
1325 1.1.1.4 christos case ACPI_DMT_BUF10:
1326 1.1.1.10 christos case ACPI_DMT_BUF12:
1327 1.1 jruoho case ACPI_DMT_BUF16:
1328 1.1.1.20 christos case ACPI_DMT_BUF18:
1329 1.1.1.3 jruoho case ACPI_DMT_BUF128:
1330 1.1.1.2 jruoho /*
1331 1.1.1.2 jruoho * Buffer: Size depends on the opcode and was set above.
1332 1.1.1.2 jruoho * Each hex byte is separated with a space.
1333 1.1.1.3 jruoho * Multiple lines are separated by line continuation char.
1334 1.1.1.2 jruoho */
1335 1.1.1.3 jruoho for (Temp16 = 0; Temp16 < ByteLength; Temp16++)
1336 1.1 jruoho {
1337 1.1.1.3 jruoho AcpiOsPrintf ("%2.2X", Target[Temp16]);
1338 1.1.1.3 jruoho if ((UINT32) (Temp16 + 1) < ByteLength)
1339 1.1.1.2 jruoho {
1340 1.1.1.3 jruoho if ((Temp16 > 0) && (!((Temp16+1) % 16)))
1341 1.1.1.3 jruoho {
1342 1.1.1.3 jruoho AcpiOsPrintf (" \\\n"); /* Line continuation */
1343 1.1.1.3 jruoho AcpiDmLineHeader (0, 0, NULL);
1344 1.1.1.3 jruoho }
1345 1.1.1.3 jruoho else
1346 1.1.1.3 jruoho {
1347 1.1.1.3 jruoho AcpiOsPrintf (" ");
1348 1.1.1.3 jruoho }
1349 1.1.1.2 jruoho }
1350 1.1 jruoho }
1351 1.1.1.8 christos
1352 1.1 jruoho AcpiOsPrintf ("\n");
1353 1.1 jruoho break;
1354 1.1 jruoho
1355 1.1.1.2 jruoho case ACPI_DMT_UUID:
1356 1.1.1.2 jruoho
1357 1.1.1.2 jruoho /* Convert 16-byte UUID buffer to 36-byte formatted UUID string */
1358 1.1.1.2 jruoho
1359 1.1.1.19 christos (void) AcpiUtConvertUuidToString ((char *) Target, AslGbl_MsgBuffer);
1360 1.1.1.2 jruoho
1361 1.1.1.15 christos AcpiOsPrintf ("%s\n", AslGbl_MsgBuffer);
1362 1.1.1.2 jruoho break;
1363 1.1.1.2 jruoho
1364 1.1 jruoho case ACPI_DMT_STRING:
1365 1.1 jruoho
1366 1.1 jruoho AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target));
1367 1.1 jruoho break;
1368 1.1 jruoho
1369 1.1.1.19 christos case ACPI_DMT_IVRS_UNTERMINATED_STRING:
1370 1.1.1.19 christos
1371 1.1.1.19 christos AcpiOsPrintf ("\"%.*s\"\n", ByteLength, ACPI_CAST_PTR (char, Target));
1372 1.1.1.19 christos break;
1373 1.1.1.19 christos
1374 1.1 jruoho /* Fixed length ASCII name fields */
1375 1.1 jruoho
1376 1.1 jruoho case ACPI_DMT_SIG:
1377 1.1 jruoho
1378 1.1.1.9 christos AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1379 1.1 jruoho AcpiOsPrintf ("\"%.4s\" ", RepairedName);
1380 1.1.1.8 christos
1381 1.1.1.7 christos TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
1382 1.1 jruoho if (TableData)
1383 1.1 jruoho {
1384 1.1.1.7 christos AcpiOsPrintf (STRING_FORMAT, TableData->Description);
1385 1.1.1.3 jruoho }
1386 1.1.1.3 jruoho else
1387 1.1.1.3 jruoho {
1388 1.1.1.3 jruoho AcpiOsPrintf ("\n");
1389 1.1 jruoho }
1390 1.1 jruoho break;
1391 1.1 jruoho
1392 1.1 jruoho case ACPI_DMT_NAME4:
1393 1.1 jruoho
1394 1.1.1.9 christos AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1395 1.1 jruoho AcpiOsPrintf ("\"%.4s\"\n", RepairedName);
1396 1.1 jruoho break;
1397 1.1 jruoho
1398 1.1 jruoho case ACPI_DMT_NAME6:
1399 1.1 jruoho
1400 1.1.1.9 christos AcpiUtCheckAndRepairAscii (Target, RepairedName, 6);
1401 1.1 jruoho AcpiOsPrintf ("\"%.6s\"\n", RepairedName);
1402 1.1 jruoho break;
1403 1.1 jruoho
1404 1.1 jruoho case ACPI_DMT_NAME8:
1405 1.1 jruoho
1406 1.1.1.9 christos AcpiUtCheckAndRepairAscii (Target, RepairedName, 8);
1407 1.1 jruoho AcpiOsPrintf ("\"%.8s\"\n", RepairedName);
1408 1.1 jruoho break;
1409 1.1 jruoho
1410 1.1 jruoho /* Special Data Types */
1411 1.1 jruoho
1412 1.1 jruoho case ACPI_DMT_CHKSUM:
1413 1.1 jruoho
1414 1.1 jruoho /* Checksum, display and validate */
1415 1.1 jruoho
1416 1.1 jruoho AcpiOsPrintf ("%2.2X", *Target);
1417 1.1.1.2 jruoho Temp8 = AcpiDmGenerateChecksum (Table,
1418 1.1.1.6 christos ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
1419 1.1.1.6 christos ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
1420 1.1.1.6 christos
1421 1.1 jruoho if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
1422 1.1 jruoho {
1423 1.1 jruoho AcpiOsPrintf (
1424 1.1 jruoho " /* Incorrect checksum, should be %2.2X */", Temp8);
1425 1.1 jruoho }
1426 1.1.1.8 christos
1427 1.1 jruoho AcpiOsPrintf ("\n");
1428 1.1 jruoho break;
1429 1.1 jruoho
1430 1.1 jruoho case ACPI_DMT_SPACEID:
1431 1.1 jruoho
1432 1.1 jruoho /* Address Space ID */
1433 1.1 jruoho
1434 1.1.1.3 jruoho AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiUtGetRegionName (*Target));
1435 1.1 jruoho break;
1436 1.1 jruoho
1437 1.1.1.2 jruoho case ACPI_DMT_ACCWIDTH:
1438 1.1.1.2 jruoho
1439 1.1.1.2 jruoho /* Encoded Access Width */
1440 1.1.1.2 jruoho
1441 1.1.1.2 jruoho Temp8 = *Target;
1442 1.1.1.2 jruoho if (Temp8 > ACPI_GAS_WIDTH_RESERVED)
1443 1.1.1.2 jruoho {
1444 1.1.1.2 jruoho Temp8 = ACPI_GAS_WIDTH_RESERVED;
1445 1.1.1.2 jruoho }
1446 1.1.1.2 jruoho
1447 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]);
1448 1.1.1.2 jruoho break;
1449 1.1.1.2 jruoho
1450 1.1 jruoho case ACPI_DMT_GAS:
1451 1.1 jruoho
1452 1.1 jruoho /* Generic Address Structure */
1453 1.1 jruoho
1454 1.1.1.3 jruoho AcpiOsPrintf (STRING_FORMAT, "Generic Address Structure");
1455 1.1.1.7 christos Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1456 1.1 jruoho sizeof (ACPI_GENERIC_ADDRESS), AcpiDmTableInfoGas);
1457 1.1.1.7 christos if (ACPI_FAILURE (Status))
1458 1.1.1.7 christos {
1459 1.1.1.7 christos return (Status);
1460 1.1.1.7 christos }
1461 1.1.1.7 christos
1462 1.1 jruoho AcpiOsPrintf ("\n");
1463 1.1 jruoho LastOutputBlankLine = TRUE;
1464 1.1 jruoho break;
1465 1.1 jruoho
1466 1.1.1.20 christos case ACPI_DMT_AEST:
1467 1.1.1.20 christos
1468 1.1.1.20 christos /* AEST subtable types */
1469 1.1.1.20 christos
1470 1.1.1.20 christos Temp8 = *Target;
1471 1.1.1.20 christos if (Temp8 > ACPI_AEST_NODE_TYPE_RESERVED)
1472 1.1.1.20 christos {
1473 1.1.1.20 christos Temp8 = ACPI_AEST_NODE_TYPE_RESERVED;
1474 1.1.1.20 christos }
1475 1.1.1.20 christos
1476 1.1.1.20 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1477 1.1.1.20 christos AcpiDmAestSubnames[Temp8]);
1478 1.1.1.20 christos break;
1479 1.1.1.20 christos
1480 1.1.1.20 christos case ACPI_DMT_AEST_CACHE:
1481 1.1.1.20 christos
1482 1.1.1.20 christos /* AEST cache resource subtable */
1483 1.1.1.20 christos
1484 1.1.1.20 christos Temp32 = *Target;
1485 1.1.1.20 christos if (Temp32 > ACPI_AEST_CACHE_RESERVED)
1486 1.1.1.20 christos {
1487 1.1.1.20 christos Temp32 = ACPI_AEST_CACHE_RESERVED;
1488 1.1.1.20 christos }
1489 1.1.1.20 christos
1490 1.1.1.20 christos AcpiOsPrintf (UINT32_FORMAT, *Target,
1491 1.1.1.20 christos AcpiDmAestCacheNames[Temp32]);
1492 1.1.1.20 christos break;
1493 1.1.1.20 christos
1494 1.1.1.20 christos case ACPI_DMT_AEST_GIC:
1495 1.1.1.20 christos
1496 1.1.1.20 christos /* AEST GIC error subtable */
1497 1.1.1.20 christos
1498 1.1.1.20 christos Temp32 = *Target;
1499 1.1.1.20 christos if (Temp32 > ACPI_AEST_GIC_RESERVED)
1500 1.1.1.20 christos {
1501 1.1.1.20 christos Temp32 = ACPI_AEST_GIC_RESERVED;
1502 1.1.1.20 christos }
1503 1.1.1.20 christos
1504 1.1.1.20 christos AcpiOsPrintf (UINT32_FORMAT, *Target,
1505 1.1.1.20 christos AcpiDmAestGicNames[Temp32]);
1506 1.1.1.20 christos break;
1507 1.1.1.20 christos
1508 1.1.1.20 christos case ACPI_DMT_AEST_RES:
1509 1.1.1.20 christos
1510 1.1.1.20 christos /* AEST resource type subtable */
1511 1.1.1.20 christos
1512 1.1.1.20 christos Temp8 = *Target;
1513 1.1.1.20 christos if (Temp8 > ACPI_AEST_RESOURCE_RESERVED)
1514 1.1.1.20 christos {
1515 1.1.1.20 christos Temp8 = ACPI_AEST_RESOURCE_RESERVED;
1516 1.1.1.20 christos }
1517 1.1.1.20 christos
1518 1.1.1.20 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1519 1.1.1.20 christos AcpiDmAestResourceNames[Temp8]);
1520 1.1.1.20 christos break;
1521 1.1.1.20 christos
1522 1.1.1.20 christos case ACPI_DMT_AEST_XFACE:
1523 1.1.1.20 christos
1524 1.1.1.20 christos /* AEST interface structure types */
1525 1.1.1.20 christos
1526 1.1.1.20 christos Temp8 = *Target;
1527 1.1.1.20 christos if (Temp8 > ACPI_AEST_XFACE_RESERVED)
1528 1.1.1.20 christos {
1529 1.1.1.20 christos Temp8 = ACPI_AEST_XFACE_RESERVED;
1530 1.1.1.20 christos }
1531 1.1.1.20 christos
1532 1.1.1.20 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1533 1.1.1.20 christos AcpiDmAestXfaceNames[Temp8]);
1534 1.1.1.20 christos break;
1535 1.1.1.20 christos
1536 1.1.1.20 christos case ACPI_DMT_AEST_XRUPT:
1537 1.1.1.20 christos
1538 1.1.1.20 christos /* AEST interrupt structure types */
1539 1.1.1.20 christos
1540 1.1.1.20 christos Temp8 = *Target;
1541 1.1.1.20 christos if (Temp8 > ACPI_AEST_XRUPT_RESERVED)
1542 1.1.1.20 christos {
1543 1.1.1.20 christos Temp8 = ACPI_AEST_XRUPT_RESERVED;
1544 1.1.1.20 christos }
1545 1.1.1.20 christos
1546 1.1.1.20 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1547 1.1.1.20 christos AcpiDmAestXruptNames[Temp8]);
1548 1.1.1.20 christos break;
1549 1.1.1.20 christos
1550 1.1 jruoho case ACPI_DMT_ASF:
1551 1.1 jruoho
1552 1.1 jruoho /* ASF subtable types */
1553 1.1 jruoho
1554 1.1 jruoho Temp16 = (UINT16) ((*Target) & 0x7F); /* Top bit can be zero or one */
1555 1.1 jruoho if (Temp16 > ACPI_ASF_TYPE_RESERVED)
1556 1.1 jruoho {
1557 1.1 jruoho Temp16 = ACPI_ASF_TYPE_RESERVED;
1558 1.1 jruoho }
1559 1.1 jruoho
1560 1.1.1.3 jruoho AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmAsfSubnames[Temp16]);
1561 1.1 jruoho break;
1562 1.1 jruoho
1563 1.1.1.18 christos case ACPI_DMT_CEDT:
1564 1.1.1.18 christos
1565 1.1.1.18 christos /* CEDT subtable types */
1566 1.1.1.18 christos
1567 1.1.1.18 christos Temp8 = *Target;
1568 1.1.1.18 christos if (Temp8 > ACPI_CEDT_TYPE_RESERVED)
1569 1.1.1.18 christos {
1570 1.1.1.18 christos Temp8 = ACPI_CEDT_TYPE_RESERVED;
1571 1.1.1.18 christos }
1572 1.1.1.18 christos
1573 1.1.1.18 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1574 1.1.1.18 christos AcpiDmCedtSubnames[Temp8]);
1575 1.1.1.18 christos break;
1576 1.1.1.18 christos
1577 1.1 jruoho case ACPI_DMT_DMAR:
1578 1.1 jruoho
1579 1.1 jruoho /* DMAR subtable types */
1580 1.1 jruoho
1581 1.1 jruoho Temp16 = ACPI_GET16 (Target);
1582 1.1 jruoho if (Temp16 > ACPI_DMAR_TYPE_RESERVED)
1583 1.1 jruoho {
1584 1.1 jruoho Temp16 = ACPI_DMAR_TYPE_RESERVED;
1585 1.1 jruoho }
1586 1.1 jruoho
1587 1.1.1.6 christos AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1588 1.1.1.6 christos AcpiDmDmarSubnames[Temp16]);
1589 1.1 jruoho break;
1590 1.1 jruoho
1591 1.1.1.5 christos case ACPI_DMT_DMAR_SCOPE:
1592 1.1.1.5 christos
1593 1.1.1.5 christos /* DMAR device scope types */
1594 1.1.1.5 christos
1595 1.1.1.5 christos Temp8 = *Target;
1596 1.1.1.5 christos if (Temp8 > ACPI_DMAR_SCOPE_TYPE_RESERVED)
1597 1.1.1.5 christos {
1598 1.1.1.5 christos Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED;
1599 1.1.1.5 christos }
1600 1.1.1.5 christos
1601 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1602 1.1.1.6 christos AcpiDmDmarScope[Temp8]);
1603 1.1.1.5 christos break;
1604 1.1.1.5 christos
1605 1.1.1.2 jruoho case ACPI_DMT_EINJACT:
1606 1.1.1.2 jruoho
1607 1.1.1.2 jruoho /* EINJ Action types */
1608 1.1.1.2 jruoho
1609 1.1.1.2 jruoho Temp8 = *Target;
1610 1.1.1.2 jruoho if (Temp8 > ACPI_EINJ_ACTION_RESERVED)
1611 1.1.1.2 jruoho {
1612 1.1.1.2 jruoho Temp8 = ACPI_EINJ_ACTION_RESERVED;
1613 1.1.1.2 jruoho }
1614 1.1.1.2 jruoho
1615 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1616 1.1.1.6 christos AcpiDmEinjActions[Temp8]);
1617 1.1.1.2 jruoho break;
1618 1.1.1.2 jruoho
1619 1.1.1.2 jruoho case ACPI_DMT_EINJINST:
1620 1.1.1.2 jruoho
1621 1.1.1.2 jruoho /* EINJ Instruction types */
1622 1.1.1.2 jruoho
1623 1.1.1.2 jruoho Temp8 = *Target;
1624 1.1.1.2 jruoho if (Temp8 > ACPI_EINJ_INSTRUCTION_RESERVED)
1625 1.1.1.2 jruoho {
1626 1.1.1.2 jruoho Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
1627 1.1.1.2 jruoho }
1628 1.1.1.2 jruoho
1629 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1630 1.1.1.6 christos AcpiDmEinjInstructions[Temp8]);
1631 1.1.1.2 jruoho break;
1632 1.1.1.2 jruoho
1633 1.1.1.2 jruoho case ACPI_DMT_ERSTACT:
1634 1.1.1.2 jruoho
1635 1.1.1.2 jruoho /* ERST Action types */
1636 1.1.1.2 jruoho
1637 1.1.1.2 jruoho Temp8 = *Target;
1638 1.1.1.2 jruoho if (Temp8 > ACPI_ERST_ACTION_RESERVED)
1639 1.1.1.2 jruoho {
1640 1.1.1.2 jruoho Temp8 = ACPI_ERST_ACTION_RESERVED;
1641 1.1.1.2 jruoho }
1642 1.1.1.2 jruoho
1643 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1644 1.1.1.6 christos AcpiDmErstActions[Temp8]);
1645 1.1.1.2 jruoho break;
1646 1.1.1.2 jruoho
1647 1.1.1.2 jruoho case ACPI_DMT_ERSTINST:
1648 1.1.1.2 jruoho
1649 1.1.1.2 jruoho /* ERST Instruction types */
1650 1.1.1.2 jruoho
1651 1.1.1.2 jruoho Temp8 = *Target;
1652 1.1.1.2 jruoho if (Temp8 > ACPI_ERST_INSTRUCTION_RESERVED)
1653 1.1.1.2 jruoho {
1654 1.1.1.2 jruoho Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
1655 1.1.1.2 jruoho }
1656 1.1.1.2 jruoho
1657 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1658 1.1.1.6 christos AcpiDmErstInstructions[Temp8]);
1659 1.1.1.2 jruoho break;
1660 1.1.1.2 jruoho
1661 1.1.1.5 christos case ACPI_DMT_GTDT:
1662 1.1.1.5 christos
1663 1.1.1.5 christos /* GTDT subtable types */
1664 1.1.1.5 christos
1665 1.1.1.5 christos Temp8 = *Target;
1666 1.1.1.5 christos if (Temp8 > ACPI_GTDT_TYPE_RESERVED)
1667 1.1.1.5 christos {
1668 1.1.1.5 christos Temp8 = ACPI_GTDT_TYPE_RESERVED;
1669 1.1.1.5 christos }
1670 1.1.1.5 christos
1671 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1672 1.1.1.6 christos AcpiDmGtdtSubnames[Temp8]);
1673 1.1.1.5 christos break;
1674 1.1.1.5 christos
1675 1.1 jruoho case ACPI_DMT_HEST:
1676 1.1 jruoho
1677 1.1 jruoho /* HEST subtable types */
1678 1.1 jruoho
1679 1.1 jruoho Temp16 = ACPI_GET16 (Target);
1680 1.1 jruoho if (Temp16 > ACPI_HEST_TYPE_RESERVED)
1681 1.1 jruoho {
1682 1.1 jruoho Temp16 = ACPI_HEST_TYPE_RESERVED;
1683 1.1 jruoho }
1684 1.1 jruoho
1685 1.1.1.6 christos AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1686 1.1.1.6 christos AcpiDmHestSubnames[Temp16]);
1687 1.1 jruoho break;
1688 1.1 jruoho
1689 1.1 jruoho case ACPI_DMT_HESTNTFY:
1690 1.1 jruoho
1691 1.1.1.6 christos AcpiOsPrintf (STRING_FORMAT,
1692 1.1.1.6 christos "Hardware Error Notification Structure");
1693 1.1.1.6 christos
1694 1.1.1.7 christos Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1695 1.1 jruoho sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify);
1696 1.1.1.7 christos if (ACPI_FAILURE (Status))
1697 1.1.1.7 christos {
1698 1.1.1.7 christos return (Status);
1699 1.1.1.7 christos }
1700 1.1.1.7 christos
1701 1.1 jruoho AcpiOsPrintf ("\n");
1702 1.1 jruoho LastOutputBlankLine = TRUE;
1703 1.1 jruoho break;
1704 1.1 jruoho
1705 1.1 jruoho case ACPI_DMT_HESTNTYP:
1706 1.1 jruoho
1707 1.1 jruoho /* HEST Notify types */
1708 1.1 jruoho
1709 1.1 jruoho Temp8 = *Target;
1710 1.1 jruoho if (Temp8 > ACPI_HEST_NOTIFY_RESERVED)
1711 1.1 jruoho {
1712 1.1 jruoho Temp8 = ACPI_HEST_NOTIFY_RESERVED;
1713 1.1 jruoho }
1714 1.1 jruoho
1715 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1716 1.1.1.6 christos AcpiDmHestNotifySubnames[Temp8]);
1717 1.1 jruoho break;
1718 1.1 jruoho
1719 1.1.1.12 christos case ACPI_DMT_HMAT:
1720 1.1.1.12 christos
1721 1.1.1.12 christos /* HMAT subtable types */
1722 1.1.1.12 christos
1723 1.1.1.12 christos Temp16 = *Target;
1724 1.1.1.12 christos if (Temp16 > ACPI_HMAT_TYPE_RESERVED)
1725 1.1.1.12 christos {
1726 1.1.1.12 christos Temp16 = ACPI_HMAT_TYPE_RESERVED;
1727 1.1.1.12 christos }
1728 1.1.1.12 christos
1729 1.1.1.12 christos AcpiOsPrintf (UINT16_FORMAT, *Target,
1730 1.1.1.12 christos AcpiDmHmatSubnames[Temp16]);
1731 1.1.1.12 christos break;
1732 1.1.1.12 christos
1733 1.1.1.7 christos case ACPI_DMT_IORTMEM:
1734 1.1.1.7 christos
1735 1.1.1.7 christos AcpiOsPrintf (STRING_FORMAT,
1736 1.1.1.7 christos "IORT Memory Access Properties");
1737 1.1.1.7 christos
1738 1.1.1.7 christos Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1739 1.1.1.7 christos sizeof (ACPI_IORT_MEMORY_ACCESS), AcpiDmTableInfoIortAcc);
1740 1.1.1.7 christos if (ACPI_FAILURE (Status))
1741 1.1.1.7 christos {
1742 1.1.1.7 christos return (Status);
1743 1.1.1.7 christos }
1744 1.1.1.7 christos
1745 1.1.1.7 christos LastOutputBlankLine = TRUE;
1746 1.1.1.7 christos break;
1747 1.1.1.7 christos
1748 1.1 jruoho case ACPI_DMT_MADT:
1749 1.1 jruoho
1750 1.1 jruoho /* MADT subtable types */
1751 1.1 jruoho
1752 1.1 jruoho Temp8 = *Target;
1753 1.1.1.22 christos if ((Temp8 >= ACPI_MADT_TYPE_RESERVED) && (Temp8 < ACPI_MADT_TYPE_OEM_RESERVED))
1754 1.1 jruoho {
1755 1.1 jruoho Temp8 = ACPI_MADT_TYPE_RESERVED;
1756 1.1 jruoho }
1757 1.1.1.22 christos else if (Temp8 >= ACPI_MADT_TYPE_OEM_RESERVED)
1758 1.1.1.22 christos {
1759 1.1.1.22 christos Temp8 = ACPI_MADT_TYPE_RESERVED + 1;
1760 1.1.1.22 christos }
1761 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1762 1.1.1.6 christos AcpiDmMadtSubnames[Temp8]);
1763 1.1.1.3 jruoho break;
1764 1.1.1.3 jruoho
1765 1.1.1.7 christos case ACPI_DMT_NFIT:
1766 1.1.1.7 christos
1767 1.1.1.7 christos /* NFIT subtable types */
1768 1.1.1.7 christos
1769 1.1.1.7 christos Temp16 = ACPI_GET16 (Target);
1770 1.1.1.7 christos if (Temp16 > ACPI_NFIT_TYPE_RESERVED)
1771 1.1.1.7 christos {
1772 1.1.1.7 christos Temp16 = ACPI_NFIT_TYPE_RESERVED;
1773 1.1.1.7 christos }
1774 1.1.1.7 christos
1775 1.1.1.7 christos AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1776 1.1.1.7 christos AcpiDmNfitSubnames[Temp16]);
1777 1.1.1.7 christos break;
1778 1.1.1.7 christos
1779 1.1.1.20 christos case ACPI_DMT_NHLT1:
1780 1.1.1.20 christos
1781 1.1.1.20 christos /* NHLT link types */
1782 1.1.1.20 christos
1783 1.1.1.20 christos Temp8 = *Target;
1784 1.1.1.20 christos if (Temp8 > ACPI_NHLT_TYPE_RESERVED)
1785 1.1.1.20 christos {
1786 1.1.1.20 christos Temp8 = ACPI_NHLT_TYPE_RESERVED;
1787 1.1.1.20 christos }
1788 1.1.1.20 christos
1789 1.1.1.20 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1790 1.1.1.20 christos AcpiDmNhltLinkTypeNames[Temp8]);
1791 1.1.1.20 christos break;
1792 1.1.1.20 christos
1793 1.1.1.20 christos case ACPI_DMT_NHLT1a:
1794 1.1.1.20 christos
1795 1.1.1.20 christos /* NHLT direction */
1796 1.1.1.20 christos
1797 1.1.1.20 christos Temp8 = *Target;
1798 1.1.1.20 christos if (Temp8 > ACPI_NHLT_DIR_RESERVED)
1799 1.1.1.20 christos {
1800 1.1.1.20 christos Temp8 = ACPI_NHLT_DIR_RESERVED;
1801 1.1.1.20 christos }
1802 1.1.1.20 christos
1803 1.1.1.20 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1804 1.1.1.20 christos AcpiDmNhltDirectionNames[Temp8]);
1805 1.1.1.20 christos break;
1806 1.1.1.20 christos
1807 1.1.1.21 christos case ACPI_DMT_NHLT1b:
1808 1.1.1.21 christos
1809 1.1.1.21 christos /* NHLT microphone type */
1810 1.1.1.21 christos
1811 1.1.1.21 christos Temp8 = *Target;
1812 1.1.1.21 christos if (Temp8 > ACPI_NHLT_MIC_RESERVED)
1813 1.1.1.21 christos {
1814 1.1.1.21 christos Temp8 = ACPI_NHLT_MIC_RESERVED;
1815 1.1.1.21 christos }
1816 1.1.1.21 christos
1817 1.1.1.21 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1818 1.1.1.21 christos AcpiDmNhltMicTypeNames[Temp8]);
1819 1.1.1.21 christos break;
1820 1.1.1.21 christos
1821 1.1.1.21 christos case ACPI_DMT_NHLT1c:
1822 1.1.1.21 christos
1823 1.1.1.21 christos /* NHLT microphone position */
1824 1.1.1.21 christos
1825 1.1.1.21 christos Temp8 = *Target;
1826 1.1.1.21 christos if (Temp8 > ACPI_NHLT_MIC_POSITION_RESERVED)
1827 1.1.1.21 christos {
1828 1.1.1.21 christos Temp8 = ACPI_NHLT_MIC_POSITION_RESERVED;
1829 1.1.1.21 christos }
1830 1.1.1.21 christos
1831 1.1.1.21 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1832 1.1.1.21 christos AcpiDmNhltMicPositionNames[Temp8]);
1833 1.1.1.21 christos break;
1834 1.1.1.21 christos
1835 1.1.1.21 christos case ACPI_DMT_NHLT1d:
1836 1.1.1.21 christos
1837 1.1.1.21 christos /* NHLT microphone array type */
1838 1.1.1.21 christos
1839 1.1.1.21 christos Temp8 = *Target & ACPI_NHLT_ARRAY_TYPE_MASK;
1840 1.1.1.21 christos if (Temp8 < ACPI_NHLT_ARRAY_TYPE_RESERVED)
1841 1.1.1.21 christos {
1842 1.1.1.21 christos Temp8 = ACPI_NHLT_ARRAY_TYPE_RESERVED;
1843 1.1.1.21 christos }
1844 1.1.1.21 christos
1845 1.1.1.21 christos AcpiOsPrintf (UINT8_FORMAT_NO_NEWLINE, *Target,
1846 1.1.1.21 christos AcpiDmNhltMicArrayTypeNames[Temp8 - ACPI_NHLT_ARRAY_TYPE_RESERVED]);
1847 1.1.1.21 christos
1848 1.1.1.21 christos Temp8 = *Target;
1849 1.1.1.21 christos if (Temp8 & ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT)
1850 1.1.1.21 christos {
1851 1.1.1.21 christos AcpiOsPrintf (" [%s]", "SNR and Sensitivity");
1852 1.1.1.21 christos }
1853 1.1.1.21 christos
1854 1.1.1.21 christos AcpiOsPrintf ("\n");
1855 1.1.1.21 christos break;
1856 1.1.1.21 christos
1857 1.1.1.21 christos case ACPI_DMT_NHLT1e:
1858 1.1.1.21 christos
1859 1.1.1.21 christos /* NHLT Endpoint Device ID */
1860 1.1.1.21 christos
1861 1.1.1.21 christos Temp16 = ACPI_GET16 (Target);
1862 1.1.1.21 christos if (Temp16 == 0xAE20)
1863 1.1.1.21 christos {
1864 1.1.1.21 christos Name = "PDM DMIC";
1865 1.1.1.21 christos }
1866 1.1.1.21 christos else if (Temp16 == 0xAE30)
1867 1.1.1.21 christos {
1868 1.1.1.21 christos Name = "BT Sideband";
1869 1.1.1.21 christos }
1870 1.1.1.21 christos else if (Temp16 == 0xAE34)
1871 1.1.1.21 christos {
1872 1.1.1.21 christos Name = "I2S/TDM Codecs";
1873 1.1.1.21 christos }
1874 1.1.1.21 christos else
1875 1.1.1.21 christos {
1876 1.1.1.21 christos Name = "Unknown Device ID";
1877 1.1.1.21 christos }
1878 1.1.1.21 christos
1879 1.1.1.21 christos AcpiOsPrintf (UINT16_FORMAT, Temp16, Name);
1880 1.1.1.21 christos break;
1881 1.1.1.21 christos
1882 1.1.1.21 christos case ACPI_DMT_NHLT1f:
1883 1.1.1.21 christos
1884 1.1.1.21 christos /* NHLT ConfigType field */
1885 1.1.1.21 christos
1886 1.1.1.21 christos Temp8 = *Target;
1887 1.1.1.21 christos if (Temp8 > ACPI_NHLT_CONFIG_TYPE_RESERVED)
1888 1.1.1.21 christos {
1889 1.1.1.21 christos Temp8 = ACPI_NHLT_CONFIG_TYPE_RESERVED;
1890 1.1.1.21 christos }
1891 1.1.1.21 christos
1892 1.1.1.21 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1893 1.1.1.21 christos AcpiDmNhltConfigTypeNames[Temp8]);
1894 1.1.1.21 christos break;
1895 1.1.1.21 christos
1896 1.1.1.4 christos case ACPI_DMT_PCCT:
1897 1.1.1.4 christos
1898 1.1.1.4 christos /* PCCT subtable types */
1899 1.1.1.4 christos
1900 1.1.1.4 christos Temp8 = *Target;
1901 1.1.1.4 christos if (Temp8 > ACPI_PCCT_TYPE_RESERVED)
1902 1.1.1.4 christos {
1903 1.1.1.4 christos Temp8 = ACPI_PCCT_TYPE_RESERVED;
1904 1.1.1.4 christos }
1905 1.1.1.4 christos
1906 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1907 1.1.1.6 christos AcpiDmPcctSubnames[Temp8]);
1908 1.1.1.4 christos break;
1909 1.1.1.4 christos
1910 1.1.1.18 christos case ACPI_DMT_PHAT:
1911 1.1.1.18 christos
1912 1.1.1.18 christos /* PMTT subtable types */
1913 1.1.1.18 christos
1914 1.1.1.18 christos Temp16 = *Target;
1915 1.1.1.18 christos if (Temp16 > ACPI_PHAT_TYPE_RESERVED)
1916 1.1.1.18 christos {
1917 1.1.1.18 christos Temp16 = ACPI_PHAT_TYPE_RESERVED;
1918 1.1.1.18 christos }
1919 1.1.1.18 christos
1920 1.1.1.18 christos AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16(Target),
1921 1.1.1.18 christos AcpiDmPhatSubnames[Temp16]);
1922 1.1.1.18 christos break;
1923 1.1.1.18 christos
1924 1.1.1.4 christos case ACPI_DMT_PMTT:
1925 1.1.1.4 christos
1926 1.1.1.4 christos /* PMTT subtable types */
1927 1.1.1.4 christos
1928 1.1.1.4 christos Temp8 = *Target;
1929 1.1.1.18 christos if (Temp8 == ACPI_PMTT_TYPE_VENDOR)
1930 1.1.1.18 christos {
1931 1.1.1.18 christos Temp8 = ACPI_PMTT_TYPE_RESERVED + 1;
1932 1.1.1.18 christos }
1933 1.1.1.18 christos else if (Temp8 > ACPI_PMTT_TYPE_RESERVED)
1934 1.1.1.4 christos {
1935 1.1.1.4 christos Temp8 = ACPI_PMTT_TYPE_RESERVED;
1936 1.1.1.4 christos }
1937 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1938 1.1.1.6 christos AcpiDmPmttSubnames[Temp8]);
1939 1.1.1.4 christos break;
1940 1.1.1.4 christos
1941 1.1.1.12 christos case ACPI_DMT_PPTT:
1942 1.1.1.12 christos
1943 1.1.1.12 christos /* PPTT subtable types */
1944 1.1.1.12 christos
1945 1.1.1.12 christos Temp8 = *Target;
1946 1.1.1.12 christos if (Temp8 > ACPI_PPTT_TYPE_RESERVED)
1947 1.1.1.12 christos {
1948 1.1.1.12 christos Temp8 = ACPI_PPTT_TYPE_RESERVED;
1949 1.1.1.12 christos }
1950 1.1.1.12 christos
1951 1.1.1.12 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1952 1.1.1.12 christos AcpiDmPpttSubnames[Temp8]);
1953 1.1.1.12 christos break;
1954 1.1.1.12 christos
1955 1.1.1.7 christos case ACPI_DMT_UNICODE:
1956 1.1.1.20 christos case ACPI_DMT_WPBT_UNICODE:
1957 1.1.1.7 christos
1958 1.1.1.7 christos if (ByteLength == 0)
1959 1.1.1.7 christos {
1960 1.1.1.7 christos AcpiOsPrintf ("/* Zero-length Data */\n");
1961 1.1.1.7 christos break;
1962 1.1.1.7 christos }
1963 1.1.1.7 christos
1964 1.1.1.7 christos AcpiDmDumpUnicode (Table, CurrentOffset, ByteLength);
1965 1.1.1.7 christos break;
1966 1.1.1.7 christos
1967 1.1.1.6 christos case ACPI_DMT_RAW_BUFFER:
1968 1.1.1.18 christos case ACPI_DMT_BUFFER:
1969 1.1.1.18 christos case ACPI_DMT_PMTT_VENDOR:
1970 1.1.1.3 jruoho
1971 1.1.1.7 christos if (ByteLength == 0)
1972 1.1.1.7 christos {
1973 1.1.1.7 christos AcpiOsPrintf ("/* Zero-length Data */\n");
1974 1.1.1.7 christos break;
1975 1.1.1.7 christos }
1976 1.1.1.7 christos
1977 1.1.1.21 christos AcpiDmDumpBuffer (Target, 0, ByteLength, CurrentOffset, NULL);
1978 1.1 jruoho break;
1979 1.1 jruoho
1980 1.1.1.19 christos case ACPI_DMT_RGRT:
1981 1.1.1.19 christos
1982 1.1.1.19 christos /* RGRT subtable types */
1983 1.1.1.19 christos
1984 1.1.1.19 christos Temp8 = *Target;
1985 1.1.1.19 christos if (Temp8 >= ACPI_RGRT_TYPE_RESERVED)
1986 1.1.1.19 christos {
1987 1.1.1.19 christos Temp8 = ACPI_RGRT_TYPE_RESERVED0;
1988 1.1.1.19 christos }
1989 1.1.1.19 christos
1990 1.1.1.19 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
1991 1.1.1.19 christos AcpiDmRgrtSubnames[Temp8]);
1992 1.1.1.19 christos break;
1993 1.1.1.19 christos
1994 1.1.1.13 christos case ACPI_DMT_SDEV:
1995 1.1.1.13 christos
1996 1.1.1.13 christos /* SDEV subtable types */
1997 1.1.1.13 christos
1998 1.1.1.13 christos Temp8 = *Target;
1999 1.1.1.13 christos if (Temp8 > ACPI_SDEV_TYPE_RESERVED)
2000 1.1.1.13 christos {
2001 1.1.1.13 christos Temp8 = ACPI_SDEV_TYPE_RESERVED;
2002 1.1.1.13 christos }
2003 1.1.1.13 christos
2004 1.1.1.13 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
2005 1.1.1.13 christos AcpiDmSdevSubnames[Temp8]);
2006 1.1.1.13 christos break;
2007 1.1.1.13 christos
2008 1.1 jruoho case ACPI_DMT_SRAT:
2009 1.1 jruoho
2010 1.1 jruoho /* SRAT subtable types */
2011 1.1 jruoho
2012 1.1 jruoho Temp8 = *Target;
2013 1.1 jruoho if (Temp8 > ACPI_SRAT_TYPE_RESERVED)
2014 1.1 jruoho {
2015 1.1 jruoho Temp8 = ACPI_SRAT_TYPE_RESERVED;
2016 1.1 jruoho }
2017 1.1 jruoho
2018 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
2019 1.1.1.6 christos AcpiDmSratSubnames[Temp8]);
2020 1.1 jruoho break;
2021 1.1 jruoho
2022 1.1.1.13 christos case ACPI_DMT_TPM2:
2023 1.1.1.13 christos
2024 1.1.1.13 christos /* TPM2 Start Method types */
2025 1.1.1.13 christos
2026 1.1.1.13 christos Temp8 = *Target;
2027 1.1.1.13 christos if (Temp8 > ACPI_TPM2_RESERVED)
2028 1.1.1.13 christos {
2029 1.1.1.13 christos Temp8 = ACPI_TPM2_RESERVED;
2030 1.1.1.13 christos }
2031 1.1.1.13 christos
2032 1.1.1.13 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
2033 1.1.1.13 christos AcpiDmTpm2Subnames[Temp8]);
2034 1.1.1.13 christos break;
2035 1.1.1.13 christos
2036 1.1.1.13 christos
2037 1.1 jruoho case ACPI_DMT_FADTPM:
2038 1.1 jruoho
2039 1.1 jruoho /* FADT Preferred PM Profile names */
2040 1.1 jruoho
2041 1.1 jruoho Temp8 = *Target;
2042 1.1 jruoho if (Temp8 > ACPI_FADT_PM_RESERVED)
2043 1.1 jruoho {
2044 1.1 jruoho Temp8 = ACPI_FADT_PM_RESERVED;
2045 1.1 jruoho }
2046 1.1 jruoho
2047 1.1.1.6 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
2048 1.1.1.6 christos AcpiDmFadtProfiles[Temp8]);
2049 1.1 jruoho break;
2050 1.1 jruoho
2051 1.1 jruoho case ACPI_DMT_IVRS:
2052 1.1 jruoho
2053 1.1 jruoho /* IVRS subtable types */
2054 1.1 jruoho
2055 1.1 jruoho Temp8 = *Target;
2056 1.1 jruoho switch (Temp8)
2057 1.1 jruoho {
2058 1.1.1.17 christos case ACPI_IVRS_TYPE_HARDWARE1:
2059 1.1.1.17 christos case ACPI_IVRS_TYPE_HARDWARE2:
2060 1.1.1.4 christos
2061 1.1 jruoho Name = AcpiDmIvrsSubnames[0];
2062 1.1 jruoho break;
2063 1.1 jruoho
2064 1.1.1.19 christos case ACPI_IVRS_TYPE_HARDWARE3:
2065 1.1.1.19 christos
2066 1.1.1.19 christos Name = AcpiDmIvrsSubnames[1];
2067 1.1.1.19 christos break;
2068 1.1.1.19 christos
2069 1.1 jruoho case ACPI_IVRS_TYPE_MEMORY1:
2070 1.1 jruoho case ACPI_IVRS_TYPE_MEMORY2:
2071 1.1 jruoho case ACPI_IVRS_TYPE_MEMORY3:
2072 1.1.1.4 christos
2073 1.1.1.19 christos Name = AcpiDmIvrsSubnames[2];
2074 1.1 jruoho break;
2075 1.1 jruoho
2076 1.1 jruoho default:
2077 1.1.1.4 christos
2078 1.1.1.19 christos Name = AcpiDmIvrsSubnames[3];
2079 1.1.1.19 christos break;
2080 1.1.1.19 christos }
2081 1.1.1.19 christos
2082 1.1.1.19 christos AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
2083 1.1.1.19 christos break;
2084 1.1.1.19 christos
2085 1.1.1.19 christos case ACPI_DMT_IVRS_DE:
2086 1.1.1.19 christos
2087 1.1.1.19 christos /* IVRS device entry types */
2088 1.1.1.19 christos
2089 1.1.1.19 christos Temp8 = *Target;
2090 1.1.1.19 christos switch (Temp8)
2091 1.1.1.19 christos {
2092 1.1.1.19 christos case ACPI_IVRS_TYPE_ALL:
2093 1.1.1.19 christos case ACPI_IVRS_TYPE_SELECT:
2094 1.1.1.19 christos case ACPI_IVRS_TYPE_START:
2095 1.1.1.19 christos case ACPI_IVRS_TYPE_END:
2096 1.1.1.19 christos
2097 1.1.1.19 christos Name = AcpiDmIvrsDevEntryNames[Temp8];
2098 1.1.1.19 christos break;
2099 1.1.1.19 christos
2100 1.1.1.19 christos case ACPI_IVRS_TYPE_ALIAS_SELECT:
2101 1.1.1.19 christos case ACPI_IVRS_TYPE_ALIAS_START:
2102 1.1.1.19 christos case ACPI_IVRS_TYPE_EXT_SELECT:
2103 1.1.1.19 christos case ACPI_IVRS_TYPE_EXT_START:
2104 1.1.1.19 christos case ACPI_IVRS_TYPE_SPECIAL:
2105 1.1.1.19 christos
2106 1.1.1.19 christos Name = AcpiDmIvrsDevEntryNames[Temp8 - 61];
2107 1.1.1.19 christos break;
2108 1.1.1.19 christos
2109 1.1.1.19 christos case ACPI_IVRS_TYPE_HID:
2110 1.1.1.19 christos
2111 1.1.1.19 christos Name = AcpiDmIvrsDevEntryNames[Temp8 - 228];
2112 1.1.1.19 christos break;
2113 1.1.1.19 christos
2114 1.1.1.19 christos default:
2115 1.1.1.19 christos Name = AcpiDmIvrsDevEntryNames[0]; /* Unknown/Reserved */
2116 1.1 jruoho break;
2117 1.1 jruoho }
2118 1.1 jruoho
2119 1.1.1.3 jruoho AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
2120 1.1 jruoho break;
2121 1.1 jruoho
2122 1.1.1.5 christos case ACPI_DMT_LPIT:
2123 1.1.1.5 christos
2124 1.1.1.5 christos /* LPIT subtable types */
2125 1.1.1.5 christos
2126 1.1.1.6 christos Temp32 = ACPI_GET32 (Target);
2127 1.1.1.6 christos if (Temp32 > ACPI_LPIT_TYPE_RESERVED)
2128 1.1.1.5 christos {
2129 1.1.1.6 christos Temp32 = ACPI_LPIT_TYPE_RESERVED;
2130 1.1.1.5 christos }
2131 1.1.1.5 christos
2132 1.1.1.6 christos AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target),
2133 1.1.1.6 christos AcpiDmLpitSubnames[Temp32]);
2134 1.1.1.5 christos break;
2135 1.1.1.5 christos
2136 1.1.1.18 christos case ACPI_DMT_VIOT:
2137 1.1.1.18 christos
2138 1.1.1.18 christos /* VIOT subtable types */
2139 1.1.1.18 christos
2140 1.1.1.18 christos Temp8 = *Target;
2141 1.1.1.18 christos if (Temp8 > ACPI_VIOT_RESERVED)
2142 1.1.1.18 christos {
2143 1.1.1.18 christos Temp8 = ACPI_VIOT_RESERVED;
2144 1.1.1.18 christos }
2145 1.1.1.18 christos
2146 1.1.1.18 christos AcpiOsPrintf (UINT8_FORMAT, *Target,
2147 1.1.1.18 christos AcpiDmViotSubnames[Temp8]);
2148 1.1.1.18 christos break;
2149 1.1.1.18 christos
2150 1.1 jruoho case ACPI_DMT_EXIT:
2151 1.1.1.4 christos
2152 1.1 jruoho return (AE_OK);
2153 1.1 jruoho
2154 1.1 jruoho default:
2155 1.1.1.4 christos
2156 1.1 jruoho ACPI_ERROR ((AE_INFO,
2157 1.1 jruoho "**** Invalid table opcode [0x%X] ****\n", Info->Opcode));
2158 1.1 jruoho return (AE_SUPPORT);
2159 1.1 jruoho }
2160 1.1 jruoho }
2161 1.1 jruoho
2162 1.1 jruoho if (TableOffset && !SubtableLength)
2163 1.1 jruoho {
2164 1.1.1.6 christos /*
2165 1.1.1.6 christos * If this table is not the main table, the subtable must have a
2166 1.1.1.6 christos * valid length
2167 1.1.1.6 christos */
2168 1.1 jruoho AcpiOsPrintf ("Invalid zero length subtable\n");
2169 1.1 jruoho return (AE_BAD_DATA);
2170 1.1 jruoho }
2171 1.1 jruoho
2172 1.1 jruoho return (AE_OK);
2173 1.1 jruoho }
2174