287aa2f0b75275cc11ff666f8f2e4f2931b4f901
[reactos.git] / hal / halx86 / halinit.c
1 /* $Id$
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 #include <internal/ntoskrnl.h>
18
19 #ifdef MP
20 #include <mps.h>
21 #endif /* MP */
22
23 #define NDEBUG
24 #include <internal/debug.h>
25
26 /* FUNCTIONS ***************************************************************/
27
28 NTSTATUS
29 STDCALL
30 DriverEntry(
31     PDRIVER_OBJECT DriverObject,
32     PUNICODE_STRING RegistryPath)
33 {
34         return STATUS_SUCCESS;
35 }
36
37 BOOLEAN STDCALL
38 HalInitSystem (ULONG BootPhase,
39                PLOADER_PARAMETER_BLOCK LoaderBlock)
40 {
41   if (BootPhase == 0)
42     {
43       HalInitializeDisplay (LoaderBlock);
44       
45 #ifdef MP
46       
47       HalpInitMPS();
48       
49 #else
50
51       HalpInitPICs();
52
53       /* Setup busy waiting */
54       HalpCalibrateStallExecution();
55
56 #endif /* MP */
57
58     }
59   else if (BootPhase == 1)
60     {
61       HalpInitBusHandlers ();
62           HalpCalibrateStallExecution ();
63
64       /* Enumerate the devices on the motherboard */
65       HalpStartEnumerator();
66    }
67
68   return TRUE;
69 }
70
71 /* EOF */