ReactOS  0.4.15-dev-3294-ge98684e
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 "apicp.h"
12 #define NDEBUG
13 #include <debug.h>
14 
15 VOID
16 NTAPI
18 
19 /* FUNCTIONS ****************************************************************/
20 
21 VOID
22 NTAPI
24  IN ULONG ProcessorNumber,
25  IN PLOADER_PARAMETER_BLOCK LoaderBlock)
26 {
27  /* Initialize the local APIC for this cpu */
28  ApicInitializeLocalApic(ProcessorNumber);
29 
30  /* Initialize profiling data (but don't start it) */
32 
33  /* Initialize the timer */
34  //ApicInitializeTimer(ProcessorNumber);
35 }
36 
37 VOID
39 {
40  DPRINT1("Using HAL: APIC %s %s\n",
41  (HalpBuildType & PRCB_BUILD_UNIPROCESSOR) ? "UP" : "SMP",
42  (HalpBuildType & PRCB_BUILD_DEBUG) ? "DBG" : "REL");
43 
44  /* Enable clock interrupt handler */
46  0,
50  Latched);
51 }
52 
53 VOID
55 {
56  /* Initialize DMA. NT does this in Phase 0 */
57  HalpInitDma();
58 }
59 
60 /* EOF */
#define IN
Definition: typedefs.h:39
const USHORT HalpBuildType
Definition: buildtype.c:14
#define PRCB_BUILD_DEBUG
Definition: ketypes.h:246
VOID NTAPI HalInitializeProfiling(VOID)
Definition: apictimer.c:76
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
VOID HalpInitDma(VOID)
Definition: dma.c:153
#define APIC_CLOCK_VECTOR
Definition: apicp.h:44
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:54
VOID HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit.c:38
#define CLOCK2_LEVEL
Definition: env_spec_w32.h:700
#define IDT_INTERNAL
Definition: halp.h:21
VOID HalpClockInterrupt(VOID)
Definition: timer.c:30
#define PRCB_BUILD_UNIPROCESSOR
Definition: ketypes.h:247
#define DPRINT1
Definition: precomp.h:8
VOID NTAPI ApicInitializeLocalApic(ULONG Cpu)
Definition: apic.c:256
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI HalpInitProcessor(IN ULONG ProcessorNumber, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit.c:23