Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrsinfo.c
Go to the documentation of this file.
00001 /******************************************************************************* 00002 * 00003 * Module Name: rsinfo - Dispatch and Info tables 00004 * 00005 ******************************************************************************/ 00006 00007 /****************************************************************************** 00008 * 00009 * 1. Copyright Notice 00010 * 00011 * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp. 00012 * All rights reserved. 00013 * 00014 * 2. License 00015 * 00016 * 2.1. This is your license from Intel Corp. under its intellectual property 00017 * rights. You may have additional license terms from the party that provided 00018 * you this software, covering your right to use that party's intellectual 00019 * property rights. 00020 * 00021 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 00022 * copy of the source code appearing in this file ("Covered Code") an 00023 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 00024 * base code distributed originally by Intel ("Original Intel Code") to copy, 00025 * make derivatives, distribute, use and display any portion of the Covered 00026 * Code in any form, with the right to sublicense such rights; and 00027 * 00028 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 00029 * license (with the right to sublicense), under only those claims of Intel 00030 * patents that are infringed by the Original Intel Code, to make, use, sell, 00031 * offer to sell, and import the Covered Code and derivative works thereof 00032 * solely to the minimum extent necessary to exercise the above copyright 00033 * license, and in no event shall the patent license extend to any additions 00034 * to or modifications of the Original Intel Code. No other license or right 00035 * is granted directly or by implication, estoppel or otherwise; 00036 * 00037 * The above copyright and patent license is granted only if the following 00038 * conditions are met: 00039 * 00040 * 3. Conditions 00041 * 00042 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 00043 * Redistribution of source code of any substantial portion of the Covered 00044 * Code or modification with rights to further distribute source must include 00045 * the above Copyright Notice, the above License, this list of Conditions, 00046 * and the following Disclaimer and Export Compliance provision. In addition, 00047 * Licensee must cause all Covered Code to which Licensee contributes to 00048 * contain a file documenting the changes Licensee made to create that Covered 00049 * Code and the date of any change. Licensee must include in that file the 00050 * documentation of any changes made by any predecessor Licensee. Licensee 00051 * must include a prominent statement that the modification is derived, 00052 * directly or indirectly, from Original Intel Code. 00053 * 00054 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 00055 * Redistribution of source code of any substantial portion of the Covered 00056 * Code or modification without rights to further distribute source must 00057 * include the following Disclaimer and Export Compliance provision in the 00058 * documentation and/or other materials provided with distribution. In 00059 * addition, Licensee may not authorize further sublicense of source of any 00060 * portion of the Covered Code, and must include terms to the effect that the 00061 * license from Licensee to its licensee is limited to the intellectual 00062 * property embodied in the software Licensee provides to its licensee, and 00063 * not to intellectual property embodied in modifications its licensee may 00064 * make. 00065 * 00066 * 3.3. Redistribution of Executable. Redistribution in executable form of any 00067 * substantial portion of the Covered Code or modification must reproduce the 00068 * above Copyright Notice, and the following Disclaimer and Export Compliance 00069 * provision in the documentation and/or other materials provided with the 00070 * distribution. 00071 * 00072 * 3.4. Intel retains all right, title, and interest in and to the Original 00073 * Intel Code. 00074 * 00075 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 00076 * Intel shall be used in advertising or otherwise to promote the sale, use or 00077 * other dealings in products derived from or relating to the Covered Code 00078 * without prior written authorization from Intel. 00079 * 00080 * 4. Disclaimer and Export Compliance 00081 * 00082 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 00083 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 00084 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 00085 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 00086 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 00087 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 00088 * PARTICULAR PURPOSE. 00089 * 00090 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 00091 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 00092 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 00093 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 00094 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 00095 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 00096 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 00097 * LIMITED REMEDY. 00098 * 00099 * 4.3. Licensee shall not export, either directly or indirectly, any of this 00100 * software or system incorporating such software without first obtaining any 00101 * required license or other approval from the U. S. Department of Commerce or 00102 * any other agency or department of the United States Government. In the 00103 * event Licensee exports any such software from the United States or 00104 * re-exports any such software from a foreign destination, Licensee shall 00105 * ensure that the distribution and export/re-export of the software is in 00106 * compliance with all laws, regulations, orders, or other restrictions of the 00107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 00108 * any of its subsidiaries will export/re-export any technical data, process, 00109 * software, or service, directly or indirectly, to any country for which the 00110 * United States government or any agency thereof requires an export license, 00111 * other governmental approval, or letter of assurance, without first obtaining 00112 * such license, approval or letter. 00113 * 00114 *****************************************************************************/ 00115 00116 #define __RSINFO_C__ 00117 00118 #include "acpi.h" 00119 #include "accommon.h" 00120 #include "acresrc.h" 00121 00122 #define _COMPONENT ACPI_RESOURCES 00123 ACPI_MODULE_NAME ("rsinfo") 00124 00125 /* 00126 * Resource dispatch and information tables. Any new resource types (either 00127 * Large or Small) must be reflected in each of these tables, so they are here 00128 * in one place. 00129 * 00130 * The tables for Large descriptors are indexed by bits 6:0 of the AML 00131 * descriptor type byte. The tables for Small descriptors are indexed by 00132 * bits 6:3 of the descriptor byte. The tables for internal resource 00133 * descriptors are indexed by the ACPI_RESOURCE_TYPE field. 00134 */ 00135 00136 00137 /* Dispatch table for resource-to-AML (Set Resource) conversion functions */ 00138 00139 ACPI_RSCONVERT_INFO *AcpiGbl_SetResourceDispatch[] = 00140 { 00141 AcpiRsSetIrq, /* 0x00, ACPI_RESOURCE_TYPE_IRQ */ 00142 AcpiRsConvertDma, /* 0x01, ACPI_RESOURCE_TYPE_DMA */ 00143 AcpiRsSetStartDpf, /* 0x02, ACPI_RESOURCE_TYPE_START_DEPENDENT */ 00144 AcpiRsConvertEndDpf, /* 0x03, ACPI_RESOURCE_TYPE_END_DEPENDENT */ 00145 AcpiRsConvertIo, /* 0x04, ACPI_RESOURCE_TYPE_IO */ 00146 AcpiRsConvertFixedIo, /* 0x05, ACPI_RESOURCE_TYPE_FIXED_IO */ 00147 AcpiRsSetVendor, /* 0x06, ACPI_RESOURCE_TYPE_VENDOR */ 00148 AcpiRsConvertEndTag, /* 0x07, ACPI_RESOURCE_TYPE_END_TAG */ 00149 AcpiRsConvertMemory24, /* 0x08, ACPI_RESOURCE_TYPE_MEMORY24 */ 00150 AcpiRsConvertMemory32, /* 0x09, ACPI_RESOURCE_TYPE_MEMORY32 */ 00151 AcpiRsConvertFixedMemory32, /* 0x0A, ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */ 00152 AcpiRsConvertAddress16, /* 0x0B, ACPI_RESOURCE_TYPE_ADDRESS16 */ 00153 AcpiRsConvertAddress32, /* 0x0C, ACPI_RESOURCE_TYPE_ADDRESS32 */ 00154 AcpiRsConvertAddress64, /* 0x0D, ACPI_RESOURCE_TYPE_ADDRESS64 */ 00155 AcpiRsConvertExtAddress64, /* 0x0E, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ 00156 AcpiRsConvertExtIrq, /* 0x0F, ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ 00157 AcpiRsConvertGenericReg /* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ 00158 }; 00159 00160 /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ 00161 00162 ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[] = 00163 { 00164 /* Small descriptors */ 00165 00166 NULL, /* 0x00, Reserved */ 00167 NULL, /* 0x01, Reserved */ 00168 NULL, /* 0x02, Reserved */ 00169 NULL, /* 0x03, Reserved */ 00170 AcpiRsGetIrq, /* 0x04, ACPI_RESOURCE_NAME_IRQ */ 00171 AcpiRsConvertDma, /* 0x05, ACPI_RESOURCE_NAME_DMA */ 00172 AcpiRsGetStartDpf, /* 0x06, ACPI_RESOURCE_NAME_START_DEPENDENT */ 00173 AcpiRsConvertEndDpf, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */ 00174 AcpiRsConvertIo, /* 0x08, ACPI_RESOURCE_NAME_IO */ 00175 AcpiRsConvertFixedIo, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */ 00176 NULL, /* 0x0A, Reserved */ 00177 NULL, /* 0x0B, Reserved */ 00178 NULL, /* 0x0C, Reserved */ 00179 NULL, /* 0x0D, Reserved */ 00180 AcpiRsGetVendorSmall, /* 0x0E, ACPI_RESOURCE_NAME_VENDOR_SMALL */ 00181 AcpiRsConvertEndTag, /* 0x0F, ACPI_RESOURCE_NAME_END_TAG */ 00182 00183 /* Large descriptors */ 00184 00185 NULL, /* 0x00, Reserved */ 00186 AcpiRsConvertMemory24, /* 0x01, ACPI_RESOURCE_NAME_MEMORY24 */ 00187 AcpiRsConvertGenericReg, /* 0x02, ACPI_RESOURCE_NAME_GENERIC_REGISTER */ 00188 NULL, /* 0x03, Reserved */ 00189 AcpiRsGetVendorLarge, /* 0x04, ACPI_RESOURCE_NAME_VENDOR_LARGE */ 00190 AcpiRsConvertMemory32, /* 0x05, ACPI_RESOURCE_NAME_MEMORY32 */ 00191 AcpiRsConvertFixedMemory32, /* 0x06, ACPI_RESOURCE_NAME_FIXED_MEMORY32 */ 00192 AcpiRsConvertAddress32, /* 0x07, ACPI_RESOURCE_NAME_ADDRESS32 */ 00193 AcpiRsConvertAddress16, /* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */ 00194 AcpiRsConvertExtIrq, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */ 00195 AcpiRsConvertAddress64, /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */ 00196 AcpiRsConvertExtAddress64 /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */ 00197 }; 00198 00199 00200 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 00201 00202 /* Dispatch table for resource dump functions */ 00203 00204 ACPI_RSDUMP_INFO *AcpiGbl_DumpResourceDispatch[] = 00205 { 00206 AcpiRsDumpIrq, /* ACPI_RESOURCE_TYPE_IRQ */ 00207 AcpiRsDumpDma, /* ACPI_RESOURCE_TYPE_DMA */ 00208 AcpiRsDumpStartDpf, /* ACPI_RESOURCE_TYPE_START_DEPENDENT */ 00209 AcpiRsDumpEndDpf, /* ACPI_RESOURCE_TYPE_END_DEPENDENT */ 00210 AcpiRsDumpIo, /* ACPI_RESOURCE_TYPE_IO */ 00211 AcpiRsDumpFixedIo, /* ACPI_RESOURCE_TYPE_FIXED_IO */ 00212 AcpiRsDumpVendor, /* ACPI_RESOURCE_TYPE_VENDOR */ 00213 AcpiRsDumpEndTag, /* ACPI_RESOURCE_TYPE_END_TAG */ 00214 AcpiRsDumpMemory24, /* ACPI_RESOURCE_TYPE_MEMORY24 */ 00215 AcpiRsDumpMemory32, /* ACPI_RESOURCE_TYPE_MEMORY32 */ 00216 AcpiRsDumpFixedMemory32, /* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */ 00217 AcpiRsDumpAddress16, /* ACPI_RESOURCE_TYPE_ADDRESS16 */ 00218 AcpiRsDumpAddress32, /* ACPI_RESOURCE_TYPE_ADDRESS32 */ 00219 AcpiRsDumpAddress64, /* ACPI_RESOURCE_TYPE_ADDRESS64 */ 00220 AcpiRsDumpExtAddress64, /* ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ 00221 AcpiRsDumpExtIrq, /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ 00222 AcpiRsDumpGenericReg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ 00223 }; 00224 #endif 00225 00226 00227 /* 00228 * Base sizes for external AML resource descriptors, indexed by internal type. 00229 * Includes size of the descriptor header (1 byte for small descriptors, 00230 * 3 bytes for large descriptors) 00231 */ 00232 const UINT8 AcpiGbl_AmlResourceSizes[] = 00233 { 00234 sizeof (AML_RESOURCE_IRQ), /* ACPI_RESOURCE_TYPE_IRQ (optional Byte 3 always created) */ 00235 sizeof (AML_RESOURCE_DMA), /* ACPI_RESOURCE_TYPE_DMA */ 00236 sizeof (AML_RESOURCE_START_DEPENDENT), /* ACPI_RESOURCE_TYPE_START_DEPENDENT (optional Byte 1 always created) */ 00237 sizeof (AML_RESOURCE_END_DEPENDENT), /* ACPI_RESOURCE_TYPE_END_DEPENDENT */ 00238 sizeof (AML_RESOURCE_IO), /* ACPI_RESOURCE_TYPE_IO */ 00239 sizeof (AML_RESOURCE_FIXED_IO), /* ACPI_RESOURCE_TYPE_FIXED_IO */ 00240 sizeof (AML_RESOURCE_VENDOR_SMALL), /* ACPI_RESOURCE_TYPE_VENDOR */ 00241 sizeof (AML_RESOURCE_END_TAG), /* ACPI_RESOURCE_TYPE_END_TAG */ 00242 sizeof (AML_RESOURCE_MEMORY24), /* ACPI_RESOURCE_TYPE_MEMORY24 */ 00243 sizeof (AML_RESOURCE_MEMORY32), /* ACPI_RESOURCE_TYPE_MEMORY32 */ 00244 sizeof (AML_RESOURCE_FIXED_MEMORY32), /* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */ 00245 sizeof (AML_RESOURCE_ADDRESS16), /* ACPI_RESOURCE_TYPE_ADDRESS16 */ 00246 sizeof (AML_RESOURCE_ADDRESS32), /* ACPI_RESOURCE_TYPE_ADDRESS32 */ 00247 sizeof (AML_RESOURCE_ADDRESS64), /* ACPI_RESOURCE_TYPE_ADDRESS64 */ 00248 sizeof (AML_RESOURCE_EXTENDED_ADDRESS64),/*ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ 00249 sizeof (AML_RESOURCE_EXTENDED_IRQ), /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ 00250 sizeof (AML_RESOURCE_GENERIC_REGISTER) /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ 00251 }; 00252 00253 00254 const UINT8 AcpiGbl_ResourceStructSizes[] = 00255 { 00256 /* Small descriptors */ 00257 00258 0, 00259 0, 00260 0, 00261 0, 00262 ACPI_RS_SIZE (ACPI_RESOURCE_IRQ), 00263 ACPI_RS_SIZE (ACPI_RESOURCE_DMA), 00264 ACPI_RS_SIZE (ACPI_RESOURCE_START_DEPENDENT), 00265 ACPI_RS_SIZE_MIN, 00266 ACPI_RS_SIZE (ACPI_RESOURCE_IO), 00267 ACPI_RS_SIZE (ACPI_RESOURCE_FIXED_IO), 00268 0, 00269 0, 00270 0, 00271 0, 00272 ACPI_RS_SIZE (ACPI_RESOURCE_VENDOR), 00273 ACPI_RS_SIZE_MIN, 00274 00275 /* Large descriptors */ 00276 00277 0, 00278 ACPI_RS_SIZE (ACPI_RESOURCE_MEMORY24), 00279 ACPI_RS_SIZE (ACPI_RESOURCE_GENERIC_REGISTER), 00280 0, 00281 ACPI_RS_SIZE (ACPI_RESOURCE_VENDOR), 00282 ACPI_RS_SIZE (ACPI_RESOURCE_MEMORY32), 00283 ACPI_RS_SIZE (ACPI_RESOURCE_FIXED_MEMORY32), 00284 ACPI_RS_SIZE (ACPI_RESOURCE_ADDRESS32), 00285 ACPI_RS_SIZE (ACPI_RESOURCE_ADDRESS16), 00286 ACPI_RS_SIZE (ACPI_RESOURCE_EXTENDED_IRQ), 00287 ACPI_RS_SIZE (ACPI_RESOURCE_ADDRESS64), 00288 ACPI_RS_SIZE (ACPI_RESOURCE_EXTENDED_ADDRESS64) 00289 }; 00290 Generated on Sun May 27 2012 04:27:22 for ReactOS by
1.7.6.1
|