ReactOS  0.4.15-dev-2487-g7b27e7c
halinit.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Hardware Abstraction Layer
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Initialize the APIC HAL
5  * COPYRIGHT: Copyright 2011 Timo Kreuzer <timo.kreuzer@reactos.org>
6  */
7 
8 /* INCLUDES *****************************************************************/
9 
10 #include <hal.h>
11 #include <apic.h>
12 #define NDEBUG
13 #include <debug.h>
14 
15 VOID
16 NTAPI
18 
19 /* GLOBALS ******************************************************************/
20 
22 
23 /* FUNCTIONS ****************************************************************/
24 
25 VOID
26 NTAPI
28  IN ULONG ProcessorNumber,
29  IN PLOADER_PARAMETER_BLOCK LoaderBlock)
30 {
31  /* Initialize the local APIC for this cpu */
32  ApicInitializeLocalApic(ProcessorNumber);
33 
34  /* Initialize profiling data (but don't start it) */
36 
37  /* Initialize the timer */
38  //ApicInitializeTimer(ProcessorNumber);
39 }
40 
41 VOID
43 {
44 
45  /* Enable clock interrupt handler */
47  0,
51  Latched);
52 }
53 
54 VOID
56 {
57  /* Initialize DMA. NT does this in Phase 0 */
58  HalpInitDma();
59 }
60 
61 /* EOF */
#define IN
Definition: typedefs.h:39
#define APIC_CLOCK_VECTOR
Definition: apic.h:45
#define HAL_BUILD_TYPE
Definition: halp.h:10
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
VOID HalpInitDma(VOID)
Definition: dma.c:121
VOID NTAPI HalpEnableInterruptHandler(IN UCHAR Flags, IN ULONG BusVector, IN ULONG SystemVector, IN KIRQL Irql, IN PVOID Handler, IN KINTERRUPT_MODE Mode)
Definition: usage.c:49
VOID HalpInitPhase1(VOID)
Definition: halinit.c:55
VOID HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit.c:42
#define CLOCK2_LEVEL
Definition: env_spec_w32.h:700
#define IDT_INTERNAL
Definition: halp.h:21
VOID HalpClockInterrupt(VOID)
Definition: timer.c:30
unsigned short USHORT
Definition: pedump.c:61
VOID NTAPI HalInitializeProfiling(VOID)
Definition: apictimer.c:69
VOID NTAPI ApicInitializeLocalApic(ULONG Cpu)
Definition: apic.c:259
unsigned int ULONG
Definition: retypes.h:1
const USHORT HalpBuildType
Definition: halinit.c:21
VOID NTAPI HalpInitProcessor(IN ULONG ProcessorNumber, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit.c:27