shared resources in AMP between Cortex-A9 and Cortex-M4
Hello Stefan,
I'm currently trying to get Linux running on the M4 of an i.MX6 Solo X and found you describing doing this on the Vybrid already[1].
I see the problem that clk and pinmux must be used by both cores. Did you solve this for your Vybrid experiments? And if so, how did it work?
Having two drivers on the same IP is racy at best and using some kind of inter cpu communication to let (say) the A9 enable the clks for the M4 sounds like overkill.
Best regards
Uwe
[1] https://falstaff.agner.ch/2015/05/17/u-boot-command-to-boot-vybrids-cortex-m4-core/
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
Quoted 5 lines · Uwe Kleine-K?nig
Hello Stefan,
I'm currently trying to get Linux running on the M4 of an i.MX6 Solo X and found you describing doing this on the Vybrid already[1].
Quoted 7 lines
I see the problem that clk and pinmux must be used by both cores. Did you solve this for your Vybrid experiments? And if so, how did it work?
Having two drivers on the same IP is racy at best and using some kind of inter cpu communication to let (say) the A9 enable the clks for the M4 sounds like overkill.
IMO it should be other way around. In-fact few latest platforms(with performant Cortex-A cores) have dedicated Cortex-M core to do such system control and power management as it are low power and mostly always on.
Signature · 2 lines
Regards, Sudeep
Hi Uwe, Hi Sudeep,
Quoted 8 lines · Sudeep Holla
Quoted 7 lines · Uwe Kleine-K?nig
Hello Stefan,
I'm currently trying to get Linux running on the M4 of an i.MX6 Solo X and found you describing doing this on the Vybrid already[1].
I see the problem that clk and pinmux must be used by both cores. Did you solve this for your Vybrid experiments? And if so, how did it work?
No, it is basically unsolved. I just used "clk_ignore_unused" on both sides to avoid stuff getting disabled. It works surprisingly well :-)
Quoted 5 lines
Quoted 5 lines
Having two drivers on the same IP is racy at best and using some kind of inter cpu communication to let (say) the A9 enable the clks for the M4 sounds like overkill.
On a high level there are these two options:
1) One core takes care of the IP, hence needs to know the other cores needs and provide it
2) Both cores access the IP (with some kind of mutual exclusion to avoid races and conflicts of shared resources)
Especially for the clock stuff I fell that 1 is probably easier.
Quoted 5 lines
IMO it should be other way around. In-fact few latest platforms(with performant Cortex-A cores) have dedicated Cortex-M core to do such system control and power management as it are low power and mostly always on.
Whether that is the M4 or the A-class CPU is probably application specific. If it is used for system control/power management, I agree with Sudeep, however, the NXP's new AMP designs mainly target user applications, e.g. to fulfill real-time requirements. In those applications I feel that the A-class CPU being the master is probably more common. Usually you only want to solve a small subset of your application on the M4.
I thought about device trees which describe the other cores needs, basically a massively enhanced version of this:
http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/remoteproc/wkup_m3_rproc.txt
I mean, we could assign lets say a UART to the remote proc, and then let the master core handle pinmux, clocks etc...
--
Stefan