reactos/hal/halx86/apic/halinit.c
Victor Perevertkin 7601fb549c
[HALX86] Rearrange files in x86 HAL
- Rename UP -> PIC. The "up" folder in fact contains the code for
  managing the Intel 8259 PIC chip
- Move amd64/processor.c -> apic/processor.c. The code is not tied to
  amd64
- Remove platform from "halinit*" files. They already reside in the
  corresponding folder
2021-03-15 02:48:35 +03:00

63 lines
1.5 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 x86 HAL
* COPYRIGHT: Copyright 2011 Timo Kreuzer <timo.kreuzer@reactos.org>
*/
/* INCLUDES *****************************************************************/
#include <hal.h>
#define NDEBUG
#include <debug.h>
#include "apic.h"
VOID
NTAPI
ApicInitializeLocalApic(ULONG Cpu);
/* GLOBALS ******************************************************************/
const USHORT HalpBuildType = HAL_BUILD_TYPE;
/* FUNCTIONS ****************************************************************/
VOID
NTAPI
HalpInitProcessor(
IN ULONG ProcessorNumber,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
/* 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)
{
/* 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 */