ReactOS  0.4.15-dev-3294-ge98684e
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 
57 VOID
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
88 VOID
89 NTAPI
90 HalpRequestIpi(KAFFINITY TargetProcessors)
91 {
93  __debugbreak();
94 }
95 
96 // APIC specific SMP code here
enum _APIC_DSH APIC_DSH
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
FORCEINLINE VOID ApicWrite(APIC_REGISTER Register, ULONG Value)
Definition: apicp.h:328
VOID NTAPI HalpRequestIpi(KAFFINITY TargetProcessors)
Definition: apicsmp.c:90
#define _In_
Definition: ms_sal.h:308
enum _APIC_TGM APIC_TGM
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
unsigned char UCHAR
Definition: xmlstorage.h:181
enum _APIC_MT APIC_MT
ULONG_PTR KAFFINITY
Definition: compat.h:85
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG Vector
Definition: iofuncs.h:800
#define FORCEINLINE
Definition: wdftypes.h:67
#define UNIMPLEMENTED
Definition: debug.h:115