diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2002-07-09 17:51:31 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2002-07-09 17:51:31 +0000 |
commit | 80fd7f7b7e25faf86d25d2c97b3a0dfbedb12552 (patch) | |
tree | ea70a54a7d2f53270d0147b285a5fa912b760051 /sys/contrib/dev/acpica/actypes.h | |
parent | 6b92cff93be2b7ae83deb340b753b02444cdcacd (diff) | |
download | FreeBSD-src-80fd7f7b7e25faf86d25d2c97b3a0dfbedb12552.zip FreeBSD-src-80fd7f7b7e25faf86d25d2c97b3a0dfbedb12552.tar.gz |
Vendor import of the Intel ACPI CA 20020611 drop.
Diffstat (limited to 'sys/contrib/dev/acpica/actypes.h')
-rw-r--r-- | sys/contrib/dev/acpica/actypes.h | 122 |
1 files changed, 92 insertions, 30 deletions
diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h index a7a99bb..dbff910 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: 227 $ + * $Revision: 237 $ * *****************************************************************************/ @@ -119,13 +119,23 @@ /*! [Begin] no source code translation (keep the typedefs) */ + + +/* + * Data type ranges + */ +#define ACPI_UINT8_MAX (UINT8) 0xFF +#define ACPI_UINT16_MAX (UINT16) 0xFFFF +#define ACPI_UINT32_MAX (UINT32) 0xFFFFFFFF +#define ACPI_UINT64_MAX (UINT64) 0xFFFFFFFFFFFFFFFF +#define ACPI_ASCII_MAX 0x7F + + + /* * Data types - Fixed across all compilation models * * BOOLEAN Logical Boolean. - * 1 byte value containing a 0 for FALSE or a 1 for TRUE. - * Other values are undefined. - * * INT8 8-bit (1 byte) signed value * UINT8 8-bit (1 byte) unsigned value * INT16 16-bit (2 byte) signed value @@ -138,8 +148,11 @@ * NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value */ +#ifndef ACPI_MACHINE_WIDTH +#error ACPI_MACHINE_WIDTH not defined +#endif -#ifdef _IA64 +#if ACPI_MACHINE_WIDTH == 64 /* * 64-bit type definitions */ @@ -151,8 +164,11 @@ typedef unsigned int UINT32; typedef COMPILER_DEPENDENT_INT64 INT64; typedef COMPILER_DEPENDENT_UINT64 UINT64; +typedef INT64 NATIVE_INT; typedef UINT64 NATIVE_UINT; -typedef UINT64 NATIVE_INT; + +typedef UINT32 NATIVE_UINT_MAX32; +typedef UINT64 NATIVE_UINT_MIN32; typedef UINT64 ACPI_TBLPTR; typedef UINT64 ACPI_IO_ADDRESS; @@ -161,10 +177,11 @@ typedef UINT64 ACPI_SIZE; #define ALIGNED_ADDRESS_BOUNDARY 0x00000008 /* No hardware alignment support in IA64 */ #define ACPI_USE_NATIVE_DIVIDE /* Native 64-bit integer support */ -#define ACPI_MAX_PTR 0xFFFFFFFFFFFFFFFF +#define ACPI_MAX_PTR ACPI_UINT64_MAX +#define ACPI_SIZE_MAX ACPI_UINT64_MAX -#elif _IA16 +#elif ACPI_MACHINE_WIDTH == 16 /* * 16-bit type definitions */ @@ -185,15 +202,19 @@ typedef struct typedef UINT16 NATIVE_UINT; typedef INT16 NATIVE_INT; +typedef UINT16 NATIVE_UINT_MAX32; +typedef UINT32 NATIVE_UINT_MIN32; + typedef UINT32 ACPI_TBLPTR; typedef UINT32 ACPI_IO_ADDRESS; typedef char *ACPI_PHYSICAL_ADDRESS; -typedef UINT32 ACPI_SIZE; +typedef UINT16 ACPI_SIZE; #define ALIGNED_ADDRESS_BOUNDARY 0x00000002 #define _HW_ALIGNMENT_SUPPORT #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ -#define ACPI_MAX_PTR 0xFFFF +#define ACPI_MAX_PTR ACPI_UINT16_MAX +#define ACPI_SIZE_MAX ACPI_UINT16_MAX /* * (16-bit only) internal integers must be 32-bits, so @@ -202,7 +223,7 @@ typedef UINT32 ACPI_SIZE; #define ACPI_NO_INTEGER64_SUPPORT -#else +#elif ACPI_MACHINE_WIDTH == 32 /* * 32-bit type definitions (default) */ @@ -214,8 +235,11 @@ typedef unsigned int UINT32; typedef COMPILER_DEPENDENT_INT64 INT64; typedef COMPILER_DEPENDENT_UINT64 UINT64; -typedef UINT32 NATIVE_UINT; typedef INT32 NATIVE_INT; +typedef UINT32 NATIVE_UINT; + +typedef UINT32 NATIVE_UINT_MAX32; +typedef UINT32 NATIVE_UINT_MIN32; typedef UINT64 ACPI_TBLPTR; typedef UINT32 ACPI_IO_ADDRESS; @@ -224,9 +248,12 @@ typedef UINT32 ACPI_SIZE; #define ALIGNED_ADDRESS_BOUNDARY 0x00000004 #define _HW_ALIGNMENT_SUPPORT -#define ACPI_MAX_PTR 0xFFFFFFFF -#endif +#define ACPI_MAX_PTR ACPI_UINT32_MAX +#define ACPI_SIZE_MAX ACPI_UINT32_MAX +#else +#error unknown ACPI_MACHINE_WIDTH +#endif /* @@ -238,16 +265,6 @@ typedef NATIVE_UINT ACPI_PTRDIFF; typedef char NATIVE_CHAR; -/* - * Data type ranges - */ -#define ACPI_UINT8_MAX (UINT8) 0xFF -#define ACPI_UINT16_MAX (UINT16) 0xFFFF -#define ACPI_UINT32_MAX (UINT32) 0xFFFFFFFF -#define ACPI_UINT64_MAX (UINT64) 0xFFFFFFFFFFFFFFFF -#define ACPI_ASCII_MAX 0x7F - - #ifdef DEFINE_ALTERNATE_TYPES /* * Types used only in translated source, defined here to enable @@ -266,7 +283,7 @@ typedef UINT64 u64; * Pointer overlays to avoid lots of typecasting for * code that accepts both physical and logical pointers. */ -typedef union AcpiPointers +typedef union acpi_ptrs { ACPI_PHYSICAL_ADDRESS Physical; void *Logical; @@ -277,7 +294,7 @@ typedef union AcpiPointers typedef struct AcpiPointer { UINT32 PointerType; - ACPI_POINTERS Pointer; + union acpi_ptrs Pointer; } ACPI_POINTER; @@ -329,6 +346,13 @@ typedef union } UINT64_OVERLAY; +typedef struct +{ + UINT32 Lo; + UINT32 Hi; + +} UINT32_STRUCT; + /* * Acpi integer width. In ACPI version 1, integers are @@ -362,7 +386,7 @@ typedef UINT64 ACPI_INTEGER; #define ACPI_MAX_BCD_DIGITS 16 #define ACPI_MAX_DECIMAL_DIGITS 19 -#ifdef _IA64 +#if ACPI_MACHINE_WIDTH == 64 #define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 64-bit divide */ #endif #endif @@ -372,7 +396,7 @@ typedef UINT64 ACPI_INTEGER; * Constants with special meanings */ -#define ACPI_ROOT_OBJECT (ACPI_HANDLE) ACPI_PTR_ADD (char, NULL, ACPI_UINT32_MAX) +#define ACPI_ROOT_OBJECT (ACPI_HANDLE) ACPI_PTR_ADD (char, NULL, ACPI_MAX_PTR) /* @@ -653,6 +677,37 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE; /* + * BitRegister IDs + * These are bitfields defined within the full ACPI registers + */ +#define ACPI_BITREG_TIMER_STATUS 0x00 +#define ACPI_BITREG_BUS_MASTER_STATUS 0x01 +#define ACPI_BITREG_GLOBAL_LOCK_STATUS 0x02 +#define ACPI_BITREG_POWER_BUTTON_STATUS 0x03 +#define ACPI_BITREG_SLEEP_BUTTON_STATUS 0x04 +#define ACPI_BITREG_RT_CLOCK_STATUS 0x05 +#define ACPI_BITREG_WAKE_STATUS 0x06 + +#define ACPI_BITREG_TIMER_ENABLE 0x07 +#define ACPI_BITREG_GLOBAL_LOCK_ENABLE 0x08 +#define ACPI_BITREG_POWER_BUTTON_ENABLE 0x09 +#define ACPI_BITREG_SLEEP_BUTTON_ENABLE 0x0A +#define ACPI_BITREG_RT_CLOCK_ENABLE 0x0B +#define ACPI_BITREG_WAKE_ENABLE 0x0C + +#define ACPI_BITREG_SCI_ENABLE 0x0D +#define ACPI_BITREG_BUS_MASTER_RLD 0x0E +#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x0F +#define ACPI_BITREG_SLEEP_TYPE_A 0x10 +#define ACPI_BITREG_SLEEP_TYPE_B 0x11 +#define ACPI_BITREG_SLEEP_ENABLE 0x12 + +#define ACPI_BITREG_ARB_DISABLE 0x13 + +#define ACPI_BITREG_MAX 0x13 +#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1 + +/* * External ACPI object definition */ @@ -811,6 +866,13 @@ void (*ACPI_OBJECT_HANDLER) ( UINT32 Function, void *Data); +typedef +ACPI_STATUS (*ACPI_INIT_HANDLER) ( + ACPI_HANDLE Object, + UINT32 Function); + +#define ACPI_INIT_DEVICE_INI 1 + /* Address Spaces (Operation Regions */ @@ -823,7 +885,7 @@ ACPI_STATUS (*ACPI_ADR_SPACE_HANDLER) ( void *HandlerContext, void *RegionContext); -#define ACPI_DEFAULT_HANDLER ((ACPI_ADR_SPACE_HANDLER) NULL) +#define ACPI_DEFAULT_HANDLER NULL typedef @@ -898,7 +960,7 @@ typedef struct ACPI_PHYSICAL_ADDRESS Address; ACPI_PHYSICAL_ADDRESS MappedPhysicalAddress; UINT8 *MappedLogicalAddress; - UINT32 MappedLength; + ACPI_SIZE MappedLength; } ACPI_MEM_SPACE_CONTEXT; |