Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenacresrc.h
Go to the documentation of this file.
00001 /****************************************************************************** 00002 * 00003 * Name: acresrc.h - Resource Manager function prototypes 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 00026 * make derivatives, distribute, use and display any portion of the Covered 00027 * Code in any form, with the right to sublicense such rights; and 00028 * 00029 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 00030 * license (with the right to sublicense), under only those claims of Intel 00031 * patents that are infringed by the Original Intel Code, to make, use, sell, 00032 * offer to sell, and import the Covered Code and derivative works thereof 00033 * solely to the minimum extent necessary to exercise the above copyright 00034 * license, and in no event shall the patent license extend to any additions 00035 * to or modifications of the Original Intel Code. No other license or right 00036 * is granted directly or by implication, estoppel or otherwise; 00037 * 00038 * The above copyright and patent license is granted only if the following 00039 * conditions are met: 00040 * 00041 * 3. Conditions 00042 * 00043 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 00044 * Redistribution of source code of any substantial portion of the Covered 00045 * Code or modification with rights to further distribute source must include 00046 * the above Copyright Notice, the above License, this list of Conditions, 00047 * and the following Disclaimer and Export Compliance provision. In addition, 00048 * Licensee must cause all Covered Code to which Licensee contributes to 00049 * contain a file documenting the changes Licensee made to create that Covered 00050 * Code and the date of any change. Licensee must include in that file the 00051 * documentation of any changes made by any predecessor Licensee. Licensee 00052 * must include a prominent statement that the modification is derived, 00053 * directly or indirectly, from Original Intel Code. 00054 * 00055 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 00056 * Redistribution of source code of any substantial portion of the Covered 00057 * Code or modification without rights to further distribute source must 00058 * include the following Disclaimer and Export Compliance provision in the 00059 * documentation and/or other materials provided with distribution. In 00060 * addition, Licensee may not authorize further sublicense of source of any 00061 * portion of the Covered Code, and must include terms to the effect that the 00062 * license from Licensee to its licensee is limited to the intellectual 00063 * property embodied in the software Licensee provides to its licensee, and 00064 * not to intellectual property embodied in modifications its licensee may 00065 * make. 00066 * 00067 * 3.3. Redistribution of Executable. Redistribution in executable form of any 00068 * substantial portion of the Covered Code or modification must reproduce the 00069 * above Copyright Notice, and the following Disclaimer and Export Compliance 00070 * provision in the documentation and/or other materials provided with the 00071 * distribution. 00072 * 00073 * 3.4. Intel retains all right, title, and interest in and to the Original 00074 * Intel Code. 00075 * 00076 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 00077 * Intel shall be used in advertising or otherwise to promote the sale, use or 00078 * other dealings in products derived from or relating to the Covered Code 00079 * without prior written authorization from Intel. 00080 * 00081 * 4. Disclaimer and Export Compliance 00082 * 00083 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 00084 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 00085 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 00086 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 00087 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 00088 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 00089 * PARTICULAR PURPOSE. 00090 * 00091 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 00092 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 00093 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 00094 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 00095 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 00096 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 00097 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 00098 * LIMITED REMEDY. 00099 * 00100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 00101 * software or system incorporating such software without first obtaining any 00102 * required license or other approval from the U. S. Department of Commerce or 00103 * any other agency or department of the United States Government. In the 00104 * event Licensee exports any such software from the United States or 00105 * re-exports any such software from a foreign destination, Licensee shall 00106 * ensure that the distribution and export/re-export of the software is in 00107 * compliance with all laws, regulations, orders, or other restrictions of the 00108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 00109 * any of its subsidiaries will export/re-export any technical data, process, 00110 * software, or service, directly or indirectly, to any country for which the 00111 * United States government or any agency thereof requires an export license, 00112 * other governmental approval, or letter of assurance, without first obtaining 00113 * such license, approval or letter. 00114 * 00115 *****************************************************************************/ 00116 00117 #ifndef __ACRESRC_H__ 00118 #define __ACRESRC_H__ 00119 00120 /* Need the AML resource descriptor structs */ 00121 00122 #include "amlresrc.h" 00123 00124 00125 /* 00126 * If possible, pack the following structures to byte alignment, since we 00127 * don't care about performance for debug output. Two cases where we cannot 00128 * pack the structures: 00129 * 00130 * 1) Hardware does not support misaligned memory transfers 00131 * 2) Compiler does not support pointers within packed structures 00132 */ 00133 #if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED)) 00134 #pragma pack(1) 00135 #endif 00136 00137 /* 00138 * Individual entry for the resource conversion tables 00139 */ 00140 typedef const struct acpi_rsconvert_info 00141 { 00142 UINT8 Opcode; 00143 UINT8 ResourceOffset; 00144 UINT8 AmlOffset; 00145 UINT8 Value; 00146 00147 } ACPI_RSCONVERT_INFO; 00148 00149 /* Resource conversion opcodes */ 00150 00151 #define ACPI_RSC_INITGET 0 00152 #define ACPI_RSC_INITSET 1 00153 #define ACPI_RSC_FLAGINIT 2 00154 #define ACPI_RSC_1BITFLAG 3 00155 #define ACPI_RSC_2BITFLAG 4 00156 #define ACPI_RSC_COUNT 5 00157 #define ACPI_RSC_COUNT16 6 00158 #define ACPI_RSC_LENGTH 7 00159 #define ACPI_RSC_MOVE8 8 00160 #define ACPI_RSC_MOVE16 9 00161 #define ACPI_RSC_MOVE32 10 00162 #define ACPI_RSC_MOVE64 11 00163 #define ACPI_RSC_SET8 12 00164 #define ACPI_RSC_DATA8 13 00165 #define ACPI_RSC_ADDRESS 14 00166 #define ACPI_RSC_SOURCE 15 00167 #define ACPI_RSC_SOURCEX 16 00168 #define ACPI_RSC_BITMASK 17 00169 #define ACPI_RSC_BITMASK16 18 00170 #define ACPI_RSC_EXIT_NE 19 00171 #define ACPI_RSC_EXIT_LE 20 00172 #define ACPI_RSC_EXIT_EQ 21 00173 00174 /* Resource Conversion sub-opcodes */ 00175 00176 #define ACPI_RSC_COMPARE_AML_LENGTH 0 00177 #define ACPI_RSC_COMPARE_VALUE 1 00178 00179 #define ACPI_RSC_TABLE_SIZE(d) (sizeof (d) / sizeof (ACPI_RSCONVERT_INFO)) 00180 00181 #define ACPI_RS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_RESOURCE,f) 00182 #define AML_OFFSET(f) (UINT8) ACPI_OFFSET (AML_RESOURCE,f) 00183 00184 00185 typedef const struct acpi_rsdump_info 00186 { 00187 UINT8 Opcode; 00188 UINT8 Offset; 00189 char *Name; 00190 const char **Pointer; 00191 00192 } ACPI_RSDUMP_INFO; 00193 00194 /* Values for the Opcode field above */ 00195 00196 #define ACPI_RSD_TITLE 0 00197 #define ACPI_RSD_LITERAL 1 00198 #define ACPI_RSD_STRING 2 00199 #define ACPI_RSD_UINT8 3 00200 #define ACPI_RSD_UINT16 4 00201 #define ACPI_RSD_UINT32 5 00202 #define ACPI_RSD_UINT64 6 00203 #define ACPI_RSD_1BITFLAG 7 00204 #define ACPI_RSD_2BITFLAG 8 00205 #define ACPI_RSD_SHORTLIST 9 00206 #define ACPI_RSD_LONGLIST 10 00207 #define ACPI_RSD_DWORDLIST 11 00208 #define ACPI_RSD_ADDRESS 12 00209 #define ACPI_RSD_SOURCE 13 00210 00211 /* restore default alignment */ 00212 00213 #pragma pack() 00214 00215 00216 /* Resource tables indexed by internal resource type */ 00217 00218 extern const UINT8 AcpiGbl_AmlResourceSizes[]; 00219 extern ACPI_RSCONVERT_INFO *AcpiGbl_SetResourceDispatch[]; 00220 00221 /* Resource tables indexed by raw AML resource descriptor type */ 00222 00223 extern const UINT8 AcpiGbl_ResourceStructSizes[]; 00224 extern ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[]; 00225 00226 00227 typedef struct acpi_vendor_walk_info 00228 { 00229 ACPI_VENDOR_UUID *Uuid; 00230 ACPI_BUFFER *Buffer; 00231 ACPI_STATUS Status; 00232 00233 } ACPI_VENDOR_WALK_INFO; 00234 00235 00236 /* 00237 * rscreate 00238 */ 00239 ACPI_STATUS 00240 AcpiRsCreateResourceList ( 00241 ACPI_OPERAND_OBJECT *AmlBuffer, 00242 ACPI_BUFFER *OutputBuffer); 00243 00244 ACPI_STATUS 00245 AcpiRsCreateAmlResources ( 00246 ACPI_RESOURCE *LinkedListBuffer, 00247 ACPI_BUFFER *OutputBuffer); 00248 00249 ACPI_STATUS 00250 AcpiRsCreatePciRoutingTable ( 00251 ACPI_OPERAND_OBJECT *PackageObject, 00252 ACPI_BUFFER *OutputBuffer); 00253 00254 00255 /* 00256 * rsutils 00257 */ 00258 ACPI_STATUS 00259 AcpiRsGetPrtMethodData ( 00260 ACPI_NAMESPACE_NODE *Node, 00261 ACPI_BUFFER *RetBuffer); 00262 00263 ACPI_STATUS 00264 AcpiRsGetCrsMethodData ( 00265 ACPI_NAMESPACE_NODE *Node, 00266 ACPI_BUFFER *RetBuffer); 00267 00268 ACPI_STATUS 00269 AcpiRsGetPrsMethodData ( 00270 ACPI_NAMESPACE_NODE *Node, 00271 ACPI_BUFFER *RetBuffer); 00272 00273 ACPI_STATUS 00274 AcpiRsGetMethodData ( 00275 ACPI_HANDLE Handle, 00276 char *Path, 00277 ACPI_BUFFER *RetBuffer); 00278 00279 ACPI_STATUS 00280 AcpiRsSetSrsMethodData ( 00281 ACPI_NAMESPACE_NODE *Node, 00282 ACPI_BUFFER *RetBuffer); 00283 00284 00285 /* 00286 * rscalc 00287 */ 00288 ACPI_STATUS 00289 AcpiRsGetListLength ( 00290 UINT8 *AmlBuffer, 00291 UINT32 AmlBufferLength, 00292 ACPI_SIZE *SizeNeeded); 00293 00294 ACPI_STATUS 00295 AcpiRsGetAmlLength ( 00296 ACPI_RESOURCE *LinkedListBuffer, 00297 ACPI_SIZE *SizeNeeded); 00298 00299 ACPI_STATUS 00300 AcpiRsGetPciRoutingTableLength ( 00301 ACPI_OPERAND_OBJECT *PackageObject, 00302 ACPI_SIZE *BufferSizeNeeded); 00303 00304 ACPI_STATUS 00305 AcpiRsConvertAmlToResources ( 00306 UINT8 *Aml, 00307 UINT32 Length, 00308 UINT32 Offset, 00309 UINT8 ResourceIndex, 00310 void *Context); 00311 00312 ACPI_STATUS 00313 AcpiRsConvertResourcesToAml ( 00314 ACPI_RESOURCE *Resource, 00315 ACPI_SIZE AmlSizeNeeded, 00316 UINT8 *OutputBuffer); 00317 00318 00319 /* 00320 * rsaddr 00321 */ 00322 void 00323 AcpiRsSetAddressCommon ( 00324 AML_RESOURCE *Aml, 00325 ACPI_RESOURCE *Resource); 00326 00327 BOOLEAN 00328 AcpiRsGetAddressCommon ( 00329 ACPI_RESOURCE *Resource, 00330 AML_RESOURCE *Aml); 00331 00332 00333 /* 00334 * rsmisc 00335 */ 00336 ACPI_STATUS 00337 AcpiRsConvertAmlToResource ( 00338 ACPI_RESOURCE *Resource, 00339 AML_RESOURCE *Aml, 00340 ACPI_RSCONVERT_INFO *Info); 00341 00342 ACPI_STATUS 00343 AcpiRsConvertResourceToAml ( 00344 ACPI_RESOURCE *Resource, 00345 AML_RESOURCE *Aml, 00346 ACPI_RSCONVERT_INFO *Info); 00347 00348 00349 /* 00350 * rsutils 00351 */ 00352 void 00353 AcpiRsMoveData ( 00354 void *Destination, 00355 void *Source, 00356 UINT16 ItemCount, 00357 UINT8 MoveType); 00358 00359 UINT8 00360 AcpiRsDecodeBitmask ( 00361 UINT16 Mask, 00362 UINT8 *List); 00363 00364 UINT16 00365 AcpiRsEncodeBitmask ( 00366 UINT8 *List, 00367 UINT8 Count); 00368 00369 ACPI_RS_LENGTH 00370 AcpiRsGetResourceSource ( 00371 ACPI_RS_LENGTH ResourceLength, 00372 ACPI_RS_LENGTH MinimumLength, 00373 ACPI_RESOURCE_SOURCE *ResourceSource, 00374 AML_RESOURCE *Aml, 00375 char *StringPtr); 00376 00377 ACPI_RSDESC_SIZE 00378 AcpiRsSetResourceSource ( 00379 AML_RESOURCE *Aml, 00380 ACPI_RS_LENGTH MinimumLength, 00381 ACPI_RESOURCE_SOURCE *ResourceSource); 00382 00383 void 00384 AcpiRsSetResourceHeader ( 00385 UINT8 DescriptorType, 00386 ACPI_RSDESC_SIZE TotalLength, 00387 AML_RESOURCE *Aml); 00388 00389 void 00390 AcpiRsSetResourceLength ( 00391 ACPI_RSDESC_SIZE TotalLength, 00392 AML_RESOURCE *Aml); 00393 00394 00395 /* 00396 * rsdump 00397 */ 00398 void 00399 AcpiRsDumpResourceList ( 00400 ACPI_RESOURCE *Resource); 00401 00402 void 00403 AcpiRsDumpIrqList ( 00404 UINT8 *RouteTable); 00405 00406 00407 /* 00408 * Resource conversion tables 00409 */ 00410 extern ACPI_RSCONVERT_INFO AcpiRsConvertDma[]; 00411 extern ACPI_RSCONVERT_INFO AcpiRsConvertEndDpf[]; 00412 extern ACPI_RSCONVERT_INFO AcpiRsConvertIo[]; 00413 extern ACPI_RSCONVERT_INFO AcpiRsConvertFixedIo[]; 00414 extern ACPI_RSCONVERT_INFO AcpiRsConvertEndTag[]; 00415 extern ACPI_RSCONVERT_INFO AcpiRsConvertMemory24[]; 00416 extern ACPI_RSCONVERT_INFO AcpiRsConvertGenericReg[]; 00417 extern ACPI_RSCONVERT_INFO AcpiRsConvertMemory32[]; 00418 extern ACPI_RSCONVERT_INFO AcpiRsConvertFixedMemory32[]; 00419 extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress32[]; 00420 extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress16[]; 00421 extern ACPI_RSCONVERT_INFO AcpiRsConvertExtIrq[]; 00422 extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress64[]; 00423 extern ACPI_RSCONVERT_INFO AcpiRsConvertExtAddress64[]; 00424 00425 /* These resources require separate get/set tables */ 00426 00427 extern ACPI_RSCONVERT_INFO AcpiRsGetIrq[]; 00428 extern ACPI_RSCONVERT_INFO AcpiRsGetStartDpf[]; 00429 extern ACPI_RSCONVERT_INFO AcpiRsGetVendorSmall[]; 00430 extern ACPI_RSCONVERT_INFO AcpiRsGetVendorLarge[]; 00431 00432 extern ACPI_RSCONVERT_INFO AcpiRsSetIrq[]; 00433 extern ACPI_RSCONVERT_INFO AcpiRsSetStartDpf[]; 00434 extern ACPI_RSCONVERT_INFO AcpiRsSetVendor[]; 00435 00436 00437 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 00438 /* 00439 * rsinfo 00440 */ 00441 extern ACPI_RSDUMP_INFO *AcpiGbl_DumpResourceDispatch[]; 00442 00443 /* 00444 * rsdump 00445 */ 00446 extern ACPI_RSDUMP_INFO AcpiRsDumpIrq[]; 00447 extern ACPI_RSDUMP_INFO AcpiRsDumpDma[]; 00448 extern ACPI_RSDUMP_INFO AcpiRsDumpStartDpf[]; 00449 extern ACPI_RSDUMP_INFO AcpiRsDumpEndDpf[]; 00450 extern ACPI_RSDUMP_INFO AcpiRsDumpIo[]; 00451 extern ACPI_RSDUMP_INFO AcpiRsDumpFixedIo[]; 00452 extern ACPI_RSDUMP_INFO AcpiRsDumpVendor[]; 00453 extern ACPI_RSDUMP_INFO AcpiRsDumpEndTag[]; 00454 extern ACPI_RSDUMP_INFO AcpiRsDumpMemory24[]; 00455 extern ACPI_RSDUMP_INFO AcpiRsDumpMemory32[]; 00456 extern ACPI_RSDUMP_INFO AcpiRsDumpFixedMemory32[]; 00457 extern ACPI_RSDUMP_INFO AcpiRsDumpAddress16[]; 00458 extern ACPI_RSDUMP_INFO AcpiRsDumpAddress32[]; 00459 extern ACPI_RSDUMP_INFO AcpiRsDumpAddress64[]; 00460 extern ACPI_RSDUMP_INFO AcpiRsDumpExtAddress64[]; 00461 extern ACPI_RSDUMP_INFO AcpiRsDumpExtIrq[]; 00462 extern ACPI_RSDUMP_INFO AcpiRsDumpGenericReg[]; 00463 #endif 00464 00465 #endif /* __ACRESRC_H__ */ Generated on Sat May 26 2012 04:25:52 for ReactOS by
1.7.6.1
|