ReactOS  0.4.13-dev-982-g9853eab
intrin_i.h
Go to the documentation of this file.
1 #pragma once
2 
4 VOID
6 {
7  //
8  // Enter Wait-For-Interrupt Mode
9  //
10 #ifdef _MSC_VER
11 #else
12  __asm__ __volatile__ ("mcr p15, 0, %0, c7, c0, 4" : : "r"(0) : "cc");
13 #endif
14 }
15 
19 {
21 #ifdef _MSC_VER
22  Value.AsUlong = 0;
23 #else
24  __asm__ __volatile__ ("mrc p15, 0, %0, c1, c0, 0" : "=r"(Value.AsUlong) : : "cc");
25 #endif
26  return Value;
27 }
28 
32 {
34 #ifdef _MSC_VER
35  Value.AsUlong = 0;
36 #else
37  __asm__ __volatile__ ("mrc p15, 0, %0, c0, c0, 0" : "=r"(Value.AsUlong) : : "cc");
38 #endif
39  return Value;
40 }
41 
43 ULONG
45 {
46  ULONG Value;
47 #ifdef _MSC_VER
48  Value = 0;
49 #else
50  __asm__ __volatile__ ("mrc p15, 0, %0, c5, c0, 0" : "=r"(Value) : : "cc");
51 #endif
52  return Value;
53 }
54 
56 ULONG
58 {
59  ULONG Value;
60 #ifdef _MSC_VER
61  Value = 0;
62 #else
63  __asm__ __volatile__ ("mrc p15, 0, %0, c5, c0, 1" : "=r"(Value) : : "cc");
64 #endif
65  return Value;
66 }
67 
69 ULONG
71 {
72  ULONG Value;
73 #ifdef _MSC_VER
74  Value = 0;
75 #else
76  __asm__ __volatile__ ("mrc p15, 0, %0, c6, c0, 0" : "=r"(Value) : : "cc");
77 #endif
78  return Value;
79 }
80 
84 {
86 #ifdef _MSC_VER
87  Value.AsUlong = 0;
88 #else
89  __asm__ __volatile__ ("mrc p15, 0, %0, c10, c0, 0" : "=r"(Value.AsUlong) : : "cc");
90 #endif
91  return Value;
92 }
93 
97 {
99 #ifdef _MSC_VER
100  Value.AsUlong = 0;
101 #else
102  __asm__ __volatile__ ("mrc p15, 0, %0, c2, c0, 0" : "=r"(Value.AsUlong) : : "cc");
103 #endif
104  return Value;
105 }
106 
110 {
112 #ifdef _MSC_VER
113  Value.AsUlong = 0;
114 #else
115  __asm__ __volatile__ ("mrc p15, 0, %0, c0, c0, 1" : "=r"(Value.AsUlong) : : "cc");
116 #endif
117  return Value;
118 }
119 
123 {
125 #ifdef _MSC_VER
126  Value.AsUlong = _ReadStatusReg(0);
127 #else
128  __asm__ __volatile__ ("mrs %0, cpsr" : "=r"(Value.AsUlong) : : "cc");
129 #endif
130  return Value;
131 }
132 
134 VOID
136 {
137 #ifdef _MSC_VER
138 #else
139  __asm__ __volatile__ ("mcr p15, 0, %0, c1, c0, 0" : : "r"(ControlRegister.AsUlong) : "cc");
140 #endif
141 }
142 
144 VOID
146 {
147 #ifdef _MSC_VER
148 #else
149  __asm__ __volatile__ ("mcr p15, 0, %0, c2, c0, 0" : : "r"(Ttb.AsUlong) : "cc");
150 #endif
151 }
152 
154 VOID
156 {
157 #ifdef _MSC_VER
158 #else
159  __asm__ __volatile__ ("mcr p15, 0, %0, c3, c0, 0" : : "r"(DomainRegister.AsUlong) : "cc");
160 #endif
161 }
162 
164 VOID
166 {
167 #ifdef _MSC_VER
168 #else
169  __asm__ __volatile__ ("mcr p15, 0, %0, c10, c0, 0" : : "r"(LockdownRegister.AsUlong) : "cc");
170 #endif
171 }
172 
174 VOID
176 {
177 #ifdef _MSC_VER
178 #else
179  __asm__ __volatile__ ("mcr p15, 0, %0, c8, c7, 0" : : "r"(0) : "cc");
180 #endif
181 }
182 
184 VOID
186 {
187 #ifdef _MSC_VER
188 #else
189  __asm__ __volatile__ ("mcr p15, 0, %0, c8, c7, 1" : : "r"(Address) : "cc");
190 #endif
191 }
192 
194 VOID
196 {
197 #ifdef _MSC_VER
198 #else
199  __asm__ __volatile__ ("mcr p15, 0, %0, c7, c7, 0" : : "r"(0) : "cc");
200 #endif
201 }
202 
204 VOID
206 {
207 #ifdef _MSC_VER
208 #else
209  __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 0" : : "r"(0) : "cc");
210 #endif
211 }
212 
214 VOID
216 {
217 #ifdef _MSC_VER
218 #else
219  __asm__ __volatile__ ("mcr p15, 0, %0, c7, c0, 4" : : "r"(0) : "cc");
220 #endif
221 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
FORCEINLINE VOID KeArmFlushIcache(VOID)
Definition: intrin_i.h:205
#define IN
Definition: typedefs.h:38
FORCEINLINE ARM_CACHE_REGISTER KeArmCacheRegisterGet(VOID)
Definition: intrin_i.h:109
FORCEINLINE VOID KeArmDomainRegisterSet(IN ARM_DOMAIN_REGISTER DomainRegister)
Definition: intrin_i.h:155
FORCEINLINE ARM_CONTROL_REGISTER KeArmControlRegisterGet(VOID)
Definition: intrin_i.h:18
FORCEINLINE VOID KeArmInvalidateTlbEntry(IN PVOID Address)
Definition: intrin_i.h:185
FORCEINLINE VOID KeArmLockdownRegisterSet(IN ARM_LOCKDOWN_REGISTER LockdownRegister)
Definition: intrin_i.h:165
FORCEINLINE ULONG KeArmFaultStatusRegisterGet(VOID)
Definition: intrin_i.h:44
FORCEINLINE VOID KeArmWaitForInterrupt(VOID)
Definition: intrin_i.h:215
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
FORCEINLINE VOID KeArmHaltProcessor(VOID)
Definition: intrin_i.h:5
FORCEINLINE ARM_STATUS_REGISTER KeArmStatusRegisterGet(VOID)
Definition: intrin_i.h:122
FORCEINLINE VOID KeArmControlRegisterSet(IN ARM_CONTROL_REGISTER ControlRegister)
Definition: intrin_i.h:135
static WCHAR Address[46]
Definition: ping.c:68
#define FORCEINLINE
Definition: ntbasedef.h:221
FORCEINLINE ULONG KeArmFaultAddressRegisterGet(VOID)
Definition: intrin_i.h:70
FORCEINLINE ARM_LOCKDOWN_REGISTER KeArmLockdownRegisterGet(VOID)
Definition: intrin_i.h:83
FORCEINLINE ARM_ID_CODE_REGISTER KeArmIdCodeRegisterGet(VOID)
Definition: intrin_i.h:31
FORCEINLINE VOID KeArmInvalidateAllCaches(VOID)
Definition: intrin_i.h:195
FORCEINLINE ULONG KeArmInstructionFaultStatusRegisterGet(VOID)
Definition: intrin_i.h:57
unsigned int ULONG
Definition: retypes.h:1
FORCEINLINE VOID KeArmFlushTlb(VOID)
Definition: intrin_i.h:175
FORCEINLINE ARM_TTB_REGISTER KeArmTranslationTableRegisterGet(VOID)
Definition: intrin_i.h:96
FORCEINLINE VOID KeArmTranslationTableRegisterSet(IN ARM_TTB_REGISTER Ttb)
Definition: intrin_i.h:145