- NDK 0.98, now with versionned headers. Too many changes to list, see the TinyKRNL...
[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 PROS_LOADER_PARAMETER_BLOCK LoaderBlock)
37 {
38 if (BootPhase == 0)
39 {
40 RtlZeroMemory(&HalpHooks, sizeof(HALP_HOOKS));
41 HalpInitPhase0((PROS_LOADER_PARAMETER_BLOCK)LoaderBlock);
42 }
43 else if (BootPhase == 1)
44 {
45 /* Initialize display and make the screen black */
46 HalInitializeDisplay ((PROS_LOADER_PARAMETER_BLOCK)LoaderBlock);
47 HalpInitBusHandlers();
48 HalpInitDma();
49
50 /* Enumerate the devices on the motherboard */
51 HalpStartEnumerator();
52 }
53 else if (BootPhase == 2)
54 {
55 PHYSICAL_ADDRESS Null = {{0}};
56
57 /* Go to blue screen */
58 HalClearDisplay (0x17); /* grey on blue */
59
60 HalpZeroPageMapping = MmMapIoSpace(Null, PAGE_SIZE, MmNonCached);
61 }
62
63 return TRUE;
64 }
65
66 /* EOF */