2021-06-24 16:57:19 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Kernel
|
|
|
|
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
|
|
|
* PURPOSE: Core source file for SMP management
|
2023-11-19 23:51:33 +00:00
|
|
|
* COPYRIGHT: Copyright 2021 Victor Perevertkin <victor.perevertkin@reactos.org>
|
|
|
|
* Copyright 2021-2023 Justin Miller <justin.miller@reactos.org>
|
2021-06-24 16:57:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
|
|
|
#include <hal.h>
|
|
|
|
#include <smp.h>
|
2023-11-19 23:51:33 +00:00
|
|
|
|
2021-06-24 16:57:19 +00:00
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
2022-03-26 17:01:21 +00:00
|
|
|
extern PPROCESSOR_IDENTITY HalpProcessorIdentity;
|
|
|
|
|
2021-06-24 16:57:19 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
VOID
|
|
|
|
HalpSetupProcessorsTable(
|
|
|
|
_In_ UINT32 NTProcessorNumber)
|
|
|
|
{
|
2022-03-26 17:01:21 +00:00
|
|
|
PKPRCB CurrentPrcb;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Link the Prcb of the current CPU to
|
|
|
|
* the current CPUs entry in the global ProcessorIdentity
|
|
|
|
*/
|
|
|
|
CurrentPrcb = KeGetCurrentPrcb();
|
|
|
|
HalpProcessorIdentity[NTProcessorNumber].ProcessorPrcb = CurrentPrcb;
|
2021-06-24 16:57:19 +00:00
|
|
|
}
|
2024-02-24 10:05:12 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
HalpBroadcastClockIpi(
|
|
|
|
_In_ UCHAR Vector)
|
|
|
|
{
|
|
|
|
/* Send a clock IPI to all processors */
|
|
|
|
HalpBroadcastIpiSpecifyVector(Vector, FALSE);
|
|
|
|
}
|