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