aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/******************************************************************************
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers *
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * Name: acrestyp.h - Defines, types, and structures for resource descriptors
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers *
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers *****************************************************************************/
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross/*
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek * Copyright (C) 2000 - 2016, Intel Corp.
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * All rights reserved.
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers *
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * Redistribution and use in source and binary forms, with or without
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * modification, are permitted provided that the following conditions
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * are met:
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * 1. Redistributions of source code must retain the above copyright
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * notice, this list of conditions, and the following disclaimer,
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * without modification.
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * 2. Redistributions in binary form must reproduce at minimum a disclaimer
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * substantially similar to the "NO WARRANTY" disclaimer below
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * ("Disclaimer") and any redistribution must be conditioned upon
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * including a substantially similar Disclaimer requirement for further
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * binary redistribution.
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * 3. Neither the names of the above-listed copyright holders nor the names
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * of any contributors may be used to endorse or promote products derived
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * from this software without specific prior written permission.
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers *
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * Alternatively, this software may be distributed under the terms of the
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * GNU General Public License ("GPL") version 2 as published by the Free
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * Software Foundation.
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers *
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * NO WARRANTY
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross * POSSIBILITY OF SUCH DAMAGES.
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#ifndef __ACRESTYP_H__
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define __ACRESTYP_H__
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * Definitions for Resource Attributes
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef UINT16 ACPI_RS_LENGTH; /* Resource Length field is fixed at 16 bits */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef UINT32 ACPI_RSDESC_SIZE; /* Max Resource Descriptor size is (Length+3) = (64K-1)+3 */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * Memory Attributes
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_READ_ONLY_MEMORY (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_READ_WRITE_MEMORY (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_NON_CACHEABLE_MEMORY (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_CACHABLE_MEMORY (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_WRITE_COMBINING_MEMORY (UINT8) 0x02
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_PREFETCHABLE_MEMORY (UINT8) 0x03
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/*! [Begin] no source code translation */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * IO Attributes
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh.
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/*! [End] no source code translation !*/
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_NON_ISA_ONLY_RANGES (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_ISA_ONLY_RANGES (UINT8) 0x02
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/* Type of translation - 1=Sparse, 0=Dense */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_SPARSE_TRANSLATION (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * IO Port Descriptor Decode
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_DECODE_10 (UINT8) 0x00 /* 10-bit IO address decode */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_DECODE_16 (UINT8) 0x01 /* 16-bit IO address decode */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek * Interrupt attributes - used in multiple descriptors
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Triggering */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_LEVEL_SENSITIVE (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_EDGE_SENSITIVE (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Polarity */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_ACTIVE_HIGH (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_ACTIVE_LOW (UINT8) 0x01
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_ACTIVE_BOTH (UINT8) 0x02
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Sharing */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_EXCLUSIVE (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_SHARED (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Wake */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_NOT_WAKE_CAPABLE (UINT8) 0x00
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_WAKE_CAPABLE (UINT8) 0x01
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * DMA Attributes
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_COMPATIBILITY (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_TYPE_A (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_TYPE_B (UINT8) 0x02
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_TYPE_F (UINT8) 0x03
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_NOT_BUS_MASTER (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_BUS_MASTER (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_TRANSFER_8 (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_TRANSFER_8_16 (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_TRANSFER_16 (UINT8) 0x02
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * Start Dependent Functions Priority definitions
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_GOOD_CONFIGURATION (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_ACCEPTABLE_CONFIGURATION (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_SUB_OPTIMAL_CONFIGURATION (UINT8) 0x02
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * 16, 32 and 64-bit Address Descriptor resource types
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_MEMORY_RANGE (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_IO_RANGE (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_BUS_NUMBER_RANGE (UINT8) 0x02
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_ADDRESS_NOT_FIXED (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_ADDRESS_FIXED (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_POS_DECODE (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_SUB_DECODE (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Producer/Consumer */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_PRODUCER (UINT8) 0x00
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_CONSUMER (UINT8) 0x01
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * If possible, pack the following structures to byte alignment
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#pragma pack(1)
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#endif
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/* UUID data structures for use in vendor-defined resource descriptors */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_uuid
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Data[ACPI_UUID_LENGTH];
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_UUID;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_vendor_uuid
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Subtype;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Data[ACPI_UUID_LENGTH];
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_VENDOR_UUID;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * Structures used to describe device resources
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_irq
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 DescriptorLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Triggering;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Polarity;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Sharable;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 WakeCapable;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 InterruptCount;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Interrupts[1];
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_IRQ;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_resource_dma
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Type;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 BusMaster;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Transfer;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 ChannelCount;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Channels[1];
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_DMA;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_start_dependent
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 DescriptorLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 CompatibilityPriority;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 PerformanceRobustness;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_START_DEPENDENT;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/*
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers * needed because it has no fields
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_io
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 IoDecode;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Alignment;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 AddressLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 Minimum;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 Maximum;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_IO;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_fixed_io
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 Address;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 AddressLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_FIXED_IO;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_resource_fixed_dma
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 RequestLines;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 Channels;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 Width;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_RESOURCE_FIXED_DMA;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for Width field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_DMA_WIDTH8 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_DMA_WIDTH16 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_DMA_WIDTH32 2
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_DMA_WIDTH64 3
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_DMA_WIDTH128 4
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_DMA_WIDTH256 5
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_vendor
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 ByteLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 ByteData[1];
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_VENDOR;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/* Vendor resource with UUID info (introduced in ACPI 3.0) */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_vendor_typed
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 ByteLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 UuidSubtype;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Uuid[ACPI_UUID_LENGTH];
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 ByteData[1];
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_VENDOR_TYPED;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_end_tag
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Checksum;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_END_TAG;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_memory24
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 WriteProtect;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 Minimum;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 Maximum;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 Alignment;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 AddressLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_MEMORY24;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_memory32
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 WriteProtect;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Minimum;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Maximum;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Alignment;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 AddressLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_MEMORY32;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_fixed_memory32
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 WriteProtect;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Address;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 AddressLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_FIXED_MEMORY32;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_memory_attribute
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 WriteProtect;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Caching;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 RangeType;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Translation;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_MEMORY_ATTRIBUTE;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_io_attribute
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 RangeType;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Translation;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 TranslationType;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Reserved1;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_IO_ATTRIBUTE;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef union acpi_resource_attribute
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_MEMORY_ATTRIBUTE Mem;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_IO_ATTRIBUTE Io;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers /* Used for the *WordSpace macros */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 TypeSpecific;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_ATTRIBUTE;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_source
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Index;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT16 StringLength;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers char *StringPtr;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_SOURCE;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/* Fields common to all address descriptors, 16/32/64 bit */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_ADDRESS_COMMON \
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 ResourceType; \
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 ProducerConsumer; \
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Decode; \
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 MinAddressFixed; \
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 MaxAddressFixed; \
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ATTRIBUTE Info;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_address16_attribute
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 Granularity;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 Minimum;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 Maximum;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 TranslationOffset;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 AddressLength;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_ADDRESS16_ATTRIBUTE;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_address32_attribute
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT32 Granularity;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT32 Minimum;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT32 Maximum;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT32 TranslationOffset;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT32 AddressLength;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_ADDRESS32_ATTRIBUTE;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_address64_attribute
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT64 Granularity;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT64 Minimum;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT64 Maximum;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT64 TranslationOffset;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT64 AddressLength;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_ADDRESS64_ATTRIBUTE;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_address
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS_COMMON
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_ADDRESS;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_address16
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS_COMMON
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_ADDRESS16_ATTRIBUTE Address;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_SOURCE ResourceSource;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_ADDRESS16;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_address32
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS_COMMON
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_ADDRESS32_ATTRIBUTE Address;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_SOURCE ResourceSource;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_ADDRESS32;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_address64
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS_COMMON
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_ADDRESS64_ATTRIBUTE Address;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_SOURCE ResourceSource;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_ADDRESS64;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_extended_address64
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS_COMMON
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 RevisionID;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_ADDRESS64_ATTRIBUTE Address;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT64 TypeSpecific;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_EXTENDED_ADDRESS64;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_extended_irq
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 ProducerConsumer;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Triggering;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Polarity;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 Sharable;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 WakeCapable;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 InterruptCount;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_SOURCE ResourceSource;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Interrupts[1];
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_EXTENDED_IRQ;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource_generic_register
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 SpaceId;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 BitWidth;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 BitOffset;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT8 AccessSize;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT64 Address;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_GENERIC_REGISTER;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_resource_gpio
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 RevisionId;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 ConnectionType;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 PinConfig;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 Sharable; /* For values, see Interrupt Attributes above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 WakeCapable; /* For values, see Interrupt Attributes above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 IoRestriction;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 Triggering; /* For values, see Interrupt Attributes above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 Polarity; /* For values, see Interrupt Attributes above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 DriveStrength;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 DebounceTimeout;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 PinTableLength;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 VendorLength;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_SOURCE ResourceSource;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 *PinTable;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 *VendorData;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_RESOURCE_GPIO;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for GPIO ConnectionType field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_GPIO_TYPE_INT 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_GPIO_TYPE_IO 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for PinConfig field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_PIN_CONFIG_DEFAULT 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_PIN_CONFIG_PULLUP 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_PIN_CONFIG_PULLDOWN 2
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_PIN_CONFIG_NOPULL 3
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for IoRestriction field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_IO_RESTRICT_NONE 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_IO_RESTRICT_INPUT 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_IO_RESTRICT_OUTPUT 2
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_IO_RESTRICT_NONE_PRESERVE 3
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Common structure for I2C, SPI, and UART serial descriptors */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_SERIAL_COMMON \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 RevisionId; \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 Type; \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 ProducerConsumer; /* For values, see Producer/Consumer above */\
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 SlaveMode; \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 ConnectionSharing; \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 TypeRevisionId; \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 TypeDataLength; \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 VendorLength; \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_SOURCE ResourceSource; \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 *VendorData;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_resource_common_serialbus
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_SERIAL_COMMON
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_RESOURCE_COMMON_SERIALBUS;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for the Type field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_SERIAL_TYPE_I2C 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_SERIAL_TYPE_SPI 2
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_SERIAL_TYPE_UART 3
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for SlaveMode field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_CONTROLLER_INITIATED 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_DEVICE_INITIATED 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_resource_i2c_serialbus
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_SERIAL_COMMON
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 AccessMode;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 SlaveAddress;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT32 ConnectionSpeed;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_RESOURCE_I2C_SERIALBUS;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for AccessMode field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_I2C_7BIT_MODE 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_I2C_10BIT_MODE 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_resource_spi_serialbus
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_SERIAL_COMMON
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 WireMode;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 DevicePolarity;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 DataBitLength;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 ClockPhase;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 ClockPolarity;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 DeviceSelection;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT32 ConnectionSpeed;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_RESOURCE_SPI_SERIALBUS;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for WireMode field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_SPI_4WIRE_MODE 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_SPI_3WIRE_MODE 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for DevicePolarity field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_SPI_ACTIVE_LOW 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_SPI_ACTIVE_HIGH 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for ClockPhase field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_SPI_FIRST_PHASE 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_SPI_SECOND_PHASE 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for ClockPolarity field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_SPI_START_LOW 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_SPI_START_HIGH 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinektypedef struct acpi_resource_uart_serialbus
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek{
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_SERIAL_COMMON
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 Endian;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 DataBits;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 StopBits;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 FlowControl;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 Parity;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT8 LinesEnabled;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 RxFifoSize;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT16 TxFifoSize;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek UINT32 DefaultBaudRate;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek} ACPI_RESOURCE_UART_SERIALBUS;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for Endian field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_LITTLE_ENDIAN 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_BIG_ENDIAN 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for DataBits field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_5_DATA_BITS 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_6_DATA_BITS 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_7_DATA_BITS 2
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_8_DATA_BITS 3
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_9_DATA_BITS 4
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for StopBits field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_NO_STOP_BITS 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_1_STOP_BIT 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_1P5_STOP_BITS 2
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_2_STOP_BITS 3
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for FlowControl field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_FLOW_CONTROL_NONE 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_FLOW_CONTROL_HW 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_FLOW_CONTROL_XON_XOFF 2
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for Parity field above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_PARITY_NONE 0
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_PARITY_EVEN 1
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_PARITY_ODD 2
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_PARITY_MARK 3
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_PARITY_SPACE 4
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Values for LinesEnabled bitfield above */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_CARRIER_DETECT (1<<2)
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_RING_INDICATOR (1<<3)
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_DATA_SET_READY (1<<4)
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_DATA_TERMINAL_READY (1<<5)
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_CLEAR_TO_SEND (1<<6)
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_UART_REQUEST_TO_SEND (1<<7)
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/* ACPI_RESOURCE_TYPEs */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_IRQ 0
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_DMA 1
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_START_DEPENDENT 2
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_END_DEPENDENT 3
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_IO 4
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_FIXED_IO 5
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_VENDOR 6
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_END_TAG 7
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_MEMORY24 8
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_MEMORY32 9
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_ADDRESS16 11
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_ADDRESS32 12
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_ADDRESS64 13
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_TYPE_GPIO 17 /* ACPI 5.0 */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_TYPE_FIXED_DMA 18 /* ACPI 5.0 */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_RESOURCE_TYPE_MAX 19
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/* Master union for resource descriptors */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef union acpi_resource_data
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_IRQ Irq;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_DMA Dma;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_START_DEPENDENT StartDpf;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_IO Io;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_FIXED_IO FixedIo;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_FIXED_DMA FixedDma;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_VENDOR Vendor;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_VENDOR_TYPED VendorTyped;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_END_TAG EndTag;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_MEMORY24 Memory24;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_MEMORY32 Memory32;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_FIXED_MEMORY32 FixedMemory32;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS16 Address16;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS32 Address32;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS64 Address64;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_EXTENDED_IRQ ExtendedIrq;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_GENERIC_REGISTER GenericReg;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_GPIO Gpio;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_I2C_SERIALBUS I2cSerialBus;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_SPI_SERIALBUS SpiSerialBus;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_UART_SERIALBUS UartSerialBus;
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_RESOURCE_COMMON_SERIALBUS CommonSerialBus;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers /* Common fields */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_ADDRESS Address; /* Common 16/32/64 address fields */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE_DATA;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/* Common resource header */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_resource
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Type;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Length;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers ACPI_RESOURCE_DATA Data;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_RESOURCE;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers/* restore default alignment */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#pragma pack()
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RS_SIZE_MIN (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#define ACPI_RS_SIZE(Type) (UINT32) (ACPI_RS_SIZE_NO_DATA + sizeof (Type))
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek/* Macro for walking resource templates with multiple descriptors */
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek#define ACPI_NEXT_RESOURCE(Res) \
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek ACPI_ADD_PTR (ACPI_RESOURCE, (Res), (Res)->Length)
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myerstypedef struct acpi_pci_routing_table
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers{
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Length;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 Pin;
26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0Gordon Ross UINT64 Address; /* here for 64-bit alignment */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers UINT32 SourceIndex;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers char Source[4]; /* pad to 64 bits so sizeof() works in all cases */
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers} ACPI_PCI_ROUTING_TABLE;
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers
aa2aa9a662539940ddbc8610da5a3a874ebd7503Dana Myers#endif /* __ACRESTYP_H__ */