Reorganise HAL so multiple HAL versions can be built in parallel
[reactos.git] / reactos / hal / halx86 / generic / halinit.c
1 /* $Id: halinit.c,v 1.1 2004/12/03 20:10:43 gvg 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 <hal.h>
16
17 #define NDEBUG
18 #include <internal/debug.h>
19
20 /* GLOBALS *****************************************************************/
21
22 PVOID HalpZeroPageMapping = NULL;
23
24 /* FUNCTIONS ***************************************************************/
25
26 NTSTATUS
27 STDCALL
28 DriverEntry(
29 PDRIVER_OBJECT DriverObject,
30 PUNICODE_STRING RegistryPath)
31 {
32 return STATUS_SUCCESS;
33 }
34
35 BOOLEAN STDCALL
36 HalInitSystem (ULONG BootPhase,
37 PLOADER_PARAMETER_BLOCK LoaderBlock)
38 {
39 if (BootPhase == 0)
40 {
41 /* Initialize display and make the screen black */
42 HalInitializeDisplay (LoaderBlock);
43
44 HalpInitPhase0();
45 }
46 else if (BootPhase == 1)
47 {
48 HalpInitBusHandlers();
49 HalpInitDma();
50
51 /* Enumerate the devices on the motherboard */
52 HalpStartEnumerator();
53 }
54 else if (BootPhase == 2)
55 {
56 /* Go to blue screen */
57 HalClearDisplay (0x17); /* grey on blue */
58
59 HalpZeroPageMapping = MmMapIoSpace((LARGE_INTEGER)0LL, PAGE_SIZE, MmNonCached);
60 }
61
62 return TRUE;
63 }
64
65 /* EOF */