summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/actypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/actypes.h')
-rw-r--r--sys/contrib/dev/acpica/actypes.h201
1 files changed, 102 insertions, 99 deletions
diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h
index 420ac3b..0b19399 100644
--- a/sys/contrib/dev/acpica/actypes.h
+++ b/sys/contrib/dev/acpica/actypes.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
- * $Revision: 241 $
+ * $Revision: 253 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -131,21 +131,34 @@
#define ACPI_ASCII_MAX 0x7F
+#ifdef DEFINE_ALTERNATE_TYPES
+/*
+ * Types used only in translated source, defined here to enable
+ * cross-platform compilation only.
+ */
+typedef int s32;
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned int u32;
+typedef COMPILER_DEPENDENT_UINT64 u64;
+
+#endif
+
/*
* Data types - Fixed across all compilation models (16/32/64)
*
- * BOOLEAN Logical Boolean.
- * INT8 8-bit (1 byte) signed value
- * UINT8 8-bit (1 byte) unsigned value
- * INT16 16-bit (2 byte) signed value
- * UINT16 16-bit (2 byte) unsigned value
- * INT32 32-bit (4 byte) signed value
- * UINT32 32-bit (4 byte) unsigned value
- * INT64 64-bit (8 byte) signed value
- * UINT64 64-bit (8 byte) unsigned value
- * NATIVE_INT 32-bit on IA-32, 64-bit on IA-64 signed value
- * NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value
+ * BOOLEAN Logical Boolean.
+ * INT8 8-bit (1 byte) signed value
+ * UINT8 8-bit (1 byte) unsigned value
+ * INT16 16-bit (2 byte) signed value
+ * UINT16 16-bit (2 byte) unsigned value
+ * INT32 32-bit (4 byte) signed value
+ * UINT32 32-bit (4 byte) unsigned value
+ * INT64 64-bit (8 byte) signed value
+ * UINT64 64-bit (8 byte) unsigned value
+ * ACPI_NATIVE_INT 32-bit on IA-32, 64-bit on IA-64 signed value
+ * ACPI_NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value
*/
#ifndef ACPI_MACHINE_WIDTH
@@ -153,6 +166,9 @@
#endif
#if ACPI_MACHINE_WIDTH == 64
+
+/*! [Begin] no source code translation (keep the typedefs) */
+
/*
* 64-bit type definitions
*/
@@ -164,13 +180,12 @@ typedef unsigned int UINT32;
typedef COMPILER_DEPENDENT_INT64 INT64;
typedef COMPILER_DEPENDENT_UINT64 UINT64;
-typedef INT64 NATIVE_INT;
-typedef UINT64 NATIVE_UINT;
+/*! [End] no source code translation !*/
-typedef UINT32 NATIVE_UINT_MAX32;
-typedef UINT64 NATIVE_UINT_MIN32;
+typedef INT64 ACPI_NATIVE_INT;
+typedef UINT64 ACPI_NATIVE_UINT;
-typedef UINT64 ACPI_TBLPTR;
+typedef UINT64 ACPI_TABLE_PTR;
typedef UINT64 ACPI_IO_ADDRESS;
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
typedef UINT64 ACPI_SIZE;
@@ -183,6 +198,8 @@ typedef UINT64 ACPI_SIZE;
#elif ACPI_MACHINE_WIDTH == 16
+/*! [Begin] no source code translation (keep the typedefs) */
+
/*
* 16-bit type definitions
*/
@@ -200,13 +217,12 @@ typedef struct
} UINT64;
-typedef UINT16 NATIVE_UINT;
-typedef INT16 NATIVE_INT;
+/*! [End] no source code translation !*/
-typedef UINT16 NATIVE_UINT_MAX32;
-typedef UINT32 NATIVE_UINT_MIN32;
+typedef UINT16 ACPI_NATIVE_UINT;
+typedef INT16 ACPI_NATIVE_INT;
-typedef UINT32 ACPI_TBLPTR;
+typedef UINT32 ACPI_TABLE_PTR;
typedef UINT32 ACPI_IO_ADDRESS;
typedef char *ACPI_PHYSICAL_ADDRESS;
typedef UINT16 ACPI_SIZE;
@@ -226,6 +242,8 @@ typedef UINT16 ACPI_SIZE;
#elif ACPI_MACHINE_WIDTH == 32
+/*! [Begin] no source code translation (keep the typedefs) */
+
/*
* 32-bit type definitions (default)
*/
@@ -237,13 +255,12 @@ typedef unsigned int UINT32;
typedef COMPILER_DEPENDENT_INT64 INT64;
typedef COMPILER_DEPENDENT_UINT64 UINT64;
-typedef INT32 NATIVE_INT;
-typedef UINT32 NATIVE_UINT;
+/*! [End] no source code translation !*/
-typedef UINT32 NATIVE_UINT_MAX32;
-typedef UINT32 NATIVE_UINT_MIN32;
+typedef INT32 ACPI_NATIVE_INT;
+typedef UINT32 ACPI_NATIVE_UINT;
-typedef UINT64 ACPI_TBLPTR;
+typedef UINT64 ACPI_TABLE_PTR;
typedef UINT32 ACPI_IO_ADDRESS;
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
typedef UINT32 ACPI_SIZE;
@@ -262,40 +279,24 @@ typedef UINT32 ACPI_SIZE;
* Miscellaneous common types
*/
typedef UINT32 UINT32_BIT;
-typedef NATIVE_UINT ACPI_PTRDIFF;
-typedef char NATIVE_CHAR;
-
-
-#ifdef DEFINE_ALTERNATE_TYPES
-/*
- * Types used only in translated source, defined here to enable
- * cross-platform compilation only.
- */
-typedef INT32 s32;
-typedef UINT8 u8;
-typedef UINT16 u16;
-typedef UINT32 u32;
-typedef UINT64 u64;
-#endif
-/*! [End] no source code translation !*/
-
+typedef ACPI_NATIVE_UINT ACPI_PTRDIFF;
/*
* Pointer overlays to avoid lots of typecasting for
* code that accepts both physical and logical pointers.
*/
-typedef union acpi_ptrs
+typedef union acpi_pointers
{
ACPI_PHYSICAL_ADDRESS Physical;
void *Logical;
- ACPI_TBLPTR Value;
+ ACPI_TABLE_PTR Value;
} ACPI_POINTERS;
-typedef struct AcpiPointer
+typedef struct acpi_pointer
{
UINT32 PointerType;
- union acpi_ptrs Pointer;
+ union acpi_pointers Pointer;
} ACPI_POINTER;
@@ -338,24 +339,24 @@ typedef struct AcpiPointer
*/
typedef UINT32 ACPI_STATUS; /* All ACPI Exceptions */
typedef UINT32 ACPI_NAME; /* 4-byte ACPI name */
-typedef char* ACPI_STRING; /* Null terminated ASCII string */
-typedef void* ACPI_HANDLE; /* Actually a ptr to an Node */
+typedef char * ACPI_STRING; /* Null terminated ASCII string */
+typedef void * ACPI_HANDLE; /* Actually a ptr to an Node */
-typedef struct
+typedef struct uint64_struct
{
UINT32 Lo;
UINT32 Hi;
} UINT64_STRUCT;
-typedef union
+typedef union uint64_overlay
{
UINT64 Full;
UINT64_STRUCT Part;
} UINT64_OVERLAY;
-typedef struct
+typedef struct uint32_struct
{
UINT32 Lo;
UINT32 Hi;
@@ -520,9 +521,9 @@ typedef UINT32 ACPI_OBJECT_TYPE;
#define ACPI_TYPE_EXTERNAL_MAX 0x10
/*
- * These are object types that do not map directly to the ACPI
- * ObjectType() operator. They are used for various internal purposes only.
- * If new predefined ACPI_TYPEs are added (via the ACPI specification), these
+ * These are object types that do not map directly to the ACPI
+ * ObjectType() operator. They are used for various internal purposes only.
+ * If new predefined ACPI_TYPEs are added (via the ACPI specification), these
* internal types must move upwards. (There is code that depends on these
* values being contiguous with the external types above.)
*/
@@ -670,6 +671,7 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
#define ACPI_ADR_SPACE_CMOS (ACPI_ADR_SPACE_TYPE) 5
#define ACPI_ADR_SPACE_PCI_BAR_TARGET (ACPI_ADR_SPACE_TYPE) 6
#define ACPI_ADR_SPACE_DATA_TABLE (ACPI_ADR_SPACE_TYPE) 7
+#define ACPI_ADR_SPACE_FIXED_HARDWARE (ACPI_ADR_SPACE_TYPE) 127
/*
@@ -707,7 +709,7 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
/*
* External ACPI object definition
*/
-typedef union AcpiObj
+typedef union acpi_object
{
ACPI_OBJECT_TYPE Type; /* See definition of AcpiNsType for values */
struct
@@ -720,7 +722,7 @@ typedef union AcpiObj
{
ACPI_OBJECT_TYPE Type;
UINT32 Length; /* # of bytes in string, excluding trailing null */
- NATIVE_CHAR *Pointer; /* points to the string value */
+ char *Pointer; /* points to the string value */
} String;
struct
@@ -741,7 +743,7 @@ typedef union AcpiObj
{
ACPI_OBJECT_TYPE Type;
UINT32 Count; /* # of elements in package */
- union AcpiObj *Elements; /* Pointer to an array of ACPI_OBJECTs */
+ union acpi_object *Elements; /* Pointer to an array of ACPI_OBJECTs */
} Package;
struct
@@ -765,7 +767,7 @@ typedef union AcpiObj
/*
* List of objects, used as a parameter list for control method evaluation
*/
-typedef struct AcpiObjList
+typedef struct acpi_object_list
{
UINT32 Count;
ACPI_OBJECT *Pointer;
@@ -780,7 +782,7 @@ typedef struct AcpiObjList
#define ACPI_ALLOCATE_BUFFER (ACPI_SIZE) (-1)
#define ACPI_ALLOCATE_LOCAL_BUFFER (ACPI_SIZE) (-2)
-typedef struct
+typedef struct acpi_buffer
{
ACPI_SIZE Length; /* Length in bytes of the buffer */
void *Pointer; /* pointer to buffer */
@@ -808,7 +810,7 @@ typedef struct
/*
* ACPI Table Info. One per ACPI table _type_
*/
-typedef struct AcpiTableInfo
+typedef struct acpi_table_info
{
UINT32 Count;
@@ -818,7 +820,7 @@ typedef struct AcpiTableInfo
/*
* System info returned by AcpiGetSystemInfo()
*/
-typedef struct _AcpiSysInfo
+typedef struct acpi_system_info
{
UINT32 AcpiCaVersion;
UINT32 Flags;
@@ -915,48 +917,47 @@ ACPI_STATUS (*ACPI_WALK_CALLBACK) (
ACPI_NAME Name /* ACPI object Name */
-typedef struct
+typedef struct acpi_obj_info_header
{
ACPI_COMMON_OBJ_INFO;
+
} ACPI_OBJ_INFO_HEADER;
-typedef struct
+typedef struct acpi_device_info
{
ACPI_COMMON_OBJ_INFO;
UINT32 Valid; /* Are the next bits legit? */
- NATIVE_CHAR HardwareId[9]; /* _HID value if any */
- NATIVE_CHAR UniqueId[9]; /* _UID value if any */
+ char HardwareId[9]; /* _HID value if any */
+ char UniqueId[9]; /* _UID value if any */
ACPI_INTEGER Address; /* _ADR value if any */
UINT32 CurrentStatus; /* _STA value */
+
} ACPI_DEVICE_INFO;
/* Context structs for address space handlers */
-typedef struct
+typedef struct acpi_pci_id
{
UINT16 Segment;
UINT16 Bus;
UINT16 Device;
UINT16 Function;
+
} ACPI_PCI_ID;
-typedef struct
+typedef struct acpi_mem_space_context
{
UINT32 Length;
ACPI_PHYSICAL_ADDRESS Address;
ACPI_PHYSICAL_ADDRESS MappedPhysicalAddress;
UINT8 *MappedLogicalAddress;
ACPI_SIZE MappedLength;
-} ACPI_MEM_SPACE_CONTEXT;
-
-/* Sleep states */
-
-#define ACPI_NUM_SLEEP_STATES 7
+} ACPI_MEM_SPACE_CONTEXT;
/*
@@ -983,6 +984,8 @@ typedef struct
#define ACPI_ISA_ONLY_RANGES (UINT8) 0x02
#define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
+#define ACPI_SPARSE_TRANSLATION (UINT8) 0x03
+
/*
* IO Port Descriptor Decode
*/
@@ -1043,7 +1046,7 @@ typedef struct
/*
* Structures used to describe device resources
*/
-typedef struct
+typedef struct acpi_resource_irq
{
UINT32 EdgeLevel;
UINT32 ActiveHighLow;
@@ -1053,7 +1056,7 @@ typedef struct
} ACPI_RESOURCE_IRQ;
-typedef struct
+typedef struct ACPI_RESOURCE_DMA
{
UINT32 Type;
UINT32 BusMaster;
@@ -1063,7 +1066,7 @@ typedef struct
} ACPI_RESOURCE_DMA;
-typedef struct
+typedef struct acpi_resource_start_dpf
{
UINT32 CompatibilityPriority;
UINT32 PerformanceRobustness;
@@ -1075,7 +1078,7 @@ typedef struct
* needed because it has no fields
*/
-typedef struct
+typedef struct acpi_resource_io
{
UINT32 IoDecode;
UINT32 MinBaseAddress;
@@ -1085,27 +1088,27 @@ typedef struct
} ACPI_RESOURCE_IO;
-typedef struct
+typedef struct acpi_resource_fixed_io
{
UINT32 BaseAddress;
UINT32 RangeLength;
} ACPI_RESOURCE_FIXED_IO;
-typedef struct
+typedef struct acpi_resource_vendor
{
UINT32 Length;
UINT8 Reserved[1];
} ACPI_RESOURCE_VENDOR;
-typedef struct
+typedef struct acpi_resource_end_tag
{
UINT8 Checksum;
} ACPI_RESOURCE_END_TAG;
-typedef struct
+typedef struct acpi_resource_mem24
{
UINT32 ReadWriteAttribute;
UINT32 MinBaseAddress;
@@ -1115,7 +1118,7 @@ typedef struct
} ACPI_RESOURCE_MEM24;
-typedef struct
+typedef struct acpi_resource_mem32
{
UINT32 ReadWriteAttribute;
UINT32 MinBaseAddress;
@@ -1125,7 +1128,7 @@ typedef struct
} ACPI_RESOURCE_MEM32;
-typedef struct
+typedef struct acpi_resource_fixed_mem32
{
UINT32 ReadWriteAttribute;
UINT32 RangeBaseAddress;
@@ -1133,28 +1136,28 @@ typedef struct
} ACPI_RESOURCE_FIXED_MEM32;
-typedef struct
+typedef struct acpi_memory_attribute
{
UINT16 CacheAttribute;
UINT16 ReadWriteAttribute;
} ACPI_MEMORY_ATTRIBUTE;
-typedef struct
+typedef struct acpi_io_attribute
{
UINT16 RangeAttribute;
- UINT16 Reserved;
+ UINT16 TranslationAttribute;
} ACPI_IO_ATTRIBUTE;
-typedef struct
+typedef struct acpi_bus_attribute
{
UINT16 Reserved1;
UINT16 Reserved2;
} ACPI_BUS_ATTRIBUTE;
-typedef union
+typedef union acpi_resource_attribute
{
ACPI_MEMORY_ATTRIBUTE Memory;
ACPI_IO_ATTRIBUTE Io;
@@ -1162,15 +1165,15 @@ typedef union
} ACPI_RESOURCE_ATTRIBUTE;
-typedef struct
+typedef struct acpi_resource_source
{
UINT32 Index;
UINT32 StringLength;
- NATIVE_CHAR *StringPtr;
+ char *StringPtr;
} ACPI_RESOURCE_SOURCE;
-typedef struct
+typedef struct acpi_resource_address16
{
UINT32 ResourceType;
UINT32 ProducerConsumer;
@@ -1187,7 +1190,7 @@ typedef struct
} ACPI_RESOURCE_ADDRESS16;
-typedef struct
+typedef struct acpi_resource_address32
{
UINT32 ResourceType;
UINT32 ProducerConsumer;
@@ -1204,7 +1207,7 @@ typedef struct
} ACPI_RESOURCE_ADDRESS32;
-typedef struct
+typedef struct acpi_resource_address64
{
UINT32 ResourceType;
UINT32 ProducerConsumer;
@@ -1221,7 +1224,7 @@ typedef struct
} ACPI_RESOURCE_ADDRESS64;
-typedef struct
+typedef struct acpi_resource_ext_irq
{
UINT32 ProducerConsumer;
UINT32 EdgeLevel;
@@ -1254,7 +1257,7 @@ typedef struct
typedef UINT32 ACPI_RESOURCE_TYPE;
-typedef union
+typedef union acpi_resource_data
{
ACPI_RESOURCE_IRQ Irq;
ACPI_RESOURCE_DMA Dma;
@@ -1273,7 +1276,7 @@ typedef union
} ACPI_RESOURCE_DATA;
-typedef struct AcpiResource
+typedef struct acpi_resource
{
ACPI_RESOURCE_TYPE Id;
UINT32 Length;
@@ -1305,7 +1308,7 @@ typedef struct acpi_pci_routing_table
UINT32 Pin;
ACPI_INTEGER Address; /* here for 64-bit alignment */
UINT32 SourceIndex;
- NATIVE_CHAR Source[4]; /* pad to 64 bits so sizeof() works in all cases */
+ char Source[4]; /* pad to 64 bits so sizeof() works in all cases */
} ACPI_PCI_ROUTING_TABLE;
OpenPOWER on IntegriCloud