1 /* 2 * PROJECT: ReactOS Hardware Abstraction Layer 3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 * PURPOSE: Initialize the x86 HAL 5 * COPYRIGHT: Copyright 1998 David Welch (welch@cwcom.net) 6 */ 7 8 /* INCLUDES *****************************************************************/ 9 10 #include <hal.h> 11 12 #define NDEBUG 13 #include <debug.h> 14 15 /* GLOBALS ******************************************************************/ 16 17 const USHORT HalpBuildType = HAL_BUILD_TYPE; 18 19 /* FUNCTIONS ****************************************************************/ 20 21 VOID 22 NTAPI 23 HalpInitProcessor( 24 IN ULONG ProcessorNumber, 25 IN PLOADER_PARAMETER_BLOCK LoaderBlock) 26 { 27 /* Set default IDR */ 28 KeGetPcr()->IDR = 0xFFFFFFFF & ~(1 << PIC_CASCADE_IRQ); 29 } 30 31 VOID 32 HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) 33 { 34 35 } 36 37 VOID 38 HalpInitPhase1(VOID) 39 { 40 /* Enable timer interrupt handler */ 41 HalpEnableInterruptHandler(IDT_DEVICE, 42 0, 43 PRIMARY_VECTOR_BASE + PIC_TIMER_IRQ, 44 CLOCK2_LEVEL, 45 HalpClockInterrupt, 46 Latched); 47 48 /* Enable RTC interrupt handler */ 49 HalpEnableInterruptHandler(IDT_DEVICE, 50 0, 51 PRIMARY_VECTOR_BASE + PIC_RTC_IRQ, 52 PROFILE_LEVEL, 53 HalpProfileInterrupt, 54 Latched); 55 56 /* Initialize DMA. NT does this in Phase 0 */ 57 HalpInitDma(); 58 } 59 60 /* EOF */ 61