arch/arm/src/armv7-a/mmu.h: pdating the cp15_wrttb and cp15_wrdacr functions to use inline assembly in the correct way. The incorrect method was generating errors as ARMv7-a expects the MCR/MRC instructions to provide registers as an argument(MRC p15, 0, <Rt>, c2, c0, 0) and the code was providing a constant value(and hence the build error).

This commit is contained in:
Bilal Wasim 2019-03-14 17:14:56 -06:00 committed by Gregory Nutt
parent 0e6f093e2a
commit 1690f2ca8b
1 changed files with 2 additions and 2 deletions

View File

@ -1252,7 +1252,7 @@ static inline void cp15_wrdacr(unsigned int dacr)
{
__asm__ __volatile__
(
"\tmcr p15, 0,0, c3, c0, 0\n"
"\tmcr p15, 0, %0, c3, c0, 0\n"
"\tnop\n"
"\tnop\n"
"\tnop\n"
@ -1286,7 +1286,7 @@ static inline void cp15_wrttb(unsigned int ttb)
{
__asm__ __volatile__
(
"\tmcr p15, 0,0, c2, c0, 0\n"
"\tmcr p15, 0, %0, c2, c0, 0\n"
"\tnop\n"
"\tnop\n"
"\tnop\n"