ReactOS 0.4.16-dev-1025-gd3456f5
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#ifdef KDBG
90// #define KdKdbg 3
91#define KdMax 4
92#else
93#define KdMax 3
94#endif
95
96/* KD Private Debug Modes */
97typedef struct _KDP_DEBUG_MODE
98{
99 union
100 {
101 struct
102 {
103 /* Native Modes */
107 };
108
109 /* Generic Value */
111 };
113
114/* Dispatch Table for Wrapper Functions */
115typedef struct _KD_DISPATCH_TABLE
116{
122
123/* The current Debugging Mode */
125
126/* Port Information for the Serial Native Mode */
129
130/* Logging file path */
132
133/* Init Functions for Native Providers */
135
136/* Dispatch Tables for Native Providers */
138
139/* 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:19
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:93
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: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
CONST CHAR * PCCH
Definition: ntbasedef.h:400
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
UCHAR File
Definition: kd.h:106
UCHAR Screen
Definition: kd.h:104
UCHAR Serial
Definition: kd.h:105
ULONG Value
Definition: kd.h:110
PKDP_PRINT_ROUTINE KdpPrintRoutine
Definition: kd.h:119
PKDP_INIT_ROUTINE KdpInitRoutine
Definition: kd.h:118
NTSTATUS InitStatus
Definition: kd.h:120
LIST_ENTRY KdProvidersList
Definition: kd.h:117
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