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: Header File for SMP support
|
|
|
|
* COPYRIGHT: Copyright 2021 Justin Miller <justinmiller100@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/* This table is filled for each physical processor on system */
|
|
|
|
typedef struct _PROCESSOR_IDENTITY
|
|
|
|
{
|
|
|
|
UCHAR ProcessorId;
|
|
|
|
UCHAR LapicId;
|
|
|
|
BOOLEAN ProcessorStarted;
|
|
|
|
BOOLEAN BSPCheck;
|
|
|
|
PKPRCB ProcessorPrcb;
|
|
|
|
|
|
|
|
} PROCESSOR_IDENTITY, *PPROCESSOR_IDENTITY;
|
|
|
|
|
2022-03-26 19:39:28 +00:00
|
|
|
/* This table is counter of the overall APIC constants acquired from madt */
|
|
|
|
typedef struct _HALP_APIC_INFO_TABLE
|
|
|
|
{
|
|
|
|
ULONG ApicMode;
|
|
|
|
ULONG ProcessorCount; /* Count of all physical cores, This includes BSP */
|
|
|
|
ULONG IOAPICCount;
|
|
|
|
ULONG LocalApicPA; // The 32-bit physical address at which each processor can access its local interrupt controller
|
|
|
|
ULONG IoApicVA[256];
|
|
|
|
ULONG IoApicPA[256];
|
|
|
|
ULONG IoApicIrqBase[256]; // Global system interrupt base
|
|
|
|
|
|
|
|
} HALP_APIC_INFO_TABLE, *PHALP_APIC_INFO_TABLE;
|
|
|
|
|
2021-06-24 16:57:19 +00:00
|
|
|
VOID
|
|
|
|
HalpParseApicTables(
|
|
|
|
_In_ PLOADER_PARAMETER_BLOCK LoaderBlock);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
HalpSetupProcessorsTable(
|
|
|
|
_In_ UINT32 NTProcessorNumber);
|
2022-03-26 17:22:12 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
HalpPrintApicTables(VOID);
|
2023-11-19 23:51:33 +00:00
|
|
|
|
2024-02-24 10:05:12 +00:00
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
HalpBroadcastClockIpi(
|
|
|
|
_In_ UCHAR Vector);
|
|
|
|
|
2023-11-19 23:51:33 +00:00
|
|
|
/* APIC specific functions inside apic/apicsmp.c */
|
|
|
|
|
|
|
|
VOID
|
|
|
|
ApicStartApplicationProcessor(
|
|
|
|
_In_ ULONG NTProcessorNumber,
|
|
|
|
_In_ PHYSICAL_ADDRESS StartupLoc);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalpRequestIpi(
|
|
|
|
_In_ KAFFINITY TargetProcessors);
|
2023-11-26 15:32:27 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalpBroadcastIpiSpecifyVector(
|
|
|
|
_In_ UCHAR Vector,
|
|
|
|
_In_ BOOLEAN IncludeSelf);
|
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalRequestIpiSpecifyVector(
|
|
|
|
_In_ KAFFINITY TargetSet,
|
|
|
|
_In_ UCHAR Vector);
|
|
|
|
|
|
|
|
#ifdef _M_AMD64
|
|
|
|
|
|
|
|
NTHALAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalpSendNMI(
|
|
|
|
_In_ KAFFINITY TargetSet);
|
|
|
|
|
|
|
|
NTHALAPI
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalpSendSoftwareInterrupt(
|
|
|
|
_In_ KAFFINITY TargetSet,
|
|
|
|
_In_ KIRQL Irql);
|
|
|
|
|
|
|
|
#endif // _M_AMD64
|