ReactOS 0.4.15-dev-8419-g7f0e8a3
fxifrkm.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FX_IFR_MAX_BUFFER_SIZE   (0x10000)
 
#define FX_IFR_AVG_BUFFER_SIZE   (5 * PAGE_SIZE)
 

Enumerations

enum  FxIFRValues {
  FxIFRMinLogPages = 1 , FxIFRMaxLogPages = FX_IFR_MAX_BUFFER_SIZE/PAGE_SIZE , FxIFRAvgLogPages = FX_IFR_AVG_BUFFER_SIZE/PAGE_SIZE , FxIFRMinLogSize = FxIFRMinLogPages * PAGE_SIZE ,
  FxIFRMaxLogSize = FxIFRMaxLogPages * PAGE_SIZE , FxIFRAvgLogSize = FxIFRAvgLogPages * PAGE_SIZE , FxIFRMaxMessageSize = 256 , FxIFRRecordSignature = WDF_IFR_RECORD_SIGNATURE
}
 

Functions

 C_ASSERT (FxIFRMaxLogSize<=0x10000)
 
 C_ASSERT (FxIFRMinLogSize >=PAGE_SIZE)
 
 C_ASSERT (FxIFRMaxLogSize >=FxIFRAvgLogSize &&FxIFRAvgLogSize >=FxIFRMinLogSize)
 
 C_ASSERT (FxIFRMaxLogPages >=FxIFRAvgLogPages &&FxIFRAvgLogPages >=FxIFRMinLogPages)
 
__inline VOID FxVerifyLogHeader (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_IFR_HEADER Header)
 

Macro Definition Documentation

◆ FX_IFR_AVG_BUFFER_SIZE

#define FX_IFR_AVG_BUFFER_SIZE   (5 * PAGE_SIZE)

Definition at line 12 of file fxifrkm.h.

◆ FX_IFR_MAX_BUFFER_SIZE

#define FX_IFR_MAX_BUFFER_SIZE   (0x10000)

Definition at line 7 of file fxifrkm.h.

Enumeration Type Documentation

◆ FxIFRValues

Enumerator
FxIFRMinLogPages 
FxIFRMaxLogPages 
FxIFRAvgLogPages 
FxIFRMinLogSize 
FxIFRMaxLogSize 
FxIFRAvgLogSize 
FxIFRMaxMessageSize 
FxIFRRecordSignature 

Definition at line 18 of file fxifrkm.h.

18 {
22
26
28
30};
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define WDF_IFR_RECORD_SIGNATURE
Definition: fxifr.h:109
#define FX_IFR_AVG_BUFFER_SIZE
Definition: fxifrkm.h:12
@ FxIFRMaxLogSize
Definition: fxifrkm.h:24
@ FxIFRMaxLogPages
Definition: fxifrkm.h:20
@ FxIFRMinLogPages
Definition: fxifrkm.h:19
@ FxIFRMinLogSize
Definition: fxifrkm.h:23
@ FxIFRAvgLogPages
Definition: fxifrkm.h:21
@ FxIFRAvgLogSize
Definition: fxifrkm.h:25
@ FxIFRMaxMessageSize
Definition: fxifrkm.h:27
@ FxIFRRecordSignature
Definition: fxifrkm.h:29
#define FX_IFR_MAX_BUFFER_SIZE
Definition: fxifrkm.h:7

Function Documentation

◆ C_ASSERT() [1/4]

C_ASSERT ( FxIFRMaxLogPages >=FxIFRAvgLogPages &&FxIFRAvgLogPages >=  FxIFRMinLogPages)

◆ C_ASSERT() [2/4]

C_ASSERT ( FxIFRMaxLogSize >=FxIFRAvgLogSize &&FxIFRAvgLogSize >=  FxIFRMinLogSize)

◆ C_ASSERT() [3/4]

C_ASSERT ( FxIFRMaxLogSize<=  0x10000)

◆ C_ASSERT() [4/4]

C_ASSERT ( FxIFRMinLogSize >=  PAGE_SIZE)

◆ FxVerifyLogHeader()

__inline VOID FxVerifyLogHeader ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in PWDF_IFR_HEADER  Header 
)

Definition at line 49 of file fxifrkm.h.

61{
63
64 if (FxDriverGlobals->FxVerifierOn
65 &&
66 (strncmp(Header->DriverName, FxDriverGlobals->Public.DriverName,
68 ||
69 FxIsEqualGuid((LPGUID)&(Header->Guid), (LPGUID)&WdfTraceGuid) == FALSE
70 ||
71 Header->Base != (PUCHAR) &Header[1]
72 ||
73 Header->Offset.u.s.Current > Header->Size
74 ||
75 Header->Offset.u.s.Previous > Header->Size
76 ||
77 Header->Size >= FxIFRMaxLogSize)) // size doesn't include header.
78 {
79 FxVerifierDbgBreakPoint(FxDriverGlobals);
80 }
81}
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
Definition: Header.h:9
#define FALSE
Definition: types.h:117
FxVerifierDbgBreakPoint(pFxDriverGlobals)
_Must_inspect_result_ BOOLEAN __inline FxIsEqualGuid(__in CONST GUID *Lhs, __in CONST GUID *Rhs)
Definition: fxglobals.h:977
#define WDF_IFR_HEADER_NAME_LEN
Definition: fxifr.h:42
unsigned char * PUCHAR
Definition: typedefs.h:53
#define WDFCASSERT(c)
Definition: wdfassert.h:93
#define WDF_DRIVER_GLOBALS_NAME_LEN
Definition: wdfglobals.h:51

Referenced by FxIFR().