mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
[NTOS:KE/x64] Implement initial IPI code
This commit is contained in:
parent
e6201ea61e
commit
1831bc6add
3 changed files with 55 additions and 0 deletions
50
ntoskrnl/ke/amd64/ipi.c
Normal file
50
ntoskrnl/ke/amd64/ipi.c
Normal file
|
@ -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 <timo.kreuzer@reactos.org>
|
||||
*/
|
||||
|
||||
/* 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;
|
||||
}
|
|
@ -18,6 +18,8 @@ extern KSPIN_LOCK KiReverseStallIpiLock;
|
|||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
#ifndef _M_AMD64
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
KiIpiGenericCallTarget(IN PKIPI_CONTEXT PacketContext,
|
||||
|
@ -270,3 +272,5 @@ KeIpiGenericCall(IN PKIPI_BROADCAST_WORKER Function,
|
|||
KeLowerIrql(OldIrql);
|
||||
return Status;
|
||||
}
|
||||
|
||||
#endif // !_M_AMD64
|
||||
|
|
|
@ -351,6 +351,7 @@ elseif(ARCH STREQUAL "amd64")
|
|||
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/cpu.c
|
||||
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/except.c
|
||||
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/interrupt.c
|
||||
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/ipi.c
|
||||
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/irql.c
|
||||
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/kiinit.c
|
||||
${REACTOS_SOURCE_DIR}/ntoskrnl/ke/amd64/krnlinit.c
|
||||
|
|
Loading…
Reference in a new issue