mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 12:26:32 +00:00
10bb50b456
- Don't use CONFIG_SMP, this isn't handled in (most of) hal - Add a dummy HalpSetupProcessorsTable for UP - Call HalpRegisterKdSupportFunctions only for processor 0
71 lines
1.7 KiB
C
71 lines
1.7 KiB
C
/*
|
|
* PROJECT: ReactOS Hardware Abstraction Layer
|
|
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
|
* PURPOSE: Initialize the APIC HAL
|
|
* COPYRIGHT: Copyright 2011 Timo Kreuzer <timo.kreuzer@reactos.org>
|
|
*/
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
#include <hal.h>
|
|
#include "apicp.h"
|
|
#include <smp.h>
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
VOID
|
|
NTAPI
|
|
ApicInitializeLocalApic(ULONG Cpu);
|
|
|
|
/* FUNCTIONS ****************************************************************/
|
|
|
|
VOID
|
|
NTAPI
|
|
HalpInitProcessor(
|
|
IN ULONG ProcessorNumber,
|
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|
{
|
|
if (ProcessorNumber == 0)
|
|
{
|
|
HalpParseApicTables(LoaderBlock);
|
|
}
|
|
|
|
HalpSetupProcessorsTable(ProcessorNumber);
|
|
|
|
/* Initialize the local APIC for this cpu */
|
|
ApicInitializeLocalApic(ProcessorNumber);
|
|
|
|
/* Initialize profiling data (but don't start it) */
|
|
HalInitializeProfiling();
|
|
|
|
/* Initialize the timer */
|
|
//ApicInitializeTimer(ProcessorNumber);
|
|
}
|
|
|
|
VOID
|
|
HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|
{
|
|
DPRINT1("Using HAL: APIC %s %s\n",
|
|
(HalpBuildType & PRCB_BUILD_UNIPROCESSOR) ? "UP" : "SMP",
|
|
(HalpBuildType & PRCB_BUILD_DEBUG) ? "DBG" : "REL");
|
|
|
|
HalpPrintApicTables();
|
|
|
|
/* Enable clock interrupt handler */
|
|
HalpEnableInterruptHandler(IDT_INTERNAL,
|
|
0,
|
|
APIC_CLOCK_VECTOR,
|
|
CLOCK2_LEVEL,
|
|
HalpClockInterrupt,
|
|
Latched);
|
|
}
|
|
|
|
VOID
|
|
HalpInitPhase1(VOID)
|
|
{
|
|
/* Initialize DMA. NT does this in Phase 0 */
|
|
HalpInitDma();
|
|
}
|
|
|
|
/* EOF */
|