summaryrefslogtreecommitdiff
path: root/source/include/acpixf.h
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/acpixf.h
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/acpixf.h')
-rw-r--r--source/include/acpixf.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/include/acpixf.h b/source/include/acpixf.h
index 8efd75978..a80827237 100644
--- a/source/include/acpixf.h
+++ b/source/include/acpixf.h
@@ -365,6 +365,15 @@ ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE);
/*
+ * Debugger command handshake globals. Host OSes need to access these
+ * variables to implement their own command handshake mechanism.
+ */
+#ifdef ACPI_DEBUGGER
+ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE);
+ACPI_GLOBAL (char, AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]);
+#endif
+
+/*
* Other miscellaneous globals
*/
ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT);
@@ -1334,6 +1343,10 @@ AcpiTerminateDebugger (
void);
void
+AcpiRunDebugger (
+ char *BatchBuffer);
+
+void
AcpiSetDebuggerThreadId (
ACPI_THREAD_ID ThreadId);