3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: hal/halx86/up/processor.c
5 * PURPOSE: HAL Processor Routines
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
9 /* INCLUDES ******************************************************************/
15 LONG HalpActiveProcessors
;
16 KAFFINITY HalpDefaultInterruptAffinity
;
18 /* PRIVATE FUNCTIONS *********************************************************/
24 /* Disable interrupts and halt the CPU */
29 /* FUNCTIONS *****************************************************************/
36 HalInitializeProcessor(IN ULONG ProcessorNumber
,
37 IN PLOADER_PARAMETER_BLOCK LoaderBlock
)
39 /* Set default IDR and stall count */
41 KeGetPcr()->IDR
= 0xFFFFFFFB;
43 KeGetPcr()->StallScaleFactor
= INITIAL_STALL_COUNT
;
45 /* Update the interrupt affinity and processor mask */
46 InterlockedBitTestAndSet(&HalpActiveProcessors
, ProcessorNumber
);
47 InterlockedBitTestAndSet((PLONG
)&HalpDefaultInterruptAffinity
,
50 /* Register routines for KDCOM */
51 HalpRegisterKdSupportFunctions();
59 HalAllProcessorsStarted(VOID
)
70 HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock
,
71 IN PKPROCESSOR_STATE ProcessorState
)
82 HalProcessorIdle(VOID
)
84 /* Enable interrupts and halt the processor */
94 HalRequestIpi(KAFFINITY TargetProcessors
)
96 /* Not implemented on UP */