mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:35:59 +00:00
[WDF] Add Windows Driver Framework files
Takern from Microsoft GitHub repo:
d9c6040fe9
Licensed under MIT
This commit is contained in:
parent
545df81502
commit
8a978a179f
475 changed files with 285099 additions and 0 deletions
107
sdk/lib/drivers/wdf/shared/object/fxverifierbugcheck.cpp
Normal file
107
sdk/lib/drivers/wdf/shared/object/fxverifierbugcheck.cpp
Normal file
|
@ -0,0 +1,107 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
FxVerifierBugcheck.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
This file contains definitions of verifier bugcheck functions
|
||||
These definitions are split from tracing.cpp in kmdf\src\core
|
||||
|
||||
Author:
|
||||
|
||||
|
||||
|
||||
|
||||
Environment:
|
||||
|
||||
Both kernel and user mode
|
||||
|
||||
Revision History:
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#include "fxobjectpch.hpp"
|
||||
|
||||
// We use DoTraceMessage
|
||||
extern "C" {
|
||||
#if defined(EVENT_TRACING)
|
||||
#include "FxVerifierBugcheck.tmh"
|
||||
#endif
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
|
||||
VOID
|
||||
__declspec(noreturn)
|
||||
FxVerifierBugCheckWorker(
|
||||
__in PFX_DRIVER_GLOBALS FxDriverGlobals,
|
||||
__in WDF_BUGCHECK_CODES WdfBugCheckCode,
|
||||
__in_opt ULONG_PTR BugCheckParameter2,
|
||||
__in_opt ULONG_PTR BugCheckParameter3
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Wrapper for system BugCheck.
|
||||
|
||||
Note this functions is marked "__declspec(noreturn)"
|
||||
|
||||
Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
//
|
||||
// Indicate to the BugCheck callback filter which IFR to dump.
|
||||
//
|
||||
FxDriverGlobals->FxForceLogsInMiniDump = TRUE;
|
||||
|
||||
Mx::MxBugCheckEx(WDF_VIOLATION,
|
||||
WdfBugCheckCode,
|
||||
BugCheckParameter2,
|
||||
BugCheckParameter3,
|
||||
(ULONG_PTR) FxDriverGlobals );
|
||||
}
|
||||
|
||||
VOID
|
||||
__declspec(noreturn)
|
||||
FxVerifierNullBugCheck(
|
||||
__in PFX_DRIVER_GLOBALS FxDriverGlobals,
|
||||
__in PVOID ReturnAddress
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Calls KeBugCheckEx indicating a WDF DDI was passed a NULL parameter.
|
||||
|
||||
Note this functions is marked "__declspec(noreturn)"
|
||||
|
||||
Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
|
||||
DoTraceLevelMessage( FxDriverGlobals, TRACE_LEVEL_FATAL, TRACINGERROR,
|
||||
"NULL Required Parameter Passed to a DDI\n"
|
||||
"FxDriverGlobals 0x%p",
|
||||
FxDriverGlobals
|
||||
);
|
||||
|
||||
FxVerifierBugCheck(FxDriverGlobals,
|
||||
WDF_REQUIRED_PARAMETER_IS_NULL, // Bugcheck code.
|
||||
0, // Parameter 2
|
||||
(ULONG_PTR)ReturnAddress // Parameter 3
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue