0

I'm using a NanoPi Neo Air and I'm finding it impossible to get any code to run on any of the other cores. I am using no OS. This example shows how to get multicore code running on the Raspberry Pi. I have not been able to find any information about the NanoPi equivalent of that code though, except for the Linux source code. I have attempted to write an equivalent of the smp_boot_secondary function in ARM assembly, but this isn't working.

LDR  r0, =multicore_start @ Func ptr
MOVW r11, #0x1DA4 @ Set ptr
MOVT r11, #0x01F0
STR  r0, [r11]

MOVW r1, #0x1C80
MOVT r1, #0x01F0
MOV  r11, #0      @ Reset core
STR  r11, [r1]

MOVW r2, #0x0003 @ Mask to reset L1 for CORE1
MOVT r2, #0x0000

MOVW r11, #0x1D84 @ Turn off L1
MOVT r11, #0x01F0
LDR  r10, [r11]
BIC  r10, r10, r2
STR  r10, [r11]

MOVW r11, #0x1500 @ Clear power off
MOVT r11, #0x01F0
LDR  r10, [r11]
BIC  r10, r10, r2
STR  r10, [r11]

MOVW r11, #0x1C80
MOVT r11, #0x01F0
MOV r11, #3       @ Power up the core
STR r11, [r1]

Am I approaching this the wrong way?

mpromonet
  • 11,326
  • 43
  • 62
  • 91
somebody0
  • 53
  • 6
  • sunxi has the datasheet you can download, in that datasheet it shows each of the cpu reset control registers. I wrote that code you posted, the raspberry pi either doesnt have separate reset controls and/or it is undocumented as the GPU brings up the arm cores anyway. ARM provides separate controls on the edge of the core it is the chip vendor that choses how to deal with those signals. You should examine these registers and see if the cores are enabled, if not then perhaps adjust your bootcode and enable one and guide it to its code or a resting place. – old_timer May 19 '17 at 13:29
  • like the raspi there should be a cpuid register (this is a bunch of registers in the arm not just one) that you can use to figure out one core from another and guide them to their code or a holding area where they wait to be told to run something. – old_timer May 19 '17 at 13:30

0 Answers0