ReactOS 0.4.15-dev-8138-g1e75ea8
halinit.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Hardware Abstraction Layer
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Initialize the APIC HAL
5 * COPYRIGHT: Copyright 2011 Timo Kreuzer <timo.kreuzer@reactos.org>
6 */
7
8/* INCLUDES *****************************************************************/
9
10#include <hal.h>
11#include "apicp.h"
12#include <smp.h>
13#define NDEBUG
14#include <debug.h>
15
16VOID
19
20/* FUNCTIONS ****************************************************************/
21
22VOID
25 IN ULONG ProcessorNumber,
26 IN PLOADER_PARAMETER_BLOCK LoaderBlock)
27{
28 if (ProcessorNumber == 0)
29 {
30 HalpParseApicTables(LoaderBlock);
31 }
32
33 HalpSetupProcessorsTable(ProcessorNumber);
34
35 /* Initialize the local APIC for this cpu */
36 ApicInitializeLocalApic(ProcessorNumber);
37
38 /* Initialize profiling data (but don't start it) */
40
41 /* Initialize the timer */
42 //ApicInitializeTimer(ProcessorNumber);
43}
44
45VOID
47{
48 DPRINT1("Using HAL: APIC %s %s\n",
49 (HalpBuildType & PRCB_BUILD_UNIPROCESSOR) ? "UP" : "SMP",
50 (HalpBuildType & PRCB_BUILD_DEBUG) ? "DBG" : "REL");
51
53
54 /* Enable clock interrupt handler */
56 0,
60 Latched);
61}
62
63VOID
65{
66 /* Initialize DMA. NT does this in Phase 0 */
68}
69
70/* EOF */
VOID NTAPI HalInitializeProfiling(VOID)
Definition: apictimer.c:76
#define APIC_CLOCK_VECTOR
Definition: apicp.h:44
#define DPRINT1
Definition: precomp.h:8
const USHORT HalpBuildType
Definition: buildtype.c:14
#define CLOCK2_LEVEL
Definition: env_spec_w32.h:700
VOID HalpClockInterrupt(VOID)
Definition: timer.c:30
VOID NTAPI HalpEnableInterruptHandler(IN UCHAR Flags, IN ULONG BusVector, IN ULONG SystemVector, IN KIRQL Irql, IN PVOID Handler, IN KINTERRUPT_MODE Mode)
Definition: usage.c:49
VOID HalpInitDma(VOID)
Definition: dma.c:185
VOID HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit_mp.c:30
VOID HalpInitPhase1(VOID)
Definition: halinit_up.c:26
#define IDT_INTERNAL
Definition: halp.h:21
VOID NTAPI ApicInitializeLocalApic(ULONG Cpu)
Definition: apic.c:291
VOID NTAPI HalpInitProcessor(IN ULONG ProcessorNumber, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit.c:24
VOID HalpParseApicTables(_In_ PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: madt.c:30
VOID HalpPrintApicTables(VOID)
Definition: madt.c:76
#define PRCB_BUILD_UNIPROCESSOR
Definition: ketypes.h:324
#define PRCB_BUILD_DEBUG
Definition: ketypes.h:323
@ Latched
Definition: miniport.h:81
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
VOID HalpSetupProcessorsTable(_In_ UINT32 NTProcessorNumber)
Definition: up.c:37