mirror of
https://github.com/reactos/reactos.git
synced 2024-09-06 19:02:32 +00:00
![Victor Perevertkin](/assets/img/avatar_default.png)
- 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
61 lines
1.6 KiB
C
61 lines
1.6 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 1998 David Welch (welch@cwcom.net)
|
|
*/
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
#include <hal.h>
|
|
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
/* GLOBALS ******************************************************************/
|
|
|
|
const USHORT HalpBuildType = HAL_BUILD_TYPE;
|
|
|
|
/* FUNCTIONS ****************************************************************/
|
|
|
|
VOID
|
|
NTAPI
|
|
HalpInitProcessor(
|
|
IN ULONG ProcessorNumber,
|
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|
{
|
|
/* Set default IDR */
|
|
KeGetPcr()->IDR = 0xFFFFFFFF & ~(1 << PIC_CASCADE_IRQ);
|
|
}
|
|
|
|
VOID
|
|
HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|
{
|
|
|
|
}
|
|
|
|
VOID
|
|
HalpInitPhase1(VOID)
|
|
{
|
|
/* Enable timer interrupt handler */
|
|
HalpEnableInterruptHandler(IDT_DEVICE,
|
|
0,
|
|
PRIMARY_VECTOR_BASE + PIC_TIMER_IRQ,
|
|
CLOCK2_LEVEL,
|
|
HalpClockInterrupt,
|
|
Latched);
|
|
|
|
/* Enable RTC interrupt handler */
|
|
HalpEnableInterruptHandler(IDT_DEVICE,
|
|
0,
|
|
PRIMARY_VECTOR_BASE + PIC_RTC_IRQ,
|
|
PROFILE_LEVEL,
|
|
HalpProfileInterrupt,
|
|
Latched);
|
|
|
|
/* Initialize DMA. NT does this in Phase 0 */
|
|
HalpInitDma();
|
|
}
|
|
|
|
/* EOF */
|