Re: kernel/tests: Test behaviour of TPIDRURW register with threads on ARMv7
4 Jul
2013
4 Jul
'13
1:59 a.m.
André Hentschel <nerv(a)dawncrow.de> wrote:
+#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) +static inline void set_tpidrurw(DWORD tpidrurw) +{ + __asm__ volatile ("mcr p15, 0, %0, c13, c0, 2" : : "r" (tpidrurw)); +} + +static inline DWORD get_tpidrurw(void) +{ + DWORD tpidrurw = 0; + __asm__ volatile ("mrc p15, 0, %0, c13, c0, 2" : "=r" (tpidrurw)); + return tpidrurw; +}
This code is gcc specific and for instance won't compile with PSDK compiler. It either needs to be protected or replaced with hex/binary form. -- Dmitry.
4634
Age (days ago)
4634
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov