36 #if defined(ALLOC_PRAGMA) 37 #pragma alloc_text(INIT, PowerCallbackInitialization) 38 #pragma alloc_text(PAGE, PowerCallbackTermination) 39 #pragma alloc_text(PAGE, PowerCallbackpCallbackRoutine) 59 UNICODE_STRING name = RTL_CONSTANT_STRING(L
"\\Callback\\PowerState");
60 OBJECT_ATTRIBUTES oa =
61 RTL_CONSTANT_OBJECT_ATTRIBUTES(&name, OBJ_CASE_INSENSITIVE);
64 if (!NT_SUCCESS(status)) {
73 return STATUS_UNSUCCESSFUL;
92 PVOID callback_context, PVOID argument1, PVOID argument2) {
93 UNREFERENCED_PARAMETER(callback_context);
98 if (argument1 != reinterpret_cast<void*>(PO_CB_SYSTEM_STATE_LOCK)) {
108 if (!NT_SUCCESS(status)) {
110 "Failed to re-virtualize processors. Please unload the driver.");
#define HYPERPLATFORM_LOG_INFO(format,...)
#define HYPERPLATFORM_LOG_DEBUG(format,...)
Logs a message as respective severity.
NTSTATUS VmInitialization()
Virtualizes all processors.
NTSTATUS PowerCallbackInitialization()
void VmTermination()
De-virtualize all processors.
#define HYPERPLATFORM_COMMON_DBG_BREAK()
Sets a break point that works only when a debugger is present.
void PowerCallbackTermination()
Declares interfaces to power functions.
static CALLBACK_FUNCTION PowerCallbackpCallbackRoutine
Declares and implements common things across the project.
static PCALLBACK_OBJECT g_pcp_callback_object
Declares interfaces to VMM initialization functions.
#define HYPERPLATFORM_LOG_ERROR(format,...)
Declares interfaces to logging functions.
static PVOID g_pcp_registration