I am new to ARM and trying to understand MRC instruction.
As I understood , MRC is to read Coprocessor registers and put it into main Core register.
Now Coprocessors are attached to main core and is used to control the memory subsystem of main core.How Coprocessors are attached to main core processor .Could anyone point to some good Digram?
Now this below instruction on arm7 cpu core
/* workaround to disable secure state */
mrc p15, #0, r0, c1, c1, #0
orr r0, r0, #1
mcr p15, #0, r0, c1, c1, #0
isb
Now I just couldn't find what is going on in mrc instruction here
1.First argument to mrc is coprocessor number(how p0 is different from p15).
2.Second Argument is opcode1 of coprocessor(Not sure about it).
3.Third argument is main core register(Ok with it).
4.fourth and fivth argumnet is co processor registers(Is result of c1,#0 is stored to c1 )?
5.Agin final Argument is opcode2 (Not sure about it).
Thanks
MRC
/MCR
instructions are generic. You have to refer to specific documents. VFP, Neon, and CP15. The CP15 is a catch all for things not built-in to the instruction set and is intended for OS programmers. It may include MMU, cache control, protection unit, fast context switch, write buffer, TrustZone, HyperVisor, Vector table, etc. CP15 does not remain backwards compatible as the instruction set does. – artless noise