mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
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:
committed by
Gregory Nutt
parent
0e6f093e2a
commit
1690f2ca8b
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user