394e008ae966c3c7c714258c8f9879c4f059f5c7
[reactos.git] / reactos / hal / halx86 / halinit.c
1 /* $Id: halinit.c,v 1.4 2003/02/26 14:14:03 ekohl Exp $
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/hal/x86/halinit.c
6 * PURPOSE: Initalize the x86 hal
7 * PROGRAMMER: David Welch (welch@cwcom.net)
8 * UPDATE HISTORY:
9 * 11/06/98: Created
10 */
11
12 /* INCLUDES *****************************************************************/
13
14 #include <ddk/ntddk.h>
15 #include <roscfg.h>
16 #include <hal.h>
17
18 #ifdef MP
19 #include <mps.h>
20 #endif /* MP */
21
22 #define NDEBUG
23 #include <internal/debug.h>
24
25 /* FUNCTIONS ***************************************************************/
26
27 NTSTATUS
28 STDCALL
29 DriverEntry(
30 PDRIVER_OBJECT DriverObject,
31 PUNICODE_STRING RegistryPath)
32 {
33 return STATUS_SUCCESS;
34 }
35
36 BOOLEAN STDCALL
37 HalInitSystem (ULONG BootPhase,
38 PLOADER_PARAMETER_BLOCK LoaderBlock)
39 {
40 if (BootPhase == 0)
41 {
42 HalInitializeDisplay (LoaderBlock);
43
44 #ifdef MP
45
46 HalpInitMPS();
47
48 #else
49
50 HalpInitPICs();
51
52 /* Setup busy waiting */
53 HalpCalibrateStallExecution();
54
55 #endif /* MP */
56
57 }
58 else if (BootPhase == 1)
59 {
60 HalpInitBusHandlers();
61 HalpCalibrateStallExecution();
62
63 /* Enumerate the devices on the motherboard */
64 HalpStartEnumerator();
65 }
66
67 return TRUE;
68 }
69
70 /* EOF */