acrestyp.h revision 26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0
/******************************************************************************
*
* Name: acrestyp.h - Defines, types, and structures for resource descriptors
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2011, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#ifndef __ACRESTYP_H__
#define __ACRESTYP_H__
/*
* Definitions for Resource Attributes
*/
/*
* Memory Attributes
*/
/*
* IO Attributes
* The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh.
* The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
*/
/* Type of translation - 1=Sparse, 0=Dense */
/*
* IO Port Descriptor Decode
*/
/*
* IRQ Attributes
*/
/*
* DMA Attributes
*/
/*
* Start Dependent Functions Priority definitions
*/
/*
* 16, 32 and 64-bit Address Descriptor resource types
*/
/*
* If possible, pack the following structures to byte alignment
*/
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
#pragma pack(1)
#endif
/* UUID data structures for use in vendor-defined resource descriptors */
typedef struct acpi_uuid
{
} ACPI_UUID;
typedef struct acpi_vendor_uuid
{
/*
* Structures used to describe device resources
*/
typedef struct acpi_resource_irq
{
typedef struct ACPI_RESOURCE_DMA
{
typedef struct acpi_resource_start_dependent
{
/*
* The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
* needed because it has no fields
*/
typedef struct acpi_resource_io
{
typedef struct acpi_resource_fixed_io
{
typedef struct acpi_resource_vendor
{
/* Vendor resource with UUID info (introduced in ACPI 3.0) */
typedef struct acpi_resource_vendor_typed
{
typedef struct acpi_resource_end_tag
{
typedef struct acpi_resource_memory24
{
typedef struct acpi_resource_memory32
{
typedef struct acpi_resource_fixed_memory32
{
typedef struct acpi_memory_attribute
{
typedef struct acpi_io_attribute
{
typedef union acpi_resource_attribute
{
/* Used for the *WordSpace macros */
typedef struct acpi_resource_source
{
char *StringPtr;
/* Fields common to all address descriptors, 16/32/64 bit */
#define ACPI_RESOURCE_ADDRESS_COMMON \
typedef struct acpi_resource_address
{
typedef struct acpi_resource_address16
{
typedef struct acpi_resource_address32
{
typedef struct acpi_resource_address64
{
typedef struct acpi_resource_extended_address64
{
typedef struct acpi_resource_extended_irq
{
typedef struct acpi_resource_generic_register
{
/* ACPI_RESOURCE_TYPEs */
#define ACPI_RESOURCE_TYPE_IRQ 0
#define ACPI_RESOURCE_TYPE_DMA 1
#define ACPI_RESOURCE_TYPE_START_DEPENDENT 2
#define ACPI_RESOURCE_TYPE_END_DEPENDENT 3
#define ACPI_RESOURCE_TYPE_IO 4
#define ACPI_RESOURCE_TYPE_FIXED_IO 5
#define ACPI_RESOURCE_TYPE_VENDOR 6
#define ACPI_RESOURCE_TYPE_END_TAG 7
#define ACPI_RESOURCE_TYPE_MEMORY24 8
#define ACPI_RESOURCE_TYPE_MEMORY32 9
#define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10
#define ACPI_RESOURCE_TYPE_ADDRESS16 11
#define ACPI_RESOURCE_TYPE_ADDRESS32 12
#define ACPI_RESOURCE_TYPE_ADDRESS64 13
#define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15
#define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16
#define ACPI_RESOURCE_TYPE_MAX 16
/* Master union for resource descriptors */
typedef union acpi_resource_data
{
/* Common fields */
/* Common resource header */
typedef struct acpi_resource
{
/* restore default alignment */
#pragma pack()
typedef struct acpi_pci_routing_table
{
#endif /* __ACRESTYP_H__ */