ReactOS 0.4.15-dev-7924-g5949c20
processor.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS HAL
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: hal/halarm/generic/processor.c
5 * PURPOSE: HAL Processor Routines
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include <hal.h>
12#define NDEBUG
13#include <debug.h>
14
15/* GLOBALS ********************************************************************/
16
21
22/* PRIVATE FUNCTIONS **********************************************************/
23
24VOID
26{
27 ARM_ID_CODE_REGISTER IdRegister;
28
29 /* Don't do it again */
31
32 // fixfix: Use Pcr->ProcessorId
33
34 /* Read the ID Code */
35 IdRegister = KeArmIdCodeRegisterGet();
36
37 /* Architecture "6" CPUs support test-and-clean (926EJ-S and 1026EJ-S) */
38 HalpTestCleanSupported = (IdRegister.Architecture == 6);
39}
40
41/* FUNCTIONS ******************************************************************/
42
43/*
44 * @implemented
45 */
46VOID
49 IN PLOADER_PARAMETER_BLOCK LoaderBlock)
50{
51 /* Do nothing */
52 return;
53}
54
55/*
56 * @implemented
57 */
61{
62 /* Do nothing */
63 return TRUE;
64}
65
66/*
67 * @implemented
68 */
72 IN PKPROCESSOR_STATE ProcessorState)
73{
74 /* Ready to start */
75 return FALSE;
76}
77
78/*
79 * @implemented
80 */
81VOID
84{
85 /* Enable interrupts and halt the processor */
86 _enable();
88 while (TRUE);
89}
90
91/*
92 * @implemented
93 */
94VOID
96HalRequestIpi(KAFFINITY TargetProcessors)
97{
98 /* Not implemented on UP */
100 while (TRUE);
101}
102
103/*
104 * @implemented
105 */
106VOID
108{
109 /*
110 * We get called very early on, before HalInitSystem or any of the Hal*
111 * processor routines, so we need to figure out what CPU we're on.
112 */
114
115 /*
116 * Check if we can do it the ARMv5TE-J way
117 */
119 {
120 /* Test, clean, flush D-Cache */
121 __asm__ __volatile__ ("1: mrc p15, 0, pc, c7, c14, 3; bne 1b");
122 }
123 else
124 {
125 /* We need to do it it by set/way. For now always call ARMv7 function */
126 //extern VOID v7_flush_dcache_all(VOID);
127 //v7_flush_dcache_all();
128 }
129}
130
131/*
132 * @implemented
133 */
134VOID
136{
137 /* All ARM cores support the same Icache flush command */
139}
140
141/* EOF */
unsigned char BOOLEAN
FORCEINLINE ARM_ID_CODE_REGISTER KeArmIdCodeRegisterGet(VOID)
Definition: intrin_i.h:31
FORCEINLINE VOID KeArmFlushIcache(VOID)
Definition: intrin_i.h:205
#define UNIMPLEMENTED
Definition: debug.h:115
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
ULONG_PTR KAFFINITY
Definition: compat.h:85
KAFFINITY HalpDefaultInterruptAffinity
Definition: processor.c:18
VOID NTAPI HalRequestIpi(KAFFINITY TargetProcessors)
Definition: processor.c:96
BOOLEAN NTAPI HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PKPROCESSOR_STATE ProcessorState)
Definition: processor.c:71
BOOLEAN HalpTestCleanSupported
Definition: processor.c:20
VOID NTAPI HalProcessorIdle(VOID)
Definition: processor.c:83
VOID HalSweepDcache(VOID)
Definition: processor.c:107
VOID HalpIdentifyProcessor(VOID)
Definition: processor.c:25
VOID HalSweepIcache(VOID)
Definition: processor.c:135
KAFFINITY HalpActiveProcessors
Definition: processor.c:17
BOOLEAN NTAPI HalAllProcessorsStarted(VOID)
Definition: processor.c:60
BOOLEAN HalpProcessorIdentified
Definition: processor.c:19
VOID NTAPI HalInitializeProcessor(IN ULONG ProcessorNumber, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: processor.c:48
void __cdecl _enable(void)
Definition: intrin_arm.h:373
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tmov %rdx, %rbp\n" "\tjmp *%rax\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59