ReactOS  0.4.15-dev-1377-ga59cecd
DebugData.h
Go to the documentation of this file.
1 /*
2  * This file contains definitions and data structures, common between
3  * NDIS driver and debugger helper unit, processing crash dump with built-in
4  * data provided by the driver.
5  *
6  * Included in NetKVM NDIS kernel driver for Windows.
7  * Included in NetKVMDumpParser application.
8  *
9  * Copyright (c) 2008-2017 Red Hat, Inc.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met :
14  * 1. Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright
17  * notice, this list of conditions and the following disclaimer in the
18  * documentation and / or other materials provided with the distribution.
19  * 3. Neither the names of the copyright holders nor the names of their contributors
20  * may be used to endorse or promote products derived from this software
21  * without specific prior written permission.
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25  * ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32  * SUCH DAMAGE.
33  */
34 
35 #ifndef PARANDIS_DEBUG_DATA_H
36 #define PARANDIS_DEBUG_DATA_H
37 
39 {
40  hopPowerOff, // common::PowerOff, 1/0 - entry/exit (none, entry, none, none)
41  hopPowerOn, // common::PowerOn, 1/0 - entry/exit (none, entry, none, none)
42  hopSysPause, // ndis6::Pause, 1/0 - entry/completion
43  hopSysResume, // ndis6::Restart, 1/0 - entry/completion
44  hopInternalSendPause, // implementation, 1/0 - entry/completion
45  hopInternalReceivePause, // implementation, 1/0 - entry/completion
46  hopInternalSendResume, // implementation
47  hopInternalReceiveResume, // implementation
48  hopSysReset, // implementation driver, 1/0 - entry/completion
49  hopHalt, // implementation driver, 1/0 - entry/completion
50  hopConnectIndication, // implementation
51  hopDPC, // common::DpcWorkBody (1, none, none, none) (0, left, free buffers, free desc)
52  hopSend, // implementation, when Send requested (nbl, nof lists, nof bufs, nof bytes) (packet, 1, nof packets, none)
53  hopSendNBLRequest, // ndis6 implementation (nbl, nof packets, none, none)
54  hopSendPacketRequest, // not used
55  hopSendPacketMapped, // implementation, before the packet inserted into queue (nbl, which packet, nof frags, none)
56  hopSubmittedPacket, // implementation, when the packet submitted (nbl, which packet, result, flags)
57  hopBufferSent, // implementation, when the packet returned from VirtIO queue (nbl, packet no., free buf, free desc)
58  hopReceiveStat, // common: RX (none, retrieved, reported, ready rx buffers)
59  hopBufferReturned, // not used
60  hopSendComplete, // implementation, when the packet completed
62  hopPacketReceived, // implementation, when the packet prepared for indication (nbl, length, prio tag, type)
63  hopOidRequest, // implementation, none, OID, on entry(type, 1), on exit (status, 0), on complete (status, 2)
64  hopPnpEvent // common, none, event, 0, 0
66 
67 // {E51FCE18-B3E7-441e-B18C-D9E9B71616F3}
68 static const GUID ParaNdis_CrashGuid =
69 { 0xe51fce18, 0xb3e7, 0x441e, { 0xb1, 0x8c, 0xd9, 0xe9, 0xb7, 0x16, 0x16, 0xf3 } };
70 
71 /* This structure is NOT changeable */
73 {
83 
84 /* This structure is NOT changeable */
86 {
90 
91 #define PARANDIS_DEBUG_STATIC_DATA_VERSION 0
92 #define PARANDIS_DEBUG_PER_NIC_DATA_VERSION 0
93 #define PARANDIS_DEBUG_HISTORY_DATA_VERSION 1
94 /* This structure is NOT changeable */
96 {
103 
104 #define PARANDIS_DEBUG_INTERRUPTS
105 
106 #ifdef PARANDIS_DEBUG_INTERRUPTS
107 # define PARANDIS_STORE_LAST_INTERRUPT_TIMESTAMP(p) \
108  NdisGetCurrentSystemTime(&(p)->LastInterruptTimeStamp)
109 # define PARANDIS_GET_LAST_INTERRUPT_TIMESTAMP(p) \
110  (p)->LastInterruptTimeStamp.QuadPart
111 #else
112 # define PARANDIS_STORE_LAST_INTERRUPT_TIMESTAMP(p)
113 # define PARANDIS_GET_LAST_INTERRUPT_TIMESTAMP(p) (0)
114 #endif
115 
117 {
124 
126 {
135 
137 {
148 
149 
150 #if (PARANDIS_DEBUG_STATIC_DATA_VERSION == 0)
152 #endif
153 
154 #if (PARANDIS_DEBUG_PER_NIC_DATA_VERSION == 0)
156 #endif
157 
158 #if (PARANDIS_DEBUG_HISTORY_DATA_VERSION == 0)
160 #elif (PARANDIS_DEBUG_HISTORY_DATA_VERSION == 1)
162 #endif
163 
165 {
170 
172 {
179 
180 
181 #if (PARANDIS_DEBUG_HEADER_VERSION == 1)
183 #endif
184 
185 #if (PARANDIS_DEBUG_PER_NIC_DATA_VERSION == 1)
187 #endif
188 
189 // etc
190 
191 
192 
193 #endif
LARGE_INTEGER LastTxCompletionTimeStamp
Definition: DebugData.h:175
struct _tagBugCheckStaticDataHeader tBugCheckStaticDataHeader
LARGE_INTEGER LastInterruptTimeStamp
Definition: DebugData.h:174
tBugCheckPerNicDataContent_V0 tBugCheckPerNicDataContent
Definition: DebugData.h:155
struct _tagBugCheckDataLocation tBugCheckDataLocation
long LONG
Definition: pedump.c:60
struct _tagBugCheckHistoryDataEntry_V1 tBugCheckHistoryDataEntry_V1
enum _etagHistoryLogOperation eHistoryLogOperation
struct _tagBugCheckHistoryDataEntry_V0 tBugCheckHistoryDataEntry_V0
static const GUID ParaNdis_CrashGuid
Definition: DebugData.h:68
LARGE_INTEGER LastInterruptTimeStamp
Definition: DebugData.h:119
unsigned __int64 ULONG64
Definition: imports.h:198
struct _tagBugCheckStaticDataContent_V1 tBugCheckStaticDataContent_V1
tBugCheckHistoryDataEntry_V1 tBugCheckHistoryDataEntry
Definition: DebugData.h:161
LARGE_INTEGER LastTxCompletionTimeStamp
Definition: DebugData.h:120
unsigned short USHORT
Definition: pedump.c:61
_etagHistoryLogOperation
Definition: DebugData.h:38
struct _tagBugCheckPerNicDataContent_V0 tBugCheckPerNicDataContent_V0
struct _tagBugCheckStaticDataContent_V0 tBugCheckStaticDataContent_V0
struct _tagBugCheckPerNicDataContent_V1 tBugCheckPerNicDataContent_V1
unsigned int ULONG
Definition: retypes.h:1
LARGE_INTEGER qCrashTime
Definition: DebugData.h:78
unsigned long long UINT64
tBugCheckStaticDataContent_V0 tBugCheckStaticDataContent
Definition: DebugData.h:151