Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenacrestyp.h
Go to the documentation of this file.
00001 /****************************************************************************** 00002 * 00003 * Name: acrestyp.h - Defines, types, and structures for resource descriptors 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 #ifndef __ACRESTYP_H__ 00117 #define __ACRESTYP_H__ 00118 00119 00120 /* 00121 * Definitions for Resource Attributes 00122 */ 00123 typedef UINT16 ACPI_RS_LENGTH; /* Resource Length field is fixed at 16 bits */ 00124 typedef UINT32 ACPI_RSDESC_SIZE; /* Max Resource Descriptor size is (Length+3) = (64K-1)+3 */ 00125 00126 /* 00127 * Memory Attributes 00128 */ 00129 #define ACPI_READ_ONLY_MEMORY (UINT8) 0x00 00130 #define ACPI_READ_WRITE_MEMORY (UINT8) 0x01 00131 00132 #define ACPI_NON_CACHEABLE_MEMORY (UINT8) 0x00 00133 #define ACPI_CACHABLE_MEMORY (UINT8) 0x01 00134 #define ACPI_WRITE_COMBINING_MEMORY (UINT8) 0x02 00135 #define ACPI_PREFETCHABLE_MEMORY (UINT8) 0x03 00136 00137 /* 00138 * IO Attributes 00139 * The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh. 00140 * The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh. 00141 */ 00142 #define ACPI_NON_ISA_ONLY_RANGES (UINT8) 0x01 00143 #define ACPI_ISA_ONLY_RANGES (UINT8) 0x02 00144 #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) 00145 00146 /* Type of translation - 1=Sparse, 0=Dense */ 00147 00148 #define ACPI_SPARSE_TRANSLATION (UINT8) 0x01 00149 00150 /* 00151 * IO Port Descriptor Decode 00152 */ 00153 #define ACPI_DECODE_10 (UINT8) 0x00 /* 10-bit IO address decode */ 00154 #define ACPI_DECODE_16 (UINT8) 0x01 /* 16-bit IO address decode */ 00155 00156 /* 00157 * IRQ Attributes 00158 */ 00159 #define ACPI_LEVEL_SENSITIVE (UINT8) 0x00 00160 #define ACPI_EDGE_SENSITIVE (UINT8) 0x01 00161 00162 #define ACPI_ACTIVE_HIGH (UINT8) 0x00 00163 #define ACPI_ACTIVE_LOW (UINT8) 0x01 00164 00165 #define ACPI_EXCLUSIVE (UINT8) 0x00 00166 #define ACPI_SHARED (UINT8) 0x01 00167 00168 /* 00169 * DMA Attributes 00170 */ 00171 #define ACPI_COMPATIBILITY (UINT8) 0x00 00172 #define ACPI_TYPE_A (UINT8) 0x01 00173 #define ACPI_TYPE_B (UINT8) 0x02 00174 #define ACPI_TYPE_F (UINT8) 0x03 00175 00176 #define ACPI_NOT_BUS_MASTER (UINT8) 0x00 00177 #define ACPI_BUS_MASTER (UINT8) 0x01 00178 00179 #define ACPI_TRANSFER_8 (UINT8) 0x00 00180 #define ACPI_TRANSFER_8_16 (UINT8) 0x01 00181 #define ACPI_TRANSFER_16 (UINT8) 0x02 00182 00183 /* 00184 * Start Dependent Functions Priority definitions 00185 */ 00186 #define ACPI_GOOD_CONFIGURATION (UINT8) 0x00 00187 #define ACPI_ACCEPTABLE_CONFIGURATION (UINT8) 0x01 00188 #define ACPI_SUB_OPTIMAL_CONFIGURATION (UINT8) 0x02 00189 00190 /* 00191 * 16, 32 and 64-bit Address Descriptor resource types 00192 */ 00193 #define ACPI_MEMORY_RANGE (UINT8) 0x00 00194 #define ACPI_IO_RANGE (UINT8) 0x01 00195 #define ACPI_BUS_NUMBER_RANGE (UINT8) 0x02 00196 00197 #define ACPI_ADDRESS_NOT_FIXED (UINT8) 0x00 00198 #define ACPI_ADDRESS_FIXED (UINT8) 0x01 00199 00200 #define ACPI_POS_DECODE (UINT8) 0x00 00201 #define ACPI_SUB_DECODE (UINT8) 0x01 00202 00203 #define ACPI_PRODUCER (UINT8) 0x00 00204 #define ACPI_CONSUMER (UINT8) 0x01 00205 00206 00207 /* 00208 * If possible, pack the following structures to byte alignment 00209 */ 00210 #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 00211 #pragma pack(1) 00212 #endif 00213 00214 /* UUID data structures for use in vendor-defined resource descriptors */ 00215 00216 typedef struct acpi_uuid 00217 { 00218 UINT8 Data[ACPI_UUID_LENGTH]; 00219 } ACPI_UUID; 00220 00221 typedef struct acpi_vendor_uuid 00222 { 00223 UINT8 Subtype; 00224 UINT8 Data[ACPI_UUID_LENGTH]; 00225 00226 } ACPI_VENDOR_UUID; 00227 00228 /* 00229 * Structures used to describe device resources 00230 */ 00231 typedef struct acpi_resource_irq 00232 { 00233 UINT8 DescriptorLength; 00234 UINT8 Triggering; 00235 UINT8 Polarity; 00236 UINT8 Sharable; 00237 UINT8 InterruptCount; 00238 UINT8 Interrupts[1]; 00239 00240 } ACPI_RESOURCE_IRQ; 00241 00242 typedef struct ACPI_RESOURCE_DMA 00243 { 00244 UINT8 Type; 00245 UINT8 BusMaster; 00246 UINT8 Transfer; 00247 UINT8 ChannelCount; 00248 UINT8 Channels[1]; 00249 00250 } ACPI_RESOURCE_DMA; 00251 00252 typedef struct acpi_resource_start_dependent 00253 { 00254 UINT8 DescriptorLength; 00255 UINT8 CompatibilityPriority; 00256 UINT8 PerformanceRobustness; 00257 00258 } ACPI_RESOURCE_START_DEPENDENT; 00259 00260 00261 /* 00262 * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not 00263 * needed because it has no fields 00264 */ 00265 00266 00267 typedef struct acpi_resource_io 00268 { 00269 UINT8 IoDecode; 00270 UINT8 Alignment; 00271 UINT8 AddressLength; 00272 UINT16 Minimum; 00273 UINT16 Maximum; 00274 00275 } ACPI_RESOURCE_IO; 00276 00277 typedef struct acpi_resource_fixed_io 00278 { 00279 UINT16 Address; 00280 UINT8 AddressLength; 00281 00282 } ACPI_RESOURCE_FIXED_IO; 00283 00284 typedef struct acpi_resource_vendor 00285 { 00286 UINT16 ByteLength; 00287 UINT8 ByteData[1]; 00288 00289 } ACPI_RESOURCE_VENDOR; 00290 00291 /* Vendor resource with UUID info (introduced in ACPI 3.0) */ 00292 00293 typedef struct acpi_resource_vendor_typed 00294 { 00295 UINT16 ByteLength; 00296 UINT8 UuidSubtype; 00297 UINT8 Uuid[ACPI_UUID_LENGTH]; 00298 UINT8 ByteData[1]; 00299 00300 } ACPI_RESOURCE_VENDOR_TYPED; 00301 00302 typedef struct acpi_resource_end_tag 00303 { 00304 UINT8 Checksum; 00305 00306 } ACPI_RESOURCE_END_TAG; 00307 00308 typedef struct acpi_resource_memory24 00309 { 00310 UINT8 WriteProtect; 00311 UINT16 Minimum; 00312 UINT16 Maximum; 00313 UINT16 Alignment; 00314 UINT16 AddressLength; 00315 00316 } ACPI_RESOURCE_MEMORY24; 00317 00318 typedef struct acpi_resource_memory32 00319 { 00320 UINT8 WriteProtect; 00321 UINT32 Minimum; 00322 UINT32 Maximum; 00323 UINT32 Alignment; 00324 UINT32 AddressLength; 00325 00326 } ACPI_RESOURCE_MEMORY32; 00327 00328 typedef struct acpi_resource_fixed_memory32 00329 { 00330 UINT8 WriteProtect; 00331 UINT32 Address; 00332 UINT32 AddressLength; 00333 00334 } ACPI_RESOURCE_FIXED_MEMORY32; 00335 00336 typedef struct acpi_memory_attribute 00337 { 00338 UINT8 WriteProtect; 00339 UINT8 Caching; 00340 UINT8 RangeType; 00341 UINT8 Translation; 00342 00343 } ACPI_MEMORY_ATTRIBUTE; 00344 00345 typedef struct acpi_io_attribute 00346 { 00347 UINT8 RangeType; 00348 UINT8 Translation; 00349 UINT8 TranslationType; 00350 UINT8 Reserved1; 00351 00352 } ACPI_IO_ATTRIBUTE; 00353 00354 typedef union acpi_resource_attribute 00355 { 00356 ACPI_MEMORY_ATTRIBUTE Mem; 00357 ACPI_IO_ATTRIBUTE Io; 00358 00359 /* Used for the *WordSpace macros */ 00360 00361 UINT8 TypeSpecific; 00362 00363 } ACPI_RESOURCE_ATTRIBUTE; 00364 00365 typedef struct acpi_resource_source 00366 { 00367 UINT8 Index; 00368 UINT16 StringLength; 00369 char *StringPtr; 00370 00371 } ACPI_RESOURCE_SOURCE; 00372 00373 /* Fields common to all address descriptors, 16/32/64 bit */ 00374 00375 #define ACPI_RESOURCE_ADDRESS_COMMON \ 00376 UINT8 ResourceType; \ 00377 UINT8 ProducerConsumer; \ 00378 UINT8 Decode; \ 00379 UINT8 MinAddressFixed; \ 00380 UINT8 MaxAddressFixed; \ 00381 ACPI_RESOURCE_ATTRIBUTE Info; 00382 00383 typedef struct acpi_resource_address 00384 { 00385 ACPI_RESOURCE_ADDRESS_COMMON 00386 00387 } ACPI_RESOURCE_ADDRESS; 00388 00389 typedef struct acpi_resource_address16 00390 { 00391 ACPI_RESOURCE_ADDRESS_COMMON 00392 UINT16 Granularity; 00393 UINT16 Minimum; 00394 UINT16 Maximum; 00395 UINT16 TranslationOffset; 00396 UINT16 AddressLength; 00397 ACPI_RESOURCE_SOURCE ResourceSource; 00398 00399 } ACPI_RESOURCE_ADDRESS16; 00400 00401 typedef struct acpi_resource_address32 00402 { 00403 ACPI_RESOURCE_ADDRESS_COMMON 00404 UINT32 Granularity; 00405 UINT32 Minimum; 00406 UINT32 Maximum; 00407 UINT32 TranslationOffset; 00408 UINT32 AddressLength; 00409 ACPI_RESOURCE_SOURCE ResourceSource; 00410 00411 } ACPI_RESOURCE_ADDRESS32; 00412 00413 typedef struct acpi_resource_address64 00414 { 00415 ACPI_RESOURCE_ADDRESS_COMMON 00416 UINT64 Granularity; 00417 UINT64 Minimum; 00418 UINT64 Maximum; 00419 UINT64 TranslationOffset; 00420 UINT64 AddressLength; 00421 ACPI_RESOURCE_SOURCE ResourceSource; 00422 00423 } ACPI_RESOURCE_ADDRESS64; 00424 00425 typedef struct acpi_resource_extended_address64 00426 { 00427 ACPI_RESOURCE_ADDRESS_COMMON 00428 UINT8 RevisionID; 00429 UINT64 Granularity; 00430 UINT64 Minimum; 00431 UINT64 Maximum; 00432 UINT64 TranslationOffset; 00433 UINT64 AddressLength; 00434 UINT64 TypeSpecific; 00435 00436 } ACPI_RESOURCE_EXTENDED_ADDRESS64; 00437 00438 typedef struct acpi_resource_extended_irq 00439 { 00440 UINT8 ProducerConsumer; 00441 UINT8 Triggering; 00442 UINT8 Polarity; 00443 UINT8 Sharable; 00444 UINT8 InterruptCount; 00445 ACPI_RESOURCE_SOURCE ResourceSource; 00446 UINT32 Interrupts[1]; 00447 00448 } ACPI_RESOURCE_EXTENDED_IRQ; 00449 00450 typedef struct acpi_resource_generic_register 00451 { 00452 UINT8 SpaceId; 00453 UINT8 BitWidth; 00454 UINT8 BitOffset; 00455 UINT8 AccessSize; 00456 UINT64 Address; 00457 00458 } ACPI_RESOURCE_GENERIC_REGISTER; 00459 00460 00461 /* ACPI_RESOURCE_TYPEs */ 00462 00463 #define ACPI_RESOURCE_TYPE_IRQ 0 00464 #define ACPI_RESOURCE_TYPE_DMA 1 00465 #define ACPI_RESOURCE_TYPE_START_DEPENDENT 2 00466 #define ACPI_RESOURCE_TYPE_END_DEPENDENT 3 00467 #define ACPI_RESOURCE_TYPE_IO 4 00468 #define ACPI_RESOURCE_TYPE_FIXED_IO 5 00469 #define ACPI_RESOURCE_TYPE_VENDOR 6 00470 #define ACPI_RESOURCE_TYPE_END_TAG 7 00471 #define ACPI_RESOURCE_TYPE_MEMORY24 8 00472 #define ACPI_RESOURCE_TYPE_MEMORY32 9 00473 #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10 00474 #define ACPI_RESOURCE_TYPE_ADDRESS16 11 00475 #define ACPI_RESOURCE_TYPE_ADDRESS32 12 00476 #define ACPI_RESOURCE_TYPE_ADDRESS64 13 00477 #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ 00478 #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 00479 #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 00480 #define ACPI_RESOURCE_TYPE_MAX 16 00481 00482 /* Master union for resource descriptors */ 00483 00484 typedef union acpi_resource_data 00485 { 00486 ACPI_RESOURCE_IRQ Irq; 00487 ACPI_RESOURCE_DMA Dma; 00488 ACPI_RESOURCE_START_DEPENDENT StartDpf; 00489 ACPI_RESOURCE_IO Io; 00490 ACPI_RESOURCE_FIXED_IO FixedIo; 00491 ACPI_RESOURCE_VENDOR Vendor; 00492 ACPI_RESOURCE_VENDOR_TYPED VendorTyped; 00493 ACPI_RESOURCE_END_TAG EndTag; 00494 ACPI_RESOURCE_MEMORY24 Memory24; 00495 ACPI_RESOURCE_MEMORY32 Memory32; 00496 ACPI_RESOURCE_FIXED_MEMORY32 FixedMemory32; 00497 ACPI_RESOURCE_ADDRESS16 Address16; 00498 ACPI_RESOURCE_ADDRESS32 Address32; 00499 ACPI_RESOURCE_ADDRESS64 Address64; 00500 ACPI_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64; 00501 ACPI_RESOURCE_EXTENDED_IRQ ExtendedIrq; 00502 ACPI_RESOURCE_GENERIC_REGISTER GenericReg; 00503 00504 /* Common fields */ 00505 00506 ACPI_RESOURCE_ADDRESS Address; /* Common 16/32/64 address fields */ 00507 00508 } ACPI_RESOURCE_DATA; 00509 00510 00511 /* Common resource header */ 00512 00513 typedef struct acpi_resource 00514 { 00515 UINT32 Type; 00516 UINT32 Length; 00517 ACPI_RESOURCE_DATA Data; 00518 00519 } ACPI_RESOURCE; 00520 00521 /* restore default alignment */ 00522 00523 #pragma pack() 00524 00525 00526 #define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */ 00527 #define ACPI_RS_SIZE_MIN (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (12) 00528 #define ACPI_RS_SIZE(Type) (UINT32) (ACPI_RS_SIZE_NO_DATA + sizeof (Type)) 00529 00530 #define ACPI_NEXT_RESOURCE(Res) (ACPI_RESOURCE *)((UINT8 *) Res + Res->Length) 00531 00532 00533 typedef struct acpi_pci_routing_table 00534 { 00535 UINT32 Length; 00536 UINT32 Pin; 00537 UINT64 Address; /* here for 64-bit alignment */ 00538 UINT32 SourceIndex; 00539 char Source[4]; /* pad to 64 bits so sizeof() works in all cases */ 00540 00541 } ACPI_PCI_ROUTING_TABLE; 00542 00543 #endif /* __ACRESTYP_H__ */ 00544 Generated on Fri May 25 2012 04:25:33 for ReactOS by
1.7.6.1
|