mirror of
https://github.com/reactos/reactos.git
synced 2024-08-02 17:40:58 +00:00
8fa95b6a9c
- Simplify Ke386GetTr and Ke386GetLocalDescriptorTable to return by value instead of reference. - Make RDMSR smaller by making it fastcall as rdmsr takes its argument in ecx. - Fix KiGetCacheInformation -- it only handled the Intel and AMD case. - Replace Ke386HaltProcessor with __halt. - KiHaltProcessorDpcRoutine: Always halt the processor for the architectures we support for consistency. - Clean up x86 and PPC headers from deprecated stuff. - Fix broken LOCK undefine in v86m_sup.S -- LOCK is used both in a macro and the code, so only undefine it where required and redefine it after it is used (this worked because LOCK was interpreted as lock). Get rid of KeArch*: - Rename KeArchInitThreadWithContext to KiInitializeContextThread and use the same name for all architectures. - Kill KeArchHaltProcessor. Use __halt and KeArmHaltProcessor directly instead. - Use Ke386FnInit instead of KeArchFnInit -- it is only used for x86. svn path=/trunk/; revision=43180
88 lines
1.7 KiB
C
88 lines
1.7 KiB
C
/*
|
|
* PROJECT: ReactOS HAL
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
* FILE: hal/halx86/up/processor.c
|
|
* PURPOSE: HAL Processor Routines
|
|
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
|
*/
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
#include <hal.h>
|
|
#define NDEBUG
|
|
#include <debug.h>
|
|
|
|
LONG HalpActiveProcessors;
|
|
KAFFINITY HalpDefaultInterruptAffinity;
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
VOID
|
|
NTAPI
|
|
HalInitializeProcessor(IN ULONG ProcessorNumber,
|
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|
{
|
|
/* Set default IDR and stall count */
|
|
KeGetPcr()->IDR = 0xFFFFFFFB;
|
|
KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT;
|
|
|
|
/* Update the interrupt affinity and processor mask */
|
|
InterlockedBitTestAndSet(&HalpActiveProcessors, ProcessorNumber);
|
|
InterlockedBitTestAndSet((PLONG)&HalpDefaultInterruptAffinity,
|
|
ProcessorNumber);
|
|
|
|
/* Register routines for KDCOM */
|
|
HalpRegisterKdSupportFunctions();
|
|
}
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
BOOLEAN
|
|
NTAPI
|
|
HalAllProcessorsStarted(VOID)
|
|
{
|
|
/* Do nothing */
|
|
return TRUE;
|
|
}
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
BOOLEAN
|
|
NTAPI
|
|
HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|
IN PKPROCESSOR_STATE ProcessorState)
|
|
{
|
|
/* Ready to start */
|
|
return FALSE;
|
|
}
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
VOID
|
|
NTAPI
|
|
HalProcessorIdle(VOID)
|
|
{
|
|
/* Enable interrupts and halt the processor */
|
|
_enable();
|
|
__halt();
|
|
}
|
|
|
|
/*
|
|
* @implemented
|
|
*/
|
|
VOID
|
|
NTAPI
|
|
HalRequestIpi(KAFFINITY TargetProcessors)
|
|
{
|
|
/* Not implemented on UP */
|
|
__debugbreak();
|
|
}
|
|
|
|
/* EOF */
|