diff options
Diffstat (limited to 'include/actbl.h')
-rw-r--r-- | include/actbl.h | 72 |
1 files changed, 46 insertions, 26 deletions
diff --git a/include/actbl.h b/include/actbl.h index 084d210..caa3bdb 100644 --- a/include/actbl.h +++ b/include/actbl.h @@ -116,9 +116,25 @@ #ifndef __ACTBL_H__ #define __ACTBL_H__ + +/******************************************************************************* + * + * Fundamental ACPI tables + * + * This file contains definitions for the ACPI tables that are directly consumed + * by ACPICA. All other tables are consumed by the OS-dependent ACPI-related + * device drivers and other OS support code. + * + * The RSDP and FACS do not use the common ACPI table header. All other ACPI + * tables use the header. + * + ******************************************************************************/ + + /* - * Values for description table header signatures. Useful because they make - * it more difficult to inadvertently type in the wrong signature. + * Values for description table header signatures for tables defined in this + * file. Useful because they make it more difficult to inadvertently type in + * the wrong signature. */ #define ACPI_SIG_DSDT "DSDT" /* Differentiated System Description Table */ #define ACPI_SIG_FADT "FACP" /* Fixed ACPI Description Table */ @@ -137,23 +153,17 @@ */ #pragma pack(1) - /* - * These are the ACPI tables that are directly consumed by the subsystem. - * - * The RSDP and FACS do not use the common ACPI table header. All other ACPI - * tables use the header. - * * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables. * This is the only type that is even remotely portable. Anything else is not * portable, so do not use any other bitfield types. */ + /******************************************************************************* * - * ACPI Table Header. This common header is used by all tables except the - * RSDP and FACS. The define is used for direct inclusion of header into - * other ACPI tables + * Master ACPI Table Header. This common header is used by all ACPI tables + * except the RSDP and FACS. * ******************************************************************************/ @@ -172,13 +182,16 @@ typedef struct acpi_table_header } ACPI_TABLE_HEADER; -/* +/******************************************************************************* + * * GAS - Generic Address Structure (ACPI 2.0+) * * Note: Since this structure is used in the ACPI tables, it is byte aligned. - * If misalignment is not supported, access to the Address field must be - * performed with care. - */ + * If misaliged access is not supported by the hardware, accesses to the + * 64-bit Address field must be performed with care. + * + ******************************************************************************/ + typedef struct acpi_generic_address { UINT8 SpaceId; /* Address space where struct or register exists */ @@ -193,6 +206,7 @@ typedef struct acpi_generic_address /******************************************************************************* * * RSDP - Root System Description Pointer (Signature is "RSD PTR ") + * Version 2 * ******************************************************************************/ @@ -216,6 +230,7 @@ typedef struct acpi_table_rsdp /******************************************************************************* * * RSDT/XSDT - Root System Description Tables + * Version 1 (both) * ******************************************************************************/ @@ -256,17 +271,17 @@ typedef struct acpi_table_facs } ACPI_TABLE_FACS; -/* GlobalLock flags */ +/* Masks for GlobalLock flag field above */ #define ACPI_GLOCK_PENDING (1) /* 00: Pending global lock ownership */ #define ACPI_GLOCK_OWNED (1<<1) /* 01: Global lock is owned */ -/* Flags */ +/* Masks for Flags field above */ #define ACPI_FACS_S4_BIOS_PRESENT (1) /* 00: S4BIOS support is present */ -#define ACPI_FACS_64BIT_WAKE (1<<1) /* 01: 64-bit wake vector supported (ACPI 4.0) */ +#define ACPI_FACS_64BIT_WAKE (1<<1) /* 01: 64-bit wake vector supported (ACPI 4.0) */ -/* OspmFlags */ +/* Masks for OspmFlags field above */ #define ACPI_FACS_64BIT_ENVIRONMENT (1) /* 00: 64-bit wake environment is required (ACPI 4.0) */ @@ -274,6 +289,7 @@ typedef struct acpi_table_facs /******************************************************************************* * * FADT - Fixed ACPI Description Table (Signature "FACP") + * Version 4 * ******************************************************************************/ @@ -337,7 +353,7 @@ typedef struct acpi_table_fadt } ACPI_TABLE_FADT; -/* FADT Boot Architecture Flags (BootFlags) */ +/* Masks for FADT Boot Architecture Flags (BootFlags) */ #define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ #define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ @@ -345,7 +361,7 @@ typedef struct acpi_table_fadt #define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */ #define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */ -/* FADT flags */ +/* Masks for FADT flags */ #define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ #define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */ @@ -369,7 +385,7 @@ typedef struct acpi_table_fadt #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local xAPICs must use physical dest mode (ACPI 3.0) */ -/* FADT Prefered Power Management Profiles */ +/* Values for PreferredProfile (Prefered Power Management Profiles) */ enum AcpiPreferedPmProfiles { @@ -388,6 +404,9 @@ enum AcpiPreferedPmProfiles #pragma pack() +/* + * Internal table-related structures + */ typedef union acpi_name_union { UINT32 Integer; @@ -395,9 +414,9 @@ typedef union acpi_name_union } ACPI_NAME_UNION; -/* - * Internal ACPI Table Descriptor. One per ACPI table - */ + +/* Internal ACPI Table Descriptor. One per ACPI table. */ + typedef struct acpi_table_desc { ACPI_PHYSICAL_ADDRESS Address; @@ -409,7 +428,7 @@ typedef struct acpi_table_desc } ACPI_TABLE_DESC; -/* Flags for above */ +/* Masks for Flags field above */ #define ACPI_TABLE_ORIGIN_UNKNOWN (0) #define ACPI_TABLE_ORIGIN_MAPPED (1) @@ -423,6 +442,7 @@ typedef struct acpi_table_desc * Get the remaining ACPI tables */ #include "actbl1.h" +#include "actbl2.h" /* Macros used to generate offsets to specific table fields */ |