Trouble starting AP cpu's on all winner R40/V40 chip, help needed?

Søren Schmidt soren.schmidt at gmail.com
Tue Oct 15 12:27:43 UTC 2019


Hi Manu

> 
>> Hi all
>> 
>> I found some time to wrestle the allwinner R40/v40 I?ve sitting around, but I?m bashing my head against getting the AP?s booted properly.
>> 
>> I don?t seem to be able to get the CPU to run at all, or (more likely) I don?t have a way to get them startet at ?mpentry? to get them going correctly.
>> 
>> I?m not sure I understand how those AP?s gets their starting address, the only reference to ?mpentry? is aw_mp.c:
>> 
>> 
>> bus_space_write_4(fdtbus_bs_tag, cpucfg, CPUCFG_P_REG0,
>>            pmap_kextract((vm_offset_t)mpentry));
>> 
>> This is used on all all winner cpu?s (more or less) but according til the R40/v40 docs that register doesn?t exist which would explain the failure?

> 
> R40 seems to use different registers for cpu bringup, so you will need
> to define a new platform for it in aw_machdep.c and defines some new
> function for ap bringup in aw_mp.c
> The User Manual section 3.2 of the R40 have all the needed info.
> 

Yeps, already did that, and I can reset the cores etc, that seems to work (register bits flips), but there are no mention of regs to put the starting address into.

Chap 3.2 doesn’t mention anything in that regard (at least in the docs I’ve found online) its moved to chap 4.2 in the latest R40/V40/T3 docs I’ve found bu still no mention of starting address.

I looks somewhat like the A20 ie it has control for 2 cpu’s the last two are missing from the register ref, which suggests to me that the docs might be inaccurate at best.

I looked into “Tina-linux” that they made for it, but I havn’t found out how they start it there either..

I might also just have stared me blind at it :)


-Søren




More information about the freebsd-arm mailing list