xref: /reactos/ntoskrnl/ke/amd64/ipi.c (revision 84344399)
1 /*
2  * PROJECT:     ReactOS Kernel
3  * LICENSE:     GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE:     IPI code for x64
5  * COPYRIGHT:   Copyright 2023 Timo Kreuzer <timo.kreuzer@reactos.org>
6  */
7 
8 /* INCLUDES *******************************************************************/
9 
10 #include <ntoskrnl.h>
11 #define NDEBUG
12 #include <debug.h>
13 
14 /* FUNCTIONS *****************************************************************/
15 
16 VOID
17 FASTCALL
18 KiIpiSend(
19     _In_ KAFFINITY TargetSet,
20     _In_ ULONG IpiRequest)
21 {
22     /* Check if we can send the IPI directly */
23     if (IpiRequest == IPI_APC)
24     {
25         HalSendSoftwareInterrupt(TargetSet, APC_LEVEL);
26     }
27     else if (IpiRequest == IPI_DPC)
28     {
29         HalSendSoftwareInterrupt(TargetSet, DISPATCH_LEVEL);
30     }
31     else if (IpiRequest == IPI_FREEZE)
32     {
33         /* On x64 the freeze IPI is an NMI */
34         HalSendNMI(TargetSet);
35     }
36     else
37     {
38         ASSERT(FALSE);
39     }
40 }
41 
42 ULONG_PTR
43 NTAPI
44 KeIpiGenericCall(
45     _In_ PKIPI_BROADCAST_WORKER Function,
46     _In_ ULONG_PTR Argument)
47 {
48     __debugbreak();
49     return 0;
50 }
51