Something went wrong. Try again.
Reactos
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879/* * 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>
VOIDNTAPIApicInitializeLocalApic(ULONG Cpu);
/* FUNCTIONS ****************************************************************/
VOIDNTAPIHalpInitProcessor( 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);}
VOIDHalpInitPhase0(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);
/* Enable profile interrupt handler */ HalpEnableInterruptHandler(IDT_DEVICE, 0, APIC_PROFILE_VECTOR, APIC_PROFILE_LEVEL, HalpProfileInterrupt, Latched);}
VOIDHalpInitPhase1(VOID){ /* Initialize DMA. NT does this in Phase 0 */ HalpInitDma();}
/* EOF */