summaryrefslogtreecommitdiff
path: root/source/include/platform
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-11-03 01:17:13 +0800
committerLv Zheng <lv.zheng@intel.com>2016-11-03 01:17:13 +0800
commite76eb8b36ace880e4d475880db1128a206e57b6f (patch)
tree83b5b9a652d3dc85eaca7785891d71054f94e11c /source/include/platform
parentf0071e71698ac492bc9abb46d671d3bea2d3ffbc (diff)
downloadacpica-e76eb8b36ace880e4d475880db1128a206e57b6f.tar.gz
Debugger: Convert some mechanisms to OSPM specific
The following mechanisms are OSPM specific: 1. Redirect output destination to console: no file redirection will be needed by an in-kernel debugger, there is even no file can be accessed when the debugger is running in the kernel mode. 2. Output command prompts: programs other than acpiexec can have different prompt characters and the prompt characters may be implemented as a special character sequence to form a char device IO protocol. 3. Command ready/complete handshake: OSPM debugger may wait more conditions to implement OSPM specific semantics (for example, FIFO full/empty conditions for O_NONBLOCK or IO open/close conditions). Leaving such OSPM specific stuffs in the ACPICA debugger core blocks Linux debugger IO driver implementation. Several new OSL APIs are provided by this patch: 1. AcpiOsInitializeDebugger: initialize debugger. 2. AcpiOsTerminateDebugger: reversal of AcpiOsInitializeDebugger. 3. AcpiOsWaitCommandReady: putting debugger task into wait state when a command is not ready. OSPMs can terminate command loop by returning AE_CTRL_TERMINATE from this API. Normally, wait_event() or WaitForMultipleObject() may be used to implement this API. 4. AcpiOsNotifyCommandComplete: putting user task into running state when a command has been completed. OSPMs can terminate command loop by returning AE_CTRL_TERMINATE from this API. Normally, wake_up() or SetEvent() may be used to implement this API. This patch also converts current command signaling implementation into a generic debugger layer (osgendbg.c) to be used by the existing OSPMs or acpiexec, in return, Linux can have chance to implement its own command handshake mechanism. This patch also implements acpiexec batch mode in a multi-threading mode comaptible style as a demo (this can be confirmed by configuring acpiexec into DEBUGGER_MULTI_THREADED mode where the batch mode is still working). Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Diffstat (limited to 'source/include/platform')
-rw-r--r--source/include/platform/aclinux.h2
-rw-r--r--source/include/platform/aclinuxex.h14
2 files changed, 16 insertions, 0 deletions
diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h
index 6f7c5775e..8d0b56fcb 100644
--- a/source/include/platform/aclinux.h
+++ b/source/include/platform/aclinux.h
@@ -225,6 +225,8 @@
*/
#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadable
#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritable
+#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInitializeDebugger
+#define ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTerminateDebugger
/*
* OSL interfaces used by utilities
diff --git a/source/include/platform/aclinuxex.h b/source/include/platform/aclinuxex.h
index 7f24989c9..c39672d43 100644
--- a/source/include/platform/aclinuxex.h
+++ b/source/include/platform/aclinuxex.h
@@ -216,6 +216,20 @@ AcpiOsReadable (
return TRUE;
}
+static inline ACPI_STATUS
+AcpiOsInitializeDebugger (
+ void)
+{
+ return AE_OK;
+}
+
+static inline void
+AcpiOsTerminateDebugger (
+ void)
+{
+ return;
+}
+
/*
* OSL interfaces added by Linux