2013-03-14 21:04:13 +00:00
|
|
|
/*
|
2011-09-07 18:25:43 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
2015-11-04 13:30:52 +00:00
|
|
|
* FILE: hal/halx86/apic/halinit_apic.c
|
2013-04-04 20:11:17 +00:00
|
|
|
* PURPOSE: Initialize the x86 hal
|
2011-09-10 15:55:15 +00:00
|
|
|
* PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
|
2011-09-07 18:25:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
|
|
|
#include <hal.h>
|
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
2011-09-10 15:55:15 +00:00
|
|
|
#include "apic.h"
|
2011-09-07 18:25:43 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
ApicInitializeLocalApic(ULONG Cpu);
|
|
|
|
|
2011-09-10 15:55:15 +00:00
|
|
|
/* GLOBALS ******************************************************************/
|
|
|
|
|
|
|
|
const USHORT HalpBuildType = HAL_BUILD_TYPE;
|
|
|
|
|
|
|
|
/* FUNCTIONS ****************************************************************/
|
2011-09-07 18:25:43 +00:00
|
|
|
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalpInitProcessor(
|
|
|
|
IN ULONG ProcessorNumber,
|
|
|
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|
|
|
{
|
|
|
|
/* Initialize the local APIC for this cpu */
|
|
|
|
ApicInitializeLocalApic(ProcessorNumber);
|
|
|
|
|
2017-11-06 18:40:21 +00:00
|
|
|
/* Initialize profiling data (but don't start it) */
|
|
|
|
HalInitializeProfiling();
|
|
|
|
|
2011-09-07 18:25:43 +00:00
|
|
|
/* Initialize the timer */
|
|
|
|
//ApicInitializeTimer(ProcessorNumber);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|
|
|
{
|
|
|
|
|
2011-09-10 15:55:15 +00:00
|
|
|
/* Enable clock interrupt handler */
|
|
|
|
HalpEnableInterruptHandler(IDT_INTERNAL,
|
|
|
|
0,
|
|
|
|
APIC_CLOCK_VECTOR,
|
|
|
|
CLOCK2_LEVEL,
|
|
|
|
HalpClockInterrupt,
|
|
|
|
Latched);
|
2011-09-07 18:25:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
HalpInitPhase1(VOID)
|
|
|
|
{
|
|
|
|
/* Initialize DMA. NT does this in Phase 0 */
|
|
|
|
HalpInitDma();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* EOF */
|