1 /******************************************************************************
3 * Name: acrestyp.h - Defines, types, and structures for resource descriptors
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
12 * All rights reserved.
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
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
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
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
72 * 3.4. Intel retains all right, title, and interest in and to the Original
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
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
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 * Alternatively, you may choose to be licensed under the terms of the
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
152 #ifndef __ACRESTYP_H__
153 #define __ACRESTYP_H__
157 * Definitions for Resource Attributes
159 typedef UINT16 ACPI_RS_LENGTH
; /* Resource Length field is fixed at 16 bits */
160 typedef UINT32 ACPI_RSDESC_SIZE
; /* Max Resource Descriptor size is (Length+3) = (64K-1)+3 */
165 #define ACPI_READ_ONLY_MEMORY (UINT8) 0x00
166 #define ACPI_READ_WRITE_MEMORY (UINT8) 0x01
168 #define ACPI_NON_CACHEABLE_MEMORY (UINT8) 0x00
169 #define ACPI_CACHABLE_MEMORY (UINT8) 0x01
170 #define ACPI_WRITE_COMBINING_MEMORY (UINT8) 0x02
171 #define ACPI_PREFETCHABLE_MEMORY (UINT8) 0x03
173 /*! [Begin] no source code translation */
176 * The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh.
177 * The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
179 /*! [End] no source code translation !*/
181 #define ACPI_NON_ISA_ONLY_RANGES (UINT8) 0x01
182 #define ACPI_ISA_ONLY_RANGES (UINT8) 0x02
183 #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
185 /* Type of translation - 1=Sparse, 0=Dense */
187 #define ACPI_SPARSE_TRANSLATION (UINT8) 0x01
190 * IO Port Descriptor Decode
192 #define ACPI_DECODE_10 (UINT8) 0x00 /* 10-bit IO address decode */
193 #define ACPI_DECODE_16 (UINT8) 0x01 /* 16-bit IO address decode */
196 * Interrupt attributes - used in multiple descriptors
201 #define ACPI_LEVEL_SENSITIVE (UINT8) 0x00
202 #define ACPI_EDGE_SENSITIVE (UINT8) 0x01
206 #define ACPI_ACTIVE_HIGH (UINT8) 0x00
207 #define ACPI_ACTIVE_LOW (UINT8) 0x01
208 #define ACPI_ACTIVE_BOTH (UINT8) 0x02
212 #define ACPI_EXCLUSIVE (UINT8) 0x00
213 #define ACPI_SHARED (UINT8) 0x01
217 #define ACPI_NOT_WAKE_CAPABLE (UINT8) 0x00
218 #define ACPI_WAKE_CAPABLE (UINT8) 0x01
223 #define ACPI_COMPATIBILITY (UINT8) 0x00
224 #define ACPI_TYPE_A (UINT8) 0x01
225 #define ACPI_TYPE_B (UINT8) 0x02
226 #define ACPI_TYPE_F (UINT8) 0x03
228 #define ACPI_NOT_BUS_MASTER (UINT8) 0x00
229 #define ACPI_BUS_MASTER (UINT8) 0x01
231 #define ACPI_TRANSFER_8 (UINT8) 0x00
232 #define ACPI_TRANSFER_8_16 (UINT8) 0x01
233 #define ACPI_TRANSFER_16 (UINT8) 0x02
236 * Start Dependent Functions Priority definitions
238 #define ACPI_GOOD_CONFIGURATION (UINT8) 0x00
239 #define ACPI_ACCEPTABLE_CONFIGURATION (UINT8) 0x01
240 #define ACPI_SUB_OPTIMAL_CONFIGURATION (UINT8) 0x02
243 * 16, 32 and 64-bit Address Descriptor resource types
245 #define ACPI_MEMORY_RANGE (UINT8) 0x00
246 #define ACPI_IO_RANGE (UINT8) 0x01
247 #define ACPI_BUS_NUMBER_RANGE (UINT8) 0x02
249 #define ACPI_ADDRESS_NOT_FIXED (UINT8) 0x00
250 #define ACPI_ADDRESS_FIXED (UINT8) 0x01
252 #define ACPI_POS_DECODE (UINT8) 0x00
253 #define ACPI_SUB_DECODE (UINT8) 0x01
255 /* Producer/Consumer */
257 #define ACPI_PRODUCER (UINT8) 0x00
258 #define ACPI_CONSUMER (UINT8) 0x01
262 * If possible, pack the following structures to byte alignment
264 #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
268 /* UUID data structures for use in vendor-defined resource descriptors */
270 typedef struct acpi_uuid
272 UINT8 Data
[ACPI_UUID_LENGTH
];
275 typedef struct acpi_vendor_uuid
278 UINT8 Data
[ACPI_UUID_LENGTH
];
283 * Structures used to describe device resources
285 typedef struct acpi_resource_irq
287 UINT8 DescriptorLength
;
292 UINT8 InterruptCount
;
297 typedef struct acpi_resource_dma
307 typedef struct acpi_resource_start_dependent
309 UINT8 DescriptorLength
;
310 UINT8 CompatibilityPriority
;
311 UINT8 PerformanceRobustness
;
313 } ACPI_RESOURCE_START_DEPENDENT
;
317 * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
318 * needed because it has no fields
322 typedef struct acpi_resource_io
332 typedef struct acpi_resource_fixed_io
337 } ACPI_RESOURCE_FIXED_IO
;
339 typedef struct acpi_resource_fixed_dma
345 } ACPI_RESOURCE_FIXED_DMA
;
347 /* Values for Width field above */
349 #define ACPI_DMA_WIDTH8 0
350 #define ACPI_DMA_WIDTH16 1
351 #define ACPI_DMA_WIDTH32 2
352 #define ACPI_DMA_WIDTH64 3
353 #define ACPI_DMA_WIDTH128 4
354 #define ACPI_DMA_WIDTH256 5
357 typedef struct acpi_resource_vendor
362 } ACPI_RESOURCE_VENDOR
;
364 /* Vendor resource with UUID info (introduced in ACPI 3.0) */
366 typedef struct acpi_resource_vendor_typed
370 UINT8 Uuid
[ACPI_UUID_LENGTH
];
373 } ACPI_RESOURCE_VENDOR_TYPED
;
375 typedef struct acpi_resource_end_tag
379 } ACPI_RESOURCE_END_TAG
;
381 typedef struct acpi_resource_memory24
387 UINT16 AddressLength
;
389 } ACPI_RESOURCE_MEMORY24
;
391 typedef struct acpi_resource_memory32
397 UINT32 AddressLength
;
399 } ACPI_RESOURCE_MEMORY32
;
401 typedef struct acpi_resource_fixed_memory32
405 UINT32 AddressLength
;
407 } ACPI_RESOURCE_FIXED_MEMORY32
;
409 typedef struct acpi_memory_attribute
416 } ACPI_MEMORY_ATTRIBUTE
;
418 typedef struct acpi_io_attribute
422 UINT8 TranslationType
;
427 typedef union acpi_resource_attribute
429 ACPI_MEMORY_ATTRIBUTE Mem
;
430 ACPI_IO_ATTRIBUTE Io
;
432 /* Used for the *WordSpace macros */
436 } ACPI_RESOURCE_ATTRIBUTE
;
438 typedef struct acpi_resource_source
444 } ACPI_RESOURCE_SOURCE
;
446 /* Fields common to all address descriptors, 16/32/64 bit */
448 #define ACPI_RESOURCE_ADDRESS_COMMON \
449 UINT8 ResourceType; \
450 UINT8 ProducerConsumer; \
452 UINT8 MinAddressFixed; \
453 UINT8 MaxAddressFixed; \
454 ACPI_RESOURCE_ATTRIBUTE Info;
456 typedef struct acpi_address16_attribute
461 UINT16 TranslationOffset
;
462 UINT16 AddressLength
;
464 } ACPI_ADDRESS16_ATTRIBUTE
;
466 typedef struct acpi_address32_attribute
471 UINT32 TranslationOffset
;
472 UINT32 AddressLength
;
474 } ACPI_ADDRESS32_ATTRIBUTE
;
476 typedef struct acpi_address64_attribute
481 UINT64 TranslationOffset
;
482 UINT64 AddressLength
;
484 } ACPI_ADDRESS64_ATTRIBUTE
;
486 typedef struct acpi_resource_address
488 ACPI_RESOURCE_ADDRESS_COMMON
490 } ACPI_RESOURCE_ADDRESS
;
492 typedef struct acpi_resource_address16
494 ACPI_RESOURCE_ADDRESS_COMMON
495 ACPI_ADDRESS16_ATTRIBUTE Address
;
496 ACPI_RESOURCE_SOURCE ResourceSource
;
498 } ACPI_RESOURCE_ADDRESS16
;
500 typedef struct acpi_resource_address32
502 ACPI_RESOURCE_ADDRESS_COMMON
503 ACPI_ADDRESS32_ATTRIBUTE Address
;
504 ACPI_RESOURCE_SOURCE ResourceSource
;
506 } ACPI_RESOURCE_ADDRESS32
;
508 typedef struct acpi_resource_address64
510 ACPI_RESOURCE_ADDRESS_COMMON
511 ACPI_ADDRESS64_ATTRIBUTE Address
;
512 ACPI_RESOURCE_SOURCE ResourceSource
;
514 } ACPI_RESOURCE_ADDRESS64
;
516 typedef struct acpi_resource_extended_address64
518 ACPI_RESOURCE_ADDRESS_COMMON
520 ACPI_ADDRESS64_ATTRIBUTE Address
;
523 } ACPI_RESOURCE_EXTENDED_ADDRESS64
;
525 typedef struct acpi_resource_extended_irq
527 UINT8 ProducerConsumer
;
532 UINT8 InterruptCount
;
533 ACPI_RESOURCE_SOURCE ResourceSource
;
534 UINT32 Interrupts
[1];
536 } ACPI_RESOURCE_EXTENDED_IRQ
;
538 typedef struct acpi_resource_generic_register
546 } ACPI_RESOURCE_GENERIC_REGISTER
;
548 typedef struct acpi_resource_gpio
551 UINT8 ConnectionType
;
552 UINT8 ProducerConsumer
; /* For values, see Producer/Consumer above */
554 UINT8 Sharable
; /* For values, see Interrupt Attributes above */
555 UINT8 WakeCapable
; /* For values, see Interrupt Attributes above */
557 UINT8 Triggering
; /* For values, see Interrupt Attributes above */
558 UINT8 Polarity
; /* For values, see Interrupt Attributes above */
559 UINT16 DriveStrength
;
560 UINT16 DebounceTimeout
;
561 UINT16 PinTableLength
;
563 ACPI_RESOURCE_SOURCE ResourceSource
;
567 } ACPI_RESOURCE_GPIO
;
569 /* Values for GPIO ConnectionType field above */
571 #define ACPI_RESOURCE_GPIO_TYPE_INT 0
572 #define ACPI_RESOURCE_GPIO_TYPE_IO 1
574 /* Values for PinConfig field above */
576 #define ACPI_PIN_CONFIG_DEFAULT 0
577 #define ACPI_PIN_CONFIG_PULLUP 1
578 #define ACPI_PIN_CONFIG_PULLDOWN 2
579 #define ACPI_PIN_CONFIG_NOPULL 3
581 /* Values for IoRestriction field above */
583 #define ACPI_IO_RESTRICT_NONE 0
584 #define ACPI_IO_RESTRICT_INPUT 1
585 #define ACPI_IO_RESTRICT_OUTPUT 2
586 #define ACPI_IO_RESTRICT_NONE_PRESERVE 3
589 /* Common structure for I2C, SPI, and UART serial descriptors */
591 #define ACPI_RESOURCE_SERIAL_COMMON \
594 UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */\
596 UINT8 ConnectionSharing; \
597 UINT8 TypeRevisionId; \
598 UINT16 TypeDataLength; \
599 UINT16 VendorLength; \
600 ACPI_RESOURCE_SOURCE ResourceSource; \
603 typedef struct acpi_resource_common_serialbus
605 ACPI_RESOURCE_SERIAL_COMMON
607 } ACPI_RESOURCE_COMMON_SERIALBUS
;
609 /* Values for the Type field above */
611 #define ACPI_RESOURCE_SERIAL_TYPE_I2C 1
612 #define ACPI_RESOURCE_SERIAL_TYPE_SPI 2
613 #define ACPI_RESOURCE_SERIAL_TYPE_UART 3
615 /* Values for SlaveMode field above */
617 #define ACPI_CONTROLLER_INITIATED 0
618 #define ACPI_DEVICE_INITIATED 1
621 typedef struct acpi_resource_i2c_serialbus
623 ACPI_RESOURCE_SERIAL_COMMON
626 UINT32 ConnectionSpeed
;
628 } ACPI_RESOURCE_I2C_SERIALBUS
;
630 /* Values for AccessMode field above */
632 #define ACPI_I2C_7BIT_MODE 0
633 #define ACPI_I2C_10BIT_MODE 1
636 typedef struct acpi_resource_spi_serialbus
638 ACPI_RESOURCE_SERIAL_COMMON
640 UINT8 DevicePolarity
;
644 UINT16 DeviceSelection
;
645 UINT32 ConnectionSpeed
;
647 } ACPI_RESOURCE_SPI_SERIALBUS
;
649 /* Values for WireMode field above */
651 #define ACPI_SPI_4WIRE_MODE 0
652 #define ACPI_SPI_3WIRE_MODE 1
654 /* Values for DevicePolarity field above */
656 #define ACPI_SPI_ACTIVE_LOW 0
657 #define ACPI_SPI_ACTIVE_HIGH 1
659 /* Values for ClockPhase field above */
661 #define ACPI_SPI_FIRST_PHASE 0
662 #define ACPI_SPI_SECOND_PHASE 1
664 /* Values for ClockPolarity field above */
666 #define ACPI_SPI_START_LOW 0
667 #define ACPI_SPI_START_HIGH 1
670 typedef struct acpi_resource_uart_serialbus
672 ACPI_RESOURCE_SERIAL_COMMON
681 UINT32 DefaultBaudRate
;
683 } ACPI_RESOURCE_UART_SERIALBUS
;
685 /* Values for Endian field above */
687 #define ACPI_UART_LITTLE_ENDIAN 0
688 #define ACPI_UART_BIG_ENDIAN 1
690 /* Values for DataBits field above */
692 #define ACPI_UART_5_DATA_BITS 0
693 #define ACPI_UART_6_DATA_BITS 1
694 #define ACPI_UART_7_DATA_BITS 2
695 #define ACPI_UART_8_DATA_BITS 3
696 #define ACPI_UART_9_DATA_BITS 4
698 /* Values for StopBits field above */
700 #define ACPI_UART_NO_STOP_BITS 0
701 #define ACPI_UART_1_STOP_BIT 1
702 #define ACPI_UART_1P5_STOP_BITS 2
703 #define ACPI_UART_2_STOP_BITS 3
705 /* Values for FlowControl field above */
707 #define ACPI_UART_FLOW_CONTROL_NONE 0
708 #define ACPI_UART_FLOW_CONTROL_HW 1
709 #define ACPI_UART_FLOW_CONTROL_XON_XOFF 2
711 /* Values for Parity field above */
713 #define ACPI_UART_PARITY_NONE 0
714 #define ACPI_UART_PARITY_EVEN 1
715 #define ACPI_UART_PARITY_ODD 2
716 #define ACPI_UART_PARITY_MARK 3
717 #define ACPI_UART_PARITY_SPACE 4
719 /* Values for LinesEnabled bitfield above */
721 #define ACPI_UART_CARRIER_DETECT (1<<2)
722 #define ACPI_UART_RING_INDICATOR (1<<3)
723 #define ACPI_UART_DATA_SET_READY (1<<4)
724 #define ACPI_UART_DATA_TERMINAL_READY (1<<5)
725 #define ACPI_UART_CLEAR_TO_SEND (1<<6)
726 #define ACPI_UART_REQUEST_TO_SEND (1<<7)
729 /* ACPI_RESOURCE_TYPEs */
731 #define ACPI_RESOURCE_TYPE_IRQ 0
732 #define ACPI_RESOURCE_TYPE_DMA 1
733 #define ACPI_RESOURCE_TYPE_START_DEPENDENT 2
734 #define ACPI_RESOURCE_TYPE_END_DEPENDENT 3
735 #define ACPI_RESOURCE_TYPE_IO 4
736 #define ACPI_RESOURCE_TYPE_FIXED_IO 5
737 #define ACPI_RESOURCE_TYPE_VENDOR 6
738 #define ACPI_RESOURCE_TYPE_END_TAG 7
739 #define ACPI_RESOURCE_TYPE_MEMORY24 8
740 #define ACPI_RESOURCE_TYPE_MEMORY32 9
741 #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10
742 #define ACPI_RESOURCE_TYPE_ADDRESS16 11
743 #define ACPI_RESOURCE_TYPE_ADDRESS32 12
744 #define ACPI_RESOURCE_TYPE_ADDRESS64 13
745 #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */
746 #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15
747 #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16
748 #define ACPI_RESOURCE_TYPE_GPIO 17 /* ACPI 5.0 */
749 #define ACPI_RESOURCE_TYPE_FIXED_DMA 18 /* ACPI 5.0 */
750 #define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */
751 #define ACPI_RESOURCE_TYPE_MAX 19
753 /* Master union for resource descriptors */
755 typedef union acpi_resource_data
757 ACPI_RESOURCE_IRQ Irq
;
758 ACPI_RESOURCE_DMA Dma
;
759 ACPI_RESOURCE_START_DEPENDENT StartDpf
;
761 ACPI_RESOURCE_FIXED_IO FixedIo
;
762 ACPI_RESOURCE_FIXED_DMA FixedDma
;
763 ACPI_RESOURCE_VENDOR Vendor
;
764 ACPI_RESOURCE_VENDOR_TYPED VendorTyped
;
765 ACPI_RESOURCE_END_TAG EndTag
;
766 ACPI_RESOURCE_MEMORY24 Memory24
;
767 ACPI_RESOURCE_MEMORY32 Memory32
;
768 ACPI_RESOURCE_FIXED_MEMORY32 FixedMemory32
;
769 ACPI_RESOURCE_ADDRESS16 Address16
;
770 ACPI_RESOURCE_ADDRESS32 Address32
;
771 ACPI_RESOURCE_ADDRESS64 Address64
;
772 ACPI_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64
;
773 ACPI_RESOURCE_EXTENDED_IRQ ExtendedIrq
;
774 ACPI_RESOURCE_GENERIC_REGISTER GenericReg
;
775 ACPI_RESOURCE_GPIO Gpio
;
776 ACPI_RESOURCE_I2C_SERIALBUS I2cSerialBus
;
777 ACPI_RESOURCE_SPI_SERIALBUS SpiSerialBus
;
778 ACPI_RESOURCE_UART_SERIALBUS UartSerialBus
;
779 ACPI_RESOURCE_COMMON_SERIALBUS CommonSerialBus
;
783 ACPI_RESOURCE_ADDRESS Address
; /* Common 16/32/64 address fields */
785 } ACPI_RESOURCE_DATA
;
788 /* Common resource header */
790 typedef struct acpi_resource
794 ACPI_RESOURCE_DATA Data
;
798 /* restore default alignment */
803 #define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */
804 #define ACPI_RS_SIZE_MIN (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
805 #define ACPI_RS_SIZE(Type) (UINT32) (ACPI_RS_SIZE_NO_DATA + sizeof (Type))
807 /* Macro for walking resource templates with multiple descriptors */
809 #define ACPI_NEXT_RESOURCE(Res) \
810 ACPI_ADD_PTR (ACPI_RESOURCE, (Res), (Res)->Length)
813 typedef struct acpi_pci_routing_table
817 UINT64 Address
; /* here for 64-bit alignment */
819 char Source
[4]; /* pad to 64 bits so sizeof() works in all cases */
821 } ACPI_PCI_ROUTING_TABLE
;
823 #endif /* __ACRESTYP_H__ */