- fix mp hal too
[reactos.git] / reactos / hal / halx86 / mp / halinit_mp.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 /* FUNCTIONS ***************************************************************/
19
20 extern BOOLEAN HaliFindSmpConfig(VOID);
21 ULONG_PTR KernelBase;
22
23 /***************************************************************************/
24 VOID
25 HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
26
27 {
28 static BOOLEAN MPSInitialized = FALSE;
29
30
31 /* Only initialize MP system once. Once called the first time,
32 each subsequent call is part of the initialization sequence
33 for an application processor. */
34
35 DPRINT("HalpInitPhase0()\n");
36
37
38 if (MPSInitialized)
39 {
40 KEBUGCHECK(0);
41 }
42
43 MPSInitialized = TRUE;
44
45 if (!HaliFindSmpConfig())
46 {
47 KEBUGCHECK(0);
48 }
49
50 /* store the kernel base for later use */
51 KernelBase = ((PLOADER_MODULE)LoaderBlock->ModsAddr)[0].ModStart;
52
53 }
54
55 /* EOF */