ReactOS  0.4.14-dev-49-gfb4591c
kdvm.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: GPL, see COPYING in the top level directory
3  * PROJECT: ReactOS kernel
4  * FILE: drivers/base/kdvm/kdvm.h
5  * PURPOSE: Base definitions for the kernel debugger.
6  * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
7  */
8 
9 #ifndef _KDDLL_H_
10 #define _KDDLL_H_
11 
12 #define NOEXTAPI
13 #include <ntifs.h>
14 #include <windbgkd.h>
15 #include <arc/arc.h>
16 
17 #undef RtlEqualMemory
18 #define RtlEqualMemory(a, b, c) (RtlCompareMemory(a, b, c) != c)
19 
20 //#define KDDEBUG /* uncomment to enable debugging this dll */
21 
22 typedef ULONG (*PFNDBGPRNT)(const char *Format, ...);
23 extern PFNDBGPRNT KdpDbgPrint;
24 
25 #ifndef KDDEBUG
26 #define KDDBGPRINT(...)
27 #else
28 #define KDDBGPRINT KdpDbgPrint
29 #endif
30 
31 #define KDRPC_PROTOCOL_VERSION 0x101
32 #define CONNECTION_TEST_ROUNDS 2 /*100*/
33 #define KDVM_BUFFER_SIZE (131072 + 1024)
34 #define KDRPC_TEST_BUFFER_SIZE 512
35 
38 extern ULONG KdVmBufferPos;
39 
40 typedef enum
41 {
45 } KDP_STATUS;
46 
47 typedef struct _KDVM_MARSHAL_STRING
48 {
52 
53 #pragma pack(push,1)
54 typedef struct
55 {
56  CHAR Magic[8];
59 
60 typedef struct
61 {
63  CHAR Magic[9];
65 
66 typedef struct _KDVM_CONTEXT
67 {
72 
73 typedef struct
74 {
75  struct
76  {
80  };
84 
85 typedef struct _KDVM_SEND_PKT_REQUEST
86 {
95 
96 typedef struct _KDVM_SEND_PKT_RESULT
97 {
102 
103 typedef struct
104 {
111 
112 typedef struct
113 {
124 #pragma pack(pop)
125 
126 VOID
127 NTAPI
129  _In_ PVOID Buffer,
130  _In_ ULONG Size);
131 
132 VOID
133 FASTCALL
137 
138 VOID
139 NTAPI
141  VOID);
142 
143 VOID
144 NTAPI
147  _Out_ PULONG ReceiveDataSize);
148 
149 
150 #endif /* _KDDLL_H_ */
USHORT MaximumLength
Definition: kdvm.h:50
UCHAR KdDebuggerNotPresent
Definition: kdvm.h:77
struct KDVM_RECEIVE_HEADER * PKDVM_RECEIVE_HEADER
USHORT Length
Definition: kdvm.h:49
#define KDVM_BUFFER_SIZE
Definition: kdvm.h:33
UCHAR CommandType
Definition: kdvm.h:98
PFNDBGPRNT KdpDbgPrint
Definition: kdvm.c:22
UCHAR align
Definition: kdvm.h:70
struct _KDVM_SEND_PKT_RESULT * PKDVM_SEND_PKT_RESULT
KDVM_MARSHAL_STRING MessageHeader
Definition: kdvm.h:115
KDP_STATUS
Definition: kddll.h:25
char CHAR
Definition: xmlstorage.h:175
ULONG HeaderSize
Definition: kdvm.h:120
UCHAR Command
Definition: kdvm.h:57
ULONG RetryCount
Definition: kdvm.h:68
KDVM_MARSHAL_STRING MessageData
Definition: kdvm.h:116
VOID NTAPI KdVmDbgDumpBuffer(_In_ PVOID Buffer, _In_ ULONG Size)
Definition: kdvm.c:43
struct _KDVM_MARSHAL_STRING KDVM_MARSHAL_STRING
struct _KDVM_SEND_PKT_REQUEST * PKDVM_SEND_PKT_REQUEST
KDVM_SENDPACKET_INFO Info
Definition: kdvm.h:106
VOID FASTCALL KdVmExchange(_In_ ULONG_PTR PhysicalAddress, _In_ SIZE_T BufferSize)
#define FASTCALL
Definition: nt_native.h:50
uint32_t ULONG_PTR
Definition: typedefs.h:63
KDVM_SENDPACKET_INFO Info
Definition: kdvm.h:93
KDVM_CONTEXT KdContext
Definition: kdvm.h:117
static ULONG ReceiveData(PINFO pInfo)
Definition: ntpclient.c:102
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONG KdVmBufferPos
Definition: kdvm.c:20
KDP_STATUS
Definition: kdvm.h:40
unsigned char BOOLEAN
KDVM_SENDPACKET_INFO Info
Definition: kdvm.h:100
#define _Out_
Definition: no_sal2.h:323
ULONG(* PFNDBGPRNT)(const char *Format,...)
Definition: kdvm.h:22
Definition: bufpool.h:45
struct _KDVM_SEND_PKT_REQUEST KDVM_SEND_PKT_REQUEST
UCHAR CommandType
Definition: kdvm.h:114
struct _KDVM_SEND_PKT_RESULT KDVM_SEND_PKT_RESULT
KDP_STATUS KdStatus
Definition: kdvm.h:118
VOID NTAPI KdVmPrepareBuffer(VOID)
Definition: kdvbox.c:24
UCHAR KdVmDataBuffer[KDVM_BUFFER_SIZE]
Definition: kdvm.c:18
#define BufferSize
Definition: classpnp.h:419
PHYSICAL_ADDRESS KdVmBufferPhysicalAddress
Definition: kdvm.c:19
KDVM_MARSHAL_STRING MessageData
Definition: kdvm.h:88
UCHAR RetryKdSendPacket
Definition: kdvm.h:78
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1061
unsigned char UCHAR
Definition: xmlstorage.h:181
BOOLEAN BreakInRequested
Definition: kdvm.h:69
struct _KDVM_CONTEXT KDVM_CONTEXT
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
KDVM_MARSHAL_STRING MessageHeader
Definition: kdvm.h:107
USHORT Unused
Definition: kdvm.h:82
BOOLEAN KdDebuggerEnabled
Definition: kdvm.h:81
#define _In_
Definition: no_sal2.h:204
KDVM_SENDPACKET_INFO Info
Definition: kdvm.h:122
ULONG_PTR SIZE_T
Definition: typedefs.h:78
UCHAR KdDebuggerEnabledAvailable
Definition: kdvm.h:79
unsigned short USHORT
Definition: pedump.c:61
struct KDVM_RECV_PKT_RESULT * PKDVM_RECV_PKT_RESULT
unsigned int * PULONG
Definition: retypes.h:1
KDVM_CONTEXT KdContext
Definition: kdvm.h:99
KDVM_CONTEXT KdContext
Definition: kdvm.h:89
KDVM_CONTEXT KdContext
Definition: kdvm.h:109
KDVM_MARSHAL_STRING MessageHeader
Definition: kdvm.h:87
unsigned int ULONG
Definition: retypes.h:1
KDVM_MARSHAL_STRING MessageData
Definition: kdvm.h:108
struct _KDVM_CONTEXT * PKDVM_CONTEXT
VOID NTAPI KdVmKdVmExchangeData(_Out_ PVOID *ReceiveData, _Out_ PULONG ReceiveDataSize)
Definition: kdvbox.c:31
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char * Format
Definition: acpixf.h:1206