- Add information on new executive locks being worked on.
[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 <hal.h>
15 #define NDEBUG
16 #include <debug.h>
17
18 /* GLOBALS *****************************************************************/
19
20 PVOID HalpZeroPageMapping = NULL;
21 HALP_HOOKS HalpHooks;
22
23 /* FUNCTIONS ***************************************************************/
24
25 NTSTATUS
26 STDCALL
27 DriverEntry(
28 PDRIVER_OBJECT DriverObject,
29 PUNICODE_STRING RegistryPath)
30 {
31 return STATUS_SUCCESS;
32 }
33
34 BOOLEAN STDCALL
35 HalInitSystem (ULONG BootPhase,
36 PLOADER_PARAMETER_BLOCK LoaderBlock)
37 {
38 if (BootPhase == 0)
39 {
40 RtlZeroMemory(&HalpHooks, sizeof(HALP_HOOKS));
41 HalpInitPhase0(LoaderBlock);
42 }
43 else if (BootPhase == 1)
44 {
45 /* Initialize display and make the screen black */
46 HalInitializeDisplay (LoaderBlock);
47 HalpInitBusHandlers();
48 HalpInitDma();
49
50 /* Enumerate the devices on the motherboard */
51 HalpStartEnumerator();
52 }
53 else if (BootPhase == 2)
54 {
55 /* Go to blue screen */
56 HalClearDisplay (0x17); /* grey on blue */
57
58 HalpZeroPageMapping = MmMapIoSpace((LARGE_INTEGER)0LL, PAGE_SIZE, MmNonCached);
59 }
60
61 return TRUE;
62 }
63
64 /* EOF */