reactos/reactos/hal/halx86/generic/processor.c
Stefan Ginsberg 8fa95b6a9c - Change CPUID to match the old Ki386Cpuid and take 4 output arguments instead of an array. This way we save some stack when using a dummy cpuid for synchronization and can query only the registers we want in the case we don't want all 4.
- 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
2009-09-27 10:09:38 +00:00

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 */