10174267aSFredrik Holmqvist /******************************************************************************* 20174267aSFredrik Holmqvist * 30174267aSFredrik Holmqvist * Module Name: rsinfo - Dispatch and Info tables 40174267aSFredrik Holmqvist * 50174267aSFredrik Holmqvist ******************************************************************************/ 60174267aSFredrik Holmqvist 70174267aSFredrik Holmqvist /****************************************************************************** 80174267aSFredrik Holmqvist * 90174267aSFredrik Holmqvist * 1. Copyright Notice 100174267aSFredrik Holmqvist * 11*6dde014fSPulkoMandy * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. 120174267aSFredrik Holmqvist * All rights reserved. 130174267aSFredrik Holmqvist * 140174267aSFredrik Holmqvist * 2. License 150174267aSFredrik Holmqvist * 160174267aSFredrik Holmqvist * 2.1. This is your license from Intel Corp. under its intellectual property 170174267aSFredrik Holmqvist * rights. You may have additional license terms from the party that provided 180174267aSFredrik Holmqvist * you this software, covering your right to use that party's intellectual 190174267aSFredrik Holmqvist * property rights. 200174267aSFredrik Holmqvist * 210174267aSFredrik Holmqvist * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 220174267aSFredrik Holmqvist * copy of the source code appearing in this file ("Covered Code") an 230174267aSFredrik Holmqvist * irrevocable, perpetual, worldwide license under Intel's copyrights in the 240174267aSFredrik Holmqvist * base code distributed originally by Intel ("Original Intel Code") to copy, 250174267aSFredrik Holmqvist * make derivatives, distribute, use and display any portion of the Covered 260174267aSFredrik Holmqvist * Code in any form, with the right to sublicense such rights; and 270174267aSFredrik Holmqvist * 280174267aSFredrik Holmqvist * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 290174267aSFredrik Holmqvist * license (with the right to sublicense), under only those claims of Intel 300174267aSFredrik Holmqvist * patents that are infringed by the Original Intel Code, to make, use, sell, 310174267aSFredrik Holmqvist * offer to sell, and import the Covered Code and derivative works thereof 320174267aSFredrik Holmqvist * solely to the minimum extent necessary to exercise the above copyright 330174267aSFredrik Holmqvist * license, and in no event shall the patent license extend to any additions 340174267aSFredrik Holmqvist * to or modifications of the Original Intel Code. No other license or right 350174267aSFredrik Holmqvist * is granted directly or by implication, estoppel or otherwise; 360174267aSFredrik Holmqvist * 370174267aSFredrik Holmqvist * The above copyright and patent license is granted only if the following 380174267aSFredrik Holmqvist * conditions are met: 390174267aSFredrik Holmqvist * 400174267aSFredrik Holmqvist * 3. Conditions 410174267aSFredrik Holmqvist * 420174267aSFredrik Holmqvist * 3.1. Redistribution of Source with Rights to Further Distribute Source. 430174267aSFredrik Holmqvist * Redistribution of source code of any substantial portion of the Covered 440174267aSFredrik Holmqvist * Code or modification with rights to further distribute source must include 450174267aSFredrik Holmqvist * the above Copyright Notice, the above License, this list of Conditions, 460174267aSFredrik Holmqvist * and the following Disclaimer and Export Compliance provision. In addition, 470174267aSFredrik Holmqvist * Licensee must cause all Covered Code to which Licensee contributes to 480174267aSFredrik Holmqvist * contain a file documenting the changes Licensee made to create that Covered 490174267aSFredrik Holmqvist * Code and the date of any change. Licensee must include in that file the 500174267aSFredrik Holmqvist * documentation of any changes made by any predecessor Licensee. Licensee 510174267aSFredrik Holmqvist * must include a prominent statement that the modification is derived, 520174267aSFredrik Holmqvist * directly or indirectly, from Original Intel Code. 530174267aSFredrik Holmqvist * 540174267aSFredrik Holmqvist * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 550174267aSFredrik Holmqvist * Redistribution of source code of any substantial portion of the Covered 560174267aSFredrik Holmqvist * Code or modification without rights to further distribute source must 570174267aSFredrik Holmqvist * include the following Disclaimer and Export Compliance provision in the 580174267aSFredrik Holmqvist * documentation and/or other materials provided with distribution. In 590174267aSFredrik Holmqvist * addition, Licensee may not authorize further sublicense of source of any 600174267aSFredrik Holmqvist * portion of the Covered Code, and must include terms to the effect that the 610174267aSFredrik Holmqvist * license from Licensee to its licensee is limited to the intellectual 620174267aSFredrik Holmqvist * property embodied in the software Licensee provides to its licensee, and 630174267aSFredrik Holmqvist * not to intellectual property embodied in modifications its licensee may 640174267aSFredrik Holmqvist * make. 650174267aSFredrik Holmqvist * 660174267aSFredrik Holmqvist * 3.3. Redistribution of Executable. Redistribution in executable form of any 670174267aSFredrik Holmqvist * substantial portion of the Covered Code or modification must reproduce the 680174267aSFredrik Holmqvist * above Copyright Notice, and the following Disclaimer and Export Compliance 690174267aSFredrik Holmqvist * provision in the documentation and/or other materials provided with the 700174267aSFredrik Holmqvist * distribution. 710174267aSFredrik Holmqvist * 720174267aSFredrik Holmqvist * 3.4. Intel retains all right, title, and interest in and to the Original 730174267aSFredrik Holmqvist * Intel Code. 740174267aSFredrik Holmqvist * 750174267aSFredrik Holmqvist * 3.5. Neither the name Intel nor any other trademark owned or controlled by 760174267aSFredrik Holmqvist * Intel shall be used in advertising or otherwise to promote the sale, use or 770174267aSFredrik Holmqvist * other dealings in products derived from or relating to the Covered Code 780174267aSFredrik Holmqvist * without prior written authorization from Intel. 790174267aSFredrik Holmqvist * 800174267aSFredrik Holmqvist * 4. Disclaimer and Export Compliance 810174267aSFredrik Holmqvist * 820174267aSFredrik Holmqvist * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 830174267aSFredrik Holmqvist * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 840174267aSFredrik Holmqvist * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 850174267aSFredrik Holmqvist * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 860174267aSFredrik Holmqvist * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 870174267aSFredrik Holmqvist * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 880174267aSFredrik Holmqvist * PARTICULAR PURPOSE. 890174267aSFredrik Holmqvist * 900174267aSFredrik Holmqvist * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 910174267aSFredrik Holmqvist * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 920174267aSFredrik Holmqvist * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 930174267aSFredrik Holmqvist * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 940174267aSFredrik Holmqvist * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 950174267aSFredrik Holmqvist * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 960174267aSFredrik Holmqvist * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 970174267aSFredrik Holmqvist * LIMITED REMEDY. 980174267aSFredrik Holmqvist * 990174267aSFredrik Holmqvist * 4.3. Licensee shall not export, either directly or indirectly, any of this 1000174267aSFredrik Holmqvist * software or system incorporating such software without first obtaining any 1010174267aSFredrik Holmqvist * required license or other approval from the U. S. Department of Commerce or 1020174267aSFredrik Holmqvist * any other agency or department of the United States Government. In the 1030174267aSFredrik Holmqvist * event Licensee exports any such software from the United States or 1040174267aSFredrik Holmqvist * re-exports any such software from a foreign destination, Licensee shall 1050174267aSFredrik Holmqvist * ensure that the distribution and export/re-export of the software is in 1060174267aSFredrik Holmqvist * compliance with all laws, regulations, orders, or other restrictions of the 1070174267aSFredrik Holmqvist * U.S. Export Administration Regulations. Licensee agrees that neither it nor 1080174267aSFredrik Holmqvist * any of its subsidiaries will export/re-export any technical data, process, 1090174267aSFredrik Holmqvist * software, or service, directly or indirectly, to any country for which the 1100174267aSFredrik Holmqvist * United States government or any agency thereof requires an export license, 1110174267aSFredrik Holmqvist * other governmental approval, or letter of assurance, without first obtaining 1120174267aSFredrik Holmqvist * such license, approval or letter. 1130174267aSFredrik Holmqvist * 114ff2e2f81SFredrik Holmqvist ***************************************************************************** 115ff2e2f81SFredrik Holmqvist * 116ff2e2f81SFredrik Holmqvist * Alternatively, you may choose to be licensed under the terms of the 117ff2e2f81SFredrik Holmqvist * following license: 118ff2e2f81SFredrik Holmqvist * 119ff2e2f81SFredrik Holmqvist * Redistribution and use in source and binary forms, with or without 120ff2e2f81SFredrik Holmqvist * modification, are permitted provided that the following conditions 121ff2e2f81SFredrik Holmqvist * are met: 122ff2e2f81SFredrik Holmqvist * 1. Redistributions of source code must retain the above copyright 123ff2e2f81SFredrik Holmqvist * notice, this list of conditions, and the following disclaimer, 124ff2e2f81SFredrik Holmqvist * without modification. 125ff2e2f81SFredrik Holmqvist * 2. Redistributions in binary form must reproduce at minimum a disclaimer 126ff2e2f81SFredrik Holmqvist * substantially similar to the "NO WARRANTY" disclaimer below 127ff2e2f81SFredrik Holmqvist * ("Disclaimer") and any redistribution must be conditioned upon 128ff2e2f81SFredrik Holmqvist * including a substantially similar Disclaimer requirement for further 129ff2e2f81SFredrik Holmqvist * binary redistribution. 130ff2e2f81SFredrik Holmqvist * 3. Neither the names of the above-listed copyright holders nor the names 131ff2e2f81SFredrik Holmqvist * of any contributors may be used to endorse or promote products derived 132ff2e2f81SFredrik Holmqvist * from this software without specific prior written permission. 133ff2e2f81SFredrik Holmqvist * 134ff2e2f81SFredrik Holmqvist * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 135ff2e2f81SFredrik Holmqvist * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 136ff2e2f81SFredrik Holmqvist * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 137ff2e2f81SFredrik Holmqvist * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 138ff2e2f81SFredrik Holmqvist * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 139ff2e2f81SFredrik Holmqvist * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 140ff2e2f81SFredrik Holmqvist * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 141ff2e2f81SFredrik Holmqvist * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 142ff2e2f81SFredrik Holmqvist * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 143ff2e2f81SFredrik Holmqvist * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 144ff2e2f81SFredrik Holmqvist * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 145ff2e2f81SFredrik Holmqvist * 146ff2e2f81SFredrik Holmqvist * Alternatively, you may choose to be licensed under the terms of the 147ff2e2f81SFredrik Holmqvist * GNU General Public License ("GPL") version 2 as published by the Free 148ff2e2f81SFredrik Holmqvist * Software Foundation. 149ff2e2f81SFredrik Holmqvist * 1500174267aSFredrik Holmqvist *****************************************************************************/ 1510174267aSFredrik Holmqvist 1520174267aSFredrik Holmqvist #include "acpi.h" 1530174267aSFredrik Holmqvist #include "accommon.h" 1540174267aSFredrik Holmqvist #include "acresrc.h" 1550174267aSFredrik Holmqvist 1560174267aSFredrik Holmqvist #define _COMPONENT ACPI_RESOURCES 1570174267aSFredrik Holmqvist ACPI_MODULE_NAME ("rsinfo") 1580174267aSFredrik Holmqvist 1590174267aSFredrik Holmqvist /* 1600174267aSFredrik Holmqvist * Resource dispatch and information tables. Any new resource types (either 1610174267aSFredrik Holmqvist * Large or Small) must be reflected in each of these tables, so they are here 1620174267aSFredrik Holmqvist * in one place. 1630174267aSFredrik Holmqvist * 1640174267aSFredrik Holmqvist * The tables for Large descriptors are indexed by bits 6:0 of the AML 1650174267aSFredrik Holmqvist * descriptor type byte. The tables for Small descriptors are indexed by 1660174267aSFredrik Holmqvist * bits 6:3 of the descriptor byte. The tables for internal resource 1670174267aSFredrik Holmqvist * descriptors are indexed by the ACPI_RESOURCE_TYPE field. 1680174267aSFredrik Holmqvist */ 1690174267aSFredrik Holmqvist 1700174267aSFredrik Holmqvist 1710174267aSFredrik Holmqvist /* Dispatch table for resource-to-AML (Set Resource) conversion functions */ 1720174267aSFredrik Holmqvist 1730174267aSFredrik Holmqvist ACPI_RSCONVERT_INFO *AcpiGbl_SetResourceDispatch[] = 1740174267aSFredrik Holmqvist { 1750174267aSFredrik Holmqvist AcpiRsSetIrq, /* 0x00, ACPI_RESOURCE_TYPE_IRQ */ 1760174267aSFredrik Holmqvist AcpiRsConvertDma, /* 0x01, ACPI_RESOURCE_TYPE_DMA */ 1770174267aSFredrik Holmqvist AcpiRsSetStartDpf, /* 0x02, ACPI_RESOURCE_TYPE_START_DEPENDENT */ 1780174267aSFredrik Holmqvist AcpiRsConvertEndDpf, /* 0x03, ACPI_RESOURCE_TYPE_END_DEPENDENT */ 1790174267aSFredrik Holmqvist AcpiRsConvertIo, /* 0x04, ACPI_RESOURCE_TYPE_IO */ 1800174267aSFredrik Holmqvist AcpiRsConvertFixedIo, /* 0x05, ACPI_RESOURCE_TYPE_FIXED_IO */ 1810174267aSFredrik Holmqvist AcpiRsSetVendor, /* 0x06, ACPI_RESOURCE_TYPE_VENDOR */ 1820174267aSFredrik Holmqvist AcpiRsConvertEndTag, /* 0x07, ACPI_RESOURCE_TYPE_END_TAG */ 1830174267aSFredrik Holmqvist AcpiRsConvertMemory24, /* 0x08, ACPI_RESOURCE_TYPE_MEMORY24 */ 1840174267aSFredrik Holmqvist AcpiRsConvertMemory32, /* 0x09, ACPI_RESOURCE_TYPE_MEMORY32 */ 1850174267aSFredrik Holmqvist AcpiRsConvertFixedMemory32, /* 0x0A, ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */ 1860174267aSFredrik Holmqvist AcpiRsConvertAddress16, /* 0x0B, ACPI_RESOURCE_TYPE_ADDRESS16 */ 1870174267aSFredrik Holmqvist AcpiRsConvertAddress32, /* 0x0C, ACPI_RESOURCE_TYPE_ADDRESS32 */ 1880174267aSFredrik Holmqvist AcpiRsConvertAddress64, /* 0x0D, ACPI_RESOURCE_TYPE_ADDRESS64 */ 1890174267aSFredrik Holmqvist AcpiRsConvertExtAddress64, /* 0x0E, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ 1900174267aSFredrik Holmqvist AcpiRsConvertExtIrq, /* 0x0F, ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ 1916822cda0SFredrik Holmqvist AcpiRsConvertGenericReg, /* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ 1926822cda0SFredrik Holmqvist AcpiRsConvertGpio, /* 0x11, ACPI_RESOURCE_TYPE_GPIO */ 1936822cda0SFredrik Holmqvist AcpiRsConvertFixedDma, /* 0x12, ACPI_RESOURCE_TYPE_FIXED_DMA */ 1946822cda0SFredrik Holmqvist NULL, /* 0x13, ACPI_RESOURCE_TYPE_SERIAL_BUS - Use subtype table below */ 195ff2e2f81SFredrik Holmqvist AcpiRsConvertPinFunction, /* 0x14, ACPI_RESOURCE_TYPE_PIN_FUNCTION */ 196ff2e2f81SFredrik Holmqvist AcpiRsConvertPinConfig, /* 0x15, ACPI_RESOURCE_TYPE_PIN_CONFIG */ 197ff2e2f81SFredrik Holmqvist AcpiRsConvertPinGroup, /* 0x16, ACPI_RESOURCE_TYPE_PIN_GROUP */ 198ff2e2f81SFredrik Holmqvist AcpiRsConvertPinGroupFunction, /* 0x17, ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ 199ff2e2f81SFredrik Holmqvist AcpiRsConvertPinGroupConfig, /* 0x18, ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ 20015338de9SPulkoMandy AcpiRsConvertClockInput, /* 0x19, ACPI_RESOURCE_TYPE_CLOCK_INPUT */ 2010174267aSFredrik Holmqvist }; 2020174267aSFredrik Holmqvist 2030174267aSFredrik Holmqvist /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ 2040174267aSFredrik Holmqvist 2050174267aSFredrik Holmqvist ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[] = 2060174267aSFredrik Holmqvist { 2070174267aSFredrik Holmqvist /* Small descriptors */ 2080174267aSFredrik Holmqvist 2090174267aSFredrik Holmqvist NULL, /* 0x00, Reserved */ 2100174267aSFredrik Holmqvist NULL, /* 0x01, Reserved */ 2110174267aSFredrik Holmqvist NULL, /* 0x02, Reserved */ 2120174267aSFredrik Holmqvist NULL, /* 0x03, Reserved */ 2130174267aSFredrik Holmqvist AcpiRsGetIrq, /* 0x04, ACPI_RESOURCE_NAME_IRQ */ 2140174267aSFredrik Holmqvist AcpiRsConvertDma, /* 0x05, ACPI_RESOURCE_NAME_DMA */ 2150174267aSFredrik Holmqvist AcpiRsGetStartDpf, /* 0x06, ACPI_RESOURCE_NAME_START_DEPENDENT */ 2160174267aSFredrik Holmqvist AcpiRsConvertEndDpf, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */ 2170174267aSFredrik Holmqvist AcpiRsConvertIo, /* 0x08, ACPI_RESOURCE_NAME_IO */ 2180174267aSFredrik Holmqvist AcpiRsConvertFixedIo, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */ 2196822cda0SFredrik Holmqvist AcpiRsConvertFixedDma, /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */ 2200174267aSFredrik Holmqvist NULL, /* 0x0B, Reserved */ 2210174267aSFredrik Holmqvist NULL, /* 0x0C, Reserved */ 2220174267aSFredrik Holmqvist NULL, /* 0x0D, Reserved */ 2230174267aSFredrik Holmqvist AcpiRsGetVendorSmall, /* 0x0E, ACPI_RESOURCE_NAME_VENDOR_SMALL */ 2240174267aSFredrik Holmqvist AcpiRsConvertEndTag, /* 0x0F, ACPI_RESOURCE_NAME_END_TAG */ 2250174267aSFredrik Holmqvist 2260174267aSFredrik Holmqvist /* Large descriptors */ 2270174267aSFredrik Holmqvist 2280174267aSFredrik Holmqvist NULL, /* 0x00, Reserved */ 2290174267aSFredrik Holmqvist AcpiRsConvertMemory24, /* 0x01, ACPI_RESOURCE_NAME_MEMORY24 */ 2300174267aSFredrik Holmqvist AcpiRsConvertGenericReg, /* 0x02, ACPI_RESOURCE_NAME_GENERIC_REGISTER */ 2310174267aSFredrik Holmqvist NULL, /* 0x03, Reserved */ 2320174267aSFredrik Holmqvist AcpiRsGetVendorLarge, /* 0x04, ACPI_RESOURCE_NAME_VENDOR_LARGE */ 2330174267aSFredrik Holmqvist AcpiRsConvertMemory32, /* 0x05, ACPI_RESOURCE_NAME_MEMORY32 */ 2340174267aSFredrik Holmqvist AcpiRsConvertFixedMemory32, /* 0x06, ACPI_RESOURCE_NAME_FIXED_MEMORY32 */ 2350174267aSFredrik Holmqvist AcpiRsConvertAddress32, /* 0x07, ACPI_RESOURCE_NAME_ADDRESS32 */ 2360174267aSFredrik Holmqvist AcpiRsConvertAddress16, /* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */ 2370174267aSFredrik Holmqvist AcpiRsConvertExtIrq, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */ 2380174267aSFredrik Holmqvist AcpiRsConvertAddress64, /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */ 2396822cda0SFredrik Holmqvist AcpiRsConvertExtAddress64, /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */ 2406822cda0SFredrik Holmqvist AcpiRsConvertGpio, /* 0x0C, ACPI_RESOURCE_NAME_GPIO */ 241ff2e2f81SFredrik Holmqvist AcpiRsConvertPinFunction, /* 0x0D, ACPI_RESOURCE_NAME_PIN_FUNCTION */ 2426822cda0SFredrik Holmqvist NULL, /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use subtype table below */ 243ff2e2f81SFredrik Holmqvist AcpiRsConvertPinConfig, /* 0x0F, ACPI_RESOURCE_NAME_PIN_CONFIG */ 244ff2e2f81SFredrik Holmqvist AcpiRsConvertPinGroup, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */ 245ff2e2f81SFredrik Holmqvist AcpiRsConvertPinGroupFunction, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */ 246ff2e2f81SFredrik Holmqvist AcpiRsConvertPinGroupConfig, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG */ 24715338de9SPulkoMandy AcpiRsConvertClockInput, /* 0x13, ACPI_RESOURCE_NAME_CLOCK_INPUT */ 2486822cda0SFredrik Holmqvist }; 2496822cda0SFredrik Holmqvist 25015338de9SPulkoMandy /* Subtype table for SerialBus -- I2C, SPI, UART, and CSI2 */ 2516822cda0SFredrik Holmqvist 2526822cda0SFredrik Holmqvist ACPI_RSCONVERT_INFO *AcpiGbl_ConvertResourceSerialBusDispatch[] = 2536822cda0SFredrik Holmqvist { 2546822cda0SFredrik Holmqvist NULL, 2556822cda0SFredrik Holmqvist AcpiRsConvertI2cSerialBus, 2566822cda0SFredrik Holmqvist AcpiRsConvertSpiSerialBus, 2576822cda0SFredrik Holmqvist AcpiRsConvertUartSerialBus, 25815338de9SPulkoMandy AcpiRsConvertCsi2SerialBus 2590174267aSFredrik Holmqvist }; 2600174267aSFredrik Holmqvist 2610174267aSFredrik Holmqvist 262ad5bbfb8SFredrik Holmqvist #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) 2630174267aSFredrik Holmqvist 2640174267aSFredrik Holmqvist /* Dispatch table for resource dump functions */ 2650174267aSFredrik Holmqvist 2660174267aSFredrik Holmqvist ACPI_RSDUMP_INFO *AcpiGbl_DumpResourceDispatch[] = 2670174267aSFredrik Holmqvist { 2680174267aSFredrik Holmqvist AcpiRsDumpIrq, /* ACPI_RESOURCE_TYPE_IRQ */ 2690174267aSFredrik Holmqvist AcpiRsDumpDma, /* ACPI_RESOURCE_TYPE_DMA */ 2700174267aSFredrik Holmqvist AcpiRsDumpStartDpf, /* ACPI_RESOURCE_TYPE_START_DEPENDENT */ 2710174267aSFredrik Holmqvist AcpiRsDumpEndDpf, /* ACPI_RESOURCE_TYPE_END_DEPENDENT */ 2720174267aSFredrik Holmqvist AcpiRsDumpIo, /* ACPI_RESOURCE_TYPE_IO */ 2730174267aSFredrik Holmqvist AcpiRsDumpFixedIo, /* ACPI_RESOURCE_TYPE_FIXED_IO */ 2740174267aSFredrik Holmqvist AcpiRsDumpVendor, /* ACPI_RESOURCE_TYPE_VENDOR */ 2750174267aSFredrik Holmqvist AcpiRsDumpEndTag, /* ACPI_RESOURCE_TYPE_END_TAG */ 2760174267aSFredrik Holmqvist AcpiRsDumpMemory24, /* ACPI_RESOURCE_TYPE_MEMORY24 */ 2770174267aSFredrik Holmqvist AcpiRsDumpMemory32, /* ACPI_RESOURCE_TYPE_MEMORY32 */ 2780174267aSFredrik Holmqvist AcpiRsDumpFixedMemory32, /* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */ 2790174267aSFredrik Holmqvist AcpiRsDumpAddress16, /* ACPI_RESOURCE_TYPE_ADDRESS16 */ 2800174267aSFredrik Holmqvist AcpiRsDumpAddress32, /* ACPI_RESOURCE_TYPE_ADDRESS32 */ 2810174267aSFredrik Holmqvist AcpiRsDumpAddress64, /* ACPI_RESOURCE_TYPE_ADDRESS64 */ 2820174267aSFredrik Holmqvist AcpiRsDumpExtAddress64, /* ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ 2830174267aSFredrik Holmqvist AcpiRsDumpExtIrq, /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ 2840174267aSFredrik Holmqvist AcpiRsDumpGenericReg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ 2856822cda0SFredrik Holmqvist AcpiRsDumpGpio, /* ACPI_RESOURCE_TYPE_GPIO */ 2866822cda0SFredrik Holmqvist AcpiRsDumpFixedDma, /* ACPI_RESOURCE_TYPE_FIXED_DMA */ 2876822cda0SFredrik Holmqvist NULL, /* ACPI_RESOURCE_TYPE_SERIAL_BUS */ 288ff2e2f81SFredrik Holmqvist AcpiRsDumpPinFunction, /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */ 289ff2e2f81SFredrik Holmqvist AcpiRsDumpPinConfig, /* ACPI_RESOURCE_TYPE_PIN_CONFIG */ 290ff2e2f81SFredrik Holmqvist AcpiRsDumpPinGroup, /* ACPI_RESOURCE_TYPE_PIN_GROUP */ 291ff2e2f81SFredrik Holmqvist AcpiRsDumpPinGroupFunction, /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ 292ff2e2f81SFredrik Holmqvist AcpiRsDumpPinGroupConfig, /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ 29315338de9SPulkoMandy AcpiRsDumpClockInput, /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ 2946822cda0SFredrik Holmqvist }; 2956822cda0SFredrik Holmqvist 2966822cda0SFredrik Holmqvist ACPI_RSDUMP_INFO *AcpiGbl_DumpSerialBusDispatch[] = 2976822cda0SFredrik Holmqvist { 2986822cda0SFredrik Holmqvist NULL, 2996822cda0SFredrik Holmqvist AcpiRsDumpI2cSerialBus, /* AML_RESOURCE_I2C_BUS_TYPE */ 3006822cda0SFredrik Holmqvist AcpiRsDumpSpiSerialBus, /* AML_RESOURCE_SPI_BUS_TYPE */ 3016822cda0SFredrik Holmqvist AcpiRsDumpUartSerialBus, /* AML_RESOURCE_UART_BUS_TYPE */ 30215338de9SPulkoMandy AcpiRsDumpCsi2SerialBus, /* AML_RESOURCE_CSI2_BUS_TYPE */ 3030174267aSFredrik Holmqvist }; 3040174267aSFredrik Holmqvist #endif 3050174267aSFredrik Holmqvist 3060174267aSFredrik Holmqvist 3070174267aSFredrik Holmqvist /* 3080174267aSFredrik Holmqvist * Base sizes for external AML resource descriptors, indexed by internal type. 3090174267aSFredrik Holmqvist * Includes size of the descriptor header (1 byte for small descriptors, 3100174267aSFredrik Holmqvist * 3 bytes for large descriptors) 3110174267aSFredrik Holmqvist */ 3120174267aSFredrik Holmqvist const UINT8 AcpiGbl_AmlResourceSizes[] = 3130174267aSFredrik Holmqvist { 3140174267aSFredrik Holmqvist sizeof (AML_RESOURCE_IRQ), /* ACPI_RESOURCE_TYPE_IRQ (optional Byte 3 always created) */ 3150174267aSFredrik Holmqvist sizeof (AML_RESOURCE_DMA), /* ACPI_RESOURCE_TYPE_DMA */ 3160174267aSFredrik Holmqvist sizeof (AML_RESOURCE_START_DEPENDENT), /* ACPI_RESOURCE_TYPE_START_DEPENDENT (optional Byte 1 always created) */ 3170174267aSFredrik Holmqvist sizeof (AML_RESOURCE_END_DEPENDENT), /* ACPI_RESOURCE_TYPE_END_DEPENDENT */ 3180174267aSFredrik Holmqvist sizeof (AML_RESOURCE_IO), /* ACPI_RESOURCE_TYPE_IO */ 3190174267aSFredrik Holmqvist sizeof (AML_RESOURCE_FIXED_IO), /* ACPI_RESOURCE_TYPE_FIXED_IO */ 3200174267aSFredrik Holmqvist sizeof (AML_RESOURCE_VENDOR_SMALL), /* ACPI_RESOURCE_TYPE_VENDOR */ 3210174267aSFredrik Holmqvist sizeof (AML_RESOURCE_END_TAG), /* ACPI_RESOURCE_TYPE_END_TAG */ 3220174267aSFredrik Holmqvist sizeof (AML_RESOURCE_MEMORY24), /* ACPI_RESOURCE_TYPE_MEMORY24 */ 3230174267aSFredrik Holmqvist sizeof (AML_RESOURCE_MEMORY32), /* ACPI_RESOURCE_TYPE_MEMORY32 */ 3240174267aSFredrik Holmqvist sizeof (AML_RESOURCE_FIXED_MEMORY32), /* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */ 3250174267aSFredrik Holmqvist sizeof (AML_RESOURCE_ADDRESS16), /* ACPI_RESOURCE_TYPE_ADDRESS16 */ 3260174267aSFredrik Holmqvist sizeof (AML_RESOURCE_ADDRESS32), /* ACPI_RESOURCE_TYPE_ADDRESS32 */ 3270174267aSFredrik Holmqvist sizeof (AML_RESOURCE_ADDRESS64), /* ACPI_RESOURCE_TYPE_ADDRESS64 */ 3280174267aSFredrik Holmqvist sizeof (AML_RESOURCE_EXTENDED_ADDRESS64),/*ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ 3290174267aSFredrik Holmqvist sizeof (AML_RESOURCE_EXTENDED_IRQ), /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ 3306822cda0SFredrik Holmqvist sizeof (AML_RESOURCE_GENERIC_REGISTER), /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ 3316822cda0SFredrik Holmqvist sizeof (AML_RESOURCE_GPIO), /* ACPI_RESOURCE_TYPE_GPIO */ 3326822cda0SFredrik Holmqvist sizeof (AML_RESOURCE_FIXED_DMA), /* ACPI_RESOURCE_TYPE_FIXED_DMA */ 3336822cda0SFredrik Holmqvist sizeof (AML_RESOURCE_COMMON_SERIALBUS), /* ACPI_RESOURCE_TYPE_SERIAL_BUS */ 334ff2e2f81SFredrik Holmqvist sizeof (AML_RESOURCE_PIN_FUNCTION), /* ACPI_RESOURCE_TYPE_PIN_FUNCTION */ 335ff2e2f81SFredrik Holmqvist sizeof (AML_RESOURCE_PIN_CONFIG), /* ACPI_RESOURCE_TYPE_PIN_CONFIG */ 336ff2e2f81SFredrik Holmqvist sizeof (AML_RESOURCE_PIN_GROUP), /* ACPI_RESOURCE_TYPE_PIN_GROUP */ 337ff2e2f81SFredrik Holmqvist sizeof (AML_RESOURCE_PIN_GROUP_FUNCTION), /* ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION */ 338ff2e2f81SFredrik Holmqvist sizeof (AML_RESOURCE_PIN_GROUP_CONFIG), /* ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG */ 33915338de9SPulkoMandy sizeof (AML_RESOURCE_CLOCK_INPUT), /* ACPI_RESOURCE_TYPE_CLOCK_INPUT */ 3400174267aSFredrik Holmqvist }; 3410174267aSFredrik Holmqvist 3420174267aSFredrik Holmqvist 3430174267aSFredrik Holmqvist const UINT8 AcpiGbl_ResourceStructSizes[] = 3440174267aSFredrik Holmqvist { 3450174267aSFredrik Holmqvist /* Small descriptors */ 3460174267aSFredrik Holmqvist 3470174267aSFredrik Holmqvist 0, 3480174267aSFredrik Holmqvist 0, 3490174267aSFredrik Holmqvist 0, 3500174267aSFredrik Holmqvist 0, 3510174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_IRQ), 3520174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_DMA), 3530174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_START_DEPENDENT), 3540174267aSFredrik Holmqvist ACPI_RS_SIZE_MIN, 3550174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_IO), 3560174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_FIXED_IO), 3576822cda0SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_FIXED_DMA), 3580174267aSFredrik Holmqvist 0, 3590174267aSFredrik Holmqvist 0, 3600174267aSFredrik Holmqvist 0, 3610174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_VENDOR), 3620174267aSFredrik Holmqvist ACPI_RS_SIZE_MIN, 3630174267aSFredrik Holmqvist 3640174267aSFredrik Holmqvist /* Large descriptors */ 3650174267aSFredrik Holmqvist 3660174267aSFredrik Holmqvist 0, 3670174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_MEMORY24), 3680174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_GENERIC_REGISTER), 3690174267aSFredrik Holmqvist 0, 3700174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_VENDOR), 3710174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_MEMORY32), 3720174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_FIXED_MEMORY32), 3730174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_ADDRESS32), 3740174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_ADDRESS16), 3750174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_EXTENDED_IRQ), 3760174267aSFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_ADDRESS64), 3776822cda0SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_EXTENDED_ADDRESS64), 3786822cda0SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_GPIO), 379ff2e2f81SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_PIN_FUNCTION), 380ff2e2f81SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_COMMON_SERIALBUS), 381ff2e2f81SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_PIN_CONFIG), 382ff2e2f81SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP), 383ff2e2f81SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_FUNCTION), 384ff2e2f81SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_CONFIG), 38515338de9SPulkoMandy ACPI_RS_SIZE (ACPI_RESOURCE_CLOCK_INPUT), 3860174267aSFredrik Holmqvist }; 3870174267aSFredrik Holmqvist 3886822cda0SFredrik Holmqvist const UINT8 AcpiGbl_AmlResourceSerialBusSizes[] = 3896822cda0SFredrik Holmqvist { 3906822cda0SFredrik Holmqvist 0, 3916822cda0SFredrik Holmqvist sizeof (AML_RESOURCE_I2C_SERIALBUS), 3926822cda0SFredrik Holmqvist sizeof (AML_RESOURCE_SPI_SERIALBUS), 3936822cda0SFredrik Holmqvist sizeof (AML_RESOURCE_UART_SERIALBUS), 39415338de9SPulkoMandy sizeof (AML_RESOURCE_CSI2_SERIALBUS), 3956822cda0SFredrik Holmqvist }; 3966822cda0SFredrik Holmqvist 3976822cda0SFredrik Holmqvist const UINT8 AcpiGbl_ResourceStructSerialBusSizes[] = 3986822cda0SFredrik Holmqvist { 3996822cda0SFredrik Holmqvist 0, 4006822cda0SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS), 4016822cda0SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS), 4026822cda0SFredrik Holmqvist ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS), 40315338de9SPulkoMandy ACPI_RS_SIZE (ACPI_RESOURCE_CSI2_SERIALBUS), 4046822cda0SFredrik Holmqvist }; 405