ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

processor.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         ReactOS HAL
00003  * LICENSE:         BSD - See COPYING.ARM in the top level directory
00004  * FILE:            hal/halarm/generic/processor.c
00005  * PURPOSE:         HAL Processor Routines
00006  * PROGRAMMERS:     ReactOS Portable Systems Group
00007  */
00008 
00009 /* INCLUDES *******************************************************************/
00010 
00011 #include <hal.h>
00012 #define NDEBUG
00013 #include <debug.h>
00014 
00015 /* GLOBALS ********************************************************************/
00016 
00017 LONG HalpActiveProcessors;
00018 KAFFINITY HalpDefaultInterruptAffinity;
00019 BOOLEAN HalpProcessorIdentified;
00020 BOOLEAN HalpTestCleanSupported;
00021 
00022 /* PRIVATE FUNCTIONS **********************************************************/
00023 
00024 VOID
00025 HalpIdentifyProcessor(VOID)
00026 {
00027     ARM_ID_CODE_REGISTER IdRegister;
00028 
00029     /* Don't do it again */
00030     HalpProcessorIdentified = TRUE;
00031     
00032     // fixfix: Use Pcr->ProcessorId
00033     
00034     /* Read the ID Code */
00035     IdRegister = KeArmIdCodeRegisterGet();
00036     
00037     /* Architecture "6" CPUs support test-and-clean (926EJ-S and 1026EJ-S) */
00038     HalpTestCleanSupported = (IdRegister.Architecture == 6);
00039 }
00040 
00041 /* FUNCTIONS ******************************************************************/
00042 
00043 /*
00044  * @implemented
00045  */
00046 VOID
00047 NTAPI
00048 HalInitializeProcessor(IN ULONG ProcessorNumber,
00049                        IN PLOADER_PARAMETER_BLOCK LoaderBlock)
00050 {
00051     /* Do nothing */
00052     return;
00053 }
00054 
00055 /*
00056  * @implemented
00057  */
00058 BOOLEAN
00059 NTAPI
00060 HalAllProcessorsStarted(VOID)
00061 {
00062     /* Do nothing */
00063     return TRUE;
00064 }
00065 
00066 /*
00067  * @implemented
00068  */
00069 BOOLEAN
00070 NTAPI
00071 HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
00072                       IN PKPROCESSOR_STATE ProcessorState)
00073 {
00074     /* Ready to start */
00075     return FALSE;
00076 }
00077 
00078 /*
00079  * @implemented
00080  */
00081 VOID
00082 NTAPI
00083 HalProcessorIdle(VOID)
00084 {
00085     /* Enable interrupts and halt the processor */
00086     _enable();
00087     UNIMPLEMENTED;
00088     while (TRUE);
00089 }
00090 
00091 /*
00092  * @implemented
00093  */
00094 VOID
00095 NTAPI
00096 HalRequestIpi(KAFFINITY TargetProcessors)
00097 {
00098     /* Not implemented on UP */
00099     UNIMPLEMENTED;
00100     while (TRUE);
00101 }
00102 
00103 /*
00104  * @implemented
00105  */
00106 VOID
00107 HalSweepDcache(VOID)
00108 {
00109     /*
00110      * We get called very early on, before HalInitSystem or any of the Hal*
00111      * processor routines, so we need to figure out what CPU we're on.
00112      */
00113     if (!HalpProcessorIdentified) HalpIdentifyProcessor();
00114     
00115     /*
00116      * Check if we can do it the ARMv5TE-J way
00117      */
00118     if (HalpTestCleanSupported)
00119     {
00120         /* Test, clean, flush D-Cache */
00121         __asm__ __volatile__ ("1: mrc p15, 0, pc, c7, c14, 3; bne 1b");
00122     }
00123     else
00124     {
00125         /* We need to do it it by set/way. For now always call ARMv7 function */
00126         //extern VOID v7_flush_dcache_all(VOID);
00127         //v7_flush_dcache_all();
00128     }
00129 }
00130 
00131 /*
00132  * @implemented
00133  */
00134 VOID
00135 HalSweepIcache(VOID)
00136 {
00137     /* All ARM cores support the same Icache flush command */
00138     KeArmFlushIcache();
00139 }
00140 
00141 /* EOF */

Generated on Sun May 27 2012 04:22:35 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.