ReactOS 0.4.15-dev-7788-g1ad9096
halinit_mp.c File Reference
#include <hal.h>
#include <debug.h>
Include dependency graph for halinit_mp.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

BOOLEAN HaliFindSmpConfig (VOID)
 
VOID NTAPI HalpInitializePICs (IN BOOLEAN EnableInterrupts)
 
VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock)
 
VOID HalpInitPhase1 (VOID)
 

Variables

ULONG_PTR KernelBase
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 14 of file halinit_mp.c.

Function Documentation

◆ HaliFindSmpConfig()

BOOLEAN HaliFindSmpConfig ( VOID  )

Definition at line 605 of file mpconfig.c.

606{
607 /*
608 Scan the system memory for an MP configuration table
609 1) Scan the first KB of system base memory
610 2) Scan the last KB of system base memory
611 3) Scan the BIOS ROM address space between 0F0000h and 0FFFFFh
612 4) Scan the first KB from the Extended BIOS Data Area
613 */
614
615 if (!HaliScanForMPConfigTable(0x0, 0x400))
616 {
617 if (!HaliScanForMPConfigTable(0x9FC00, 0x400))
618 {
619 if (!HaliScanForMPConfigTable(0xF0000, 0x10000))
620 {
621 if (!HaliScanForMPConfigTable(*((PUSHORT)0x040E) << 4, 0x400))
622 {
623 DPRINT("No multiprocessor compliant system found.\n");
624 return FALSE;
625 }
626 }
627 }
628 }
629
630 if (HaliGetSmpConfig())
631 {
632 return TRUE;
633 }
634 else
635 {
636 DPRINT("No MP config table found\n");
637 return FALSE;
638 }
639
640}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static BOOLEAN HaliGetSmpConfig(VOID)
Definition: mpconfig.c:554
static BOOLEAN HaliScanForMPConfigTable(ULONG Base, ULONG Size)
Definition: mpconfig.c:475
#define DPRINT
Definition: sndvol32.h:71
uint16_t * PUSHORT
Definition: typedefs.h:56

Referenced by HalpInitPhase0().

◆ HalpInitializePICs()

VOID NTAPI HalpInitializePICs ( IN BOOLEAN  EnableInterrupts)

Definition at line 24 of file halinit_mp.c.

25{
27}
#define UNIMPLEMENTED
Definition: debug.h:115

◆ HalpInitPhase0()

VOID HalpInitPhase0 ( PLOADER_PARAMETER_BLOCK  LoaderBlock)

Definition at line 30 of file halinit_mp.c.

32{
33 static BOOLEAN MPSInitialized = FALSE;
34
35
36 /* Only initialize MP system once. Once called the first time,
37 each subsequent call is part of the initialization sequence
38 for an application processor. */
39
40 DPRINT("HalpInitPhase0()\n");
41
42
43 if (MPSInitialized)
44 {
46 }
47
48 MPSInitialized = TRUE;
49
50 if (!HaliFindSmpConfig())
51 {
53 }
54
55 /* store the kernel base for later use */
56 KernelBase = (ULONG_PTR)CONTAINING_RECORD(LoaderBlock->LoadOrderListHead.Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks)->DllBase;
57
58}
unsigned char BOOLEAN
#define ULONG_PTR
Definition: config.h:101
BOOLEAN HaliFindSmpConfig(VOID)
Definition: mpconfig.c:605
ULONG_PTR KernelBase
Definition: halinit_mp.c:20
#define ASSERT(a)
Definition: mode.c:44
Definition: btrfs_drv.h:1876
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
LIST_ENTRY LoadOrderListHead
Definition: arc.h:540
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by HalInitSystem().

◆ HalpInitPhase1()

VOID HalpInitPhase1 ( VOID  )

Definition at line 61 of file halinit_mp.c.

62{
63}

Variable Documentation

◆ KernelBase

ULONG_PTR KernelBase

Definition at line 20 of file halinit_mp.c.

Referenced by HalpInitPhase0(), and LoadWindowsCore().