Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2215 → Rev 2216

/drivers/devman/acpica/include/actypes.h
8,7 → 8,7
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
* Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
* All rights reserved.
*
* 2. License
188,7 → 188,6
*
* ACPI_SIZE 16/32/64-bit unsigned value
* ACPI_NATIVE_INT 16/32/64-bit signed value
*
*/
 
/*******************************************************************************
205,7 → 204,17
 
/*! [End] no source code translation !*/
 
/*
* Value returned by AcpiOsGetThreadId. There is no standard "thread_id"
* across operating systems or even the various UNIX systems. Since ACPICA
* only needs the thread ID as a unique thread identifier, we use a UINT64
* as the only common data type - it will accommodate any type of pointer or
* any type of integer. It is up to the host-dependent OSL to cast the
* native thread ID type to a UINT64 (in AcpiOsGetThreadId).
*/
#define ACPI_THREAD_ID UINT64
 
 
/*******************************************************************************
*
* Types specific to 64-bit targets
286,12 → 295,6
*
******************************************************************************/
 
/* Value returned by AcpiOsGetThreadId */
 
#ifndef ACPI_THREAD_ID
#define ACPI_THREAD_ID ACPI_SIZE
#endif
 
/* Flags for AcpiOsAcquireLock/AcpiOsReleaseLock */
 
#ifndef ACPI_CPU_FLAGS
456,21 → 459,6
#define ACPI_OWNER_ID_MAX 0xFF
 
 
typedef struct uint64_struct
{
UINT32 Lo;
UINT32 Hi;
 
} UINT64_STRUCT;
 
typedef union uint64_overlay
{
UINT64 Full;
UINT64_STRUCT Part;
 
} UINT64_OVERLAY;
 
 
#define ACPI_INTEGER_BIT_SIZE 64
#define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */
#define ACPI_MAX64_DECIMAL_DIGITS 20
742,39 → 730,35
#define ACPI_GPE_MAX 0xFF
#define ACPI_NUM_GPE 256
 
/* Actions for AcpiSetGpe */
/* Actions for AcpiSetGpe, AcpiGpeWakeup, AcpiHwLowSetGpe */
 
#define ACPI_GPE_ENABLE 0
#define ACPI_GPE_DISABLE 1
#define ACPI_GPE_CONDITIONAL_ENABLE 2
 
/* GpeTypes for AcpiEnableGpe and AcpiDisableGpe */
 
#define ACPI_GPE_TYPE_WAKE (UINT8) 0x01
#define ACPI_GPE_TYPE_RUNTIME (UINT8) 0x02
#define ACPI_GPE_TYPE_WAKE_RUN (UINT8) 0x03
 
/*
* GPE info flags - Per GPE
* +-------+---+-+-+
* | 7:4 |3:2|1|0|
* +-------+---+-+-+
* +-------+-+-+---+
* | 7:4 |3|2|1:0|
* +-------+-+-+---+
* | | | |
* | | | +--- Interrupt type: edge or level triggered
* | | +----- GPE can wake the system
* | +-------- Type of dispatch:to method, handler, or none
* +-------------- <Reserved>
* | | | +-- Type of dispatch:to method, handler, notify, or none
* | | +----- Interrupt type: edge or level triggered
* | +------- Is a Wake GPE
* +------------ <Reserved>
*/
#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x01
#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x01
#define ACPI_GPE_DISPATCH_NONE (UINT8) 0x00
#define ACPI_GPE_DISPATCH_METHOD (UINT8) 0x01
#define ACPI_GPE_DISPATCH_HANDLER (UINT8) 0x02
#define ACPI_GPE_DISPATCH_NOTIFY (UINT8) 0x03
#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x03
 
#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x04
#define ACPI_GPE_EDGE_TRIGGERED (UINT8) 0x00
#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x04
 
#define ACPI_GPE_CAN_WAKE (UINT8) 0x02
#define ACPI_GPE_CAN_WAKE (UINT8) 0x08
 
#define ACPI_GPE_DISPATCH_MASK (UINT8) 0x0C
#define ACPI_GPE_DISPATCH_HANDLER (UINT8) 0x04
#define ACPI_GPE_DISPATCH_METHOD (UINT8) 0x08
#define ACPI_GPE_DISPATCH_NOT_USED (UINT8) 0x00
 
/*
* Flags for GPE and Lock interfaces
*/
804,11 → 788,26
#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_IPMI (ACPI_ADR_SPACE_TYPE) 7
#define ACPI_ADR_SPACE_DATA_TABLE (ACPI_ADR_SPACE_TYPE) 8
#define ACPI_ADR_SPACE_FIXED_HARDWARE (ACPI_ADR_SPACE_TYPE) 127
 
#define ACPI_NUM_PREDEFINED_REGIONS 8
 
/*
* Special Address Spaces
*
* Note: A Data Table region is a special type of operation region
* that has its own AML opcode. However, internally, the AML
* interpreter simply creates an operation region with an an address
* space type of ACPI_ADR_SPACE_DATA_TABLE.
*/
#define ACPI_ADR_SPACE_DATA_TABLE (ACPI_ADR_SPACE_TYPE) 0x7E /* Internal to ACPICA only */
#define ACPI_ADR_SPACE_FIXED_HARDWARE (ACPI_ADR_SPACE_TYPE) 0x7F
 
/* Values for _REG connection code */
 
#define ACPI_REG_DISCONNECT 0
#define ACPI_REG_CONNECT 1
 
/*
* BitRegister IDs
*
* These values are intended to be used by the hardware interfaces
1032,10 → 1031,26
* Various handlers and callback procedures
*/
typedef
void (*ACPI_GBL_EVENT_HANDLER) (
UINT32 EventType,
ACPI_HANDLE Device,
UINT32 EventNumber,
void *Context);
 
#define ACPI_EVENT_TYPE_GPE 0
#define ACPI_EVENT_TYPE_FIXED 1
 
typedef
UINT32 (*ACPI_EVENT_HANDLER) (
void *Context);
 
typedef
UINT32 (*ACPI_GPE_HANDLER) (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
void *Context);
 
typedef
void (*ACPI_NOTIFY_HANDLER) (
ACPI_HANDLE Device,
UINT32 Value,
1104,12 → 1119,22
void *Context,
void **ReturnValue);
 
typedef
UINT32 (*ACPI_INTERFACE_HANDLER) (
ACPI_STRING InterfaceName,
UINT32 Supported);
 
 
/* Interrupt handler return values */
 
#define ACPI_INTERRUPT_NOT_HANDLED 0x00
#define ACPI_INTERRUPT_HANDLED 0x01
 
/* GPE handler return values */
 
#define ACPI_REENABLE_GPE 0x80
 
 
/* Length of 32-bit EISAID values when converted back to a string */
 
#define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */