Something went wrong. Try again.
Reactos
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142/* * PROJECT: ReactOS HAL * LICENSE: BSD - See COPYING.ARM in the top level directory * FILE: hal/halarm/generic/processor.c * PURPOSE: HAL Processor Routines * PROGRAMMERS: ReactOS Portable Systems Group */
/* INCLUDES *******************************************************************/
#include <hal.h>#define NDEBUG#include <debug.h>
/* GLOBALS ********************************************************************/
KAFFINITY HalpActiveProcessors;KAFFINITY HalpDefaultInterruptAffinity;BOOLEAN HalpProcessorIdentified;BOOLEAN HalpTestCleanSupported;
/* PRIVATE FUNCTIONS **********************************************************/
VOIDHalpIdentifyProcessor(VOID){ ARM_ID_CODE_REGISTER IdRegister;
/* Don't do it again */ HalpProcessorIdentified = TRUE;
// fixfix: Use Pcr->ProcessorId
/* Read the ID Code */ IdRegister = KeArmIdCodeRegisterGet();
/* Architecture "6" CPUs support test-and-clean (926EJ-S and 1026EJ-S) */ HalpTestCleanSupported = (IdRegister.Architecture == 6);}
/* FUNCTIONS ******************************************************************/
/* * @implemented */VOIDNTAPIHalInitializeProcessor(IN ULONG ProcessorNumber, IN PLOADER_PARAMETER_BLOCK LoaderBlock){ /* Do nothing */ return;}
/* * @implemented */BOOLEANNTAPIHalAllProcessorsStarted(VOID){ /* Do nothing */ return TRUE;}
/* * @implemented */BOOLEANNTAPIHalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PKPROCESSOR_STATE ProcessorState){ /* Ready to start */ return FALSE;}
/* * @implemented */VOIDNTAPIHalProcessorIdle(VOID){ /* Enable interrupts and halt the processor */ _enable(); UNIMPLEMENTED; while (TRUE);}
/* * @implemented */VOIDNTAPIHalRequestIpi(KAFFINITY TargetProcessors){ /* Not implemented on UP */ UNIMPLEMENTED; while (TRUE);}
/* * @implemented */VOIDHalSweepDcache(VOID){ /* * We get called very early on, before HalInitSystem or any of the Hal* * processor routines, so we need to figure out what CPU we're on. */ if (!HalpProcessorIdentified) HalpIdentifyProcessor();
/* * Check if we can do it the ARMv5TE-J way */ if (HalpTestCleanSupported) { /* Test, clean, flush D-Cache */ __asm__ __volatile__ ("1: mrc p15, 0, pc, c7, c14, 3; bne 1b"); } else { /* We need to do it it by set/way. For now always call ARMv7 function */ //extern VOID v7_flush_dcache_all(VOID); //v7_flush_dcache_all(); }}
/* * @implemented */VOIDHalSweepIcache(VOID){ /* All ARM cores support the same Icache flush command */ KeArmFlushIcache();}
/* EOF */