ReactOS  0.4.15-dev-1207-g698a8e6
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

const USHORT HalpBuildType = HAL_BUILD_TYPE
 
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 }
GLint x0
Definition: linetemp.h:95
#define TRUE
Definition: types.h:120
static BOOLEAN HaliScanForMPConfigTable(ULONG Base, ULONG Size)
Definition: mpconfig.c:475
#define FALSE
Definition: types.h:117
static BOOLEAN HaliGetSmpConfig(VOID)
Definition: mpconfig.c:554
void DPRINT(...)
Definition: polytest.cpp:61
unsigned short * PUSHORT
Definition: retypes.h:2

Referenced by HalpInitPhase0().

◆ HalpInitializePICs()

VOID NTAPI HalpInitializePICs ( IN BOOLEAN  EnableInterrupts)

Definition at line 25 of file halinit_mp.c.

26 {
28 }
#define UNIMPLEMENTED
Definition: debug.h:115

◆ HalpInitPhase0()

VOID HalpInitPhase0 ( PLOADER_PARAMETER_BLOCK  LoaderBlock)

Definition at line 31 of file halinit_mp.c.

33 {
34  static BOOLEAN MPSInitialized = FALSE;
35 
36 
37  /* Only initialize MP system once. Once called the first time,
38  each subsequent call is part of the initialization sequence
39  for an application processor. */
40 
41  DPRINT("HalpInitPhase0()\n");
42 
43 
44  if (MPSInitialized)
45  {
46  ASSERT(FALSE);
47  }
48 
49  MPSInitialized = TRUE;
50 
51  if (!HaliFindSmpConfig())
52  {
53  ASSERT(FALSE);
54  }
55 
56  /* store the kernel base for later use */
57  KernelBase = (ULONG_PTR)CONTAINING_RECORD(LoaderBlock->LoadOrderListHead.Flink, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks)->DllBase;
58 
59 }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned char BOOLEAN
void DPRINT(...)
Definition: polytest.cpp:61
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
BOOLEAN HaliFindSmpConfig(VOID)
Definition: mpconfig.c:605
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
ULONG_PTR KernelBase
Definition: halinit_mp.c:21
Definition: btrfs_drv.h:1922
LIST_ENTRY LoadOrderListHead
Definition: arc.h:493
#define ULONG_PTR
Definition: config.h:101

Referenced by HalInitSystem().

◆ HalpInitPhase1()

VOID HalpInitPhase1 ( VOID  )

Definition at line 62 of file halinit_mp.c.

63 {
64 }

Variable Documentation

◆ HalpBuildType

const USHORT HalpBuildType = HAL_BUILD_TYPE

Definition at line 19 of file halinit_mp.c.

◆ KernelBase

ULONG_PTR KernelBase

Definition at line 21 of file halinit_mp.c.

Referenced by HalpInitPhase0(), and LdrPEProcessImportDirectoryEntry().