ReactOS 0.4.15-dev-5836-g942b022
apicsmp.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS HAL
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * FILE: hal/halx86/apic/apicsmp.c
5 * PURPOSE: SMP specific APIC code
6 * PROGRAMMERS: Copyright 2021 Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include <hal.h>
12#include "apicp.h"
13#define NDEBUG
14#include <debug.h>
15
16/* INTERNAL FUNCTIONS *********************************************************/
17
57VOID
59 _In_ UCHAR DestinationProcessor,
61 _In_ APIC_MT MessageType,
62 _In_ APIC_TGM TriggerMode,
63 _In_ APIC_DSH DestinationShortHand)
64{
66
67 /* Setup the command register */
68 Icr.LongLong = 0;
69 Icr.Vector = Vector;
70 Icr.MessageType = MessageType;
72 Icr.DeliveryStatus = 0;
73 Icr.Level = 0;
74 Icr.TriggerMode = TriggerMode;
75 Icr.RemoteReadStatus = 0;
76 Icr.DestinationShortHand = DestinationShortHand;
77 Icr.Destination = DestinationProcessor;
78
79 /* Write the low dword last to send the interrupt */
82}
83
84
85/* SMP SUPPORT FUNCTIONS ******************************************************/
86
87// Should be called by SMP version of HalRequestIpi
88VOID
90HalpRequestIpi(KAFFINITY TargetProcessors)
91{
94}
95
96// APIC specific SMP code here
@ APIC_DM_Physical
Definition: apicp.h:144
enum _APIC_MT APIC_MT
FORCEINLINE VOID ApicWrite(APIC_REGISTER Register, ULONG Value)
Definition: apicp.h:322
enum _APIC_TGM APIC_TGM
@ APIC_ICR0
Definition: apicp.h:93
@ APIC_ICR1
Definition: apicp.h:94
enum _APIC_DSH APIC_DSH
FORCEINLINE VOID ApicRequestGlobalInterrupt(_In_ UCHAR DestinationProcessor, _In_ UCHAR Vector, _In_ APIC_MT MessageType, _In_ APIC_TGM TriggerMode, _In_ APIC_DSH DestinationShortHand)
Definition: apicsmp.c:58
VOID NTAPI HalpRequestIpi(KAFFINITY TargetProcessors)
Definition: apicsmp.c:90
#define UNIMPLEMENTED
Definition: debug.h:115
ULONG_PTR KAFFINITY
Definition: compat.h:85
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
#define _In_
Definition: ms_sal.h:308
#define NTAPI
Definition: typedefs.h:36
#define FORCEINLINE
Definition: wdftypes.h:67
unsigned char UCHAR
Definition: xmlstorage.h:181