Go to the documentation of this file.
21 #include <FreeNOS/Constant.h>
44 #define IRQ(vector) (vector)
51 #define mrc(coproc, opcode1, opcode2, reg, subReg) \
54 asm volatile("mrc " QUOTE(coproc) ", " QUOTE(opcode1) ", %0, " QUOTE(reg) ", " QUOTE(subReg) ", " QUOTE(opcode2) "\n" : "=r"(r) :: "memory"); \
63 #define mcr(coproc, opcode1, opcode2, reg, subReg, value) \
66 asm volatile("mcr " QUOTE(coproc) ", " QUOTE(opcode1) ", %0, " QUOTE(reg) ", " QUOTE(subReg) ", " QUOTE(opcode2) "\n" : : "r"(val) : "memory"); \
74 #define mrrc(coproc, opcode1, CRm) \
77 asm volatile("mrrc " QUOTE(coproc) ", " QUOTE(opcode1) ", %Q0, %R0, " QUOTE(CRm) "\n" : "=r"(r) :: "memory"); \
86 #define mcrr(coproc, opcode1, CRm, value) \
89 asm volatile("mcrr " QUOTE(coproc) ", " QUOTE(opcode1) ", %Q0, %R0, " QUOTE(CRm) "\n" : : "r"(val) : "memory"); \
110 #define cpu_shutdown()
121 #define vbar_set(addr) \
122 mcr(p15, 0, 0, c12, c0, (addr))
127 #define sysctrl_read() \
128 (mrc(p15, 0, 0, c1, c0))
133 #define sysctrl_write(val) \
134 mcr(p15, 0, 0, c1, c0, (val))
145 #define read_core_id() \
146 (mrc(p15, 0, 5, c0, c0) & 0xff)
152 #define tlb_flush_all() \
155 ctrl.write(ARMControl::UnifiedTLBClear, 0); \
163 asm volatile (
"mcr p15, 0, %0, c8, c7, 0" ::
"r"(0) :
"memory");
167 #define tlb_invalidate(page) \
169 mcr(p15, 0, 1, c8, c7, (page)); \
183 asm volatile (
"dmb" :::
"memory");
185 asm volatile (
"mcr p15, 0, %0, c7, c10, 5" : :
"r" (0));
201 asm volatile (
"dsb" :::
"memory");
203 asm volatile (
"mcr p15, 0, %0, c7, c10, 4" : :
"r" (0));
212 asm volatile (
"mcr p15, 0, %0, c7, c5, 6" : :
"r" (0) :
"memory");
221 asm volatile (
"isb" :::
"memory");
223 asm volatile (
"mcr p15, 0, %0, c7, c5, 4" : :
"r" (0) :
"memory");
235 asm volatile (
"mcr p15, 0, %0, c7, c5, 4" : :
"r" (0) :
"memory");
248 u32 r0,
r1,
r2,
r3,
r4,
r5,
r6,
r7,
r8,
r9,
r10,
r11,
r12;
275 void logException(
CPUState *state)
const;
282 void logState(
CPUState *state)
const;
291 void logRegister(
const char *name,
u32 reg,
const char *text =
"")
const;
void isb()
Instruction Synchronisation Barrier (ARMv7 and above)
void dsb()
Data Synchronisation Barrier.
void flushPrefetchBuffer()
Flush Prefetch Buffer.
void tlb_flush_all()
Flush the entire Translation Lookaside Buffer.
unsigned int u32
Unsigned 32-bit number.
Contains all the CPU registers.
Class representing an ARM processor core.
void flushBranchPrediction()
Flush branch prediction.
void dmb()
Data Memory Barrier.