I'm trying to write a kernel module that allows to run ARMv7 userspace code on an ARMv6 Raspberry Pi Zero. The kernel module registers an undefined instruction hook and parses ARMv7 instructions, manually executing the required register transfers etc. I'm hoping this would have as little overhead as possible, since I suspect using something like QEMU userspace emulation will be much too slow for any real use case.
For some instructions, such as MOVW and UBFX, this seems to work fine. However, I'm now seeing my hook being called for an MRRC instruction for coprocessor 15, which seems to be the System Control Coprocessor:
Code: Select all
ec510f1e = mrrc p15, #1, r0, r1, c14
Does anyone know how these System Control Coprocessor accesses could be emulated on ARMv6? Does ARMv6 have a Generic Timer? Why do userspace programs access the System Control Coprocessor anyway?
Thanks in advance!
: http://infocenter.arm.com/help/index.js ... HBIDJ.html
: http://infocenter.arm.com/help/index.js ... index.html
: http://infocenter.arm.com/help/index.js ... GFCGC.html