3737
3838typedef enum class _etagHistoryLogOperation
3939{
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
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
6161 hopTxProcess ,
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
65- }eHistoryLogOperation ;
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
65+ } eHistoryLogOperation ;
6666
6767// {E51FCE18-B3E7-441e-B18C-D9E9B71616F3}
68- static const GUID ParaNdis_CrashGuid =
69- { 0xe51fce18 , 0xb3e7 , 0x441e , { 0xb1 , 0x8c , 0xd9 , 0xe9 , 0xb7 , 0x16 , 0x16 , 0xf3 } };
68+ static const GUID ParaNdis_CrashGuid = {0xe51fce18 , 0xb3e7 , 0x441e , {0xb1 , 0x8c , 0xd9 , 0xe9 , 0xb7 , 0x16 , 0x16 , 0xf3 }};
7069
7170/* This structure is NOT changeable */
7271typedef struct _tagBugCheckStaticDataHeader
7372{
74- USHORT SizeOfPointer ;
75- USHORT StaticDataVersion ;
76- USHORT PerNicDataVersion ;
77- USHORT ulMaxContexts ;
78- LARGE_INTEGER qCrashTime ;
79- UINT64 PerNicData ;
80- UINT64 DataArea ;
81- UINT64 DataAreaSize ;
82- }tBugCheckStaticDataHeader ;
73+ USHORT SizeOfPointer ;
74+ USHORT StaticDataVersion ;
75+ USHORT PerNicDataVersion ;
76+ USHORT ulMaxContexts ;
77+ LARGE_INTEGER qCrashTime ;
78+ UINT64 PerNicData ;
79+ UINT64 DataArea ;
80+ UINT64 DataAreaSize ;
81+ } tBugCheckStaticDataHeader ;
8382
8483/* This structure is NOT changeable */
8584typedef struct _tagBugCheckDataLocation
8685{
87- UINT64 Address ;
88- UINT64 Size ;
89- }tBugCheckDataLocation ;
86+ UINT64 Address ;
87+ UINT64 Size ;
88+ } tBugCheckDataLocation ;
9089
91- #define PARANDIS_DEBUG_STATIC_DATA_VERSION 1
92- #define PARANDIS_DEBUG_PER_NIC_DATA_VERSION 0
93- #define PARANDIS_DEBUG_HISTORY_DATA_VERSION 1
94- #define PARANDIS_DEBUG_PENDING_NBL_ENTRY_VERSION 0
90+ #define PARANDIS_DEBUG_STATIC_DATA_VERSION 1
91+ #define PARANDIS_DEBUG_PER_NIC_DATA_VERSION 0
92+ #define PARANDIS_DEBUG_HISTORY_DATA_VERSION 1
93+ #define PARANDIS_DEBUG_PENDING_NBL_ENTRY_VERSION 0
9594
9695/* This structure is NOT changeable */
9796typedef struct _tagBugCheckStaticDataContent_V0
9897{
99- ULONG SizeOfHistory ;
100- ULONG SizeOfHistoryEntry ;
101- LONG CurrentHistoryIndex ;
102- ULONG HistoryDataVersion ;
103- ULONG64 HistoryData ;
104- }tBugCheckStaticDataContent_V0 ;
98+ ULONG SizeOfHistory ;
99+ ULONG SizeOfHistoryEntry ;
100+ LONG CurrentHistoryIndex ;
101+ ULONG HistoryDataVersion ;
102+ ULONG64 HistoryData ;
103+ } tBugCheckStaticDataContent_V0 ;
105104
106105#define PARANDIS_DEBUG_INTERRUPTS
107106
108107#ifdef PARANDIS_DEBUG_INTERRUPTS
109- # define PARANDIS_STORE_LAST_INTERRUPT_TIMESTAMP (p ) \
110- NdisGetCurrentSystemTime(&(p)->LastInterruptTimeStamp)
111- # define PARANDIS_GET_LAST_INTERRUPT_TIMESTAMP (p ) \
112- (p)->LastInterruptTimeStamp.QuadPart
108+ #define PARANDIS_STORE_LAST_INTERRUPT_TIMESTAMP (p ) NdisGetCurrentSystemTime(&(p)->LastInterruptTimeStamp)
109+ #define PARANDIS_GET_LAST_INTERRUPT_TIMESTAMP (p ) (p)->LastInterruptTimeStamp.QuadPart
113110#else
114- # define PARANDIS_STORE_LAST_INTERRUPT_TIMESTAMP (p )
115- # define PARANDIS_GET_LAST_INTERRUPT_TIMESTAMP (p ) (0)
111+ #define PARANDIS_STORE_LAST_INTERRUPT_TIMESTAMP (p )
112+ #define PARANDIS_GET_LAST_INTERRUPT_TIMESTAMP (p ) (0)
116113#endif
117114
118115typedef struct _tagBugCheckPerNicDataContent_V0
119116{
120- UINT64 Context ;
121- LARGE_INTEGER LastInterruptTimeStamp ;
122- LARGE_INTEGER LastTxCompletionTimeStamp ;
123- ULONG nofReadyTxBuffers ;
124- }tBugCheckPerNicDataContent_V0 ;
117+ UINT64 Context ;
118+ LARGE_INTEGER LastInterruptTimeStamp ;
119+ LARGE_INTEGER LastTxCompletionTimeStamp ;
120+ ULONG nofReadyTxBuffers ;
121+ } tBugCheckPerNicDataContent_V0 ;
125122
126123typedef struct _tagBugCheckHistoryDataEntry_V0
127124{
128- LARGE_INTEGER TimeStamp ;
129- UINT64 Context ;
130- UINT64 pParam1 ;
131- ULONG operation ;
132- ULONG lParam2 ;
133- ULONG lParam3 ;
134- ULONG lParam4 ;
135- }tBugCheckHistoryDataEntry_V0 ;
125+ LARGE_INTEGER TimeStamp ;
126+ UINT64 Context ;
127+ UINT64 pParam1 ;
128+ ULONG operation ;
129+ ULONG lParam2 ;
130+ ULONG lParam3 ;
131+ ULONG lParam4 ;
132+ } tBugCheckHistoryDataEntry_V0 ;
136133
137134typedef struct _tagBugCheckHistoryDataEntry_V1
138135{
139- LARGE_INTEGER TimeStamp ;
140- UINT64 Context ;
141- ULONG uIRQL ;
142- ULONG uProcessor ;
143- UINT64 pParam1 ;
144- ULONG operation ;
145- ULONG lParam2 ;
146- ULONG lParam3 ;
147- ULONG lParam4 ;
148- }tBugCheckHistoryDataEntry_V1 ;
136+ LARGE_INTEGER TimeStamp ;
137+ UINT64 Context ;
138+ ULONG uIRQL ;
139+ ULONG uProcessor ;
140+ UINT64 pParam1 ;
141+ ULONG operation ;
142+ ULONG lParam2 ;
143+ ULONG lParam3 ;
144+ ULONG lParam4 ;
145+ } tBugCheckHistoryDataEntry_V1 ;
149146
150147typedef struct _tagPendingNBlEntry_V0
151148{
152- UINT64 NBL ;
153- LARGE_INTEGER TimeStamp ;
154- }tPendingNBlEntry_V0 ;
149+ UINT64 NBL ;
150+ LARGE_INTEGER TimeStamp ;
151+ } tPendingNBlEntry_V0 ;
155152
156153#if (PARANDIS_DEBUG_PENDING_NBL_ENTRY_VERSION == 0 )
157154typedef tPendingNBlEntry_V0 tPendingNBlEntry ;
@@ -162,11 +159,11 @@ typedef tPendingNBlEntry_V1 tPendingNBlEntry;
162159typedef struct _tagBugCheckStaticDataContent_V1
163160{
164161 tBugCheckStaticDataContent_V0 StaticDataV0 ;
165- ULONG64 PendingNblData ;
166- ULONG MaxPendingNbl ;
167- USHORT PendingNblEntryVersion ;
168- USHORT fNBLOverflow ;
169- }tBugCheckStaticDataContent_V1 ;
162+ ULONG64 PendingNblData ;
163+ ULONG MaxPendingNbl ;
164+ USHORT PendingNblEntryVersion ;
165+ USHORT fNBLOverflow ;
166+ } tBugCheckStaticDataContent_V1 ;
170167
171168#if (PARANDIS_DEBUG_STATIC_DATA_VERSION == 0 )
172169typedef tBugCheckStaticDataContent_V0 tBugCheckStaticDataContent ;
@@ -186,12 +183,11 @@ typedef tBugCheckHistoryDataEntry_V1 tBugCheckHistoryDataEntry;
186183
187184typedef struct _tagBugCheckPerNicDataContent_V1
188185{
189- UINT64 Context ;
190- LARGE_INTEGER LastInterruptTimeStamp ;
191- LARGE_INTEGER LastTxCompletionTimeStamp ;
192- ULONG nofReadyTxBuffers ;
193- }tBugCheckPerNicDataContent_V1 ;
194-
186+ UINT64 Context ;
187+ LARGE_INTEGER LastInterruptTimeStamp ;
188+ LARGE_INTEGER LastTxCompletionTimeStamp ;
189+ ULONG nofReadyTxBuffers ;
190+ } tBugCheckPerNicDataContent_V1 ;
195191
196192#if (PARANDIS_DEBUG_HEADER_VERSION == 1 )
197193typedef tBugCheckStaticDataContent_V1 tBugCheckStaticDataContent ;
@@ -203,6 +199,4 @@ typedef tBugCheckPerNicDataContent_V1 tBugCheckPerNicDataContent;
203199
204200// etc
205201
206-
207-
208202#endif
0 commit comments