Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenamlresrc.h
Go to the documentation of this file.
00001 00002 /****************************************************************************** 00003 * 00004 * Module Name: amlresrc.h - AML resource descriptors 00005 * 00006 *****************************************************************************/ 00007 00008 /****************************************************************************** 00009 * 00010 * 1. Copyright Notice 00011 * 00012 * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp. 00013 * All rights reserved. 00014 * 00015 * 2. License 00016 * 00017 * 2.1. This is your license from Intel Corp. under its intellectual property 00018 * rights. You may have additional license terms from the party that provided 00019 * you this software, covering your right to use that party's intellectual 00020 * property rights. 00021 * 00022 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 00023 * copy of the source code appearing in this file ("Covered Code") an 00024 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 00025 * base code distributed originally by Intel ("Original Intel Code") to copy, 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 /* acpisrc:StructDefs -- for acpisrc conversion */ 00118 00119 #ifndef __AMLRESRC_H 00120 #define __AMLRESRC_H 00121 00122 00123 /* 00124 * Resource descriptor tags, as defined in the ACPI specification. 00125 * Used to symbolically reference fields within a descriptor. 00126 */ 00127 #define ACPI_RESTAG_ADDRESS "_ADR" 00128 #define ACPI_RESTAG_ALIGNMENT "_ALN" 00129 #define ACPI_RESTAG_ADDRESSSPACE "_ASI" 00130 #define ACPI_RESTAG_ACCESSSIZE "_ASZ" 00131 #define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT" 00132 #define ACPI_RESTAG_BASEADDRESS "_BAS" 00133 #define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */ 00134 #define ACPI_RESTAG_DECODE "_DEC" 00135 #define ACPI_RESTAG_DMA "_DMA" 00136 #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ 00137 #define ACPI_RESTAG_GRANULARITY "_GRA" 00138 #define ACPI_RESTAG_INTERRUPT "_INT" 00139 #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* ActiveLo(1), ActiveHi(0) */ 00140 #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), NoShare(0) */ 00141 #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ 00142 #define ACPI_RESTAG_LENGTH "_LEN" 00143 #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ 00144 #define ACPI_RESTAG_MEMTYPE "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ 00145 #define ACPI_RESTAG_MAXADDR "_MAX" 00146 #define ACPI_RESTAG_MINADDR "_MIN" 00147 #define ACPI_RESTAG_MAXTYPE "_MAF" 00148 #define ACPI_RESTAG_MINTYPE "_MIF" 00149 #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" 00150 #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" 00151 #define ACPI_RESTAG_RANGETYPE "_RNG" 00152 #define ACPI_RESTAG_READWRITETYPE "_RW_" /* ReadOnly(0), Writeable (1) */ 00153 #define ACPI_RESTAG_TRANSLATION "_TRA" 00154 #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ 00155 #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ 00156 #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */ 00157 00158 00159 /* Default sizes for "small" resource descriptors */ 00160 00161 #define ASL_RDESC_IRQ_SIZE 0x02 00162 #define ASL_RDESC_DMA_SIZE 0x02 00163 #define ASL_RDESC_ST_DEPEND_SIZE 0x00 00164 #define ASL_RDESC_END_DEPEND_SIZE 0x00 00165 #define ASL_RDESC_IO_SIZE 0x07 00166 #define ASL_RDESC_FIXED_IO_SIZE 0x03 00167 #define ASL_RDESC_END_TAG_SIZE 0x01 00168 00169 00170 typedef struct asl_resource_node 00171 { 00172 UINT32 BufferLength; 00173 void *Buffer; 00174 struct asl_resource_node *Next; 00175 00176 } ASL_RESOURCE_NODE; 00177 00178 00179 /* Macros used to generate AML resource length fields */ 00180 00181 #define ACPI_AML_SIZE_LARGE(r) (sizeof (r) - sizeof (AML_RESOURCE_LARGE_HEADER)) 00182 #define ACPI_AML_SIZE_SMALL(r) (sizeof (r) - sizeof (AML_RESOURCE_SMALL_HEADER)) 00183 00184 /* 00185 * Resource descriptors defined in the ACPI specification. 00186 * 00187 * Packing/alignment must be BYTE because these descriptors 00188 * are used to overlay the raw AML byte stream. 00189 */ 00190 #pragma pack(1) 00191 00192 /* 00193 * SMALL descriptors 00194 */ 00195 #define AML_RESOURCE_SMALL_HEADER_COMMON \ 00196 UINT8 DescriptorType; 00197 00198 typedef struct aml_resource_small_header 00199 { 00200 AML_RESOURCE_SMALL_HEADER_COMMON 00201 00202 } AML_RESOURCE_SMALL_HEADER; 00203 00204 00205 typedef struct aml_resource_irq 00206 { 00207 AML_RESOURCE_SMALL_HEADER_COMMON 00208 UINT16 IrqMask; 00209 UINT8 Flags; 00210 00211 } AML_RESOURCE_IRQ; 00212 00213 00214 typedef struct aml_resource_irq_noflags 00215 { 00216 AML_RESOURCE_SMALL_HEADER_COMMON 00217 UINT16 IrqMask; 00218 00219 } AML_RESOURCE_IRQ_NOFLAGS; 00220 00221 00222 typedef struct aml_resource_dma 00223 { 00224 AML_RESOURCE_SMALL_HEADER_COMMON 00225 UINT8 DmaChannelMask; 00226 UINT8 Flags; 00227 00228 } AML_RESOURCE_DMA; 00229 00230 00231 typedef struct aml_resource_start_dependent 00232 { 00233 AML_RESOURCE_SMALL_HEADER_COMMON 00234 UINT8 Flags; 00235 00236 } AML_RESOURCE_START_DEPENDENT; 00237 00238 00239 typedef struct aml_resource_start_dependent_noprio 00240 { 00241 AML_RESOURCE_SMALL_HEADER_COMMON 00242 00243 } AML_RESOURCE_START_DEPENDENT_NOPRIO; 00244 00245 00246 typedef struct aml_resource_end_dependent 00247 { 00248 AML_RESOURCE_SMALL_HEADER_COMMON 00249 00250 } AML_RESOURCE_END_DEPENDENT; 00251 00252 00253 typedef struct aml_resource_io 00254 { 00255 AML_RESOURCE_SMALL_HEADER_COMMON 00256 UINT8 Flags; 00257 UINT16 Minimum; 00258 UINT16 Maximum; 00259 UINT8 Alignment; 00260 UINT8 AddressLength; 00261 00262 } AML_RESOURCE_IO; 00263 00264 00265 typedef struct aml_resource_fixed_io 00266 { 00267 AML_RESOURCE_SMALL_HEADER_COMMON 00268 UINT16 Address; 00269 UINT8 AddressLength; 00270 00271 } AML_RESOURCE_FIXED_IO; 00272 00273 00274 typedef struct aml_resource_vendor_small 00275 { 00276 AML_RESOURCE_SMALL_HEADER_COMMON 00277 00278 } AML_RESOURCE_VENDOR_SMALL; 00279 00280 00281 typedef struct aml_resource_end_tag 00282 { 00283 AML_RESOURCE_SMALL_HEADER_COMMON 00284 UINT8 Checksum; 00285 00286 } AML_RESOURCE_END_TAG; 00287 00288 00289 /* 00290 * LARGE descriptors 00291 */ 00292 #define AML_RESOURCE_LARGE_HEADER_COMMON \ 00293 UINT8 DescriptorType;\ 00294 UINT16 ResourceLength; 00295 00296 typedef struct aml_resource_large_header 00297 { 00298 AML_RESOURCE_LARGE_HEADER_COMMON 00299 00300 } AML_RESOURCE_LARGE_HEADER; 00301 00302 00303 /* General Flags for address space resource descriptors */ 00304 00305 #define ACPI_RESOURCE_FLAG_DEC 2 00306 #define ACPI_RESOURCE_FLAG_MIF 4 00307 #define ACPI_RESOURCE_FLAG_MAF 8 00308 00309 typedef struct aml_resource_memory24 00310 { 00311 AML_RESOURCE_LARGE_HEADER_COMMON 00312 UINT8 Flags; 00313 UINT16 Minimum; 00314 UINT16 Maximum; 00315 UINT16 Alignment; 00316 UINT16 AddressLength; 00317 00318 } AML_RESOURCE_MEMORY24; 00319 00320 00321 typedef struct aml_resource_vendor_large 00322 { 00323 AML_RESOURCE_LARGE_HEADER_COMMON 00324 00325 } AML_RESOURCE_VENDOR_LARGE; 00326 00327 00328 typedef struct aml_resource_memory32 00329 { 00330 AML_RESOURCE_LARGE_HEADER_COMMON 00331 UINT8 Flags; 00332 UINT32 Minimum; 00333 UINT32 Maximum; 00334 UINT32 Alignment; 00335 UINT32 AddressLength; 00336 00337 } AML_RESOURCE_MEMORY32; 00338 00339 00340 typedef struct aml_resource_fixed_memory32 00341 { 00342 AML_RESOURCE_LARGE_HEADER_COMMON 00343 UINT8 Flags; 00344 UINT32 Address; 00345 UINT32 AddressLength; 00346 00347 } AML_RESOURCE_FIXED_MEMORY32; 00348 00349 00350 #define AML_RESOURCE_ADDRESS_COMMON \ 00351 UINT8 ResourceType; \ 00352 UINT8 Flags; \ 00353 UINT8 SpecificFlags; 00354 00355 00356 typedef struct aml_resource_address 00357 { 00358 AML_RESOURCE_LARGE_HEADER_COMMON 00359 AML_RESOURCE_ADDRESS_COMMON 00360 00361 } AML_RESOURCE_ADDRESS; 00362 00363 00364 typedef struct aml_resource_extended_address64 00365 { 00366 AML_RESOURCE_LARGE_HEADER_COMMON 00367 AML_RESOURCE_ADDRESS_COMMON 00368 UINT8 RevisionID; 00369 UINT8 Reserved; 00370 UINT64 Granularity; 00371 UINT64 Minimum; 00372 UINT64 Maximum; 00373 UINT64 TranslationOffset; 00374 UINT64 AddressLength; 00375 UINT64 TypeSpecific; 00376 00377 } AML_RESOURCE_EXTENDED_ADDRESS64; 00378 00379 #define AML_RESOURCE_EXTENDED_ADDRESS_REVISION 1 /* ACPI 3.0 */ 00380 00381 00382 typedef struct aml_resource_address64 00383 { 00384 AML_RESOURCE_LARGE_HEADER_COMMON 00385 AML_RESOURCE_ADDRESS_COMMON 00386 UINT64 Granularity; 00387 UINT64 Minimum; 00388 UINT64 Maximum; 00389 UINT64 TranslationOffset; 00390 UINT64 AddressLength; 00391 00392 } AML_RESOURCE_ADDRESS64; 00393 00394 00395 typedef struct aml_resource_address32 00396 { 00397 AML_RESOURCE_LARGE_HEADER_COMMON 00398 AML_RESOURCE_ADDRESS_COMMON 00399 UINT32 Granularity; 00400 UINT32 Minimum; 00401 UINT32 Maximum; 00402 UINT32 TranslationOffset; 00403 UINT32 AddressLength; 00404 00405 } AML_RESOURCE_ADDRESS32; 00406 00407 00408 typedef struct aml_resource_address16 00409 { 00410 AML_RESOURCE_LARGE_HEADER_COMMON 00411 AML_RESOURCE_ADDRESS_COMMON 00412 UINT16 Granularity; 00413 UINT16 Minimum; 00414 UINT16 Maximum; 00415 UINT16 TranslationOffset; 00416 UINT16 AddressLength; 00417 00418 } AML_RESOURCE_ADDRESS16; 00419 00420 00421 typedef struct aml_resource_extended_irq 00422 { 00423 AML_RESOURCE_LARGE_HEADER_COMMON 00424 UINT8 Flags; 00425 UINT8 InterruptCount; 00426 UINT32 Interrupts[1]; 00427 /* ResSourceIndex, ResSource optional fields follow */ 00428 00429 } AML_RESOURCE_EXTENDED_IRQ; 00430 00431 00432 typedef struct aml_resource_generic_register 00433 { 00434 AML_RESOURCE_LARGE_HEADER_COMMON 00435 UINT8 AddressSpaceId; 00436 UINT8 BitWidth; 00437 UINT8 BitOffset; 00438 UINT8 AccessSize; /* ACPI 3.0, was previously Reserved */ 00439 UINT64 Address; 00440 00441 } AML_RESOURCE_GENERIC_REGISTER; 00442 00443 /* restore default alignment */ 00444 00445 #pragma pack() 00446 00447 /* Union of all resource descriptors, so we can allocate the worst case */ 00448 00449 typedef union aml_resource 00450 { 00451 /* Descriptor headers */ 00452 00453 UINT8 DescriptorType; 00454 AML_RESOURCE_SMALL_HEADER SmallHeader; 00455 AML_RESOURCE_LARGE_HEADER LargeHeader; 00456 00457 /* Small resource descriptors */ 00458 00459 AML_RESOURCE_IRQ Irq; 00460 AML_RESOURCE_DMA Dma; 00461 AML_RESOURCE_START_DEPENDENT StartDpf; 00462 AML_RESOURCE_END_DEPENDENT EndDpf; 00463 AML_RESOURCE_IO Io; 00464 AML_RESOURCE_FIXED_IO FixedIo; 00465 AML_RESOURCE_VENDOR_SMALL VendorSmall; 00466 AML_RESOURCE_END_TAG EndTag; 00467 00468 /* Large resource descriptors */ 00469 00470 AML_RESOURCE_MEMORY24 Memory24; 00471 AML_RESOURCE_GENERIC_REGISTER GenericReg; 00472 AML_RESOURCE_VENDOR_LARGE VendorLarge; 00473 AML_RESOURCE_MEMORY32 Memory32; 00474 AML_RESOURCE_FIXED_MEMORY32 FixedMemory32; 00475 AML_RESOURCE_ADDRESS16 Address16; 00476 AML_RESOURCE_ADDRESS32 Address32; 00477 AML_RESOURCE_ADDRESS64 Address64; 00478 AML_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64; 00479 AML_RESOURCE_EXTENDED_IRQ ExtendedIrq; 00480 00481 /* Utility overlays */ 00482 00483 AML_RESOURCE_ADDRESS Address; 00484 UINT32 DwordItem; 00485 UINT16 WordItem; 00486 UINT8 ByteItem; 00487 00488 } AML_RESOURCE; 00489 00490 #endif 00491 Generated on Sun May 27 2012 04:27:20 for ReactOS by
1.7.6.1
|