ReactOS 0.4.16-dev-2491-g3dc6630
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/* KD Native Modes */
80// #define KdScreen 0
81// #define KdSerial 1
82// #define KdFile 2
83#ifdef KDBG
84// #define KdKdbg 3
85#define KdMax 4
86#else
87#define KdMax 3
88#endif
89
90/* KD Private Debug Modes */
91typedef struct _KDP_DEBUG_MODE
92{
93 union
94 {
95 struct
96 {
97 /* Native Modes */
101 };
102
103 /* Generic Value */
105 };
107
108/* Dispatch Table for Wrapper Functions */
109typedef struct _KD_DISPATCH_TABLE
110{
116
117/* The current Debugging Mode */
119
120/* Port Information for the Serial Native Mode */
123
124/* Logging file path */
126
127/* Init Functions for Native Providers */
129
130/* Dispatch Tables for Native Providers */
132
133/* The KD Native Provider List */
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
#define NTSTATUS
Definition: precomp.h:19
#define __cdecl
Definition: corecrt.h:121
UCHAR KIRQL
Definition: env_spec_w32.h:591
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
ULONG SerialPortNumber
Definition: kdio.c:40
VOID __cdecl KdIoPrintf(_In_ PCSTR Format,...)
Definition: kdio.c:577
VOID NTAPI KdbpReleaseLock(_In_ PKSPIN_LOCK SpinLock, _In_ KIRQL OldIrql)
Definition: kdio.c:92
LIST_ENTRY KdProviders
Definition: kdio.c:48
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:47
#define KdMax
Definition: kd.h:87
VOID KdpScreenRelease(VOID)
Definition: kdio.c:451
KIRQL NTAPI KdbpAcquireLock(_In_ PKSPIN_LOCK SpinLock)
Definition: kdio.c:65
struct _KD_DISPATCH_TABLE * PKD_DISPATCH_TABLE
PKDP_INIT_ROUTINE InitRoutines[KdMax]
Definition: kdio.c:51
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:432
ANSI_STRING KdpLogFileName
Definition: kdio.c:37
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:41
struct _KD_DISPATCH_TABLE KD_DISPATCH_TABLE
VOID KdIoPuts(_In_ PCSTR String)
Definition: kdio.c:569
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
CONST CHAR * PCCH
Definition: ntbasedef.h:404
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
UCHAR File
Definition: kd.h:100
UCHAR Screen
Definition: kd.h:98
UCHAR Serial
Definition: kd.h:99
ULONG Value
Definition: kd.h:104
PKDP_PRINT_ROUTINE KdpPrintRoutine
Definition: kd.h:113
PKDP_INIT_ROUTINE KdpInitRoutine
Definition: kd.h:112
NTSTATUS InitStatus
Definition: kd.h:114
LIST_ENTRY KdProvidersList
Definition: kd.h:111
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:4539
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2439
_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