BPicture: Fix archive constructor.
[haiku.git] / src / add-ons / kernel / bus_managers / acpi / acpica / include / acrestyp.h
blob9cf948bc72feb0da5381f53cac2bbbefa811c180
1 /******************************************************************************
3 * Name: acrestyp.h - Defines, types, and structures for resource descriptors
5 *****************************************************************************/
7 /******************************************************************************
9 * 1. Copyright Notice
11 * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp.
12 * All rights reserved.
14 * 2. License
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
19 * property rights.
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
38 * conditions are met:
40 * 3. Conditions
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
64 * make.
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
70 * distribution.
72 * 3.4. Intel retains all right, title, and interest in and to the Original
73 * Intel Code.
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88 * PARTICULAR PURPOSE.
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97 * LIMITED REMEDY.
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************/
116 #ifndef __ACRESTYP_H__
117 #define __ACRESTYP_H__
121 * Definitions for Resource Attributes
123 typedef UINT16 ACPI_RS_LENGTH; /* Resource Length field is fixed at 16 bits */
124 typedef UINT32 ACPI_RSDESC_SIZE; /* Max Resource Descriptor size is (Length+3) = (64K-1)+3 */
127 * Memory Attributes
129 #define ACPI_READ_ONLY_MEMORY (UINT8) 0x00
130 #define ACPI_READ_WRITE_MEMORY (UINT8) 0x01
132 #define ACPI_NON_CACHEABLE_MEMORY (UINT8) 0x00
133 #define ACPI_CACHABLE_MEMORY (UINT8) 0x01
134 #define ACPI_WRITE_COMBINING_MEMORY (UINT8) 0x02
135 #define ACPI_PREFETCHABLE_MEMORY (UINT8) 0x03
137 /*! [Begin] no source code translation */
139 * IO Attributes
140 * The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh.
141 * The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
143 /*! [End] no source code translation !*/
145 #define ACPI_NON_ISA_ONLY_RANGES (UINT8) 0x01
146 #define ACPI_ISA_ONLY_RANGES (UINT8) 0x02
147 #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
149 /* Type of translation - 1=Sparse, 0=Dense */
151 #define ACPI_SPARSE_TRANSLATION (UINT8) 0x01
154 * IO Port Descriptor Decode
156 #define ACPI_DECODE_10 (UINT8) 0x00 /* 10-bit IO address decode */
157 #define ACPI_DECODE_16 (UINT8) 0x01 /* 16-bit IO address decode */
160 * Interrupt attributes - used in multiple descriptors
163 /* Triggering */
165 #define ACPI_LEVEL_SENSITIVE (UINT8) 0x00
166 #define ACPI_EDGE_SENSITIVE (UINT8) 0x01
168 /* Polarity */
170 #define ACPI_ACTIVE_HIGH (UINT8) 0x00
171 #define ACPI_ACTIVE_LOW (UINT8) 0x01
172 #define ACPI_ACTIVE_BOTH (UINT8) 0x02
174 /* Sharing */
176 #define ACPI_EXCLUSIVE (UINT8) 0x00
177 #define ACPI_SHARED (UINT8) 0x01
179 /* Wake */
181 #define ACPI_NOT_WAKE_CAPABLE (UINT8) 0x00
182 #define ACPI_WAKE_CAPABLE (UINT8) 0x01
185 * DMA Attributes
187 #define ACPI_COMPATIBILITY (UINT8) 0x00
188 #define ACPI_TYPE_A (UINT8) 0x01
189 #define ACPI_TYPE_B (UINT8) 0x02
190 #define ACPI_TYPE_F (UINT8) 0x03
192 #define ACPI_NOT_BUS_MASTER (UINT8) 0x00
193 #define ACPI_BUS_MASTER (UINT8) 0x01
195 #define ACPI_TRANSFER_8 (UINT8) 0x00
196 #define ACPI_TRANSFER_8_16 (UINT8) 0x01
197 #define ACPI_TRANSFER_16 (UINT8) 0x02
200 * Start Dependent Functions Priority definitions
202 #define ACPI_GOOD_CONFIGURATION (UINT8) 0x00
203 #define ACPI_ACCEPTABLE_CONFIGURATION (UINT8) 0x01
204 #define ACPI_SUB_OPTIMAL_CONFIGURATION (UINT8) 0x02
207 * 16, 32 and 64-bit Address Descriptor resource types
209 #define ACPI_MEMORY_RANGE (UINT8) 0x00
210 #define ACPI_IO_RANGE (UINT8) 0x01
211 #define ACPI_BUS_NUMBER_RANGE (UINT8) 0x02
213 #define ACPI_ADDRESS_NOT_FIXED (UINT8) 0x00
214 #define ACPI_ADDRESS_FIXED (UINT8) 0x01
216 #define ACPI_POS_DECODE (UINT8) 0x00
217 #define ACPI_SUB_DECODE (UINT8) 0x01
219 /* Producer/Consumer */
221 #define ACPI_PRODUCER (UINT8) 0x00
222 #define ACPI_CONSUMER (UINT8) 0x01
226 * If possible, pack the following structures to byte alignment
228 #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
229 #pragma pack(1)
230 #endif
232 /* UUID data structures for use in vendor-defined resource descriptors */
234 typedef struct acpi_uuid
236 UINT8 Data[ACPI_UUID_LENGTH];
237 } ACPI_UUID;
239 typedef struct acpi_vendor_uuid
241 UINT8 Subtype;
242 UINT8 Data[ACPI_UUID_LENGTH];
244 } ACPI_VENDOR_UUID;
247 * Structures used to describe device resources
249 typedef struct acpi_resource_irq
251 UINT8 DescriptorLength;
252 UINT8 Triggering;
253 UINT8 Polarity;
254 UINT8 Sharable;
255 UINT8 WakeCapable;
256 UINT8 InterruptCount;
257 UINT8 Interrupts[1];
259 } ACPI_RESOURCE_IRQ;
261 typedef struct acpi_resource_dma
263 UINT8 Type;
264 UINT8 BusMaster;
265 UINT8 Transfer;
266 UINT8 ChannelCount;
267 UINT8 Channels[1];
269 } ACPI_RESOURCE_DMA;
271 typedef struct acpi_resource_start_dependent
273 UINT8 DescriptorLength;
274 UINT8 CompatibilityPriority;
275 UINT8 PerformanceRobustness;
277 } ACPI_RESOURCE_START_DEPENDENT;
281 * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
282 * needed because it has no fields
286 typedef struct acpi_resource_io
288 UINT8 IoDecode;
289 UINT8 Alignment;
290 UINT8 AddressLength;
291 UINT16 Minimum;
292 UINT16 Maximum;
294 } ACPI_RESOURCE_IO;
296 typedef struct acpi_resource_fixed_io
298 UINT16 Address;
299 UINT8 AddressLength;
301 } ACPI_RESOURCE_FIXED_IO;
303 typedef struct acpi_resource_fixed_dma
305 UINT16 RequestLines;
306 UINT16 Channels;
307 UINT8 Width;
309 } ACPI_RESOURCE_FIXED_DMA;
311 /* Values for Width field above */
313 #define ACPI_DMA_WIDTH8 0
314 #define ACPI_DMA_WIDTH16 1
315 #define ACPI_DMA_WIDTH32 2
316 #define ACPI_DMA_WIDTH64 3
317 #define ACPI_DMA_WIDTH128 4
318 #define ACPI_DMA_WIDTH256 5
321 typedef struct acpi_resource_vendor
323 UINT16 ByteLength;
324 UINT8 ByteData[1];
326 } ACPI_RESOURCE_VENDOR;
328 /* Vendor resource with UUID info (introduced in ACPI 3.0) */
330 typedef struct acpi_resource_vendor_typed
332 UINT16 ByteLength;
333 UINT8 UuidSubtype;
334 UINT8 Uuid[ACPI_UUID_LENGTH];
335 UINT8 ByteData[1];
337 } ACPI_RESOURCE_VENDOR_TYPED;
339 typedef struct acpi_resource_end_tag
341 UINT8 Checksum;
343 } ACPI_RESOURCE_END_TAG;
345 typedef struct acpi_resource_memory24
347 UINT8 WriteProtect;
348 UINT16 Minimum;
349 UINT16 Maximum;
350 UINT16 Alignment;
351 UINT16 AddressLength;
353 } ACPI_RESOURCE_MEMORY24;
355 typedef struct acpi_resource_memory32
357 UINT8 WriteProtect;
358 UINT32 Minimum;
359 UINT32 Maximum;
360 UINT32 Alignment;
361 UINT32 AddressLength;
363 } ACPI_RESOURCE_MEMORY32;
365 typedef struct acpi_resource_fixed_memory32
367 UINT8 WriteProtect;
368 UINT32 Address;
369 UINT32 AddressLength;
371 } ACPI_RESOURCE_FIXED_MEMORY32;
373 typedef struct acpi_memory_attribute
375 UINT8 WriteProtect;
376 UINT8 Caching;
377 UINT8 RangeType;
378 UINT8 Translation;
380 } ACPI_MEMORY_ATTRIBUTE;
382 typedef struct acpi_io_attribute
384 UINT8 RangeType;
385 UINT8 Translation;
386 UINT8 TranslationType;
387 UINT8 Reserved1;
389 } ACPI_IO_ATTRIBUTE;
391 typedef union acpi_resource_attribute
393 ACPI_MEMORY_ATTRIBUTE Mem;
394 ACPI_IO_ATTRIBUTE Io;
396 /* Used for the *WordSpace macros */
398 UINT8 TypeSpecific;
400 } ACPI_RESOURCE_ATTRIBUTE;
402 typedef struct acpi_resource_source
404 UINT8 Index;
405 UINT16 StringLength;
406 char *StringPtr;
408 } ACPI_RESOURCE_SOURCE;
410 /* Fields common to all address descriptors, 16/32/64 bit */
412 #define ACPI_RESOURCE_ADDRESS_COMMON \
413 UINT8 ResourceType; \
414 UINT8 ProducerConsumer; \
415 UINT8 Decode; \
416 UINT8 MinAddressFixed; \
417 UINT8 MaxAddressFixed; \
418 ACPI_RESOURCE_ATTRIBUTE Info;
420 typedef struct acpi_resource_address
422 ACPI_RESOURCE_ADDRESS_COMMON
424 } ACPI_RESOURCE_ADDRESS;
426 typedef struct acpi_resource_address16
428 ACPI_RESOURCE_ADDRESS_COMMON
429 UINT16 Granularity;
430 UINT16 Minimum;
431 UINT16 Maximum;
432 UINT16 TranslationOffset;
433 UINT16 AddressLength;
434 ACPI_RESOURCE_SOURCE ResourceSource;
436 } ACPI_RESOURCE_ADDRESS16;
438 typedef struct acpi_resource_address32
440 ACPI_RESOURCE_ADDRESS_COMMON
441 UINT32 Granularity;
442 UINT32 Minimum;
443 UINT32 Maximum;
444 UINT32 TranslationOffset;
445 UINT32 AddressLength;
446 ACPI_RESOURCE_SOURCE ResourceSource;
448 } ACPI_RESOURCE_ADDRESS32;
450 typedef struct acpi_resource_address64
452 ACPI_RESOURCE_ADDRESS_COMMON
453 UINT64 Granularity;
454 UINT64 Minimum;
455 UINT64 Maximum;
456 UINT64 TranslationOffset;
457 UINT64 AddressLength;
458 ACPI_RESOURCE_SOURCE ResourceSource;
460 } ACPI_RESOURCE_ADDRESS64;
462 typedef struct acpi_resource_extended_address64
464 ACPI_RESOURCE_ADDRESS_COMMON
465 UINT8 RevisionID;
466 UINT64 Granularity;
467 UINT64 Minimum;
468 UINT64 Maximum;
469 UINT64 TranslationOffset;
470 UINT64 AddressLength;
471 UINT64 TypeSpecific;
473 } ACPI_RESOURCE_EXTENDED_ADDRESS64;
475 typedef struct acpi_resource_extended_irq
477 UINT8 ProducerConsumer;
478 UINT8 Triggering;
479 UINT8 Polarity;
480 UINT8 Sharable;
481 UINT8 WakeCapable;
482 UINT8 InterruptCount;
483 ACPI_RESOURCE_SOURCE ResourceSource;
484 UINT32 Interrupts[1];
486 } ACPI_RESOURCE_EXTENDED_IRQ;
488 typedef struct acpi_resource_generic_register
490 UINT8 SpaceId;
491 UINT8 BitWidth;
492 UINT8 BitOffset;
493 UINT8 AccessSize;
494 UINT64 Address;
496 } ACPI_RESOURCE_GENERIC_REGISTER;
498 typedef struct acpi_resource_gpio
500 UINT8 RevisionId;
501 UINT8 ConnectionType;
502 UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */
503 UINT8 PinConfig;
504 UINT8 Sharable; /* For values, see Interrupt Attributes above */
505 UINT8 WakeCapable; /* For values, see Interrupt Attributes above */
506 UINT8 IoRestriction;
507 UINT8 Triggering; /* For values, see Interrupt Attributes above */
508 UINT8 Polarity; /* For values, see Interrupt Attributes above */
509 UINT16 DriveStrength;
510 UINT16 DebounceTimeout;
511 UINT16 PinTableLength;
512 UINT16 VendorLength;
513 ACPI_RESOURCE_SOURCE ResourceSource;
514 UINT16 *PinTable;
515 UINT8 *VendorData;
517 } ACPI_RESOURCE_GPIO;
519 /* Values for GPIO ConnectionType field above */
521 #define ACPI_RESOURCE_GPIO_TYPE_INT 0
522 #define ACPI_RESOURCE_GPIO_TYPE_IO 1
524 /* Values for PinConfig field above */
526 #define ACPI_PIN_CONFIG_DEFAULT 0
527 #define ACPI_PIN_CONFIG_PULLUP 1
528 #define ACPI_PIN_CONFIG_PULLDOWN 2
529 #define ACPI_PIN_CONFIG_NOPULL 3
531 /* Values for IoRestriction field above */
533 #define ACPI_IO_RESTRICT_NONE 0
534 #define ACPI_IO_RESTRICT_INPUT 1
535 #define ACPI_IO_RESTRICT_OUTPUT 2
536 #define ACPI_IO_RESTRICT_NONE_PRESERVE 3
539 /* Common structure for I2C, SPI, and UART serial descriptors */
541 #define ACPI_RESOURCE_SERIAL_COMMON \
542 UINT8 RevisionId; \
543 UINT8 Type; \
544 UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */\
545 UINT8 SlaveMode; \
546 UINT8 TypeRevisionId; \
547 UINT16 TypeDataLength; \
548 UINT16 VendorLength; \
549 ACPI_RESOURCE_SOURCE ResourceSource; \
550 UINT8 *VendorData;
552 typedef struct acpi_resource_common_serialbus
554 ACPI_RESOURCE_SERIAL_COMMON
556 } ACPI_RESOURCE_COMMON_SERIALBUS;
558 /* Values for the Type field above */
560 #define ACPI_RESOURCE_SERIAL_TYPE_I2C 1
561 #define ACPI_RESOURCE_SERIAL_TYPE_SPI 2
562 #define ACPI_RESOURCE_SERIAL_TYPE_UART 3
564 /* Values for SlaveMode field above */
566 #define ACPI_CONTROLLER_INITIATED 0
567 #define ACPI_DEVICE_INITIATED 1
570 typedef struct acpi_resource_i2c_serialbus
572 ACPI_RESOURCE_SERIAL_COMMON
573 UINT8 AccessMode;
574 UINT16 SlaveAddress;
575 UINT32 ConnectionSpeed;
577 } ACPI_RESOURCE_I2C_SERIALBUS;
579 /* Values for AccessMode field above */
581 #define ACPI_I2C_7BIT_MODE 0
582 #define ACPI_I2C_10BIT_MODE 1
585 typedef struct acpi_resource_spi_serialbus
587 ACPI_RESOURCE_SERIAL_COMMON
588 UINT8 WireMode;
589 UINT8 DevicePolarity;
590 UINT8 DataBitLength;
591 UINT8 ClockPhase;
592 UINT8 ClockPolarity;
593 UINT16 DeviceSelection;
594 UINT32 ConnectionSpeed;
596 } ACPI_RESOURCE_SPI_SERIALBUS;
598 /* Values for WireMode field above */
600 #define ACPI_SPI_4WIRE_MODE 0
601 #define ACPI_SPI_3WIRE_MODE 1
603 /* Values for DevicePolarity field above */
605 #define ACPI_SPI_ACTIVE_LOW 0
606 #define ACPI_SPI_ACTIVE_HIGH 1
608 /* Values for ClockPhase field above */
610 #define ACPI_SPI_FIRST_PHASE 0
611 #define ACPI_SPI_SECOND_PHASE 1
613 /* Values for ClockPolarity field above */
615 #define ACPI_SPI_START_LOW 0
616 #define ACPI_SPI_START_HIGH 1
619 typedef struct acpi_resource_uart_serialbus
621 ACPI_RESOURCE_SERIAL_COMMON
622 UINT8 Endian;
623 UINT8 DataBits;
624 UINT8 StopBits;
625 UINT8 FlowControl;
626 UINT8 Parity;
627 UINT8 LinesEnabled;
628 UINT16 RxFifoSize;
629 UINT16 TxFifoSize;
630 UINT32 DefaultBaudRate;
632 } ACPI_RESOURCE_UART_SERIALBUS;
634 /* Values for Endian field above */
636 #define ACPI_UART_LITTLE_ENDIAN 0
637 #define ACPI_UART_BIG_ENDIAN 1
639 /* Values for DataBits field above */
641 #define ACPI_UART_5_DATA_BITS 0
642 #define ACPI_UART_6_DATA_BITS 1
643 #define ACPI_UART_7_DATA_BITS 2
644 #define ACPI_UART_8_DATA_BITS 3
645 #define ACPI_UART_9_DATA_BITS 4
647 /* Values for StopBits field above */
649 #define ACPI_UART_NO_STOP_BITS 0
650 #define ACPI_UART_1_STOP_BIT 1
651 #define ACPI_UART_1P5_STOP_BITS 2
652 #define ACPI_UART_2_STOP_BITS 3
654 /* Values for FlowControl field above */
656 #define ACPI_UART_FLOW_CONTROL_NONE 0
657 #define ACPI_UART_FLOW_CONTROL_HW 1
658 #define ACPI_UART_FLOW_CONTROL_XON_XOFF 2
660 /* Values for Parity field above */
662 #define ACPI_UART_PARITY_NONE 0
663 #define ACPI_UART_PARITY_EVEN 1
664 #define ACPI_UART_PARITY_ODD 2
665 #define ACPI_UART_PARITY_MARK 3
666 #define ACPI_UART_PARITY_SPACE 4
668 /* Values for LinesEnabled bitfield above */
670 #define ACPI_UART_CARRIER_DETECT (1<<2)
671 #define ACPI_UART_RING_INDICATOR (1<<3)
672 #define ACPI_UART_DATA_SET_READY (1<<4)
673 #define ACPI_UART_DATA_TERMINAL_READY (1<<5)
674 #define ACPI_UART_CLEAR_TO_SEND (1<<6)
675 #define ACPI_UART_REQUEST_TO_SEND (1<<7)
678 /* ACPI_RESOURCE_TYPEs */
680 #define ACPI_RESOURCE_TYPE_IRQ 0
681 #define ACPI_RESOURCE_TYPE_DMA 1
682 #define ACPI_RESOURCE_TYPE_START_DEPENDENT 2
683 #define ACPI_RESOURCE_TYPE_END_DEPENDENT 3
684 #define ACPI_RESOURCE_TYPE_IO 4
685 #define ACPI_RESOURCE_TYPE_FIXED_IO 5
686 #define ACPI_RESOURCE_TYPE_VENDOR 6
687 #define ACPI_RESOURCE_TYPE_END_TAG 7
688 #define ACPI_RESOURCE_TYPE_MEMORY24 8
689 #define ACPI_RESOURCE_TYPE_MEMORY32 9
690 #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10
691 #define ACPI_RESOURCE_TYPE_ADDRESS16 11
692 #define ACPI_RESOURCE_TYPE_ADDRESS32 12
693 #define ACPI_RESOURCE_TYPE_ADDRESS64 13
694 #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */
695 #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15
696 #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16
697 #define ACPI_RESOURCE_TYPE_GPIO 17 /* ACPI 5.0 */
698 #define ACPI_RESOURCE_TYPE_FIXED_DMA 18 /* ACPI 5.0 */
699 #define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */
700 #define ACPI_RESOURCE_TYPE_MAX 19
702 /* Master union for resource descriptors */
704 typedef union acpi_resource_data
706 ACPI_RESOURCE_IRQ Irq;
707 ACPI_RESOURCE_DMA Dma;
708 ACPI_RESOURCE_START_DEPENDENT StartDpf;
709 ACPI_RESOURCE_IO Io;
710 ACPI_RESOURCE_FIXED_IO FixedIo;
711 ACPI_RESOURCE_FIXED_DMA FixedDma;
712 ACPI_RESOURCE_VENDOR Vendor;
713 ACPI_RESOURCE_VENDOR_TYPED VendorTyped;
714 ACPI_RESOURCE_END_TAG EndTag;
715 ACPI_RESOURCE_MEMORY24 Memory24;
716 ACPI_RESOURCE_MEMORY32 Memory32;
717 ACPI_RESOURCE_FIXED_MEMORY32 FixedMemory32;
718 ACPI_RESOURCE_ADDRESS16 Address16;
719 ACPI_RESOURCE_ADDRESS32 Address32;
720 ACPI_RESOURCE_ADDRESS64 Address64;
721 ACPI_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64;
722 ACPI_RESOURCE_EXTENDED_IRQ ExtendedIrq;
723 ACPI_RESOURCE_GENERIC_REGISTER GenericReg;
724 ACPI_RESOURCE_GPIO Gpio;
725 ACPI_RESOURCE_I2C_SERIALBUS I2cSerialBus;
726 ACPI_RESOURCE_SPI_SERIALBUS SpiSerialBus;
727 ACPI_RESOURCE_UART_SERIALBUS UartSerialBus;
728 ACPI_RESOURCE_COMMON_SERIALBUS CommonSerialBus;
730 /* Common fields */
732 ACPI_RESOURCE_ADDRESS Address; /* Common 16/32/64 address fields */
734 } ACPI_RESOURCE_DATA;
737 /* Common resource header */
739 typedef struct acpi_resource
741 UINT32 Type;
742 UINT32 Length;
743 ACPI_RESOURCE_DATA Data;
745 } ACPI_RESOURCE;
747 /* restore default alignment */
749 #pragma pack()
752 #define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */
753 #define ACPI_RS_SIZE_MIN (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
754 #define ACPI_RS_SIZE(Type) (UINT32) (ACPI_RS_SIZE_NO_DATA + sizeof (Type))
756 /* Macro for walking resource templates with multiple descriptors */
758 #define ACPI_NEXT_RESOURCE(Res) \
759 ACPI_ADD_PTR (ACPI_RESOURCE, (Res), (Res)->Length)
762 typedef struct acpi_pci_routing_table
764 UINT32 Length;
765 UINT32 Pin;
766 UINT64 Address; /* here for 64-bit alignment */
767 UINT32 SourceIndex;
768 char Source[4]; /* pad to 64 bits so sizeof() works in all cases */
770 } ACPI_PCI_ROUTING_TABLE;
772 #endif /* __ACRESTYP_H__ */