I have a RPi3 and I am trying out this program - https://github.com/PeterLemon/Raspberry ... ernel7.asm
I could successfully build and run the program. I understood all of the code except the below.
; Return CPU ID (0..3) Of The CPU Executed On
mrc p15,0,r0,c0,c0,5 ; R0 = Multiprocessor Affinity Register (MPIDR)
ands r0,3 ; R0 = CPU ID (Bits 0..1)
bne CoreLoop ; IF (CPU ID != 0) Branch To Infinite Loop (Core ID 1..3)
I understand that this is used to put the 3 cores out of the 4 cores in infinite loop. But I don't understand the mrc instruction. I tried searching online but did not find any beginner documentation.
I have read the below link and understand how to use r0 to r12, sp, lr and pc.
http://www.keil.com/support/man/docs/ar ... 128950.htm
On the same site I found this regarding co-processor: http://www.keil.com/support/man/docs/ar ... 137632.htm. I understood there is something which has registers p0 to p15 and c0 to c15. But I have no idea what a co-processor is. Is it the GPU?
Could someone explain or point me to documentation which I should read to understand co-processor and mrc instruction?