167754Smsmith/****************************************************************************** 267754Smsmith * 367754Smsmith * Name: actypes.h - Common data types for the entire ACPI subsystem 467754Smsmith * 567754Smsmith *****************************************************************************/ 667754Smsmith 7217365Sjkim/* 8245582Sjkim * Copyright (C) 2000 - 2013, Intel Corp. 970243Smsmith * All rights reserved. 1067754Smsmith * 11217365Sjkim * Redistribution and use in source and binary forms, with or without 12217365Sjkim * modification, are permitted provided that the following conditions 13217365Sjkim * are met: 14217365Sjkim * 1. Redistributions of source code must retain the above copyright 15217365Sjkim * notice, this list of conditions, and the following disclaimer, 16217365Sjkim * without modification. 17217365Sjkim * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18217365Sjkim * substantially similar to the "NO WARRANTY" disclaimer below 19217365Sjkim * ("Disclaimer") and any redistribution must be conditioned upon 20217365Sjkim * including a substantially similar Disclaimer requirement for further 21217365Sjkim * binary redistribution. 22217365Sjkim * 3. Neither the names of the above-listed copyright holders nor the names 23217365Sjkim * of any contributors may be used to endorse or promote products derived 24217365Sjkim * from this software without specific prior written permission. 2567754Smsmith * 26217365Sjkim * Alternatively, this software may be distributed under the terms of the 27217365Sjkim * GNU General Public License ("GPL") version 2 as published by the Free 28217365Sjkim * Software Foundation. 2967754Smsmith * 30217365Sjkim * NO WARRANTY 31217365Sjkim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32217365Sjkim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33217365Sjkim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34217365Sjkim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35217365Sjkim * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36217365Sjkim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37217365Sjkim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38217365Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39217365Sjkim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40217365Sjkim * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41217365Sjkim * POSSIBILITY OF SUCH DAMAGES. 42217365Sjkim */ 4367754Smsmith 4467754Smsmith#ifndef __ACTYPES_H__ 4567754Smsmith#define __ACTYPES_H__ 4667754Smsmith 47167802Sjkim/* acpisrc:StructDefs -- for acpisrc conversion */ 4867754Smsmith 49167802Sjkim/* 50167802Sjkim * ACPI_MACHINE_WIDTH must be specified in an OS- or compiler-dependent header 51167802Sjkim * and must be either 32 or 64. 16-bit ACPICA is no longer supported, as of 52167802Sjkim * 12/2006. 53167802Sjkim */ 54167802Sjkim#ifndef ACPI_MACHINE_WIDTH 55167802Sjkim#error ACPI_MACHINE_WIDTH not defined 56167802Sjkim#endif 5799679Siwasaki 58167802Sjkim/*! [Begin] no source code translation */ 5999679Siwasaki 6067754Smsmith/* 6199679Siwasaki * Data type ranges 62117521Snjl * Note: These macros are designed to be compiler independent as well as 63117521Snjl * working around problems that some 32-bit compilers have with 64-bit 64117521Snjl * constants. 6599679Siwasaki */ 66117521Snjl#define ACPI_UINT8_MAX (UINT8) (~((UINT8) 0)) /* 0xFF */ 67117521Snjl#define ACPI_UINT16_MAX (UINT16)(~((UINT16) 0)) /* 0xFFFF */ 68117521Snjl#define ACPI_UINT32_MAX (UINT32)(~((UINT32) 0)) /* 0xFFFFFFFF */ 69117521Snjl#define ACPI_UINT64_MAX (UINT64)(~((UINT64) 0)) /* 0xFFFFFFFFFFFFFFFF */ 7099679Siwasaki#define ACPI_ASCII_MAX 0x7F 7199679Siwasaki 7299679Siwasaki 73114237Snjl/* 74167802Sjkim * Architecture-specific ACPICA Subsystem Data Types 75167802Sjkim * 76167802Sjkim * The goal of these types is to provide source code portability across 77167802Sjkim * 16-bit, 32-bit, and 64-bit targets. 78167802Sjkim * 79167802Sjkim * 1) The following types are of fixed size for all targets (16/32/64): 80167802Sjkim * 81167802Sjkim * BOOLEAN Logical boolean 82167802Sjkim * 83167802Sjkim * UINT8 8-bit (1 byte) unsigned value 84167802Sjkim * UINT16 16-bit (2 byte) unsigned value 85167802Sjkim * UINT32 32-bit (4 byte) unsigned value 86167802Sjkim * UINT64 64-bit (8 byte) unsigned value 87167802Sjkim * 88167802Sjkim * INT16 16-bit (2 byte) signed value 89167802Sjkim * INT32 32-bit (4 byte) signed value 90167802Sjkim * INT64 64-bit (8 byte) signed value 91167802Sjkim * 92167802Sjkim * COMPILER_DEPENDENT_UINT64/INT64 - These types are defined in the 93167802Sjkim * compiler-dependent header(s) and were introduced because there is no common 94167802Sjkim * 64-bit integer type across the various compilation models, as shown in 95167802Sjkim * the table below. 96167802Sjkim * 97167802Sjkim * Datatype LP64 ILP64 LLP64 ILP32 LP32 16bit 98167802Sjkim * char 8 8 8 8 8 8 99167802Sjkim * short 16 16 16 16 16 16 100167802Sjkim * _int32 32 101167802Sjkim * int 32 64 32 32 16 16 102167802Sjkim * long 64 64 32 32 32 32 103167802Sjkim * long long 64 64 104167802Sjkim * pointer 64 64 64 32 32 32 105167802Sjkim * 106167802Sjkim * Note: ILP64 and LP32 are currently not supported. 107167802Sjkim * 108167802Sjkim * 109167802Sjkim * 2) These types represent the native word size of the target mode of the 110167802Sjkim * processor, and may be 16-bit, 32-bit, or 64-bit as required. They are 111167802Sjkim * usually used for memory allocation, efficient loop counters, and array 112167802Sjkim * indexes. The types are similar to the size_t type in the C library and are 113167802Sjkim * required because there is no C type that consistently represents the native 114193267Sjkim * data width. ACPI_SIZE is needed because there is no guarantee that a 115193267Sjkim * kernel-level C library is present. 116167802Sjkim * 117167802Sjkim * ACPI_SIZE 16/32/64-bit unsigned value 118167802Sjkim * ACPI_NATIVE_INT 16/32/64-bit signed value 119114237Snjl */ 12099679Siwasaki 121167802Sjkim/******************************************************************************* 122167802Sjkim * 123167802Sjkim * Common types for all compilers, all targets 124167802Sjkim * 125167802Sjkim ******************************************************************************/ 126114237Snjl 127167802Sjkimtypedef unsigned char BOOLEAN; 128167802Sjkimtypedef unsigned char UINT8; 129167802Sjkimtypedef unsigned short UINT16; 130167802Sjkimtypedef COMPILER_DEPENDENT_UINT64 UINT64; 131167802Sjkimtypedef COMPILER_DEPENDENT_INT64 INT64; 132114237Snjl 133167802Sjkim/*! [End] no source code translation !*/ 134167802Sjkim 135212761Sjkim/* 136212761Sjkim * Value returned by AcpiOsGetThreadId. There is no standard "thread_id" 137212761Sjkim * across operating systems or even the various UNIX systems. Since ACPICA 138212761Sjkim * only needs the thread ID as a unique thread identifier, we use a UINT64 139212761Sjkim * as the only common data type - it will accommodate any type of pointer or 140212761Sjkim * any type of integer. It is up to the host-dependent OSL to cast the 141212761Sjkim * native thread ID type to a UINT64 (in AcpiOsGetThreadId). 142212761Sjkim */ 143212761Sjkim#define ACPI_THREAD_ID UINT64 144167802Sjkim 145212761Sjkim 146167802Sjkim/******************************************************************************* 14767754Smsmith * 148167802Sjkim * Types specific to 64-bit targets 149167802Sjkim * 150167802Sjkim ******************************************************************************/ 15167754Smsmith 15299679Siwasaki#if ACPI_MACHINE_WIDTH == 64 153114237Snjl 154167802Sjkim/*! [Begin] no source code translation (keep the typedefs as-is) */ 155114237Snjl 156167802Sjkimtypedef unsigned int UINT32; 15767754Smsmithtypedef int INT32; 15867754Smsmith 159114237Snjl/*! [End] no source code translation !*/ 16067754Smsmith 161167802Sjkim 162114237Snjltypedef INT64 ACPI_NATIVE_INT; 163193267Sjkimtypedef UINT64 ACPI_SIZE; 16467754Smsmithtypedef UINT64 ACPI_IO_ADDRESS; 16569450Smsmithtypedef UINT64 ACPI_PHYSICAL_ADDRESS; 16667754Smsmith 16799679Siwasaki#define ACPI_MAX_PTR ACPI_UINT64_MAX 16899679Siwasaki#define ACPI_SIZE_MAX ACPI_UINT64_MAX 169167802Sjkim#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ 170167802Sjkim 171151937Sjkim/* 172151937Sjkim * In the case of the Itanium Processor Family (IPF), the hardware does not 173151937Sjkim * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag 174151937Sjkim * to indicate that special precautions must be taken to avoid alignment faults. 175151937Sjkim * (IA64 or ia64 is currently used by existing compilers to indicate IPF.) 176151937Sjkim * 177167802Sjkim * Note: EM64T and other X86-64 processors support misaligned transfers, 178151937Sjkim * so there is no need to define this flag. 179151937Sjkim */ 180151937Sjkim#if defined (__IA64__) || defined (__ia64__) 181151937Sjkim#define ACPI_MISALIGNMENT_NOT_SUPPORTED 182151937Sjkim#endif 18367754Smsmith 184107325Siwasaki 185167802Sjkim/******************************************************************************* 186167802Sjkim * 187167802Sjkim * Types specific to 32-bit targets 188167802Sjkim * 189167802Sjkim ******************************************************************************/ 190114237Snjl 19199679Siwasaki#elif ACPI_MACHINE_WIDTH == 32 192107325Siwasaki 193167802Sjkim/*! [Begin] no source code translation (keep the typedefs as-is) */ 194114237Snjl 195167802Sjkimtypedef unsigned int UINT32; 19667754Smsmithtypedef int INT32; 19767754Smsmith 198114237Snjl/*! [End] no source code translation !*/ 19967754Smsmith 200167802Sjkim 201114237Snjltypedef INT32 ACPI_NATIVE_INT; 202193267Sjkimtypedef UINT32 ACPI_SIZE; 20367754Smsmithtypedef UINT32 ACPI_IO_ADDRESS; 204167802Sjkimtypedef UINT32 ACPI_PHYSICAL_ADDRESS; 20567754Smsmith 20699679Siwasaki#define ACPI_MAX_PTR ACPI_UINT32_MAX 20799679Siwasaki#define ACPI_SIZE_MAX ACPI_UINT32_MAX 20899679Siwasaki 20999679Siwasaki#else 210167802Sjkim 211167802Sjkim/* ACPI_MACHINE_WIDTH must be either 64 or 32 */ 212167802Sjkim 21399679Siwasaki#error unknown ACPI_MACHINE_WIDTH 21467754Smsmith#endif 21567754Smsmith 21667754Smsmith 217167802Sjkim/******************************************************************************* 218167802Sjkim * 219193267Sjkim * OS-dependent types 220167802Sjkim * 221167802Sjkim * If the defaults below are not appropriate for the host system, they can 222193267Sjkim * be defined in the OS-specific header, and this will take precedence. 223167802Sjkim * 224167802Sjkim ******************************************************************************/ 22599146Siwasaki 226167802Sjkim/* Flags for AcpiOsAcquireLock/AcpiOsReleaseLock */ 227100966Siwasaki 228167802Sjkim#ifndef ACPI_CPU_FLAGS 229193267Sjkim#define ACPI_CPU_FLAGS ACPI_SIZE 230167802Sjkim#endif 231167802Sjkim 232167802Sjkim/* Object returned from AcpiOsCreateCache */ 233167802Sjkim 234151937Sjkim#ifndef ACPI_CACHE_T 235193267Sjkim#ifdef ACPI_USE_LOCAL_CACHE 236151937Sjkim#define ACPI_CACHE_T ACPI_MEMORY_LIST 237193267Sjkim#else 238193267Sjkim#define ACPI_CACHE_T void * 239151937Sjkim#endif 240193267Sjkim#endif 241100966Siwasaki 242193267Sjkim/* 243193267Sjkim * Synchronization objects - Mutexes, Semaphores, and SpinLocks 244193267Sjkim */ 245193267Sjkim#if (ACPI_MUTEX_TYPE == ACPI_BINARY_SEMAPHORE) 246193267Sjkim/* 247193267Sjkim * These macros are used if the host OS does not support a mutex object. 248193267Sjkim * Map the OSL Mutex interfaces to binary semaphores. 249193267Sjkim */ 250193267Sjkim#define ACPI_MUTEX ACPI_SEMAPHORE 251193267Sjkim#define AcpiOsCreateMutex(OutHandle) AcpiOsCreateSemaphore (1, 1, OutHandle) 252193267Sjkim#define AcpiOsDeleteMutex(Handle) (void) AcpiOsDeleteSemaphore (Handle) 253193267Sjkim#define AcpiOsAcquireMutex(Handle,Time) AcpiOsWaitSemaphore (Handle, 1, Time) 254193267Sjkim#define AcpiOsReleaseMutex(Handle) (void) AcpiOsSignalSemaphore (Handle, 1) 255193267Sjkim#endif 256193267Sjkim 257193267Sjkim/* Configurable types for synchronization objects */ 258193267Sjkim 259193267Sjkim#ifndef ACPI_SPINLOCK 260193267Sjkim#define ACPI_SPINLOCK void * 261193267Sjkim#endif 262193267Sjkim 263193267Sjkim#ifndef ACPI_SEMAPHORE 264193267Sjkim#define ACPI_SEMAPHORE void * 265193267Sjkim#endif 266193267Sjkim 267193267Sjkim#ifndef ACPI_MUTEX 268193267Sjkim#define ACPI_MUTEX void * 269193267Sjkim#endif 270193267Sjkim 271193267Sjkim 272193267Sjkim/******************************************************************************* 273193267Sjkim * 274193267Sjkim * Compiler-dependent types 275193267Sjkim * 276193267Sjkim * If the defaults below are not appropriate for the host compiler, they can 277193267Sjkim * be defined in the compiler-specific header, and this will take precedence. 278193267Sjkim * 279193267Sjkim ******************************************************************************/ 280193267Sjkim 281167802Sjkim/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ 282167802Sjkim 283167802Sjkim#ifndef ACPI_UINTPTR_T 284167802Sjkim#define ACPI_UINTPTR_T void * 285167802Sjkim#endif 286167802Sjkim 28799146Siwasaki/* 288167802Sjkim * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because 289167802Sjkim * some compilers can catch printf format string problems 29067754Smsmith */ 291167802Sjkim#ifndef ACPI_PRINTF_LIKE 292167802Sjkim#define ACPI_PRINTF_LIKE(c) 293167802Sjkim#endif 294167802Sjkim 295167802Sjkim/* 296167802Sjkim * Some compilers complain about unused variables. Sometimes we don't want to 297167802Sjkim * use all the variables (for example, _AcpiModuleName). This allows us 298245582Sjkim * to tell the compiler in a per-variable manner that a variable 299167802Sjkim * is unused 300167802Sjkim */ 301167802Sjkim#ifndef ACPI_UNUSED_VAR 302167802Sjkim#define ACPI_UNUSED_VAR 303167802Sjkim#endif 304167802Sjkim 305167802Sjkim/* 306167802Sjkim * All ACPICA functions that are available to the rest of the kernel are 307167802Sjkim * tagged with this macro which can be defined as appropriate for the host. 308167802Sjkim */ 309167802Sjkim#ifndef ACPI_EXPORT_SYMBOL 310167802Sjkim#define ACPI_EXPORT_SYMBOL(Symbol) 311167802Sjkim#endif 312167802Sjkim 313250838Sjkim/* 314250838Sjkim * Compiler/Clibrary-dependent debug initialization. Used for ACPICA 315250838Sjkim * utilities only. 316250838Sjkim */ 317250838Sjkim#ifndef ACPI_DEBUG_INITIALIZE 318250838Sjkim#define ACPI_DEBUG_INITIALIZE() 319250838Sjkim#endif 320167802Sjkim 321250838Sjkim 322193267Sjkim/****************************************************************************** 323193267Sjkim * 324193267Sjkim * ACPI Specification constants (Do not change unless the specification changes) 325193267Sjkim * 326193267Sjkim *****************************************************************************/ 327193267Sjkim 328193267Sjkim/* Number of distinct FADT-based GPE register blocks (GPE0 and GPE1) */ 329193267Sjkim 330193267Sjkim#define ACPI_MAX_GPE_BLOCKS 2 331193267Sjkim 332193267Sjkim/* Default ACPI register widths */ 333193267Sjkim 334193267Sjkim#define ACPI_GPE_REGISTER_WIDTH 8 335193267Sjkim#define ACPI_PM1_REGISTER_WIDTH 16 336193267Sjkim#define ACPI_PM2_REGISTER_WIDTH 8 337193267Sjkim#define ACPI_PM_TIMER_WIDTH 32 338193267Sjkim 339193267Sjkim/* Names within the namespace are 4 bytes long */ 340193267Sjkim 341193267Sjkim#define ACPI_NAME_SIZE 4 342193267Sjkim#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ 343193267Sjkim#define ACPI_PATH_SEPARATOR '.' 344193267Sjkim 345193267Sjkim/* Sizes for ACPI table headers */ 346193267Sjkim 347193267Sjkim#define ACPI_OEM_ID_SIZE 6 348193267Sjkim#define ACPI_OEM_TABLE_ID_SIZE 8 349193267Sjkim 350193267Sjkim/* ACPI/PNP hardware IDs */ 351193267Sjkim 352193267Sjkim#define PCI_ROOT_HID_STRING "PNP0A03" 353193267Sjkim#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08" 354193267Sjkim 355193267Sjkim/* PM Timer ticks per second (HZ) */ 356193267Sjkim 357245582Sjkim#define ACPI_PM_TIMER_FREQUENCY 3579545 358193267Sjkim 359193267Sjkim 360167802Sjkim/******************************************************************************* 361167802Sjkim * 362167802Sjkim * Independent types 363167802Sjkim * 364167802Sjkim ******************************************************************************/ 365167802Sjkim 366167802Sjkim/* Logical defines and NULL */ 367167802Sjkim 36867754Smsmith#ifdef FALSE 36967754Smsmith#undef FALSE 37067754Smsmith#endif 37167754Smsmith#define FALSE (1 == 0) 37267754Smsmith 37367754Smsmith#ifdef TRUE 37467754Smsmith#undef TRUE 37567754Smsmith#endif 37667754Smsmith#define TRUE (1 == 1) 37767754Smsmith 37867754Smsmith#ifndef NULL 37967754Smsmith#define NULL (void *) 0 38067754Smsmith#endif 38167754Smsmith 38267754Smsmith 38367754Smsmith/* 384193267Sjkim * Miscellaneous types 38567754Smsmith */ 38667754Smsmithtypedef UINT32 ACPI_STATUS; /* All ACPI Exceptions */ 38780062Smsmithtypedef UINT32 ACPI_NAME; /* 4-byte ACPI name */ 388114237Snjltypedef char * ACPI_STRING; /* Null terminated ASCII string */ 389167802Sjkimtypedef void * ACPI_HANDLE; /* Actually a ptr to a NS Node */ 39067754Smsmith 391193267Sjkim 392245582Sjkim/* Time constants for timer calculations */ 393245582Sjkim 394245582Sjkim#define ACPI_MSEC_PER_SEC 1000L 395245582Sjkim 396245582Sjkim#define ACPI_USEC_PER_MSEC 1000L 397245582Sjkim#define ACPI_USEC_PER_SEC 1000000L 398245582Sjkim 399245582Sjkim#define ACPI_100NSEC_PER_USEC 10L 400245582Sjkim#define ACPI_100NSEC_PER_MSEC 10000L 401245582Sjkim#define ACPI_100NSEC_PER_SEC 10000000L 402245582Sjkim 403245582Sjkim#define ACPI_NSEC_PER_USEC 1000L 404245582Sjkim#define ACPI_NSEC_PER_MSEC 1000000L 405245582Sjkim#define ACPI_NSEC_PER_SEC 1000000000L 406245582Sjkim 407245582Sjkim 408193267Sjkim/* Owner IDs are used to track namespace nodes for selective deletion */ 409193267Sjkim 410193267Sjkimtypedef UINT8 ACPI_OWNER_ID; 411193267Sjkim#define ACPI_OWNER_ID_MAX 0xFF 412193267Sjkim 413193267Sjkim 41467754Smsmith#define ACPI_INTEGER_BIT_SIZE 64 415138287Smarks#define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ 416138287Smarks#define ACPI_MAX64_DECIMAL_DIGITS 20 417138287Smarks#define ACPI_MAX32_DECIMAL_DIGITS 10 418138287Smarks#define ACPI_MAX16_DECIMAL_DIGITS 5 419138287Smarks#define ACPI_MAX8_DECIMAL_DIGITS 3 42067754Smsmith 42167754Smsmith/* 42267754Smsmith * Constants with special meanings 42367754Smsmith */ 424167802Sjkim#define ACPI_ROOT_OBJECT ACPI_ADD_PTR (ACPI_HANDLE, NULL, ACPI_MAX_PTR) 425193267Sjkim#define ACPI_WAIT_FOREVER 0xFFFF /* UINT16, as per ACPI spec */ 426193267Sjkim#define ACPI_DO_NOT_WAIT 0 42767754Smsmith 428202771Sjkim/* 429202771Sjkim * Obsolete: Acpi integer width. In ACPI version 1 (1996), integers are 32 bits. 430202771Sjkim * In ACPI version 2 (2000) and later, integers are 64 bits. Note that this 431202771Sjkim * pertains to the ACPI integer type only, not to other integers used in the 432202771Sjkim * implementation of the ACPICA subsystem. 433202771Sjkim * 434202771Sjkim * 01/2010: This type is obsolete and has been removed from the entire ACPICA 435202771Sjkim * code base. It remains here for compatibility with device drivers that use 436202771Sjkim * the type. However, it will be removed in the future. 437202771Sjkim */ 438202771Sjkimtypedef UINT64 ACPI_INTEGER; 439202771Sjkim#define ACPI_INTEGER_MAX ACPI_UINT64_MAX 44077424Smsmith 441202771Sjkim 442193267Sjkim/******************************************************************************* 443193267Sjkim * 444193267Sjkim * Commonly used macros 445193267Sjkim * 446193267Sjkim ******************************************************************************/ 447193267Sjkim 448193267Sjkim/* Data manipulation */ 449193267Sjkim 450193267Sjkim#define ACPI_LOBYTE(Integer) ((UINT8) (UINT16)(Integer)) 451193267Sjkim#define ACPI_HIBYTE(Integer) ((UINT8) (((UINT16)(Integer)) >> 8)) 452193267Sjkim#define ACPI_LOWORD(Integer) ((UINT16) (UINT32)(Integer)) 453193267Sjkim#define ACPI_HIWORD(Integer) ((UINT16)(((UINT32)(Integer)) >> 16)) 454193267Sjkim#define ACPI_LODWORD(Integer64) ((UINT32) (UINT64)(Integer64)) 455193267Sjkim#define ACPI_HIDWORD(Integer64) ((UINT32)(((UINT64)(Integer64)) >> 32)) 456193267Sjkim 457193267Sjkim#define ACPI_SET_BIT(target,bit) ((target) |= (bit)) 458193267Sjkim#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit)) 459193267Sjkim#define ACPI_MIN(a,b) (((a)<(b))?(a):(b)) 460193267Sjkim#define ACPI_MAX(a,b) (((a)>(b))?(a):(b)) 461193267Sjkim 462193267Sjkim/* Size calculation */ 463193267Sjkim 464193267Sjkim#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) 465193267Sjkim 466193267Sjkim/* Pointer manipulation */ 467193267Sjkim 468193267Sjkim#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p)) 469193267Sjkim#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p)) 470193267Sjkim#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b))) 471193267Sjkim#define ACPI_PTR_DIFF(a, b) (ACPI_SIZE) (ACPI_CAST_PTR (UINT8, (a)) - ACPI_CAST_PTR (UINT8, (b))) 472193267Sjkim 473193267Sjkim/* Pointer/Integer type conversions */ 474193267Sjkim 475193267Sjkim#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL,(ACPI_SIZE) i) 476193267Sjkim#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) NULL) 477193267Sjkim#define ACPI_OFFSET(d, f) (ACPI_SIZE) ACPI_PTR_DIFF (&(((d *)0)->f), (void *) NULL) 478193267Sjkim#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) 479193267Sjkim#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) 480193267Sjkim 481241973Sjkim/* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */ 482241973Sjkim 483193267Sjkim#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 484193267Sjkim#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) 485241973Sjkim#define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) 486193267Sjkim#else 487193267Sjkim#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) 488241973Sjkim#define ACPI_MOVE_NAME(dest,src) (ACPI_STRNCPY (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) 489193267Sjkim#endif 490193267Sjkim 491254745Sjkim/* Support for the special RSDP signature (8 characters) */ 492193267Sjkim 493254745Sjkim#define ACPI_VALIDATE_RSDP_SIG(a) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8)) 494254745Sjkim#define ACPI_MAKE_RSDP_SIG(dest) (ACPI_MEMCPY (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8)) 495254745Sjkim 496254745Sjkim 497193267Sjkim/******************************************************************************* 498193267Sjkim * 499193267Sjkim * Miscellaneous constants 500193267Sjkim * 501193267Sjkim ******************************************************************************/ 502193267Sjkim 50377424Smsmith/* 50477424Smsmith * Initialization sequence 50577424Smsmith */ 50667754Smsmith#define ACPI_FULL_INITIALIZATION 0x00 50767754Smsmith#define ACPI_NO_ADDRESS_SPACE_INIT 0x01 50867754Smsmith#define ACPI_NO_HARDWARE_INIT 0x02 50967754Smsmith#define ACPI_NO_EVENT_INIT 0x04 51091116Smsmith#define ACPI_NO_HANDLER_INIT 0x08 51191116Smsmith#define ACPI_NO_ACPI_ENABLE 0x10 51291116Smsmith#define ACPI_NO_DEVICE_INIT 0x20 51391116Smsmith#define ACPI_NO_OBJECT_INIT 0x40 51467754Smsmith 51580062Smsmith/* 51680062Smsmith * Initialization state 51780062Smsmith */ 518167802Sjkim#define ACPI_SUBSYSTEM_INITIALIZE 0x01 519167802Sjkim#define ACPI_INITIALIZED_OK 0x02 52067754Smsmith 52167754Smsmith/* 52278986Smsmith * Power state values 52367754Smsmith */ 52478986Smsmith#define ACPI_STATE_UNKNOWN (UINT8) 0xFF 52578986Smsmith 52667754Smsmith#define ACPI_STATE_S0 (UINT8) 0 52767754Smsmith#define ACPI_STATE_S1 (UINT8) 1 52867754Smsmith#define ACPI_STATE_S2 (UINT8) 2 52967754Smsmith#define ACPI_STATE_S3 (UINT8) 3 53067754Smsmith#define ACPI_STATE_S4 (UINT8) 4 53171867Smsmith#define ACPI_STATE_S5 (UINT8) 5 53267754Smsmith#define ACPI_S_STATES_MAX ACPI_STATE_S5 53377424Smsmith#define ACPI_S_STATE_COUNT 6 53467754Smsmith 53577424Smsmith#define ACPI_STATE_D0 (UINT8) 0 53677424Smsmith#define ACPI_STATE_D1 (UINT8) 1 53777424Smsmith#define ACPI_STATE_D2 (UINT8) 2 53877424Smsmith#define ACPI_STATE_D3 (UINT8) 3 53977424Smsmith#define ACPI_D_STATES_MAX ACPI_STATE_D3 54077424Smsmith#define ACPI_D_STATE_COUNT 4 54167754Smsmith 54291116Smsmith#define ACPI_STATE_C0 (UINT8) 0 54391116Smsmith#define ACPI_STATE_C1 (UINT8) 1 54491116Smsmith#define ACPI_STATE_C2 (UINT8) 2 54591116Smsmith#define ACPI_STATE_C3 (UINT8) 3 54691116Smsmith#define ACPI_C_STATES_MAX ACPI_STATE_C3 54791116Smsmith#define ACPI_C_STATE_COUNT 4 54891116Smsmith 54978986Smsmith/* 55087031Smsmith * Sleep type invalid value 55187031Smsmith */ 55287031Smsmith#define ACPI_SLEEP_TYPE_MAX 0x7 55387031Smsmith#define ACPI_SLEEP_TYPE_INVALID 0xFF 55487031Smsmith 55587031Smsmith/* 55678986Smsmith * Standard notify values 55778986Smsmith */ 558193267Sjkim#define ACPI_NOTIFY_BUS_CHECK (UINT8) 0x00 559193267Sjkim#define ACPI_NOTIFY_DEVICE_CHECK (UINT8) 0x01 560193267Sjkim#define ACPI_NOTIFY_DEVICE_WAKE (UINT8) 0x02 561193267Sjkim#define ACPI_NOTIFY_EJECT_REQUEST (UINT8) 0x03 562193267Sjkim#define ACPI_NOTIFY_DEVICE_CHECK_LIGHT (UINT8) 0x04 563193267Sjkim#define ACPI_NOTIFY_FREQUENCY_MISMATCH (UINT8) 0x05 564193267Sjkim#define ACPI_NOTIFY_BUS_MODE_MISMATCH (UINT8) 0x06 565193267Sjkim#define ACPI_NOTIFY_POWER_FAULT (UINT8) 0x07 566193267Sjkim#define ACPI_NOTIFY_CAPABILITIES_CHECK (UINT8) 0x08 567193267Sjkim#define ACPI_NOTIFY_DEVICE_PLD_CHECK (UINT8) 0x09 568193267Sjkim#define ACPI_NOTIFY_RESERVED (UINT8) 0x0A 569193267Sjkim#define ACPI_NOTIFY_LOCALITY_UPDATE (UINT8) 0x0B 570231844Sjkim#define ACPI_NOTIFY_SHUTDOWN_REQUEST (UINT8) 0x0C 57177424Smsmith 572231844Sjkim#define ACPI_NOTIFY_MAX 0x0C 573193267Sjkim 57467754Smsmith/* 575193267Sjkim * Types associated with ACPI names and objects. The first group of 576107325Siwasaki * values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition 577193267Sjkim * of the ACPI ObjectType() operator (See the ACPI Spec). Therefore, 57891116Smsmith * only add to the first group if the spec changes. 57967754Smsmith * 580128212Snjl * NOTE: Types must be kept in sync with the global AcpiNsProperties 581107325Siwasaki * and AcpiNsTypeNames arrays. 58267754Smsmith */ 58367754Smsmithtypedef UINT32 ACPI_OBJECT_TYPE; 58467754Smsmith 58587031Smsmith#define ACPI_TYPE_ANY 0x00 58687031Smsmith#define ACPI_TYPE_INTEGER 0x01 /* Byte/Word/Dword/Zero/One/Ones */ 58787031Smsmith#define ACPI_TYPE_STRING 0x02 58887031Smsmith#define ACPI_TYPE_BUFFER 0x03 58987031Smsmith#define ACPI_TYPE_PACKAGE 0x04 /* ByteConst, multiple DataTerm/Constant/SuperName */ 59087031Smsmith#define ACPI_TYPE_FIELD_UNIT 0x05 59187031Smsmith#define ACPI_TYPE_DEVICE 0x06 /* Name, multiple Node */ 59287031Smsmith#define ACPI_TYPE_EVENT 0x07 59387031Smsmith#define ACPI_TYPE_METHOD 0x08 /* Name, ByteConst, multiple Code */ 59487031Smsmith#define ACPI_TYPE_MUTEX 0x09 59587031Smsmith#define ACPI_TYPE_REGION 0x0A 59687031Smsmith#define ACPI_TYPE_POWER 0x0B /* Name,ByteConst,WordConst,multi Node */ 59787031Smsmith#define ACPI_TYPE_PROCESSOR 0x0C /* Name,ByteConst,DWordConst,ByteConst,multi NmO */ 59887031Smsmith#define ACPI_TYPE_THERMAL 0x0D /* Name, multiple Node */ 59987031Smsmith#define ACPI_TYPE_BUFFER_FIELD 0x0E 60087031Smsmith#define ACPI_TYPE_DDB_HANDLE 0x0F 60187031Smsmith#define ACPI_TYPE_DEBUG_OBJECT 0x10 60267754Smsmith 603107325Siwasaki#define ACPI_TYPE_EXTERNAL_MAX 0x10 60467754Smsmith 60567754Smsmith/* 606114237Snjl * These are object types that do not map directly to the ACPI 607114237Snjl * ObjectType() operator. They are used for various internal purposes only. 608114237Snjl * If new predefined ACPI_TYPEs are added (via the ACPI specification), these 609107325Siwasaki * internal types must move upwards. (There is code that depends on these 610107325Siwasaki * values being contiguous with the external types above.) 61167754Smsmith */ 612107325Siwasaki#define ACPI_TYPE_LOCAL_REGION_FIELD 0x11 613107325Siwasaki#define ACPI_TYPE_LOCAL_BANK_FIELD 0x12 614107325Siwasaki#define ACPI_TYPE_LOCAL_INDEX_FIELD 0x13 615107325Siwasaki#define ACPI_TYPE_LOCAL_REFERENCE 0x14 /* Arg#, Local#, Name, Debug, RefOf, Index */ 616107325Siwasaki#define ACPI_TYPE_LOCAL_ALIAS 0x15 617128212Snjl#define ACPI_TYPE_LOCAL_METHOD_ALIAS 0x16 618128212Snjl#define ACPI_TYPE_LOCAL_NOTIFY 0x17 619128212Snjl#define ACPI_TYPE_LOCAL_ADDRESS_HANDLER 0x18 620128212Snjl#define ACPI_TYPE_LOCAL_RESOURCE 0x19 621128212Snjl#define ACPI_TYPE_LOCAL_RESOURCE_FIELD 0x1A 622128212Snjl#define ACPI_TYPE_LOCAL_SCOPE 0x1B /* 1 Name, multiple ObjectList Nodes */ 62367754Smsmith 624128212Snjl#define ACPI_TYPE_NS_NODE_MAX 0x1B /* Last typecode used within a NS Node */ 62567754Smsmith 626107325Siwasaki/* 627107325Siwasaki * These are special object types that never appear in 628245582Sjkim * a Namespace node, only in an object of ACPI_OPERAND_OBJECT 629107325Siwasaki */ 630128212Snjl#define ACPI_TYPE_LOCAL_EXTRA 0x1C 631128212Snjl#define ACPI_TYPE_LOCAL_DATA 0x1D 63267754Smsmith 633128212Snjl#define ACPI_TYPE_LOCAL_MAX 0x1D 63469450Smsmith 635107325Siwasaki/* All types above here are invalid */ 63667754Smsmith 637128212Snjl#define ACPI_TYPE_INVALID 0x1E 63867754Smsmith#define ACPI_TYPE_NOT_FOUND 0xFF 63967754Smsmith 640193267Sjkim#define ACPI_NUM_NS_TYPES (ACPI_TYPE_INVALID + 1) 641193267Sjkim 642193267Sjkim 64367754Smsmith/* 64487031Smsmith * All I/O 64587031Smsmith */ 64687031Smsmith#define ACPI_READ 0 64787031Smsmith#define ACPI_WRITE 1 648107325Siwasaki#define ACPI_IO_MASK 1 64977424Smsmith 65077424Smsmith/* 651128212Snjl * Event Types: Fixed & General Purpose 65267754Smsmith */ 65367754Smsmithtypedef UINT32 ACPI_EVENT_TYPE; 65467754Smsmith 65567754Smsmith/* 65667754Smsmith * Fixed events 65767754Smsmith */ 65891116Smsmith#define ACPI_EVENT_PMTIMER 0 65991116Smsmith#define ACPI_EVENT_GLOBAL 1 66091116Smsmith#define ACPI_EVENT_POWER_BUTTON 2 66191116Smsmith#define ACPI_EVENT_SLEEP_BUTTON 3 66291116Smsmith#define ACPI_EVENT_RTC 4 66391116Smsmith#define ACPI_EVENT_MAX 4 66491116Smsmith#define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1 66567754Smsmith 66667754Smsmith/* 667128212Snjl * Event Status - Per event 66867754Smsmith * ------------- 66967754Smsmith * The encoding of ACPI_EVENT_STATUS is illustrated below. 67067754Smsmith * Note that a set bit (1) indicates the property is TRUE 67167754Smsmith * (e.g. if bit 0 is set then the event is enabled). 67284491Smsmith * +-------------+-+-+-+ 67384491Smsmith * | Bits 31:3 |2|1|0| 67484491Smsmith * +-------------+-+-+-+ 67584491Smsmith * | | | | 67684491Smsmith * | | | +- Enabled? 67784491Smsmith * | | +--- Enabled for wake? 67884491Smsmith * | +----- Set? 67967754Smsmith * +----------- <Reserved> 68067754Smsmith */ 68167754Smsmithtypedef UINT32 ACPI_EVENT_STATUS; 68267754Smsmith 68369450Smsmith#define ACPI_EVENT_FLAG_DISABLED (ACPI_EVENT_STATUS) 0x00 68467754Smsmith#define ACPI_EVENT_FLAG_ENABLED (ACPI_EVENT_STATUS) 0x01 68584491Smsmith#define ACPI_EVENT_FLAG_WAKE_ENABLED (ACPI_EVENT_STATUS) 0x02 68684491Smsmith#define ACPI_EVENT_FLAG_SET (ACPI_EVENT_STATUS) 0x04 68767754Smsmith 688209746Sjkim/* Actions for AcpiSetGpe, AcpiGpeWakeup, AcpiHwLowSetGpe */ 689206117Sjkim 690129684Snjl#define ACPI_GPE_ENABLE 0 691129684Snjl#define ACPI_GPE_DISABLE 1 692209746Sjkim#define ACPI_GPE_CONDITIONAL_ENABLE 2 693129684Snjl 694128212Snjl/* 695128212Snjl * GPE info flags - Per GPE 696216471Sjkim * +-------+-+-+---+ 697216471Sjkim * | 7:4 |3|2|1:0| 698216471Sjkim * +-------+-+-+---+ 699216471Sjkim * | | | | 700216471Sjkim * | | | +-- Type of dispatch:to method, handler, notify, or none 701216471Sjkim * | | +----- Interrupt type: edge or level triggered 702216471Sjkim * | +------- Is a Wake GPE 703216471Sjkim * +------------ <Reserved> 704128212Snjl */ 705216471Sjkim#define ACPI_GPE_DISPATCH_NONE (UINT8) 0x00 706216471Sjkim#define ACPI_GPE_DISPATCH_METHOD (UINT8) 0x01 707216471Sjkim#define ACPI_GPE_DISPATCH_HANDLER (UINT8) 0x02 708216471Sjkim#define ACPI_GPE_DISPATCH_NOTIFY (UINT8) 0x03 709216471Sjkim#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x03 710216471Sjkim 711216471Sjkim#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x04 712129684Snjl#define ACPI_GPE_EDGE_TRIGGERED (UINT8) 0x00 713216471Sjkim#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x04 714128212Snjl 715216471Sjkim#define ACPI_GPE_CAN_WAKE (UINT8) 0x08 716128212Snjl 717128212Snjl/* 718128212Snjl * Flags for GPE and Lock interfaces 719128212Snjl */ 720128212Snjl#define ACPI_NOT_ISR 0x1 721128212Snjl#define ACPI_ISR 0x0 722128212Snjl 723128212Snjl 72467754Smsmith/* Notify types */ 72567754Smsmith 726129684Snjl#define ACPI_SYSTEM_NOTIFY 0x1 727129684Snjl#define ACPI_DEVICE_NOTIFY 0x2 728193267Sjkim#define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY) 729129684Snjl#define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 730234623Sjkim#define ACPI_NUM_NOTIFY_TYPES 2 73167754Smsmith 732231844Sjkim#define ACPI_MAX_SYS_NOTIFY 0x7F 733231844Sjkim#define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF 73467754Smsmith 735234623Sjkim#define ACPI_SYSTEM_HANDLER_LIST 0 /* Used as index, must be SYSTEM_NOTIFY -1 */ 736234623Sjkim#define ACPI_DEVICE_HANDLER_LIST 1 /* Used as index, must be DEVICE_NOTIFY -1 */ 73767754Smsmith 738234623Sjkim 73967754Smsmith/* Address Space (Operation Region) Types */ 74067754Smsmith 74177424Smsmithtypedef UINT8 ACPI_ADR_SPACE_TYPE; 74267754Smsmith 74377424Smsmith#define ACPI_ADR_SPACE_SYSTEM_MEMORY (ACPI_ADR_SPACE_TYPE) 0 74477424Smsmith#define ACPI_ADR_SPACE_SYSTEM_IO (ACPI_ADR_SPACE_TYPE) 1 74577424Smsmith#define ACPI_ADR_SPACE_PCI_CONFIG (ACPI_ADR_SPACE_TYPE) 2 74677424Smsmith#define ACPI_ADR_SPACE_EC (ACPI_ADR_SPACE_TYPE) 3 74777424Smsmith#define ACPI_ADR_SPACE_SMBUS (ACPI_ADR_SPACE_TYPE) 4 74877424Smsmith#define ACPI_ADR_SPACE_CMOS (ACPI_ADR_SPACE_TYPE) 5 74977424Smsmith#define ACPI_ADR_SPACE_PCI_BAR_TARGET (ACPI_ADR_SPACE_TYPE) 6 750197104Sjkim#define ACPI_ADR_SPACE_IPMI (ACPI_ADR_SPACE_TYPE) 7 751228110Sjkim#define ACPI_ADR_SPACE_GPIO (ACPI_ADR_SPACE_TYPE) 8 752228110Sjkim#define ACPI_ADR_SPACE_GSBUS (ACPI_ADR_SPACE_TYPE) 9 753235945Sjkim#define ACPI_ADR_SPACE_PLATFORM_COMM (ACPI_ADR_SPACE_TYPE) 10 75467754Smsmith 755235945Sjkim#define ACPI_NUM_PREDEFINED_REGIONS 11 75667754Smsmith 75767754Smsmith/* 758220663Sjkim * Special Address Spaces 759220663Sjkim * 760220663Sjkim * Note: A Data Table region is a special type of operation region 761220663Sjkim * that has its own AML opcode. However, internally, the AML 762220663Sjkim * interpreter simply creates an operation region with an an address 763220663Sjkim * space type of ACPI_ADR_SPACE_DATA_TABLE. 764220663Sjkim */ 765220663Sjkim#define ACPI_ADR_SPACE_DATA_TABLE (ACPI_ADR_SPACE_TYPE) 0x7E /* Internal to ACPICA only */ 766220663Sjkim#define ACPI_ADR_SPACE_FIXED_HARDWARE (ACPI_ADR_SPACE_TYPE) 0x7F 767220663Sjkim 768220663Sjkim/* Values for _REG connection code */ 769220663Sjkim 770220663Sjkim#define ACPI_REG_DISCONNECT 0 771220663Sjkim#define ACPI_REG_CONNECT 1 772220663Sjkim 773220663Sjkim/* 77499679Siwasaki * BitRegister IDs 775193267Sjkim * 776193267Sjkim * These values are intended to be used by the hardware interfaces 777193267Sjkim * and are mapped to individual bitfields defined within the ACPI 778193267Sjkim * registers. See the AcpiGbl_BitRegisterInfo global table in utglobal.c 779193267Sjkim * for this mapping. 78099679Siwasaki */ 781193267Sjkim 782193267Sjkim/* PM1 Status register */ 783193267Sjkim 78499679Siwasaki#define ACPI_BITREG_TIMER_STATUS 0x00 78599679Siwasaki#define ACPI_BITREG_BUS_MASTER_STATUS 0x01 78699679Siwasaki#define ACPI_BITREG_GLOBAL_LOCK_STATUS 0x02 78799679Siwasaki#define ACPI_BITREG_POWER_BUTTON_STATUS 0x03 78899679Siwasaki#define ACPI_BITREG_SLEEP_BUTTON_STATUS 0x04 78999679Siwasaki#define ACPI_BITREG_RT_CLOCK_STATUS 0x05 79099679Siwasaki#define ACPI_BITREG_WAKE_STATUS 0x06 791151937Sjkim#define ACPI_BITREG_PCIEXP_WAKE_STATUS 0x07 79299679Siwasaki 793193267Sjkim/* PM1 Enable register */ 794193267Sjkim 795151937Sjkim#define ACPI_BITREG_TIMER_ENABLE 0x08 796151937Sjkim#define ACPI_BITREG_GLOBAL_LOCK_ENABLE 0x09 797151937Sjkim#define ACPI_BITREG_POWER_BUTTON_ENABLE 0x0A 798151937Sjkim#define ACPI_BITREG_SLEEP_BUTTON_ENABLE 0x0B 799151937Sjkim#define ACPI_BITREG_RT_CLOCK_ENABLE 0x0C 800193267Sjkim#define ACPI_BITREG_PCIEXP_WAKE_DISABLE 0x0D 80199679Siwasaki 802193267Sjkim/* PM1 Control register */ 80399679Siwasaki 804193267Sjkim#define ACPI_BITREG_SCI_ENABLE 0x0E 805193267Sjkim#define ACPI_BITREG_BUS_MASTER_RLD 0x0F 806193267Sjkim#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x10 807193267Sjkim#define ACPI_BITREG_SLEEP_TYPE 0x11 808193267Sjkim#define ACPI_BITREG_SLEEP_ENABLE 0x12 80999679Siwasaki 810193267Sjkim/* PM2 Control register */ 811193267Sjkim 812193267Sjkim#define ACPI_BITREG_ARB_DISABLE 0x13 813193267Sjkim 814193267Sjkim#define ACPI_BITREG_MAX 0x13 81599679Siwasaki#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1 81699679Siwasaki 817107325Siwasaki 818193267Sjkim/* Status register values. A 1 clears a status bit. 0 = no effect */ 819193267Sjkim 820193267Sjkim#define ACPI_CLEAR_STATUS 1 821193267Sjkim 822193267Sjkim/* Enable and Control register values */ 823193267Sjkim 824193267Sjkim#define ACPI_ENABLE_EVENT 1 825193267Sjkim#define ACPI_DISABLE_EVENT 0 826193267Sjkim 827193267Sjkim 828231844Sjkim/* Sleep function dispatch */ 829231844Sjkim 830231844Sjkimtypedef ACPI_STATUS (*ACPI_SLEEP_FUNCTION) ( 831239340Sjkim UINT8 SleepState); 832231844Sjkim 833231844Sjkimtypedef struct acpi_sleep_functions 834231844Sjkim{ 835231844Sjkim ACPI_SLEEP_FUNCTION LegacyFunction; 836231844Sjkim ACPI_SLEEP_FUNCTION ExtendedFunction; 837231844Sjkim 838231844Sjkim} ACPI_SLEEP_FUNCTIONS; 839231844Sjkim 840231844Sjkim 84199679Siwasaki/* 84267754Smsmith * External ACPI object definition 84367754Smsmith */ 844193267Sjkim 845193267Sjkim/* 846193267Sjkim * Note: Type == ACPI_TYPE_ANY (0) is used to indicate a NULL package element 847193267Sjkim * or an unresolved named reference. 848193267Sjkim */ 849114237Snjltypedef union acpi_object 85067754Smsmith{ 851167802Sjkim ACPI_OBJECT_TYPE Type; /* See definition of AcpiNsType for values */ 85267754Smsmith struct 85367754Smsmith { 854193267Sjkim ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_INTEGER */ 855202771Sjkim UINT64 Value; /* The actual number */ 85671867Smsmith } Integer; 85767754Smsmith 85867754Smsmith struct 85967754Smsmith { 860193267Sjkim ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_STRING */ 861167802Sjkim UINT32 Length; /* # of bytes in string, excluding trailing null */ 862167802Sjkim char *Pointer; /* points to the string value */ 86367754Smsmith } String; 86467754Smsmith 86567754Smsmith struct 86667754Smsmith { 867193267Sjkim ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_BUFFER */ 868167802Sjkim UINT32 Length; /* # of bytes in buffer */ 869167802Sjkim UINT8 *Pointer; /* points to the buffer */ 87067754Smsmith } Buffer; 87167754Smsmith 87267754Smsmith struct 87367754Smsmith { 874193267Sjkim ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_PACKAGE */ 875167802Sjkim UINT32 Count; /* # of elements in package */ 876167802Sjkim union acpi_object *Elements; /* Pointer to an array of ACPI_OBJECTs */ 87767754Smsmith } Package; 87867754Smsmith 87967754Smsmith struct 88067754Smsmith { 881193267Sjkim ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_LOCAL_REFERENCE */ 882193267Sjkim ACPI_OBJECT_TYPE ActualType; /* Type associated with the Handle */ 883193267Sjkim ACPI_HANDLE Handle; /* object reference */ 884193267Sjkim } Reference; 885193267Sjkim 886193267Sjkim struct 887193267Sjkim { 888193267Sjkim ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_PROCESSOR */ 889167802Sjkim UINT32 ProcId; 890167802Sjkim ACPI_IO_ADDRESS PblkAddress; 891167802Sjkim UINT32 PblkLength; 89267754Smsmith } Processor; 89367754Smsmith 89467754Smsmith struct 89567754Smsmith { 896193267Sjkim ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_POWER */ 897167802Sjkim UINT32 SystemLevel; 898167802Sjkim UINT32 ResourceOrder; 89967754Smsmith } PowerResource; 90067754Smsmith 90191116Smsmith} ACPI_OBJECT; 90267754Smsmith 90367754Smsmith 90467754Smsmith/* 90567754Smsmith * List of objects, used as a parameter list for control method evaluation 90667754Smsmith */ 907114237Snjltypedef struct acpi_object_list 90867754Smsmith{ 909167802Sjkim UINT32 Count; 910167802Sjkim ACPI_OBJECT *Pointer; 91167754Smsmith 91291116Smsmith} ACPI_OBJECT_LIST; 91367754Smsmith 91467754Smsmith 91567754Smsmith/* 91667754Smsmith * Miscellaneous common Data Structures used by the interfaces 91767754Smsmith */ 91891116Smsmith#define ACPI_NO_BUFFER 0 91991116Smsmith#define ACPI_ALLOCATE_BUFFER (ACPI_SIZE) (-1) 92091116Smsmith#define ACPI_ALLOCATE_LOCAL_BUFFER (ACPI_SIZE) (-2) 92191116Smsmith 922114237Snjltypedef struct acpi_buffer 92367754Smsmith{ 924167802Sjkim ACPI_SIZE Length; /* Length in bytes of the buffer */ 925167802Sjkim void *Pointer; /* pointer to buffer */ 92667754Smsmith 92767754Smsmith} ACPI_BUFFER; 92867754Smsmith 929245582Sjkim/* Free a buffer created in an ACPI_BUFFER via ACPI_ALLOCATE_LOCAL_BUFFER */ 93067754Smsmith 931245582Sjkim#define ACPI_FREE_BUFFER(b) ACPI_FREE(b.Pointer) 932245582Sjkim 933245582Sjkim 93467754Smsmith/* 93567754Smsmith * NameType for AcpiGetName 93667754Smsmith */ 93767754Smsmith#define ACPI_FULL_PATHNAME 0 93867754Smsmith#define ACPI_SINGLE_NAME 1 93967754Smsmith#define ACPI_NAME_TYPE_MAX 1 94067754Smsmith 94167754Smsmith 94267754Smsmith/* 943193267Sjkim * Predefined Namespace items 944193267Sjkim */ 945193267Sjkimtypedef struct acpi_predefined_names 946193267Sjkim{ 947193267Sjkim char *Name; 948193267Sjkim UINT8 Type; 949193267Sjkim char *Val; 950193267Sjkim 951193267Sjkim} ACPI_PREDEFINED_NAMES; 952193267Sjkim 953193267Sjkim 954193267Sjkim/* 95567754Smsmith * Structure and flags for AcpiGetSystemInfo 95667754Smsmith */ 95791116Smsmith#define ACPI_SYS_MODE_UNKNOWN 0x0000 95891116Smsmith#define ACPI_SYS_MODE_ACPI 0x0001 95991116Smsmith#define ACPI_SYS_MODE_LEGACY 0x0002 96091116Smsmith#define ACPI_SYS_MODES_MASK 0x0003 96167754Smsmith 96267754Smsmith 96367754Smsmith/* 96467754Smsmith * System info returned by AcpiGetSystemInfo() 96567754Smsmith */ 966114237Snjltypedef struct acpi_system_info 96767754Smsmith{ 968167802Sjkim UINT32 AcpiCaVersion; 969167802Sjkim UINT32 Flags; 970167802Sjkim UINT32 TimerResolution; 971167802Sjkim UINT32 Reserved1; 972167802Sjkim UINT32 Reserved2; 973167802Sjkim UINT32 DebugLevel; 974167802Sjkim UINT32 DebugLayer; 97567754Smsmith 97667754Smsmith} ACPI_SYSTEM_INFO; 97767754Smsmith 97867754Smsmith 97967754Smsmith/* 980193267Sjkim * System statistics returned by AcpiGetStatistics() 981193267Sjkim */ 982193267Sjkimtypedef struct acpi_statistics 983193267Sjkim{ 984193267Sjkim UINT32 SciCount; 985193267Sjkim UINT32 GpeCount; 986193267Sjkim UINT32 FixedEventCount[ACPI_NUM_FIXED_EVENTS]; 987193267Sjkim UINT32 MethodCount; 988193267Sjkim 989193267Sjkim} ACPI_STATISTICS; 990193267Sjkim 991193267Sjkim 992193267Sjkim/* Table Event Types */ 993193267Sjkim 994193267Sjkim#define ACPI_TABLE_EVENT_LOAD 0x0 995193267Sjkim#define ACPI_TABLE_EVENT_UNLOAD 0x1 996193267Sjkim#define ACPI_NUM_TABLE_EVENTS 2 997193267Sjkim 998193267Sjkim 999193267Sjkim/* 1000117521Snjl * Types specific to the OS service interfaces 1001117521Snjl */ 1002117521Snjltypedef UINT32 1003138287Smarks(ACPI_SYSTEM_XFACE *ACPI_OSD_HANDLER) ( 1004167802Sjkim void *Context); 1005117521Snjl 1006117521Snjltypedef void 1007138287Smarks(ACPI_SYSTEM_XFACE *ACPI_OSD_EXEC_CALLBACK) ( 1008167802Sjkim void *Context); 1009117521Snjl 1010117521Snjl/* 101167754Smsmith * Various handlers and callback procedures 101267754Smsmith */ 101367754Smsmithtypedef 1014254745SjkimUINT32 (*ACPI_SCI_HANDLER) ( 1015254745Sjkim void *Context); 1016254745Sjkim 1017254745Sjkimtypedef 1018216471Sjkimvoid (*ACPI_GBL_EVENT_HANDLER) ( 1019216471Sjkim UINT32 EventType, 1020216471Sjkim ACPI_HANDLE Device, 1021216471Sjkim UINT32 EventNumber, 1022216471Sjkim void *Context); 1023216471Sjkim 1024216471Sjkim#define ACPI_EVENT_TYPE_GPE 0 1025216471Sjkim#define ACPI_EVENT_TYPE_FIXED 1 1026216471Sjkim 1027216471Sjkimtypedef 102877424SmsmithUINT32 (*ACPI_EVENT_HANDLER) ( 1029167802Sjkim void *Context); 103067754Smsmith 103167754Smsmithtypedef 1032216471SjkimUINT32 (*ACPI_GPE_HANDLER) ( 1033216471Sjkim ACPI_HANDLE GpeDevice, 1034216471Sjkim UINT32 GpeNumber, 1035216471Sjkim void *Context); 1036216471Sjkim 1037216471Sjkimtypedef 103877424Smsmithvoid (*ACPI_NOTIFY_HANDLER) ( 1039167802Sjkim ACPI_HANDLE Device, 1040167802Sjkim UINT32 Value, 1041167802Sjkim void *Context); 104267754Smsmith 104387031Smsmithtypedef 104487031Smsmithvoid (*ACPI_OBJECT_HANDLER) ( 1045167802Sjkim ACPI_HANDLE Object, 1046167802Sjkim void *Data); 104767754Smsmith 104899679Siwasakitypedef 104999679SiwasakiACPI_STATUS (*ACPI_INIT_HANDLER) ( 1050167802Sjkim ACPI_HANDLE Object, 1051167802Sjkim UINT32 Function); 105287031Smsmith 105399679Siwasaki#define ACPI_INIT_DEVICE_INI 1 105499679Siwasaki 1055138287Smarkstypedef 1056138287SmarksACPI_STATUS (*ACPI_EXCEPTION_HANDLER) ( 1057167802Sjkim ACPI_STATUS AmlStatus, 1058167802Sjkim ACPI_NAME Name, 1059167802Sjkim UINT16 Opcode, 1060167802Sjkim UINT32 AmlOffset, 1061167802Sjkim void *Context); 106299679Siwasaki 1063193267Sjkim/* Table Event handler (Load, LoadTable, etc.) and types */ 1064138287Smarks 1065193267Sjkimtypedef 1066193267SjkimACPI_STATUS (*ACPI_TABLE_HANDLER) ( 1067193267Sjkim UINT32 Event, 1068193267Sjkim void *Table, 1069193267Sjkim void *Context); 1070193267Sjkim 1071193267Sjkim#define ACPI_TABLE_LOAD 0x0 1072193267Sjkim#define ACPI_TABLE_UNLOAD 0x1 1073193267Sjkim#define ACPI_NUM_TABLE_EVENTS 2 1074193267Sjkim 1075193267Sjkim 1076127175Snjl/* Address Spaces (For Operation Regions) */ 107777424Smsmith 107867754Smsmithtypedef 107977424SmsmithACPI_STATUS (*ACPI_ADR_SPACE_HANDLER) ( 1080167802Sjkim UINT32 Function, 1081167802Sjkim ACPI_PHYSICAL_ADDRESS Address, 1082167802Sjkim UINT32 BitWidth, 1083202771Sjkim UINT64 *Value, 1084167802Sjkim void *HandlerContext, 1085167802Sjkim void *RegionContext); 108667754Smsmith 1087167802Sjkim#define ACPI_DEFAULT_HANDLER NULL 108867754Smsmith 1089228110Sjkim/* Special Context data for GenericSerialBus/GeneralPurposeIo (ACPI 5.0) */ 1090228110Sjkim 1091228110Sjkimtypedef struct acpi_connection_info 1092228110Sjkim{ 1093228110Sjkim UINT8 *Connection; 1094228110Sjkim UINT16 Length; 1095228110Sjkim UINT8 AccessLength; 1096228110Sjkim 1097228110Sjkim} ACPI_CONNECTION_INFO; 1098228110Sjkim 1099228110Sjkim 110067754Smsmithtypedef 110177424SmsmithACPI_STATUS (*ACPI_ADR_SPACE_SETUP) ( 1102167802Sjkim ACPI_HANDLE RegionHandle, 1103167802Sjkim UINT32 Function, 1104167802Sjkim void *HandlerContext, 1105167802Sjkim void **RegionContext); 110667754Smsmith 110767754Smsmith#define ACPI_REGION_ACTIVATE 0 110867754Smsmith#define ACPI_REGION_DEACTIVATE 1 110967754Smsmith 111067754Smsmithtypedef 111177424SmsmithACPI_STATUS (*ACPI_WALK_CALLBACK) ( 1112207344Sjkim ACPI_HANDLE Object, 1113167802Sjkim UINT32 NestingLevel, 1114167802Sjkim void *Context, 1115167802Sjkim void **ReturnValue); 111667754Smsmith 1117210976Sjkimtypedef 1118210976SjkimUINT32 (*ACPI_INTERFACE_HANDLER) ( 1119210976Sjkim ACPI_STRING InterfaceName, 1120210976Sjkim UINT32 Supported); 112167754Smsmith 1122210976Sjkim 112367754Smsmith/* Interrupt handler return values */ 112467754Smsmith 112591116Smsmith#define ACPI_INTERRUPT_NOT_HANDLED 0x00 112691116Smsmith#define ACPI_INTERRUPT_HANDLED 0x01 112767754Smsmith 1128216471Sjkim/* GPE handler return values */ 1129216471Sjkim 1130216471Sjkim#define ACPI_REENABLE_GPE 0x80 1131216471Sjkim 1132216471Sjkim 1133197104Sjkim/* Length of 32-bit EISAID values when converted back to a string */ 113467754Smsmith 1135197104Sjkim#define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */ 1136193267Sjkim 1137197104Sjkim/* Length of UUID (string) values */ 1138197104Sjkim 1139193267Sjkim#define ACPI_UUID_LENGTH 16 1140193267Sjkim 114167754Smsmith 1142241973Sjkim/* Structures used for device/processor HID, UID, CID, and SUB */ 1143197104Sjkim 1144241973Sjkimtypedef struct acpi_pnp_device_id 1145117521Snjl{ 1146197104Sjkim UINT32 Length; /* Length of string + null */ 1147197104Sjkim char *String; 114867754Smsmith 1149241973Sjkim} ACPI_PNP_DEVICE_ID; 115067754Smsmith 1151241973Sjkimtypedef struct acpi_pnp_device_id_list 1152117521Snjl{ 1153197104Sjkim UINT32 Count; /* Number of IDs in Ids array */ 1154197104Sjkim UINT32 ListSize; /* Size of list, including ID strings */ 1155241973Sjkim ACPI_PNP_DEVICE_ID Ids[1]; /* ID array */ 1156117521Snjl 1157241973Sjkim} ACPI_PNP_DEVICE_ID_LIST; 1158117521Snjl 1159197104Sjkim/* 1160197104Sjkim * Structure returned from AcpiGetObjectInfo. 1161197104Sjkim * Optimized for both 32- and 64-bit builds 1162197104Sjkim */ 1163197104Sjkimtypedef struct acpi_device_info 1164117521Snjl{ 1165197104Sjkim UINT32 InfoSize; /* Size of info, including ID strings */ 1166197104Sjkim UINT32 Name; /* ACPI object Name */ 1167197104Sjkim ACPI_OBJECT_TYPE Type; /* ACPI object Type */ 1168197104Sjkim UINT8 ParamCount; /* If a method, required parameter count */ 1169197104Sjkim UINT8 Valid; /* Indicates which optional fields are valid */ 1170197104Sjkim UINT8 Flags; /* Miscellaneous info */ 1171197104Sjkim UINT8 HighestDstates[4]; /* _SxD values: 0xFF indicates not valid */ 1172197104Sjkim UINT8 LowestDstates[5]; /* _SxW values: 0xFF indicates not valid */ 1173197104Sjkim UINT32 CurrentStatus; /* _STA value */ 1174202771Sjkim UINT64 Address; /* _ADR value */ 1175241973Sjkim ACPI_PNP_DEVICE_ID HardwareId; /* _HID value */ 1176241973Sjkim ACPI_PNP_DEVICE_ID UniqueId; /* _UID value */ 1177241973Sjkim ACPI_PNP_DEVICE_ID SubsystemId; /* _SUB value */ 1178241973Sjkim ACPI_PNP_DEVICE_ID_LIST CompatibleIdList; /* _CID list <must be last> */ 1179117521Snjl 1180197104Sjkim} ACPI_DEVICE_INFO; 1181117521Snjl 1182197104Sjkim/* Values for Flags field above (AcpiGetObjectInfo) */ 1183117521Snjl 1184197104Sjkim#define ACPI_PCI_ROOT_BRIDGE 0x01 1185117521Snjl 1186197104Sjkim/* Flags for Valid field above (AcpiGetObjectInfo) */ 1187117521Snjl 1188197104Sjkim#define ACPI_VALID_STA 0x01 1189197104Sjkim#define ACPI_VALID_ADR 0x02 1190197104Sjkim#define ACPI_VALID_HID 0x04 1191197104Sjkim#define ACPI_VALID_UID 0x08 1192241973Sjkim#define ACPI_VALID_SUB 0x10 1193241973Sjkim#define ACPI_VALID_CID 0x20 1194241973Sjkim#define ACPI_VALID_SXDS 0x40 1195241973Sjkim#define ACPI_VALID_SXWS 0x80 1196197104Sjkim 1197241973Sjkim/* Flags for _STA return value (CurrentStatus above) */ 1198117521Snjl 1199167802Sjkim#define ACPI_STA_DEVICE_PRESENT 0x01 1200167802Sjkim#define ACPI_STA_DEVICE_ENABLED 0x02 1201167802Sjkim#define ACPI_STA_DEVICE_UI 0x04 1202167802Sjkim#define ACPI_STA_DEVICE_FUNCTIONING 0x08 1203167802Sjkim#define ACPI_STA_DEVICE_OK 0x08 /* Synonym */ 1204167802Sjkim#define ACPI_STA_BATTERY_PRESENT 0x10 1205167802Sjkim 1206167802Sjkim 120767754Smsmith/* Context structs for address space handlers */ 120867754Smsmith 1209114237Snjltypedef struct acpi_pci_id 121067754Smsmith{ 1211167802Sjkim UINT16 Segment; 1212167802Sjkim UINT16 Bus; 1213167802Sjkim UINT16 Device; 1214167802Sjkim UINT16 Function; 1215114237Snjl 121680062Smsmith} ACPI_PCI_ID; 121767754Smsmith 1218114237Snjltypedef struct acpi_mem_space_context 121967754Smsmith{ 1220167802Sjkim UINT32 Length; 1221167802Sjkim ACPI_PHYSICAL_ADDRESS Address; 1222167802Sjkim ACPI_PHYSICAL_ADDRESS MappedPhysicalAddress; 1223167802Sjkim UINT8 *MappedLogicalAddress; 1224167802Sjkim ACPI_SIZE MappedLength; 1225114237Snjl 122677424Smsmith} ACPI_MEM_SPACE_CONTEXT; 122767754Smsmith 122867754Smsmith 122967754Smsmith/* 1230193267Sjkim * ACPI_MEMORY_LIST is used only if the ACPICA local cache is enabled 123167754Smsmith */ 1232193267Sjkimtypedef struct acpi_memory_list 1233193267Sjkim{ 1234193267Sjkim char *ListName; 1235193267Sjkim void *ListHead; 1236193267Sjkim UINT16 ObjectSize; 1237193267Sjkim UINT16 MaxDepth; 1238193267Sjkim UINT16 CurrentDepth; 123967754Smsmith 1240193267Sjkim#ifdef ACPI_DBG_TRACK_ALLOCATIONS 124167754Smsmith 1242193267Sjkim /* Statistics for debug memory tracking only */ 124367754Smsmith 1244193267Sjkim UINT32 TotalAllocated; 1245193267Sjkim UINT32 TotalFreed; 1246193267Sjkim UINT32 MaxOccupied; 1247193267Sjkim UINT32 TotalSize; 1248193267Sjkim UINT32 CurrentTotalSize; 1249193267Sjkim UINT32 Requests; 1250193267Sjkim UINT32 Hits; 1251151937Sjkim#endif 1252151937Sjkim 1253193267Sjkim} ACPI_MEMORY_LIST; 1254167802Sjkim 1255167802Sjkim 1256253690Sjkim/* Definitions of _OSI support */ 1257253690Sjkim 1258253690Sjkim#define ACPI_VENDOR_STRINGS 0x01 1259253690Sjkim#define ACPI_FEATURE_STRINGS 0x02 1260253690Sjkim#define ACPI_ENABLE_INTERFACES 0x00 1261253690Sjkim#define ACPI_DISABLE_INTERFACES 0x04 1262253690Sjkim 1263253690Sjkim#define ACPI_DISABLE_ALL_VENDOR_STRINGS (ACPI_DISABLE_INTERFACES | ACPI_VENDOR_STRINGS) 1264253690Sjkim#define ACPI_DISABLE_ALL_FEATURE_STRINGS (ACPI_DISABLE_INTERFACES | ACPI_FEATURE_STRINGS) 1265253690Sjkim#define ACPI_DISABLE_ALL_STRINGS (ACPI_DISABLE_INTERFACES | ACPI_VENDOR_STRINGS | ACPI_FEATURE_STRINGS) 1266253690Sjkim#define ACPI_ENABLE_ALL_VENDOR_STRINGS (ACPI_ENABLE_INTERFACES | ACPI_VENDOR_STRINGS) 1267253690Sjkim#define ACPI_ENABLE_ALL_FEATURE_STRINGS (ACPI_ENABLE_INTERFACES | ACPI_FEATURE_STRINGS) 1268253690Sjkim#define ACPI_ENABLE_ALL_STRINGS (ACPI_ENABLE_INTERFACES | ACPI_VENDOR_STRINGS | ACPI_FEATURE_STRINGS) 1269253690Sjkim 1270253690Sjkim#define ACPI_OSI_WIN_2000 0x01 1271253690Sjkim#define ACPI_OSI_WIN_XP 0x02 1272253690Sjkim#define ACPI_OSI_WIN_XP_SP1 0x03 1273253690Sjkim#define ACPI_OSI_WINSRV_2003 0x04 1274253690Sjkim#define ACPI_OSI_WIN_XP_SP2 0x05 1275253690Sjkim#define ACPI_OSI_WINSRV_2003_SP1 0x06 1276253690Sjkim#define ACPI_OSI_WIN_VISTA 0x07 1277253690Sjkim#define ACPI_OSI_WINSRV_2008 0x08 1278253690Sjkim#define ACPI_OSI_WIN_VISTA_SP1 0x09 1279253690Sjkim#define ACPI_OSI_WIN_VISTA_SP2 0x0A 1280253690Sjkim#define ACPI_OSI_WIN_7 0x0B 1281253690Sjkim#define ACPI_OSI_WIN_8 0x0C 1282253690Sjkim 1283253690Sjkim 128467754Smsmith#endif /* __ACTYPES_H__ */ 1285