diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-11-25 21:04:42 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-11-25 21:04:42 +0000 |
commit | b9098066cd6284319bca922f13e59517f774a103 (patch) | |
tree | f01fd6c9053cb01ed84c00cb42ee789adafceaf5 /source/include | |
parent | 1e24cf365bc9c8df179b145c90d52852724e54ee (diff) | |
download | src-test2-b9098066cd6284319bca922f13e59517f774a103.tar.gz src-test2-b9098066cd6284319bca922f13e59517f774a103.zip |
Notes
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/acapps.h | 75 | ||||
-rw-r--r-- | source/include/acdebug.h | 20 | ||||
-rw-r--r-- | source/include/acdisasm.h | 33 | ||||
-rw-r--r-- | source/include/acglobal.h | 5 | ||||
-rw-r--r-- | source/include/aclocal.h | 18 | ||||
-rw-r--r-- | source/include/acmacros.h | 12 | ||||
-rw-r--r-- | source/include/acpiosxf.h | 3 | ||||
-rw-r--r-- | source/include/acpixf.h | 30 | ||||
-rw-r--r-- | source/include/actables.h | 6 | ||||
-rw-r--r-- | source/include/actypes.h | 6 | ||||
-rw-r--r-- | source/include/acutils.h | 30 | ||||
-rw-r--r-- | source/include/platform/aclinux.h | 7 | ||||
-rw-r--r-- | source/include/platform/aclinuxex.h | 9 |
13 files changed, 151 insertions, 103 deletions
diff --git a/source/include/acapps.h b/source/include/acapps.h index 9ca8e7301097..6652cefcd596 100644 --- a/source/include/acapps.h +++ b/source/include/acapps.h @@ -44,6 +44,7 @@ #ifndef _ACAPPS #define _ACAPPS +#include <stdio.h> #ifdef _MSC_VER /* disable some level-4 warnings */ #pragma warning(disable:4100) /* warning C4100: unreferenced formal parameter */ @@ -93,10 +94,38 @@ AcpiOsPrintf (" %-18s%s\n", Name, Description); +/* Check for unexpected exceptions */ + +#define ACPI_CHECK_STATUS(Name, Status, Expected) \ + if (Status != Expected) \ + { \ + AcpiOsPrintf ("Unexpected %s from %s (%s-%d)\n", \ + AcpiFormatException (Status), #Name, _AcpiModuleName, __LINE__); \ + } + +/* Check for unexpected non-AE_OK errors */ + + +#define ACPI_CHECK_OK(Name, Status) ACPI_CHECK_STATUS (Name, Status, AE_OK); + #define FILE_SUFFIX_DISASSEMBLY "dsl" #define FILE_SUFFIX_BINARY_TABLE ".dat" /* Needs the dot */ +/* acfileio */ + +ACPI_STATUS +AcpiAcGetAllTablesFromFile ( + char *Filename, + UINT8 GetOnlyAmlTables, + ACPI_NEW_TABLE_DESC **ReturnListHead); + +/* Values for GetOnlyAmlTables */ + +#define ACPI_GET_ONLY_AML_TABLES TRUE +#define ACPI_GET_ALL_TABLES FALSE + + /* * getopt */ @@ -125,51 +154,6 @@ CmGetFileSize ( ACPI_FILE File); -#ifndef ACPI_DUMP_APP -/* - * adisasm - */ -ACPI_STATUS -AdAmlDisassemble ( - BOOLEAN OutToFile, - char *Filename, - char *Prefix, - char **OutFilename); - -void -AdPrintStatistics ( - void); - -ACPI_STATUS -AdFindDsdt( - UINT8 **DsdtPtr, - UINT32 *DsdtLength); - -void -AdDumpTables ( - void); - -ACPI_STATUS -AdGetLocalTables ( - void); - -ACPI_STATUS -AdParseTable ( - ACPI_TABLE_HEADER *Table, - ACPI_OWNER_ID *OwnerId, - BOOLEAN LoadTable, - BOOLEAN External); - -ACPI_STATUS -AdDisplayTables ( - char *Filename, - ACPI_TABLE_HEADER *Table); - -ACPI_STATUS -AdDisplayStatistics ( - void); - - /* * adwalk */ @@ -228,6 +212,5 @@ AdWriteTable ( UINT32 Length, char *TableName, char *OemTableId); -#endif #endif /* _ACAPPS */ diff --git a/source/include/acdebug.h b/source/include/acdebug.h index faf3c136df3d..6bf85c13cd90 100644 --- a/source/include/acdebug.h +++ b/source/include/acdebug.h @@ -91,11 +91,17 @@ typedef struct acpi_db_execute_walk /* * dbxface - external debugger interfaces */ +ACPI_DBR_DEPENDENT_RETURN_OK ( ACPI_STATUS AcpiDbSingleStep ( ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op, - UINT32 OpType); + UINT32 OpType)) + +ACPI_DBR_DEPENDENT_RETURN_VOID ( +void +AcpiDbSignalBreakPoint ( + ACPI_WALK_STATE *WalkState)) /* @@ -290,10 +296,11 @@ AcpiDbDecodeAndDisplayObject ( char *Target, char *OutputType); +ACPI_DBR_DEPENDENT_RETURN_VOID ( void AcpiDbDisplayResultObject ( ACPI_OPERAND_OBJECT *ObjDesc, - ACPI_WALK_STATE *WalkState); + ACPI_WALK_STATE *WalkState)) ACPI_STATUS AcpiDbDisplayAllMethods ( @@ -319,10 +326,11 @@ void AcpiDbDisplayObjectType ( char *ObjectArg); +ACPI_DBR_DEPENDENT_RETURN_VOID ( void AcpiDbDisplayArgumentObject ( ACPI_OPERAND_OBJECT *ObjDesc, - ACPI_WALK_STATE *WalkState); + ACPI_WALK_STATE *WalkState)) /* @@ -374,10 +382,8 @@ AcpiDbLoadAcpiTable ( char *Filename); ACPI_STATUS -AcpiDbGetTableFromFile ( - char *Filename, - ACPI_TABLE_HEADER **Table, - BOOLEAN MustBeAmlTable); +AcpiDbLoadTables ( + ACPI_NEW_TABLE_DESC *ListHead); /* diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index f362430bed09..a39e5e63e254 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -1047,7 +1047,7 @@ AcpiDmCloseOperator ( /* - * acdisasm + * dmtables */ void AdDisassemblerHeader ( @@ -1057,4 +1057,35 @@ AdDisassemblerHeader ( #define ACPI_IS_AML_TABLE 0 #define ACPI_IS_DATA_TABLE 1 + +/* + * adisasm + */ +ACPI_STATUS +AdAmlDisassemble ( + BOOLEAN OutToFile, + char *Filename, + char *Prefix, + char **OutFilename); + +ACPI_STATUS +AdGetLocalTables ( + void); + +ACPI_STATUS +AdParseTable ( + ACPI_TABLE_HEADER *Table, + ACPI_OWNER_ID *OwnerId, + BOOLEAN LoadTable, + BOOLEAN External); + +ACPI_STATUS +AdDisplayTables ( + char *Filename, + ACPI_TABLE_HEADER *Table); + +ACPI_STATUS +AdDisplayStatistics ( + void); + #endif /* __ACDISASM_H__ */ diff --git a/source/include/acglobal.h b/source/include/acglobal.h index a9e349fe6a7b..f98401d28f00 100644 --- a/source/include/acglobal.h +++ b/source/include/acglobal.h @@ -62,6 +62,7 @@ ACPI_GLOBAL (ACPI_TABLE_HEADER, AcpiGbl_OriginalDsdtHeader); ACPI_INIT_GLOBAL (UINT32, AcpiGbl_DsdtIndex, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL (UINT32, AcpiGbl_FacsIndex, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL (UINT32, AcpiGbl_XFacsIndex, ACPI_INVALID_TABLE_INDEX); +ACPI_INIT_GLOBAL (UINT32, AcpiGbl_FadtIndex, ACPI_INVALID_TABLE_INDEX); #if (!ACPI_REDUCED_HARDWARE) ACPI_GLOBAL (ACPI_TABLE_FACS *, AcpiGbl_FACS); @@ -328,9 +329,9 @@ ACPI_GLOBAL (ACPI_EXTERNAL_FILE *, AcpiGbl_ExternalFileList); #ifdef ACPI_DEBUGGER -ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DbTerminateThreads, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_AbortMethod, FALSE); ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE); +ACPI_INIT_GLOBAL (ACPI_THREAD_ID, AcpiGbl_DbThreadId, ACPI_INVALID_THREAD_ID); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoIniMethods); ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoRegionSupport); @@ -340,6 +341,8 @@ ACPI_GLOBAL (char *, AcpiGbl_DbFilename); ACPI_GLOBAL (UINT32, AcpiGbl_DbDebugLevel); ACPI_GLOBAL (UINT32, AcpiGbl_DbConsoleDebugLevel); ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_DbScopeNode); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbTerminateLoop); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbThreadsTerminated); ACPI_GLOBAL (char *, AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS]); ACPI_GLOBAL (ACPI_OBJECT_TYPE, AcpiGbl_DbArgTypes[ACPI_DEBUGGER_MAX_ARGS]); diff --git a/source/include/aclocal.h b/source/include/aclocal.h index 15759e13811b..d618055d4189 100644 --- a/source/include/aclocal.h +++ b/source/include/aclocal.h @@ -118,6 +118,14 @@ typedef struct acpi_rw_lock #define ACPI_MUTEX_NOT_ACQUIRED (ACPI_THREAD_ID) -1 +/* This Thread ID means an invalid thread ID */ + +#ifdef ACPI_OS_INVALID_THREAD_ID +#define ACPI_INVALID_THREAD_ID ACPI_OS_INVALID_THREAD_ID +#else +#define ACPI_INVALID_THREAD_ID ((ACPI_THREAD_ID) 0xFFFFFFFF) +#endif + /* Table for the global mutexes */ typedef struct acpi_mutex_info @@ -236,6 +244,16 @@ typedef struct acpi_table_list #define ACPI_ROOT_ALLOW_RESIZE (2) +/* List to manage incoming ACPI tables */ + +typedef struct acpi_new_table_desc +{ + ACPI_TABLE_HEADER *Table; + struct acpi_new_table_desc *Next; + +} ACPI_NEW_TABLE_DESC; + + /* Predefined table indexes */ #define ACPI_INVALID_TABLE_INDEX (0xFFFFFFFF) diff --git a/source/include/acmacros.h b/source/include/acmacros.h index 48620fb470a6..2dc5c201fe59 100644 --- a/source/include/acmacros.h +++ b/source/include/acmacros.h @@ -406,18 +406,6 @@ /* - * Some code only gets executed when the debugger is built in. - * Note that this is entirely independent of whether the - * DEBUG_PRINT stuff (set by ACPI_DEBUG_OUTPUT) is on, or not. - */ -#ifdef ACPI_DEBUGGER -#define ACPI_DEBUGGER_EXEC(a) a -#else -#define ACPI_DEBUGGER_EXEC(a) -#endif - - -/* * Macros used for ACPICA utilities only */ diff --git a/source/include/acpiosxf.h b/source/include/acpiosxf.h index f894abefb10f..f31e62e68f8e 100644 --- a/source/include/acpiosxf.h +++ b/source/include/acpiosxf.h @@ -57,7 +57,8 @@ typedef enum OSL_GLOBAL_LOCK_HANDLER, OSL_NOTIFY_HANDLER, OSL_GPE_HANDLER, - OSL_DEBUGGER_THREAD, + OSL_DEBUGGER_MAIN_THREAD, + OSL_DEBUGGER_EXEC_THREAD, OSL_EC_POLL_HANDLER, OSL_EC_BURST_HANDLER diff --git a/source/include/acpixf.h b/source/include/acpixf.h index 79972714f62a..80465d3c5aa2 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20150930 +#define ACPI_CA_VERSION 0x20151124 #include "acconfig.h" #include "actypes.h" @@ -377,6 +377,30 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning); #endif /* ACPI_APPLICATION */ +/* + * Debugger prototypes + * + * All interfaces used by debugger will be configured + * out of the ACPICA build unless the ACPI_DEBUGGER + * flag is defined. + */ +#ifdef ACPI_DEBUGGER +#define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \ + ACPI_EXTERNAL_RETURN_OK(Prototype) + +#define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \ + ACPI_EXTERNAL_RETURN_VOID(Prototype) + +#else +#define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \ + static ACPI_INLINE Prototype {return(AE_OK);} + +#define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \ + static ACPI_INLINE Prototype {return;} + +#endif /* ACPI_DEBUGGER */ + + /***************************************************************************** * * ACPICA public interface prototypes @@ -1216,4 +1240,8 @@ void AcpiTerminateDebugger ( void); +void +AcpiSetDebuggerThreadId ( + ACPI_THREAD_ID ThreadId); + #endif /* __ACXFACE_H__ */ diff --git a/source/include/actables.h b/source/include/actables.h index 0f8fdd505374..f450b1b4f30a 100644 --- a/source/include/actables.h +++ b/source/include/actables.h @@ -115,7 +115,7 @@ AcpiTbSetTableLoadedFlag ( */ void AcpiTbParseFadt ( - UINT32 TableIndex); + void); void AcpiTbCreateLocalFadt ( @@ -207,10 +207,6 @@ ACPI_STATUS AcpiTbInitializeFacs ( void); -BOOLEAN -AcpiTbTablesLoaded ( - void); - void AcpiTbPrintTableHeader( ACPI_PHYSICAL_ADDRESS Address, diff --git a/source/include/actypes.h b/source/include/actypes.h index cbae6f0d69b9..7eb6376c72f4 100644 --- a/source/include/actypes.h +++ b/source/include/actypes.h @@ -1232,7 +1232,7 @@ UINT32 (*ACPI_INTERFACE_HANDLER) ( #define ACPI_PCICLS_STRING_SIZE 7 /* Includes null terminator */ -/* Structures used for device/processor HID, UID, CID, and SUB */ +/* Structures used for device/processor HID, UID, CID */ typedef struct acpi_pnp_device_id { @@ -1267,7 +1267,6 @@ typedef struct acpi_device_info UINT64 Address; /* _ADR value */ ACPI_PNP_DEVICE_ID HardwareId; /* _HID value */ ACPI_PNP_DEVICE_ID UniqueId; /* _UID value */ - ACPI_PNP_DEVICE_ID SubsystemId; /* _SUB value */ ACPI_PNP_DEVICE_ID ClassCode; /* _CLS value */ ACPI_PNP_DEVICE_ID_LIST CompatibleIdList; /* _CID list <must be last> */ @@ -1283,13 +1282,12 @@ typedef struct acpi_device_info #define ACPI_VALID_ADR 0x0002 #define ACPI_VALID_HID 0x0004 #define ACPI_VALID_UID 0x0008 -#define ACPI_VALID_SUB 0x0010 #define ACPI_VALID_CID 0x0020 #define ACPI_VALID_CLS 0x0040 #define ACPI_VALID_SXDS 0x0100 #define ACPI_VALID_SXWS 0x0200 -/* Flags for _STA return value (CurrentStatus above) */ +/* Flags for _STA method */ #define ACPI_STA_DEVICE_PRESENT 0x01 #define ACPI_STA_DEVICE_ENABLED 0x02 diff --git a/source/include/acutils.h b/source/include/acutils.h index 1699c4ed7605..93a88878aaf6 100644 --- a/source/include/acutils.h +++ b/source/include/acutils.h @@ -206,7 +206,7 @@ AcpiUtInitGlobals ( #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) -char * +const char * AcpiUtGetMutexName ( UINT32 MutexId); @@ -216,15 +216,15 @@ AcpiUtGetNotifyName ( ACPI_OBJECT_TYPE Type); #endif -char * +const char * AcpiUtGetTypeName ( ACPI_OBJECT_TYPE Type); -char * +const char * AcpiUtGetNodeName ( void *Object); -char * +const char * AcpiUtGetDescriptorName ( void *Object); @@ -232,15 +232,15 @@ const char * AcpiUtGetReferenceName ( ACPI_OPERAND_OBJECT *Object); -char * +const char * AcpiUtGetObjectTypeName ( ACPI_OPERAND_OBJECT *ObjDesc); -char * +const char * AcpiUtGetRegionName ( UINT8 SpaceId); -char * +const char * AcpiUtGetEventName ( UINT32 EventId); @@ -484,17 +484,6 @@ AcpiUtExecutePowerMethods ( /* - * utfileio - file operations - */ -#ifdef ACPI_APPLICATION -ACPI_STATUS -AcpiUtReadTableFromFile ( - char *Filename, - ACPI_TABLE_HEADER **Table); -#endif - - -/* * utids - device ID support */ ACPI_STATUS @@ -508,11 +497,6 @@ AcpiUtExecute_UID ( ACPI_PNP_DEVICE_ID **ReturnId); ACPI_STATUS -AcpiUtExecute_SUB ( - ACPI_NAMESPACE_NODE *DeviceNode, - ACPI_PNP_DEVICE_ID **ReturnId); - -ACPI_STATUS AcpiUtExecute_CID ( ACPI_NAMESPACE_NODE *DeviceNode, ACPI_PNP_DEVICE_ID_LIST **ReturnCidList); diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h index 3a916918d0a8..473055f5f349 100644 --- a/source/include/platform/aclinux.h +++ b/source/include/platform/aclinux.h @@ -64,12 +64,16 @@ #define ACPI_USE_SYSTEM_INTTYPES -/* Compile for reduced hardware mode only with this kernel config */ +/* Kernel specific ACPICA configuration */ #ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY #define ACPI_REDUCED_HARDWARE 1 #endif +#ifdef CONFIG_ACPI_DEBUGGER +#define ACPI_DEBUGGER +#endif + #include <linux/string.h> #include <linux/kernel.h> #include <linux/ctype.h> @@ -152,7 +156,6 @@ * OSL interfaces used by utilities */ #define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRedirectOutput -#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetLine #define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByName #define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByIndex #define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByAddress diff --git a/source/include/platform/aclinuxex.h b/source/include/platform/aclinuxex.h index 867228895f5a..5f65f28d5d83 100644 --- a/source/include/platform/aclinuxex.h +++ b/source/include/platform/aclinuxex.h @@ -136,6 +136,15 @@ AcpiOsGetThreadId ( Lock ? AE_OK : AE_NO_MEMORY; \ }) +static inline BOOLEAN +AcpiOsReadable ( + void *Pointer, + ACPI_SIZE Length) +{ + return TRUE; +} + + /* * OSL interfaces added by Linux */ |