diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2007-03-22 17:24:05 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2007-03-22 17:24:05 +0000 |
commit | 1a39cfb03c6797452971010e59462692d346a22b (patch) | |
tree | 69d0fa3b3760b0abcc0335ff748e39701a8bf064 /sys/contrib/dev/acpica/amlresrc.h | |
parent | e9bfb92a8e683016c7f6c24104fce9db9567ee1c (diff) | |
download | src-test2-1a39cfb03c6797452971010e59462692d346a22b.tar.gz src-test2-1a39cfb03c6797452971010e59462692d346a22b.zip |
Notes
Diffstat (limited to 'sys/contrib/dev/acpica/amlresrc.h')
-rw-r--r-- | sys/contrib/dev/acpica/amlresrc.h | 258 |
1 files changed, 134 insertions, 124 deletions
diff --git a/sys/contrib/dev/acpica/amlresrc.h b/sys/contrib/dev/acpica/amlresrc.h index b934a1c9fe20..e5b19fa6ae30 100644 --- a/sys/contrib/dev/acpica/amlresrc.h +++ b/sys/contrib/dev/acpica/amlresrc.h @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: amlresrc.h - AML resource descriptors - * $Revision: 1.33 $ + * $Revision: 1.40 $ * *****************************************************************************/ @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp. * All rights reserved. * * 2. License @@ -115,41 +115,46 @@ * *****************************************************************************/ +/* acpisrc:StructDefs -- for acpisrc conversion */ #ifndef __AMLRESRC_H #define __AMLRESRC_H -#define ASL_RESNAME_ADDRESS "_ADR" -#define ASL_RESNAME_ALIGNMENT "_ALN" -#define ASL_RESNAME_ADDRESSSPACE "_ASI" -#define ASL_RESNAME_ACCESSSIZE "_ASZ" -#define ASL_RESNAME_TYPESPECIFICATTRIBUTES "_ATT" -#define ASL_RESNAME_BASEADDRESS "_BAS" -#define ASL_RESNAME_BUSMASTER "_BM_" /* Master(1), Slave(0) */ -#define ASL_RESNAME_DECODE "_DEC" -#define ASL_RESNAME_DMA "_DMA" -#define ASL_RESNAME_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ -#define ASL_RESNAME_GRANULARITY "_GRA" -#define ASL_RESNAME_INTERRUPT "_INT" -#define ASL_RESNAME_INTERRUPTLEVEL "_LL_" /* ActiveLo(1), ActiveHi(0) */ -#define ASL_RESNAME_INTERRUPTSHARE "_SHR" /* Shareable(1), NoShare(0) */ -#define ASL_RESNAME_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ -#define ASL_RESNAME_LENGTH "_LEN" -#define ASL_RESNAME_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ -#define ASL_RESNAME_MEMTYPE "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ -#define ASL_RESNAME_MAXADDR "_MAX" -#define ASL_RESNAME_MINADDR "_MIN" -#define ASL_RESNAME_MAXTYPE "_MAF" -#define ASL_RESNAME_MINTYPE "_MIF" -#define ASL_RESNAME_REGISTERBITOFFSET "_RBO" -#define ASL_RESNAME_REGISTERBITWIDTH "_RBW" -#define ASL_RESNAME_RANGETYPE "_RNG" -#define ASL_RESNAME_READWRITETYPE "_RW_" /* ReadOnly(0), Writeable (1) */ -#define ASL_RESNAME_TRANSLATION "_TRA" -#define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ -#define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */ -#define ASL_RESNAME_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */ +/* + * Resource descriptor tags, as defined in the ACPI specification. + * Used to symbolically reference fields within a descriptor. + */ +#define ACPI_RESTAG_ADDRESS "_ADR" +#define ACPI_RESTAG_ALIGNMENT "_ALN" +#define ACPI_RESTAG_ADDRESSSPACE "_ASI" +#define ACPI_RESTAG_ACCESSSIZE "_ASZ" +#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT" +#define ACPI_RESTAG_BASEADDRESS "_BAS" +#define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */ +#define ACPI_RESTAG_DECODE "_DEC" +#define ACPI_RESTAG_DMA "_DMA" +#define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ +#define ACPI_RESTAG_GRANULARITY "_GRA" +#define ACPI_RESTAG_INTERRUPT "_INT" +#define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* ActiveLo(1), ActiveHi(0) */ +#define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), NoShare(0) */ +#define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ +#define ACPI_RESTAG_LENGTH "_LEN" +#define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ +#define ACPI_RESTAG_MEMTYPE "_MEM" /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ +#define ACPI_RESTAG_MAXADDR "_MAX" +#define ACPI_RESTAG_MINADDR "_MIN" +#define ACPI_RESTAG_MAXTYPE "_MAF" +#define ACPI_RESTAG_MINTYPE "_MIF" +#define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" +#define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" +#define ACPI_RESTAG_RANGETYPE "_RNG" +#define ACPI_RESTAG_READWRITETYPE "_RW_" /* ReadOnly(0), Writeable (1) */ +#define ACPI_RESTAG_TRANSLATION "_TRA" +#define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ +#define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ +#define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8And16(1), 16(2) */ /* Default sizes for "small" resource descriptors */ @@ -165,13 +170,18 @@ typedef struct asl_resource_node { - UINT32 BufferLength; - void *Buffer; - struct asl_resource_node *Next; + UINT32 BufferLength; + void *Buffer; + struct asl_resource_node *Next; } ASL_RESOURCE_NODE; +/* Macros used to generate AML resource length fields */ + +#define ACPI_AML_SIZE_LARGE(r) (sizeof (r) - sizeof (AML_RESOURCE_LARGE_HEADER)) +#define ACPI_AML_SIZE_SMALL(r) (sizeof (r) - sizeof (AML_RESOURCE_SMALL_HEADER)) + /* * Resource descriptors defined in the ACPI specification. * @@ -184,7 +194,7 @@ typedef struct asl_resource_node * SMALL descriptors */ #define AML_RESOURCE_SMALL_HEADER_COMMON \ - UINT8 DescriptorType; + UINT8 DescriptorType; typedef struct aml_resource_small_header { @@ -196,8 +206,8 @@ typedef struct aml_resource_small_header typedef struct aml_resource_irq { AML_RESOURCE_SMALL_HEADER_COMMON - UINT16 IrqMask; - UINT8 Flags; + UINT16 IrqMask; + UINT8 Flags; } AML_RESOURCE_IRQ; @@ -205,7 +215,7 @@ typedef struct aml_resource_irq typedef struct aml_resource_irq_noflags { AML_RESOURCE_SMALL_HEADER_COMMON - UINT16 IrqMask; + UINT16 IrqMask; } AML_RESOURCE_IRQ_NOFLAGS; @@ -213,8 +223,8 @@ typedef struct aml_resource_irq_noflags typedef struct aml_resource_dma { AML_RESOURCE_SMALL_HEADER_COMMON - UINT8 DmaChannelMask; - UINT8 Flags; + UINT8 DmaChannelMask; + UINT8 Flags; } AML_RESOURCE_DMA; @@ -222,7 +232,7 @@ typedef struct aml_resource_dma typedef struct aml_resource_start_dependent { AML_RESOURCE_SMALL_HEADER_COMMON - UINT8 Flags; + UINT8 Flags; } AML_RESOURCE_START_DEPENDENT; @@ -244,11 +254,11 @@ typedef struct aml_resource_end_dependent typedef struct aml_resource_io { AML_RESOURCE_SMALL_HEADER_COMMON - UINT8 Flags; - UINT16 Minimum; - UINT16 Maximum; - UINT8 Alignment; - UINT8 AddressLength; + UINT8 Flags; + UINT16 Minimum; + UINT16 Maximum; + UINT8 Alignment; + UINT8 AddressLength; } AML_RESOURCE_IO; @@ -256,8 +266,8 @@ typedef struct aml_resource_io typedef struct aml_resource_fixed_io { AML_RESOURCE_SMALL_HEADER_COMMON - UINT16 Address; - UINT8 AddressLength; + UINT16 Address; + UINT8 AddressLength; } AML_RESOURCE_FIXED_IO; @@ -272,7 +282,7 @@ typedef struct aml_resource_vendor_small typedef struct aml_resource_end_tag { AML_RESOURCE_SMALL_HEADER_COMMON - UINT8 Checksum; + UINT8 Checksum; } AML_RESOURCE_END_TAG; @@ -281,8 +291,8 @@ typedef struct aml_resource_end_tag * LARGE descriptors */ #define AML_RESOURCE_LARGE_HEADER_COMMON \ - UINT8 DescriptorType;\ - UINT16 ResourceLength; + UINT8 DescriptorType;\ + UINT16 ResourceLength; typedef struct aml_resource_large_header { @@ -294,11 +304,11 @@ typedef struct aml_resource_large_header typedef struct aml_resource_memory24 { AML_RESOURCE_LARGE_HEADER_COMMON - UINT8 Flags; - UINT16 Minimum; - UINT16 Maximum; - UINT16 Alignment; - UINT16 AddressLength; + UINT8 Flags; + UINT16 Minimum; + UINT16 Maximum; + UINT16 Alignment; + UINT16 AddressLength; } AML_RESOURCE_MEMORY24; @@ -313,11 +323,11 @@ typedef struct aml_resource_vendor_large typedef struct aml_resource_memory32 { AML_RESOURCE_LARGE_HEADER_COMMON - UINT8 Flags; - UINT32 Minimum; - UINT32 Maximum; - UINT32 Alignment; - UINT32 AddressLength; + UINT8 Flags; + UINT32 Minimum; + UINT32 Maximum; + UINT32 Alignment; + UINT32 AddressLength; } AML_RESOURCE_MEMORY32; @@ -325,17 +335,17 @@ typedef struct aml_resource_memory32 typedef struct aml_resource_fixed_memory32 { AML_RESOURCE_LARGE_HEADER_COMMON - UINT8 Flags; - UINT32 Address; - UINT32 AddressLength; + UINT8 Flags; + UINT32 Address; + UINT32 AddressLength; } AML_RESOURCE_FIXED_MEMORY32; #define AML_RESOURCE_ADDRESS_COMMON \ - UINT8 ResourceType; \ - UINT8 Flags; \ - UINT8 SpecificFlags; + UINT8 ResourceType; \ + UINT8 Flags; \ + UINT8 SpecificFlags; typedef struct aml_resource_address @@ -350,14 +360,14 @@ typedef struct aml_resource_extended_address64 { AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON - UINT8 RevisionID; - UINT8 Reserved; - UINT64 Granularity; - UINT64 Minimum; - UINT64 Maximum; - UINT64 TranslationOffset; - UINT64 AddressLength; - UINT64 TypeSpecific; + UINT8 RevisionID; + UINT8 Reserved; + UINT64 Granularity; + UINT64 Minimum; + UINT64 Maximum; + UINT64 TranslationOffset; + UINT64 AddressLength; + UINT64 TypeSpecific; } AML_RESOURCE_EXTENDED_ADDRESS64; @@ -368,11 +378,11 @@ typedef struct aml_resource_address64 { AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON - UINT64 Granularity; - UINT64 Minimum; - UINT64 Maximum; - UINT64 TranslationOffset; - UINT64 AddressLength; + UINT64 Granularity; + UINT64 Minimum; + UINT64 Maximum; + UINT64 TranslationOffset; + UINT64 AddressLength; } AML_RESOURCE_ADDRESS64; @@ -381,11 +391,11 @@ typedef struct aml_resource_address32 { AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON - UINT32 Granularity; - UINT32 Minimum; - UINT32 Maximum; - UINT32 TranslationOffset; - UINT32 AddressLength; + UINT32 Granularity; + UINT32 Minimum; + UINT32 Maximum; + UINT32 TranslationOffset; + UINT32 AddressLength; } AML_RESOURCE_ADDRESS32; @@ -394,11 +404,11 @@ typedef struct aml_resource_address16 { AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON - UINT16 Granularity; - UINT16 Minimum; - UINT16 Maximum; - UINT16 TranslationOffset; - UINT16 AddressLength; + UINT16 Granularity; + UINT16 Minimum; + UINT16 Maximum; + UINT16 TranslationOffset; + UINT16 AddressLength; } AML_RESOURCE_ADDRESS16; @@ -406,9 +416,9 @@ typedef struct aml_resource_address16 typedef struct aml_resource_extended_irq { AML_RESOURCE_LARGE_HEADER_COMMON - UINT8 Flags; - UINT8 InterruptCount; - UINT32 Interrupts[1]; + UINT8 Flags; + UINT8 InterruptCount; + UINT32 Interrupts[1]; /* ResSourceIndex, ResSource optional fields follow */ } AML_RESOURCE_EXTENDED_IRQ; @@ -417,11 +427,11 @@ typedef struct aml_resource_extended_irq typedef struct aml_resource_generic_register { AML_RESOURCE_LARGE_HEADER_COMMON - UINT8 AddressSpaceId; - UINT8 BitWidth; - UINT8 BitOffset; - UINT8 AccessSize; /* ACPI 3.0, was previously Reserved */ - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 BitWidth; + UINT8 BitOffset; + UINT8 AccessSize; /* ACPI 3.0, was previously Reserved */ + UINT64 Address; } AML_RESOURCE_GENERIC_REGISTER; @@ -435,42 +445,42 @@ typedef union aml_resource { /* Descriptor headers */ - AML_RESOURCE_SMALL_HEADER SmallHeader; - AML_RESOURCE_LARGE_HEADER LargeHeader; + UINT8 DescriptorType; + AML_RESOURCE_SMALL_HEADER SmallHeader; + AML_RESOURCE_LARGE_HEADER LargeHeader; /* Small resource descriptors */ - AML_RESOURCE_IRQ Irq; - AML_RESOURCE_DMA Dma; - AML_RESOURCE_START_DEPENDENT StartDpf; - AML_RESOURCE_END_DEPENDENT EndDpf; - AML_RESOURCE_IO Io; - AML_RESOURCE_FIXED_IO FixedIo; - AML_RESOURCE_VENDOR_SMALL VendorSmall; - AML_RESOURCE_END_TAG EndTag; + AML_RESOURCE_IRQ Irq; + AML_RESOURCE_DMA Dma; + AML_RESOURCE_START_DEPENDENT StartDpf; + AML_RESOURCE_END_DEPENDENT EndDpf; + AML_RESOURCE_IO Io; + AML_RESOURCE_FIXED_IO FixedIo; + AML_RESOURCE_VENDOR_SMALL VendorSmall; + AML_RESOURCE_END_TAG EndTag; /* Large resource descriptors */ - AML_RESOURCE_MEMORY24 Memory24; - AML_RESOURCE_GENERIC_REGISTER GenericReg; - AML_RESOURCE_VENDOR_LARGE VendorLarge; - AML_RESOURCE_MEMORY32 Memory32; - AML_RESOURCE_FIXED_MEMORY32 FixedMemory32; - AML_RESOURCE_ADDRESS16 Address16; - AML_RESOURCE_ADDRESS32 Address32; - AML_RESOURCE_ADDRESS64 Address64; - AML_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64; - AML_RESOURCE_EXTENDED_IRQ ExtendedIrq; + AML_RESOURCE_MEMORY24 Memory24; + AML_RESOURCE_GENERIC_REGISTER GenericReg; + AML_RESOURCE_VENDOR_LARGE VendorLarge; + AML_RESOURCE_MEMORY32 Memory32; + AML_RESOURCE_FIXED_MEMORY32 FixedMemory32; + AML_RESOURCE_ADDRESS16 Address16; + AML_RESOURCE_ADDRESS32 Address32; + AML_RESOURCE_ADDRESS64 Address64; + AML_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64; + AML_RESOURCE_EXTENDED_IRQ ExtendedIrq; /* Utility overlays */ - AML_RESOURCE_ADDRESS Address; - UINT32 U32Item; - UINT16 U16Item; - UINT8 U8Item; + AML_RESOURCE_ADDRESS Address; + UINT32 DwordItem; + UINT16 WordItem; + UINT8 ByteItem; } AML_RESOURCE; - #endif |