migrate substitution keywords to SVN
[reactos.git] / reactos / hal / halx86 / generic / 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 <hal.h>
16
17 #define NDEBUG
18 #include <internal/debug.h>
19
20 /* GLOBALS *****************************************************************/
21
22 PVOID HalpZeroPageMapping = NULL;
23 HALP_HOOKS HalpHooks;
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 RtlZeroMemory(&HalpHooks, sizeof(HALP_HOOKS));
43 HalpInitPhase0();
44 }
45 else if (BootPhase == 1)
46 {
47 /* Initialize display and make the screen black */
48 HalInitializeDisplay (LoaderBlock);
49 HalpInitBusHandlers();
50 HalpInitDma();
51
52 /* Enumerate the devices on the motherboard */
53 HalpStartEnumerator();
54 }
55 else if (BootPhase == 2)
56 {
57 /* Go to blue screen */
58 HalClearDisplay (0x17); /* grey on blue */
59
60 HalpZeroPageMapping = MmMapIoSpace((LARGE_INTEGER)0LL, PAGE_SIZE, MmNonCached);
61 }
62
63 return TRUE;
64 }
65
66 /* EOF */