aboutsummaryrefslogtreecommitdiff
path: root/source/include
diff options
context:
space:
mode:
Diffstat (limited to 'source/include')
-rw-r--r--source/include/acdisasm.h8
-rw-r--r--source/include/acevents.h5
-rw-r--r--source/include/acglobal.h143
-rw-r--r--source/include/aclocal.h7
-rw-r--r--source/include/acnames.h1
-rw-r--r--source/include/acpixf.h518
-rw-r--r--source/include/acpredef.h4
-rw-r--r--source/include/actbl1.h4
-rw-r--r--source/include/actbl2.h83
-rw-r--r--source/include/actypes.h35
-rw-r--r--source/include/platform/aclinux.h33
11 files changed, 574 insertions, 267 deletions
diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h
index ae1fdf8ab3aa..7de84acc1a49 100644
--- a/source/include/acdisasm.h
+++ b/source/include/acdisasm.h
@@ -146,6 +146,7 @@ typedef enum
ACPI_DMT_HESTNTFY,
ACPI_DMT_HESTNTYP,
ACPI_DMT_IVRS,
+ ACPI_DMT_LPIT,
ACPI_DMT_MADT,
ACPI_DMT_PCCT,
ACPI_DMT_PMTT,
@@ -283,6 +284,9 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestBank[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHpet[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpitHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpit0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpit1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs1[];
@@ -449,6 +453,10 @@ AcpiDmDumpIvrs (
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpLpit (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpMadt (
ACPI_TABLE_HEADER *Table);
diff --git a/source/include/acevents.h b/source/include/acevents.h
index 3db603534a6b..43c1d7cc5fd6 100644
--- a/source/include/acevents.h
+++ b/source/include/acevents.h
@@ -144,9 +144,10 @@ AcpiEvFinishGpe (
ACPI_STATUS
AcpiEvCreateGpeBlock (
ACPI_NAMESPACE_NODE *GpeDevice,
- ACPI_GENERIC_ADDRESS *GpeBlockAddress,
+ UINT64 Address,
+ UINT8 SpaceId,
UINT32 RegisterCount,
- UINT8 GpeBlockBaseNumber,
+ UINT16 GpeBlockBaseNumber,
UINT32 InterruptNumber,
ACPI_GPE_BLOCK_INFO **ReturnGpeBlock);
diff --git a/source/include/acglobal.h b/source/include/acglobal.h
index f33b720d0db9..06225c1247f2 100644
--- a/source/include/acglobal.h
+++ b/source/include/acglobal.h
@@ -45,146 +45,14 @@
#define __ACGLOBAL_H__
-/*
- * Ensure that the globals are actually defined and initialized only once.
- *
- * The use of these macros allows a single list of globals (here) in order
- * to simplify maintenance of the code.
- */
-#ifdef DEFINE_ACPI_GLOBALS
-#define ACPI_GLOBAL(type,name) \
- extern type name; \
- type name
-
-#define ACPI_INIT_GLOBAL(type,name,value) \
- type name=value
-
-#else
-#define ACPI_GLOBAL(type,name) \
- extern type name
-
-#define ACPI_INIT_GLOBAL(type,name,value) \
- extern type name
-#endif
-
-
-#ifdef DEFINE_ACPI_GLOBALS
-
-/* Public globals, available from outside ACPICA subsystem */
-
/*****************************************************************************
*
- * Runtime configuration (static defaults that can be overriden at runtime)
+ * Globals related to the ACPI tables
*
****************************************************************************/
-/*
- * Enable "slack" in the AML interpreter? Default is FALSE, and the
- * interpreter strictly follows the ACPI specification. Setting to TRUE
- * allows the interpreter to ignore certain errors and/or bad AML constructs.
- *
- * Currently, these features are enabled by this flag:
- *
- * 1) Allow "implicit return" of last value in a control method
- * 2) Allow access beyond the end of an operation region
- * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
- * 4) Allow ANY object type to be a source operand for the Store() operator
- * 5) Allow unresolved references (invalid target name) in package objects
- * 6) Enable warning messages for behavior that is not ACPI spec compliant
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE);
-
-/*
- * Automatically serialize all methods that create named objects? Default
- * is TRUE, meaning that all NonSerialized methods are scanned once at
- * table load time to determine those that create named objects. Methods
- * that create named objects are marked Serialized in order to prevent
- * possible run-time problems if they are entered by more than one thread.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE);
-
-/*
- * Create the predefined _OSI method in the namespace? Default is TRUE
- * because ACPICA is fully compatible with other ACPI implementations.
- * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE);
+/* Master list of all ACPI tables that were found in the RSDT/XSDT */
-/*
- * Optionally use default values for the ACPI register widths. Set this to
- * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE);
-
-/*
- * Optionally enable output from the AML Debug Object.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE);
-
-/*
- * Optionally copy the entire DSDT to local memory (instead of simply
- * mapping it.) There are some BIOSs that corrupt or replace the original
- * DSDT, creating the need for this option. Default is FALSE, do not copy
- * the DSDT.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE);
-
-/*
- * Optionally ignore an XSDT if present and use the RSDT instead.
- * Although the ACPI specification requires that an XSDT be used instead
- * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
- * some machines. Default behavior is to use the XSDT if present.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
-
-/*
- * Optionally use 32-bit FADT addresses if and when there is a conflict
- * (address mismatch) between the 32-bit and 64-bit versions of the
- * address. Although ACPICA adheres to the ACPI specification which
- * requires the use of the corresponding 64-bit address if it is non-zero,
- * some machines have been found to have a corrupted non-zero 64-bit
- * address. Default is FALSE, do not favor the 32-bit addresses.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE);
-
-/*
- * Optionally truncate I/O addresses to 16 bits. Provides compatibility
- * with other ACPI implementations. NOTE: During ACPICA initialization,
- * this value is set to TRUE if any Windows OSI strings have been
- * requested by the BIOS.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE);
-
-/*
- * Disable runtime checking and repair of values returned by control methods.
- * Use only if the repair is causing a problem on a particular machine.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE);
-
-/*
- * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
- * This can be useful for debugging ACPI problems on some machines.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE);
-
-/*
- * We keep track of the latest version of Windows that has been requested by
- * the BIOS.
- */
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
-
-#endif /* DEFINE_ACPI_GLOBALS */
-
-
-/*****************************************************************************
- *
- * ACPI Table globals
- *
- ****************************************************************************/
-
-/*
- * Master list of all ACPI tables that were found in the RSDT/XSDT.
- */
ACPI_GLOBAL (ACPI_TABLE_LIST, AcpiGbl_RootTableList);
/* DSDT information. Used to check for DSDT corruption */
@@ -284,7 +152,6 @@ ACPI_GLOBAL (ACPI_EXCEPTION_HANDLER, AcpiGbl_ExceptionHandler);
ACPI_GLOBAL (ACPI_INIT_HANDLER, AcpiGbl_InitHandler);
ACPI_GLOBAL (ACPI_TABLE_HANDLER, AcpiGbl_TableHandler);
ACPI_GLOBAL (void *, AcpiGbl_TableHandlerContext);
-ACPI_GLOBAL (ACPI_WALK_STATE *, AcpiGbl_BreakpointWalk);
ACPI_GLOBAL (ACPI_INTERFACE_HANDLER, AcpiGbl_InterfaceHandler);
ACPI_GLOBAL (ACPI_SCI_HANDLER_INFO *, AcpiGbl_SciHandlerList);
@@ -301,7 +168,6 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_RegMethodsExecuted);
/* Misc */
ACPI_GLOBAL (UINT32, AcpiGbl_OriginalMode);
-ACPI_GLOBAL (UINT32, AcpiGbl_RsdpOriginalLocation);
ACPI_GLOBAL (UINT32, AcpiGbl_NsLookupCount);
ACPI_GLOBAL (UINT32, AcpiGbl_PsFindCount);
ACPI_GLOBAL (UINT16, AcpiGbl_Pm1EnableRegisterSave);
@@ -489,11 +355,6 @@ ACPI_GLOBAL (UINT16, AcpiGbl_NodeTypeCountMisc);
ACPI_GLOBAL (UINT32, AcpiGbl_NumNodes);
ACPI_GLOBAL (UINT32, AcpiGbl_NumObjects);
-ACPI_GLOBAL (UINT32, AcpiGbl_SizeOfParseTree);
-ACPI_GLOBAL (UINT32, AcpiGbl_SizeOfMethodTrees);
-ACPI_GLOBAL (UINT32, AcpiGbl_SizeOfNodeEntries);
-ACPI_GLOBAL (UINT32, AcpiGbl_SizeOfAcpiObjects);
-
#endif /* ACPI_DEBUGGER */
diff --git a/source/include/aclocal.h b/source/include/aclocal.h
index 50a4a8e92383..3fcfe1fcb509 100644
--- a/source/include/aclocal.h
+++ b/source/include/aclocal.h
@@ -516,9 +516,9 @@ typedef struct acpi_gpe_register_info
{
ACPI_GENERIC_ADDRESS StatusAddress; /* Address of status reg */
ACPI_GENERIC_ADDRESS EnableAddress; /* Address of enable reg */
+ UINT16 BaseGpeNumber; /* Base GPE number for this register */
UINT8 EnableForWake; /* GPEs to keep enabled when sleeping */
UINT8 EnableForRun; /* GPEs to keep enabled when running */
- UINT8 BaseGpeNumber; /* Base GPE number for this register */
} ACPI_GPE_REGISTER_INFO;
@@ -534,10 +534,11 @@ typedef struct acpi_gpe_block_info
struct acpi_gpe_xrupt_info *XruptBlock; /* Backpointer to interrupt block */
ACPI_GPE_REGISTER_INFO *RegisterInfo; /* One per GPE register pair */
ACPI_GPE_EVENT_INFO *EventInfo; /* One for each GPE */
- ACPI_GENERIC_ADDRESS BlockAddress; /* Base address of the block */
+ UINT64 Address; /* Base address of the block */
UINT32 RegisterCount; /* Number of register pairs in block */
UINT16 GpeCount; /* Number of individual GPEs in block */
- UINT8 BlockBaseNumber;/* Base GPE number for this block */
+ UINT16 BlockBaseNumber;/* Base GPE number for this block */
+ UINT8 SpaceId;
BOOLEAN Initialized; /* TRUE if this block is initialized */
} ACPI_GPE_BLOCK_INFO;
diff --git a/source/include/acnames.h b/source/include/acnames.h
index f5daaceb2f81..3db143cbbdaa 100644
--- a/source/include/acnames.h
+++ b/source/include/acnames.h
@@ -55,6 +55,7 @@
#define METHOD_NAME__HID "_HID"
#define METHOD_NAME__INI "_INI"
#define METHOD_NAME__PLD "_PLD"
+#define METHOD_NAME__PRP "_PRP"
#define METHOD_NAME__PRS "_PRS"
#define METHOD_NAME__PRT "_PRT"
#define METHOD_NAME__PRW "_PRW"
diff --git a/source/include/acpixf.h b/source/include/acpixf.h
index 0b010470d0f9..53d2c1fd0ed4 100644
--- a/source/include/acpixf.h
+++ b/source/include/acpixf.h
@@ -41,64 +41,249 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#ifndef __ACXFACE_H__
#define __ACXFACE_H__
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20140325
+#define ACPI_CA_VERSION 0x20140424
#include "acconfig.h"
#include "actypes.h"
#include "actbl.h"
#include "acbuffer.h"
+
+/*****************************************************************************
+ *
+ * Macros used for ACPICA globals and configuration
+ *
+ ****************************************************************************/
+
+/*
+ * Ensure that global variables are defined and initialized only once.
+ *
+ * The use of these macros allows for a single list of globals (here)
+ * in order to simplify maintenance of the code.
+ */
+#ifdef DEFINE_ACPI_GLOBALS
+#define ACPI_GLOBAL(type,name) \
+ extern type name; \
+ type name
+
+#define ACPI_INIT_GLOBAL(type,name,value) \
+ type name=value
+
+#else
+#ifndef ACPI_GLOBAL
+#define ACPI_GLOBAL(type,name) \
+ extern type name
+#endif
+
+#ifndef ACPI_INIT_GLOBAL
+#define ACPI_INIT_GLOBAL(type,name,value) \
+ extern type name
+#endif
+#endif
+
+/*
+ * These macros configure the various ACPICA interfaces. They are
+ * useful for generating stub inline functions for features that are
+ * configured out of the current kernel or ACPICA application.
+ */
+#ifndef ACPI_EXTERNAL_RETURN_STATUS
+#define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \
+ Prototype;
+#endif
+
+#ifndef ACPI_EXTERNAL_RETURN_OK
+#define ACPI_EXTERNAL_RETURN_OK(Prototype) \
+ Prototype;
+#endif
+
+#ifndef ACPI_EXTERNAL_RETURN_VOID
+#define ACPI_EXTERNAL_RETURN_VOID(Prototype) \
+ Prototype;
+#endif
+
+#ifndef ACPI_EXTERNAL_RETURN_UINT32
+#define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \
+ Prototype;
+#endif
+
+#ifndef ACPI_EXTERNAL_RETURN_PTR
+#define ACPI_EXTERNAL_RETURN_PTR(Prototype) \
+ Prototype;
+#endif
+
+
+/*****************************************************************************
+ *
+ * Public globals and runtime configuration options
+ *
+ ****************************************************************************/
+
+/*
+ * Enable "slack mode" of the AML interpreter? Default is FALSE, and the
+ * interpreter strictly follows the ACPI specification. Setting to TRUE
+ * allows the interpreter to ignore certain errors and/or bad AML constructs.
+ *
+ * Currently, these features are enabled by this flag:
+ *
+ * 1) Allow "implicit return" of last value in a control method
+ * 2) Allow access beyond the end of an operation region
+ * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
+ * 4) Allow ANY object type to be a source operand for the Store() operator
+ * 5) Allow unresolved references (invalid target name) in package objects
+ * 6) Enable warning messages for behavior that is not ACPI spec compliant
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE);
+
+/*
+ * Automatically serialize all methods that create named objects? Default
+ * is TRUE, meaning that all NonSerialized methods are scanned once at
+ * table load time to determine those that create named objects. Methods
+ * that create named objects are marked Serialized in order to prevent
+ * possible run-time problems if they are entered by more than one thread.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE);
+
+/*
+ * Create the predefined _OSI method in the namespace? Default is TRUE
+ * because ACPICA is fully compatible with other ACPI implementations.
+ * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE);
+
+/*
+ * Optionally use default values for the ACPI register widths. Set this to
+ * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE);
+
+/*
+ * Optionally enable output from the AML Debug Object.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE);
+
+/*
+ * Optionally copy the entire DSDT to local memory (instead of simply
+ * mapping it.) There are some BIOSs that corrupt or replace the original
+ * DSDT, creating the need for this option. Default is FALSE, do not copy
+ * the DSDT.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE);
+
+/*
+ * Optionally ignore an XSDT if present and use the RSDT instead.
+ * Although the ACPI specification requires that an XSDT be used instead
+ * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
+ * some machines. Default behavior is to use the XSDT if present.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
+
+/*
+ * Optionally use 32-bit FADT addresses if and when there is a conflict
+ * (address mismatch) between the 32-bit and 64-bit versions of the
+ * address. Although ACPICA adheres to the ACPI specification which
+ * requires the use of the corresponding 64-bit address if it is non-zero,
+ * some machines have been found to have a corrupted non-zero 64-bit
+ * address. Default is FALSE, do not favor the 32-bit addresses.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE);
+
+/*
+ * Optionally truncate I/O addresses to 16 bits. Provides compatibility
+ * with other ACPI implementations. NOTE: During ACPICA initialization,
+ * this value is set to TRUE if any Windows OSI strings have been
+ * requested by the BIOS.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE);
+
+/*
+ * Disable runtime checking and repair of values returned by control methods.
+ * Use only if the repair is causing a problem on a particular machine.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE);
+
/*
- * Globals that are publically available
+ * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
+ * This can be useful for debugging ACPI problems on some machines.
*/
-extern UINT32 AcpiCurrentGpeCount;
-extern ACPI_TABLE_FADT AcpiGbl_FADT;
-extern BOOLEAN AcpiGbl_SystemAwakeAndRunning;
-extern BOOLEAN AcpiGbl_ReducedHardware; /* ACPI 5.0 */
-extern UINT8 AcpiGbl_OsiData;
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE);
-/* Runtime configuration of debug print levels */
+/*
+ * We keep track of the latest version of Windows that has been requested by
+ * the BIOS. ACPI 5.0.
+ */
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
-extern UINT32 AcpiDbgLevel;
-extern UINT32 AcpiDbgLayer;
+/*
+ * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
+ * that the ACPI hardware is no longer required. A flag in the FADT indicates
+ * a reduced HW machine, and that flag is duplicated here for convenience.
+ */
+ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
-/* ACPICA runtime options */
+/*
+ * This mechanism is used to trace a specified AML method. The method is
+ * traced each time it is executed.
+ */
+ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0);
+ACPI_INIT_GLOBAL (ACPI_NAME, AcpiGbl_TraceMethodName, 0);
-extern UINT8 AcpiGbl_AutoSerializeMethods;
-extern UINT8 AcpiGbl_CopyDsdtLocally;
-extern UINT8 AcpiGbl_CreateOsiMethod;
-extern UINT8 AcpiGbl_DisableAutoRepair;
-extern UINT8 AcpiGbl_DisableSsdtTableInstall;
-extern UINT8 AcpiGbl_DoNotUseXsdt;
-extern UINT8 AcpiGbl_EnableAmlDebugObject;
-extern UINT8 AcpiGbl_EnableInterpreterSlack;
-extern UINT32 AcpiGbl_TraceFlags;
-extern ACPI_NAME AcpiGbl_TraceMethodName;
-extern UINT8 AcpiGbl_TruncateIoAddresses;
-extern UINT8 AcpiGbl_Use32BitFadtAddresses;
-extern UINT8 AcpiGbl_UseDefaultRegisterWidths;
+/*
+ * Runtime configuration of debug output control masks. We want the debug
+ * switches statically initialized so they are already set when the debugger
+ * is entered.
+ */
+#ifdef ACPI_DEBUG_OUTPUT
+ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
+#else
+ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
+#endif
+ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
+
+/*
+ * Other miscellaneous globals
+ */
+ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT);
+ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount);
+ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning);
+/*****************************************************************************
+ *
+ * ACPICA public interface configuration.
+ *
+ * Interfaces that are configured out of the ACPICA build are replaced
+ * by inlined stubs by default.
+ *
+ ****************************************************************************/
+
/*
- * Hardware-reduced prototypes. All interfaces that use these macros will
- * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
+ * Hardware-reduced prototypes (default: Not hardware reduced).
+ *
+ * All ACPICA hardware-related interfaces that use these macros will be
+ * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
* is set to TRUE.
+ *
+ * Note: This static build option for reduced hardware is intended to
+ * reduce ACPICA code size if desired or necessary. However, even if this
+ * option is not specified, the runtime behavior of ACPICA is dependent
+ * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
+ * the flag will enable similar behavior -- ACPICA will not attempt
+ * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
*/
#if (!ACPI_REDUCED_HARDWARE)
#define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
- Prototype;
+ ACPI_EXTERNAL_RETURN_STATUS(Prototype)
#define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
- Prototype;
+ ACPI_EXTERNAL_RETURN_OK(Prototype)
#define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
- Prototype;
+ ACPI_EXTERNAL_RETURN_VOID(Prototype)
#else
#define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
@@ -114,29 +299,76 @@ extern UINT8 AcpiGbl_UseDefaultRegisterWidths;
/*
+ * Error message prototypes (default: error messages enabled).
+ *
+ * All interfaces related to error and warning messages
+ * will be configured out of the ACPICA build if the
+ * ACPI_NO_ERROR_MESSAGE flag is defined.
+ */
+#ifndef ACPI_NO_ERROR_MESSAGES
+#define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
+ Prototype;
+
+#else
+#define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
+ static ACPI_INLINE Prototype {return;}
+
+#endif /* ACPI_NO_ERROR_MESSAGES */
+
+
+/*
+ * Debugging output prototypes (default: no debug output).
+ *
+ * All interfaces related to debug output messages
+ * will be configured out of the ACPICA build unless the
+ * ACPI_DEBUG_OUTPUT flag is defined.
+ */
+#ifdef ACPI_DEBUG_OUTPUT
+#define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
+ Prototype;
+
+#else
+#define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
+ static ACPI_INLINE Prototype {return;}
+
+#endif /* ACPI_DEBUG_OUTPUT */
+
+
+/*****************************************************************************
+ *
+ * ACPICA public interface prototypes
+ *
+ ****************************************************************************/
+
+/*
* Initialization
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInitializeTables (
ACPI_TABLE_DESC *InitialStorage,
UINT32 InitialTableCount,
- BOOLEAN AllowResize);
+ BOOLEAN AllowResize))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInitializeSubsystem (
- void);
+ void))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiEnableSubsystem (
- UINT32 Flags);
+ UINT32 Flags))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInitializeObjects (
- UINT32 Flags);
+ UINT32 Flags))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiTerminate (
- void);
+ void))
/*
@@ -152,114 +384,136 @@ ACPI_STATUS
AcpiDisable (
void))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiSubsystemStatus (
- void);
+ void))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetSystemInfo (
- ACPI_BUFFER *RetBuffer);
+ ACPI_BUFFER *RetBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetStatistics (
- ACPI_STATISTICS *Stats);
+ ACPI_STATISTICS *Stats))
+ACPI_EXTERNAL_RETURN_PTR (
const char *
AcpiFormatException (
- ACPI_STATUS Exception);
+ ACPI_STATUS Exception))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiPurgeCachedObjects (
- void);
+ void))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallInterface (
- ACPI_STRING InterfaceName);
+ ACPI_STRING InterfaceName))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveInterface (
- ACPI_STRING InterfaceName);
+ ACPI_STRING InterfaceName))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiUpdateInterfaces (
- UINT8 Action);
+ UINT8 Action))
+ACPI_EXTERNAL_RETURN_UINT32 (
UINT32
AcpiCheckAddressRange (
ACPI_ADR_SPACE_TYPE SpaceId,
ACPI_PHYSICAL_ADDRESS Address,
ACPI_SIZE Length,
- BOOLEAN Warn);
+ BOOLEAN Warn))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiDecodePldBuffer (
UINT8 *InBuffer,
ACPI_SIZE Length,
- ACPI_PLD_INFO **ReturnBuffer);
+ ACPI_PLD_INFO **ReturnBuffer))
/*
* ACPI table load/unload interfaces
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallTable (
ACPI_PHYSICAL_ADDRESS Address,
- BOOLEAN Physical);
+ BOOLEAN Physical))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiLoadTable (
- ACPI_TABLE_HEADER *Table);
+ ACPI_TABLE_HEADER *Table))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiUnloadParentTable (
- ACPI_HANDLE Object);
+ ACPI_HANDLE Object))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiLoadTables (
- void);
+ void))
/*
* ACPI table manipulation interfaces
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiReallocateRootTable (
- void);
+ void))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiFindRootPointer (
- ACPI_SIZE *RsdpAddress);
+ ACPI_SIZE *RsdpAddress))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetTableHeader (
ACPI_STRING Signature,
UINT32 Instance,
- ACPI_TABLE_HEADER *OutTableHeader);
+ ACPI_TABLE_HEADER *OutTableHeader))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetTable (
ACPI_STRING Signature,
UINT32 Instance,
- ACPI_TABLE_HEADER **OutTable);
+ ACPI_TABLE_HEADER **OutTable))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetTableByIndex (
UINT32 TableIndex,
- ACPI_TABLE_HEADER **OutTable);
+ ACPI_TABLE_HEADER **OutTable))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallTableHandler (
ACPI_TABLE_HANDLER Handler,
- void *Context);
+ void *Context))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveTableHandler (
- ACPI_TABLE_HANDLER Handler);
+ ACPI_TABLE_HANDLER Handler))
/*
* Namespace and name interfaces
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiWalkNamespace (
ACPI_OBJECT_TYPE Type,
@@ -268,104 +522,119 @@ AcpiWalkNamespace (
ACPI_WALK_CALLBACK DescendingCallback,
ACPI_WALK_CALLBACK AscendingCallback,
void *Context,
- void **ReturnValue);
+ void **ReturnValue))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetDevices (
char *HID,
ACPI_WALK_CALLBACK UserFunction,
void *Context,
- void **ReturnValue);
+ void **ReturnValue))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetName (
ACPI_HANDLE Object,
UINT32 NameType,
- ACPI_BUFFER *RetPathPtr);
+ ACPI_BUFFER *RetPathPtr))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetHandle (
ACPI_HANDLE Parent,
ACPI_STRING Pathname,
- ACPI_HANDLE *RetHandle);
+ ACPI_HANDLE *RetHandle))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiAttachData (
ACPI_HANDLE Object,
ACPI_OBJECT_HANDLER Handler,
- void *Data);
+ void *Data))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiDetachData (
ACPI_HANDLE Object,
- ACPI_OBJECT_HANDLER Handler);
+ ACPI_OBJECT_HANDLER Handler))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetData (
ACPI_HANDLE Object,
ACPI_OBJECT_HANDLER Handler,
- void **Data);
+ void **Data))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiDebugTrace (
char *Name,
UINT32 DebugLevel,
UINT32 DebugLayer,
- UINT32 Flags);
+ UINT32 Flags))
/*
* Object manipulation and enumeration
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiEvaluateObject (
ACPI_HANDLE Object,
ACPI_STRING Pathname,
ACPI_OBJECT_LIST *ParameterObjects,
- ACPI_BUFFER *ReturnObjectBuffer);
+ ACPI_BUFFER *ReturnObjectBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiEvaluateObjectTyped (
ACPI_HANDLE Object,
ACPI_STRING Pathname,
ACPI_OBJECT_LIST *ExternalParams,
ACPI_BUFFER *ReturnBuffer,
- ACPI_OBJECT_TYPE ReturnType);
+ ACPI_OBJECT_TYPE ReturnType))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetObjectInfo (
ACPI_HANDLE Object,
- ACPI_DEVICE_INFO **ReturnBuffer);
+ ACPI_DEVICE_INFO **ReturnBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallMethod (
- UINT8 *Buffer);
+ UINT8 *Buffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetNextObject (
ACPI_OBJECT_TYPE Type,
ACPI_HANDLE Parent,
ACPI_HANDLE Child,
- ACPI_HANDLE *OutHandle);
+ ACPI_HANDLE *OutHandle))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetType (
ACPI_HANDLE Object,
- ACPI_OBJECT_TYPE *OutType);
+ ACPI_OBJECT_TYPE *OutType))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetParent (
ACPI_HANDLE Object,
- ACPI_HANDLE *OutHandle);
+ ACPI_HANDLE *OutHandle))
/*
* Handler interfaces
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallInitializationHandler (
ACPI_INIT_HANDLER Handler,
- UINT32 Function);
+ UINT32 Function))
ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
@@ -413,40 +682,46 @@ AcpiRemoveGpeHandler (
UINT32 GpeNumber,
ACPI_GPE_HANDLER Address))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallNotifyHandler (
ACPI_HANDLE Device,
UINT32 HandlerType,
ACPI_NOTIFY_HANDLER Handler,
- void *Context);
+ void *Context))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveNotifyHandler (
ACPI_HANDLE Device,
UINT32 HandlerType,
- ACPI_NOTIFY_HANDLER Handler);
+ ACPI_NOTIFY_HANDLER Handler))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallAddressSpaceHandler (
ACPI_HANDLE Device,
ACPI_ADR_SPACE_TYPE SpaceId,
ACPI_ADR_SPACE_HANDLER Handler,
ACPI_ADR_SPACE_SETUP Setup,
- void *Context);
+ void *Context))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveAddressSpaceHandler (
ACPI_HANDLE Device,
ACPI_ADR_SPACE_TYPE SpaceId,
- ACPI_ADR_SPACE_HANDLER Handler);
+ ACPI_ADR_SPACE_HANDLER Handler))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallExceptionHandler (
- ACPI_EXCEPTION_HANDLER Handler);
+ ACPI_EXCEPTION_HANDLER Handler))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiInstallInterfaceHandler (
- ACPI_INTERFACE_HANDLER Handler);
+ ACPI_INTERFACE_HANDLER Handler))
/*
@@ -467,16 +742,18 @@ AcpiReleaseGlobalLock (
/*
* Interfaces to AML mutex objects
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiAcquireMutex (
ACPI_HANDLE Handle,
ACPI_STRING Pathname,
- UINT16 Timeout);
+ UINT16 Timeout))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiReleaseMutex (
ACPI_HANDLE Handle,
- ACPI_STRING Pathname);
+ ACPI_STRING Pathname))
/*
@@ -604,79 +881,92 @@ ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
ACPI_RESOURCE *Resource,
void *Context);
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetVendorResource (
ACPI_HANDLE Device,
char *Name,
ACPI_VENDOR_UUID *Uuid,
- ACPI_BUFFER *RetBuffer);
+ ACPI_BUFFER *RetBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetCurrentResources (
ACPI_HANDLE Device,
- ACPI_BUFFER *RetBuffer);
+ ACPI_BUFFER *RetBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetPossibleResources (
ACPI_HANDLE Device,
- ACPI_BUFFER *RetBuffer);
+ ACPI_BUFFER *RetBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetEventResources (
ACPI_HANDLE DeviceHandle,
- ACPI_BUFFER *RetBuffer);
+ ACPI_BUFFER *RetBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiWalkResourceBuffer (
ACPI_BUFFER *Buffer,
ACPI_WALK_RESOURCE_CALLBACK UserFunction,
- void *Context);
+ void *Context))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiWalkResources (
ACPI_HANDLE Device,
char *Name,
ACPI_WALK_RESOURCE_CALLBACK UserFunction,
- void *Context);
+ void *Context))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiSetCurrentResources (
ACPI_HANDLE Device,
- ACPI_BUFFER *InBuffer);
+ ACPI_BUFFER *InBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetIrqRoutingTable (
ACPI_HANDLE Device,
- ACPI_BUFFER *RetBuffer);
+ ACPI_BUFFER *RetBuffer))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiResourceToAddress64 (
ACPI_RESOURCE *Resource,
- ACPI_RESOURCE_ADDRESS64 *Out);
+ ACPI_RESOURCE_ADDRESS64 *Out))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiBufferToResource (
UINT8 *AmlBuffer,
UINT16 AmlBufferLength,
- ACPI_RESOURCE **ResourcePtr);
+ ACPI_RESOURCE **ResourcePtr))
/*
* Hardware (ACPI device) interfaces
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiReset (
- void);
+ void))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiRead (
UINT64 *Value,
- ACPI_GENERIC_ADDRESS *Reg);
+ ACPI_GENERIC_ADDRESS *Reg))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiWrite (
UINT64 Value,
- ACPI_GENERIC_ADDRESS *Reg);
+ ACPI_GENERIC_ADDRESS *Reg))
ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
@@ -694,32 +984,37 @@ AcpiWriteBitRegister (
/*
* Sleep/Wake interfaces
*/
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiGetSleepTypeData (
UINT8 SleepState,
UINT8 *Slp_TypA,
- UINT8 *Slp_TypB);
+ UINT8 *Slp_TypB))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiEnterSleepStatePrep (
- UINT8 SleepState);
+ UINT8 SleepState))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiEnterSleepState (
- UINT8 SleepState);
+ UINT8 SleepState))
ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnterSleepStateS4bios (
void))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiLeaveSleepStatePrep (
- UINT8 SleepState);
+ UINT8 SleepState))
+ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
AcpiLeaveSleepState (
- UINT8 SleepState);
+ UINT8 SleepState))
ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
@@ -758,14 +1053,16 @@ AcpiGetTimerDuration (
/*
* Error/Warning output
*/
+ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
AcpiError (
const char *ModuleName,
UINT32 LineNumber,
const char *Format,
- ...);
+ ...))
+ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(4)
void ACPI_INTERNAL_VAR_XFACE
AcpiException (
@@ -773,46 +1070,49 @@ AcpiException (
UINT32 LineNumber,
ACPI_STATUS Status,
const char *Format,
- ...);
+ ...))
+ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
AcpiWarning (
const char *ModuleName,
UINT32 LineNumber,
const char *Format,
- ...);
+ ...))
+ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
AcpiInfo (
const char *ModuleName,
UINT32 LineNumber,
const char *Format,
- ...);
+ ...))
+ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
AcpiBiosError (
const char *ModuleName,
UINT32 LineNumber,
const char *Format,
- ...);
+ ...))
+ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
AcpiBiosWarning (
const char *ModuleName,
UINT32 LineNumber,
const char *Format,
- ...);
+ ...))
/*
* Debug output
*/
-#ifdef ACPI_DEBUG_OUTPUT
-
+ACPI_DBG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(6)
void ACPI_INTERNAL_VAR_XFACE
AcpiDebugPrint (
@@ -822,8 +1122,9 @@ AcpiDebugPrint (
const char *ModuleName,
UINT32 ComponentId,
const char *Format,
- ...);
+ ...))
+ACPI_DBG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(6)
void ACPI_INTERNAL_VAR_XFACE
AcpiDebugPrintRaw (
@@ -833,7 +1134,6 @@ AcpiDebugPrintRaw (
const char *ModuleName,
UINT32 ComponentId,
const char *Format,
- ...);
-#endif
+ ...))
#endif /* __ACXFACE_H__ */
diff --git a/source/include/acpredef.h b/source/include/acpredef.h
index e5caaf650ae5..d7af2db26974 100644
--- a/source/include/acpredef.h
+++ b/source/include/acpredef.h
@@ -580,6 +580,10 @@ const ACPI_PREDEFINED_INFO AcpiGbl_PredefinedMethods[] =
{{"_LID", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_INTEGER)}},
+ {{"_LPD", METHOD_0ARGS,
+ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Variable-length (1 Int(rev), n Pkg (2 Int) */
+ PACKAGE_INFO (ACPI_PTYPE2_REV_FIXED, ACPI_RTYPE_INTEGER, 2,0,0,0),
+
{{"_MAT", METHOD_0ARGS,
METHOD_RETURNS (ACPI_RTYPE_BUFFER)}},
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
index ace4da91d878..fe47a73c9943 100644
--- a/source/include/actbl1.h
+++ b/source/include/actbl1.h
@@ -780,7 +780,7 @@ enum AcpiMadtType
/*
- * MADT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
+ * MADT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
*/
/* 0: Processor Local APIC */
@@ -1078,7 +1078,7 @@ enum AcpiSratType
};
/*
- * SRAT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
+ * SRAT Subtables, correspond to Type in ACPI_SUBTABLE_HEADER
*/
/* 0: Processor Local APIC/SAPIC Affinity */
diff --git a/source/include/actbl2.h b/source/include/actbl2.h
index ae46ad8d8124..df6692f4054f 100644
--- a/source/include/actbl2.h
+++ b/source/include/actbl2.h
@@ -72,6 +72,7 @@
#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
+#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
@@ -521,7 +522,7 @@ typedef struct acpi_dmar_pci_path
/*
- * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
+ * DMAR Subtables, correspond to Type in ACPI_DMAR_HEADER
*/
/* 0: Hardware Unit Definition */
@@ -934,7 +935,83 @@ typedef struct acpi_ivrs_memory
/*******************************************************************************
*
- * MCFG - PCI Memory Mapped Configuration table and sub-table
+ * LPIT - Low Power Idle Table
+ *
+ * Conforms to "ACPI Low Power Idle Table (LPIT) and _LPD Proposal (DRAFT)"
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_lpit
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+
+} ACPI_TABLE_LPIT;
+
+
+/* LPIT subtable header */
+
+typedef struct acpi_lpit_header
+{
+ UINT32 Type; /* Subtable type */
+ UINT32 Length; /* Subtable length */
+ UINT16 UniqueId;
+ UINT16 Reserved;
+ UINT32 Flags;
+
+} ACPI_LPIT_HEADER;
+
+/* Values for subtable Type above */
+
+enum AcpiLpitType
+{
+ ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
+ ACPI_LPIT_TYPE_SIMPLE_IO = 0x01
+};
+
+/* Masks for Flags field above */
+
+#define ACPI_LPIT_STATE_DISABLED (1)
+#define ACPI_LPIT_NO_COUNTER (1<<1)
+
+/*
+ * LPIT subtables, correspond to Type in ACPI_LPIT_HEADER
+ */
+
+/* 0x00: Native C-state instruction based LPI structure */
+
+typedef struct acpi_lpit_native
+{
+ ACPI_LPIT_HEADER Header;
+ ACPI_GENERIC_ADDRESS EntryTrigger;
+ UINT32 Residency;
+ UINT32 Latency;
+ ACPI_GENERIC_ADDRESS ResidencyCounter;
+ UINT64 CounterFrequency;
+
+} ACPI_LPIT_NATIVE;
+
+
+/* 0x01: Simple I/O based LPI structure */
+
+typedef struct acpi_lpit_io
+{
+ ACPI_LPIT_HEADER Header;
+ ACPI_GENERIC_ADDRESS EntryTrigger;
+ UINT32 TriggerAction;
+ UINT64 TriggerValue;
+ UINT64 TriggerMask;
+ ACPI_GENERIC_ADDRESS MinimumIdleState;
+ UINT32 Residency;
+ UINT32 Latency;
+ ACPI_GENERIC_ADDRESS ResidencyCounter;
+ UINT64 CounterFrequency;
+
+} ACPI_LPIT_IO;
+
+
+/*******************************************************************************
+ *
+ * MCFG - PCI Memory Mapped Configuration table and subtable
* Version 1
*
* Conforms to "PCI Firmware Specification", Revision 3.0, June 20, 2005
@@ -1058,7 +1135,7 @@ enum AcpiSlicType
/*
- * SLIC Sub-tables, correspond to Type in ACPI_SLIC_HEADER
+ * SLIC Subtables, correspond to Type in ACPI_SLIC_HEADER
*/
/* 0: Public Key Structure */
diff --git a/source/include/actypes.h b/source/include/actypes.h
index 4a6e492fc95f..7a8d5c5c3b4b 100644
--- a/source/include/actypes.h
+++ b/source/include/actypes.h
@@ -55,8 +55,6 @@
#error ACPI_MACHINE_WIDTH not defined
#endif
-/*! [Begin] no source code translation */
-
/*
* Data type ranges
* Note: These macros are designed to be compiler independent as well as
@@ -124,13 +122,15 @@
*
******************************************************************************/
+#ifndef ACPI_USE_SYSTEM_INTTYPES
+
typedef unsigned char BOOLEAN;
typedef unsigned char UINT8;
typedef unsigned short UINT16;
typedef COMPILER_DEPENDENT_UINT64 UINT64;
typedef COMPILER_DEPENDENT_INT64 INT64;
-/*! [End] no source code translation !*/
+#endif /* ACPI_USE_SYSTEM_INTTYPES */
/*
* Value returned by AcpiOsGetThreadId. There is no standard "thread_id"
@@ -151,12 +151,12 @@ typedef COMPILER_DEPENDENT_INT64 INT64;
#if ACPI_MACHINE_WIDTH == 64
-/*! [Begin] no source code translation (keep the typedefs as-is) */
+#ifndef ACPI_USE_SYSTEM_INTTYPES
typedef unsigned int UINT32;
typedef int INT32;
-/*! [End] no source code translation !*/
+#endif /* ACPI_USE_SYSTEM_INTTYPES */
typedef INT64 ACPI_NATIVE_INT;
@@ -190,12 +190,12 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS;
#elif ACPI_MACHINE_WIDTH == 32
-/*! [Begin] no source code translation (keep the typedefs as-is) */
+#ifndef ACPI_USE_SYSTEM_INTTYPES
typedef unsigned int UINT32;
typedef int INT32;
-/*! [End] no source code translation !*/
+#endif /* ACPI_USE_SYSTEM_INTTYPES */
typedef INT32 ACPI_NATIVE_INT;
@@ -334,6 +334,15 @@ typedef UINT32 ACPI_PHYSICAL_ADDRESS;
*
******************************************************************************/
+#ifdef ACPI_NO_MEM_ALLOCATIONS
+
+#define ACPI_ALLOCATE(a) NULL
+#define ACPI_ALLOCATE_ZEROED(a) NULL
+#define ACPI_FREE(a)
+#define ACPI_MEM_TRACKING(a)
+
+#else /* ACPI_NO_MEM_ALLOCATIONS */
+
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
/*
* Memory allocation tracking (used by AcpiExec to detect memory leaks)
@@ -355,6 +364,8 @@ typedef UINT32 ACPI_PHYSICAL_ADDRESS;
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
+#endif /* ACPI_NO_MEM_ALLOCATIONS */
+
/******************************************************************************
*
@@ -954,9 +965,19 @@ typedef struct acpi_object_list
* Miscellaneous common Data Structures used by the interfaces
*/
#define ACPI_NO_BUFFER 0
+
+#ifdef ACPI_NO_MEM_ALLOCATIONS
+
+#define ACPI_ALLOCATE_BUFFER (ACPI_SIZE) (0)
+#define ACPI_ALLOCATE_LOCAL_BUFFER (ACPI_SIZE) (0)
+
+#else /* ACPI_NO_MEM_ALLOCATIONS */
+
#define ACPI_ALLOCATE_BUFFER (ACPI_SIZE) (-1) /* Let ACPICA allocate buffer */
#define ACPI_ALLOCATE_LOCAL_BUFFER (ACPI_SIZE) (-2) /* For internal use only (enables tracking) */
+#endif /* ACPI_NO_MEM_ALLOCATIONS */
+
typedef struct acpi_buffer
{
ACPI_SIZE Length; /* Length in bytes of the buffer */
diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h
index 994c9415a42d..a57f7f00db32 100644
--- a/source/include/platform/aclinux.h
+++ b/source/include/platform/aclinux.h
@@ -53,6 +53,8 @@
#ifdef __KERNEL__
+#define ACPI_USE_SYSTEM_INTTYPES
+
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
@@ -66,6 +68,37 @@
#endif
#include <asm/acpi.h>
+#ifndef CONFIG_ACPI
+
+/* External globals for __KERNEL__, stubs is needed */
+
+#define ACPI_GLOBAL(t,a)
+#define ACPI_INIT_GLOBAL(t,a,b)
+
+/* Generating stubs for configurable ACPICA macros */
+
+#define ACPI_NO_MEM_ALLOCATIONS
+
+/* Generating stubs for configurable ACPICA functions */
+
+#define ACPI_NO_ERROR_MESSAGES
+#undef ACPI_DEBUG_OUTPUT
+
+/* External interface for __KERNEL__, stub is needed */
+
+#define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \
+ static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
+#define ACPI_EXTERNAL_RETURN_OK(Prototype) \
+ static ACPI_INLINE Prototype {return(AE_OK);}
+#define ACPI_EXTERNAL_RETURN_VOID(Prototype) \
+ static ACPI_INLINE Prototype {return;}
+#define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \
+ static ACPI_INLINE Prototype {return(0);}
+#define ACPI_EXTERNAL_RETURN_PTR(Prototype) \
+ static ACPI_INLINE Prototype {return(NULL);}
+
+#endif /* CONFIG_ACPI */
+
/* Host-dependent types and defines for in-kernel ACPICA */
#define ACPI_MACHINE_WIDTH BITS_PER_LONG