2 Copyright © 2013, The AROS Development Team. All rights reserved.
10 #include "kernel_arm.h"
12 extern uint32_t __arm_affinitymask
;
14 #define EXCEPTIONS_COUNT 1
16 #define ARM_FPU_TYPE FPU_VFP
17 #define ARM_FPU_SIZE 32*64
19 /* We use native context format, no conversion needed */
20 #define regs_t struct ExceptionContext
21 /* There are no private add-ons */
22 #define AROSCPUContext ExceptionContext
24 #define ADDTIME(dest, src) \
25 (dest)->tv_micro += (src)->tv_micro; \
26 (dest)->tv_secs += (src)->tv_secs; \
27 while((dest)->tv_micro > 999999) \
30 (dest)->tv_micro -= 1000000; \
37 #define krnSysCall(n) asm volatile ("swi %[swi_no]\n\t" : : [swi_no] "I" (n) : "lr");
39 void cpu_DumpRegs(regs_t
*regs
);
41 static inline int GetCPUNumber() {
43 asm volatile (" mrc p15, 0, %0, c0, c0, 5 " : "=r" (tmp
));
47 static inline void SendIPISelf(uint32_t ipi
, uint32_t ipi_param
)
49 int cpu
= GetCPUNumber();
50 __arm_arosintern
.ARMI_SendIPI((ipi
& 0x0fffffff) | (cpu
<< 28), ipi_param
, (1 << cpu
));
53 static inline void SendIPIOthers(uint32_t ipi
, uint32_t ipi_param
)
55 int cpu
= GetCPUNumber();
56 __arm_arosintern
.ARMI_SendIPI((ipi
& 0x0fffffff) | (cpu
<< 28), ipi_param
, 0xf & ~(1 << cpu
));
59 static inline void SendIPIAll(uint32_t ipi
, uint32_t ipi_param
)
61 int cpu
= GetCPUNumber();
62 __arm_arosintern
.ARMI_SendIPI((ipi
& 0x0fffffff) | (cpu
<< 28), ipi_param
, 0xf);
65 #endif /* CPU_ARM_H_ */