HALx86: minor cleanup and internal calling convention changes in display functions.
[reactos.git] / reactos / hal / halx86 / halinit.c
1 /* $Id: halinit.c,v 1.6 2003/09/02 20:11:43 ea 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 <roscfg.h>
16 #include <hal.h>
17
18 #ifdef MP
19 #include <mps.h>
20 #endif /* MP */
21
22 #define NDEBUG
23 #include <internal/debug.h>
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 /* Initialize display and make the screen black */
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 else if (BootPhase == 2)
68 {
69 /* Go to blue screen */
70 HalClearDisplay (0x17); /* grey on blue */
71 }
72
73 return TRUE;
74 }
75
76 /* EOF */