ReactOS 0.4.15-dev-7924-g5949c20
fxifr.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxIFR.h
8
9Abstract:
10
11 This module contains the private IFR tracing definitions
12 The structures are common to the In-Flight Recorder (IFR)
13 and the IFR-related debug commands in wdfkd.dll.
14
15Environment:
16
17 kernel mode and debug extensions
18
19Revision History:
20
21
22--*/
23
24#ifndef _FXIFR_H
25#define _FXIFR_H
26
27//
28// This is maximum number of arguments a single message can capture.
29// It reflects WPP_MAX_MOF_FIELDS value of 8 found in WPP trace support.
30//
31#define WDF_MAX_LOG_FIELDS (8)
32
33//
34// This is the longest allowable message retained in the IFR log.
35//
36#define WDF_MAX_IFR_MESSAGE_SIZE (256)
37
38
39//
40// This is the maximum name length for the driver.
41//
42#define WDF_IFR_HEADER_NAME_LEN (32)
43
44//
45// Access macro for trace GUID BITs.
46//
47#define TRACE_BIT(a) WPP_BIT_ ## a
48
49//
50// Various GUIDs needed.
51//
52
53//
54// (Keep synch-ed with "KmdfTraceGuid" in fxtrace.h)
55//
56DEFINE_GUID (WdfTraceGuid,
57 0x544d4c9d, 0x942c, 0x46d5, 0xbf, 0x50, 0xdf, 0x5c, 0xd9, 0x52, 0x4a, 0x50);
58
59//
60// GUID used to tag IFR log in crash dump.
61//
62DEFINE_GUID (WdfDumpGuid,
63 0x54c84888, 0x01d1, 0x4c1e, 0xbe, 0xd6, 0x28, 0x2c, 0x98, 0x24, 0x13, 0x03);
64
65//
66// GUID used to tag drivers info in crash dump.
67//
68// {F87E4A4C-C5A1-4d2f-BFF0-D5DE63A5E4C3}
69DEFINE_GUID(WdfDumpGuid2,
700xf87e4a4c, 0xc5a1, 0x4d2f, 0xbf, 0xf0, 0xd5, 0xde, 0x63, 0xa5, 0xe4, 0xc3);
71
72//
73// This structure hold the current and previous 16-bit offsets into
74// the IFR log. These variable must be access together as a LONG
75// via the InterlockedCompareExchange().
76//
77typedef struct _WDF_IFR_OFFSET {
78 union {
79 struct {
82 } s;
84 } u;
86
87
88#define WDF_IFR_LOG_TAG 'gLxF' // 'FxLg'
89
90//
91// This is the IFR log header structure. It is immediately followed
92// by the log area itself.
93//
94typedef struct _WDF_IFR_HEADER {
95
96 GUID Guid; // WDF's GUID (WDF_TRACE_GUID)
97 PUCHAR Base; // log data area base (not header)
98 ULONG Size; // size of the log (1 page by default)
99 WDF_IFR_OFFSET Offset; // current/previous offsets
100 LONG Sequence; // local sequence number
101#if (FX_CORE_MODE == FX_CORE_USER_MODE)
102 PLONG SequenceNumberPointer; // Global IFR Sequence Number
103#endif
105
107
108
109#define WDF_IFR_RECORD_SIGNATURE 'RL' // 'LR'
110
111typedef struct _WDF_IFR_RECORD {
112
113 USHORT Signature; // 'LR' Log Record signature
116 USHORT PrevOffset; // offset to previous record
117 USHORT MessageNumber; // message number see <GUID>.tmf
118 GUID MessageGuid; // message GUID see <GUID>.tmf
119
121
122
123#endif // _FXIFR_H
struct _WDF_IFR_OFFSET WDF_IFR_OFFSET
struct _WDF_IFR_HEADER * PWDF_IFR_HEADER
struct _WDF_IFR_RECORD WDF_IFR_RECORD
struct _WDF_IFR_HEADER WDF_IFR_HEADER
struct _WDF_IFR_RECORD * PWDF_IFR_RECORD
struct _WDF_IFR_OFFSET * PWDF_IFR_OFFSET
#define WDF_IFR_HEADER_NAME_LEN
Definition: fxifr.h:42
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
WDF_IFR_OFFSET Offset
Definition: fxifr.h:99
LONG Sequence
Definition: fxifr.h:100
GUID Guid
Definition: fxifr.h:96
PLONG SequenceNumberPointer
Definition: fxifr.h:102
CHAR DriverName[WDF_IFR_HEADER_NAME_LEN]
Definition: fxifr.h:104
PUCHAR Base
Definition: fxifr.h:97
ULONG Size
Definition: fxifr.h:98
USHORT Current
Definition: fxifr.h:80
struct _WDF_IFR_OFFSET::@4763::@4764 s
LONG AsLONG
Definition: fxifr.h:83
union _WDF_IFR_OFFSET::@4763 u
USHORT Previous
Definition: fxifr.h:81
USHORT MessageNumber
Definition: fxifr.h:117
USHORT Signature
Definition: fxifr.h:113
GUID MessageGuid
Definition: fxifr.h:118
USHORT Length
Definition: fxifr.h:114
LONG Sequence
Definition: fxifr.h:115
USHORT PrevOffset
Definition: fxifr.h:116
int32_t * PLONG
Definition: typedefs.h:58
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
char CHAR
Definition: xmlstorage.h:175