0ac23c5c2f5630807f3e28ae1c75ee5968783194
[reactos.git] / hal / halx86 / apic / halinit_apic.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: hal/halx86/apic/halinit_apic.c
5 * PURPOSE: Initialize the x86 hal
6 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9 /* INCLUDES *****************************************************************/
10
11 #include <hal.h>
12 #define NDEBUG
13 #include <debug.h>
14 #include "apic.h"
15
16 VOID
17 NTAPI
18 ApicInitializeLocalApic(ULONG Cpu);
19
20 /* GLOBALS ******************************************************************/
21
22 const USHORT HalpBuildType = HAL_BUILD_TYPE;
23
24 /* FUNCTIONS ****************************************************************/
25
26 VOID
27 NTAPI
28 HalpInitProcessor(
29 IN ULONG ProcessorNumber,
30 IN PLOADER_PARAMETER_BLOCK LoaderBlock)
31 {
32 /* Initialize the local APIC for this cpu */
33 ApicInitializeLocalApic(ProcessorNumber);
34
35 /* Initialize the timer */
36 //ApicInitializeTimer(ProcessorNumber);
37
38 }
39
40 VOID
41 HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
42 {
43
44 /* Enable clock interrupt handler */
45 HalpEnableInterruptHandler(IDT_INTERNAL,
46 0,
47 APIC_CLOCK_VECTOR,
48 CLOCK2_LEVEL,
49 HalpClockInterrupt,
50 Latched);
51 }
52
53 VOID
54 HalpInitPhase1(VOID)
55 {
56 /* Initialize DMA. NT does this in Phase 0 */
57 HalpInitDma();
58 }
59
60 /* EOF */