forked from reactos/reactos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NTOS:KE/x64] Implement initial IPI code
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* PROJECT: ReactOS Kernel | ||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) | ||
* PURPOSE: IPI code for x64 | ||
* COPYRIGHT: Copyright 2023 Timo Kreuzer <[email protected]> | ||
*/ | ||
|
||
/* INCLUDES *******************************************************************/ | ||
|
||
#include <ntoskrnl.h> | ||
#define NDEBUG | ||
#include <debug.h> | ||
|
||
/* FUNCTIONS *****************************************************************/ | ||
|
||
VOID | ||
FASTCALL | ||
KiIpiSend( | ||
_In_ KAFFINITY TargetSet, | ||
_In_ ULONG IpiRequest) | ||
{ | ||
/* Check if we can send the IPI directly */ | ||
if (IpiRequest == IPI_APC) | ||
{ | ||
HalSendSoftwareInterrupt(TargetSet, APC_LEVEL); | ||
} | ||
else if (IpiRequest == IPI_DPC) | ||
{ | ||
HalSendSoftwareInterrupt(TargetSet, DISPATCH_LEVEL); | ||
} | ||
else if (IpiRequest == IPI_FREEZE) | ||
{ | ||
/* On x64 the freeze IPI is an NMI */ | ||
HalSendNMI(TargetSet); | ||
} | ||
else | ||
{ | ||
ASSERT(FALSE); | ||
} | ||
} | ||
|
||
ULONG_PTR | ||
NTAPI | ||
KeIpiGenericCall( | ||
_In_ PKIPI_BROADCAST_WORKER Function, | ||
_In_ ULONG_PTR Argument) | ||
{ | ||
__debugbreak(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters