Something went wrong. Try again.
Reactos
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293/* * 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;
/* This table is counter of the overall APIC constants acquired from madt */#define HALP_APIC_INFO_TABLE_IOAPIC_NUMBER 256 // ACPI_MADT_IO_APIC.Id is a UINT8.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[HALP_APIC_INFO_TABLE_IOAPIC_NUMBER]; ULONG IoApicPA[HALP_APIC_INFO_TABLE_IOAPIC_NUMBER]; ULONG IoApicIrqBase[HALP_APIC_INFO_TABLE_IOAPIC_NUMBER]; // Global system interrupt base} HALP_APIC_INFO_TABLE, *PHALP_APIC_INFO_TABLE;
/* HALP_APIC_INFO_TABLE.ApicMode values */// TODO: What are the other modes/values?#define HALP_APIC_MODE_LEGACY 0x00000010
VOIDHalpParseApicTables( _In_ PLOADER_PARAMETER_BLOCK LoaderBlock);
VOIDHalpSetupProcessorsTable( _In_ UINT32 NTProcessorNumber);
VOIDHalpPrintApicTables(VOID);
VOIDFASTCALLHalpBroadcastClockIpi( _In_ UCHAR Vector);
/* APIC specific functions inside apic/apicsmp.c */
VOIDApicStartApplicationProcessor( _In_ ULONG NTProcessorNumber, _In_ PHYSICAL_ADDRESS StartupLoc);
VOIDNTAPIHalpRequestIpi( _In_ KAFFINITY TargetProcessors);
VOIDNTAPIHalpBroadcastIpiSpecifyVector( _In_ UCHAR Vector, _In_ BOOLEAN IncludeSelf);
VOIDNTAPIHalRequestIpiSpecifyVector( _In_ KAFFINITY TargetSet, _In_ UCHAR Vector);
#ifdef _M_AMD64
NTHALAPIVOIDNTAPIHalpSendNMI( _In_ KAFFINITY TargetSet);
NTHALAPIVOIDNTAPIHalpSendSoftwareInterrupt( _In_ KAFFINITY TargetSet, _In_ KIRQL Irql);
#endif // _M_AMD64