I am trying to compile "mrc" and "mcr" instruction on AARCH64 based on Board but I am seeing below error message
tmp/ccqOHmrK.s: Assembler messages:
/tmp/ccqOHmrK.s:43: Error: unknown mnemonic `mrc' -- `mrc p15,0,x0,c14,c3,1'
/tmp/ccqOHmrK.s:53: Error: unknown mnemonic `mrc' -- `mrc p15,0,x2,c14,c3,0'
I tried looking into the kernel source /arch/arm64 but no where mcr&&mrc has been used without emulation.
Is it some syntax issue?
You should replace these with the appropriate msr
instructions.
For example, arch/arm/include/asm/arch_timer.h has:
case ARCH_TIMER_REG_CTRL:
asm volatile("mcr p15, 0, %0, c14, c3, 1" : : "r" (val));
The counterpart in arch/arm64/include/asm/arch_timer.h has:
case ARCH_TIMER_REG_CTRL:
asm volatile("msr cntv_ctl_el0, %0" : : "r" (val));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With