ReactOS 0.4.15-dev-7842-g558ab78
kd.h
Go to the documentation of this file.
1#pragma once
2
3/* KD ROUTINES ***************************************************************/
4
6
7typedef
11 _In_ ULONG BootPhase);
12
13typedef
18
19VOID
22
23VOID
27 ...);
28
33
34
35/* INIT ROUTINES *************************************************************/
36
41
42VOID
47
48VOID
50
51VOID
53
58 _In_ ULONG BootPhase);
59
64 _In_ ULONG BootPhase);
65
70 _In_ ULONG BootPhase);
71
72#ifdef KDBG
73#define KdpKdbgInit KdbInitialize
74#endif
75
76
77/* KD GLOBALS ****************************************************************/
78
79/* Serial debug connection */
80#define DEFAULT_DEBUG_PORT 2 /* COM2 */
81#define DEFAULT_DEBUG_COM1_IRQ 4 /* COM1 IRQ */
82#define DEFAULT_DEBUG_COM2_IRQ 3 /* COM2 IRQ */
83#define DEFAULT_DEBUG_BAUD_RATE 115200 /* 115200 Baud */
84
85/* KD Native Modes */
86#define KdScreen 0
87#define KdSerial 1
88#define KdFile 2
89#define KdKdbg 3
90#define KdMax 4
91
92/* KD Private Debug Modes */
93typedef struct _KDP_DEBUG_MODE
94{
95 union
96 {
97 struct
98 {
99 /* Native Modes */
103 };
104
105 /* Generic Value */
107 };
109
110/* Dispatch Table for Wrapper Functions */
111typedef struct _KD_DISPATCH_TABLE
112{
118
119/* The current Debugging Mode */
121
122/* Port Information for the Serial Native Mode */
125
126/* Logging file path */
128
129/* Init Functions for Native Providers */
131
132/* Dispatch Tables for Native Providers */
134
135/* The KD Native Provider List */
#define __cdecl
Definition: accygwin.h:79
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
#define NTSTATUS
Definition: precomp.h:21
UCHAR KIRQL
Definition: env_spec_w32.h:591
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
ULONG SerialPortNumber
Definition: kdio.c:39
VOID __cdecl KdIoPrintf(_In_ PCSTR Format,...)
Definition: kdio.c:576
VOID NTAPI KdbpReleaseLock(_In_ PKSPIN_LOCK SpinLock, _In_ KIRQL OldIrql)
Definition: kdio.c:91
LIST_ENTRY KdProviders
Definition: kdio.c:47
VOID(NTAPI * PKDP_PRINT_ROUTINE)(_In_ PCCH String, _In_ ULONG Length)
Definition: kd.h:15
NTSTATUS NTAPI KdpSerialInit(_In_ struct _KD_DISPATCH_TABLE *DispatchTable, _In_ ULONG BootPhase)
SIZE_T KdIoReadLine(_Out_ PCHAR Buffer, _In_ SIZE_T Size)
Reads a line of user input from the terminal.
Definition: kdprompt.c:51
KDP_DEBUG_MODE KdpDebugMode
Definition: kdio.c:46
#define KdMax
Definition: kd.h:90
VOID KdpScreenRelease(VOID)
Definition: kdio.c:450
KIRQL NTAPI KdbpAcquireLock(_In_ PKSPIN_LOCK SpinLock)
Definition: kdio.c:64
struct _KD_DISPATCH_TABLE * PKD_DISPATCH_TABLE
PKDP_INIT_ROUTINE InitRoutines[KdMax]
Definition: kdio.c:50
struct _KDP_DEBUG_MODE KDP_DEBUG_MODE
NTSTATUS(NTAPI * PKDP_INIT_ROUTINE)(_In_ struct _KD_DISPATCH_TABLE *DispatchTable, _In_ ULONG BootPhase)
Definition: kd.h:9
KD_DISPATCH_TABLE DispatchTable[KdMax]
Definition: global.c:17
VOID KdpScreenAcquire(VOID)
Definition: kdio.c:431
ANSI_STRING KdpLogFileName
Definition: kdio.c:36
NTSTATUS NTAPI KdpDebugLogInit(_In_ struct _KD_DISPATCH_TABLE *DispatchTable, _In_ ULONG BootPhase)
NTSTATUS NTAPI KdpScreenInit(_In_ struct _KD_DISPATCH_TABLE *DispatchTable, _In_ ULONG BootPhase)
CPPORT SerialPortInfo
Definition: kdio.c:40
struct _KD_DISPATCH_TABLE KD_DISPATCH_TABLE
VOID KdIoPuts(_In_ PCSTR String)
Definition: kdio.c:568
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
CONST CHAR * PCCH
Definition: ntbasedef.h:392
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
UCHAR File
Definition: kd.h:102
UCHAR Screen
Definition: kd.h:100
UCHAR Serial
Definition: kd.h:101
ULONG Value
Definition: kd.h:106
PKDP_PRINT_ROUTINE KdpPrintRoutine
Definition: kd.h:115
PKDP_INIT_ROUTINE KdpInitRoutine
Definition: kd.h:114
NTSTATUS InitStatus
Definition: kd.h:116
LIST_ENTRY KdProvidersList
Definition: kd.h:113
Definition: typedefs.h:120
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_In_ PWDFDEVICE_INIT _In_ PWDF_PDO_EVENT_CALLBACKS DispatchTable
Definition: wdfpdo.h:248
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:228
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
unsigned char UCHAR
Definition: xmlstorage.h:181