
On Sun, 2015-01-11 at 12:06 +0100, Jan Kiszka wrote:
On 2015-01-11 11:30, Hans de Goede wrote:
Hi,
On 11-01-15 10:59, Ian Campbell wrote:
I've applied #1 and #3. I'd like to hear from Hans on the v0.2 stuff.
I've no real opinion on this, I do NOT like the introduction of a third version of the i2c / rsb and axp code (we already have both a u-boot and a kernel version to maintain of both).
I do not like this replication of logic very much as well. But already my attempts to put complete C modules in the monitor segment failed.
I think this is something we are going to need to resolve eventually, if not for sunxi then for some other platform, how did it fail?
And then, would we be able to still use those functions also from the rest of uboot?
Since the main u-boot and PSCI cases are temporarily isolated (PSCI not used until after boot{m,z}, at which point the main bit has gone away) I would expect that the rest of u-boot would use the code from its place within the main u-boot text area, while PSCI would use it from the relocated secure RAM.
The code would need to be PIE and care would need to be taken about relying on global variables between the two, but it doesn't seem overly problematic (famous last words!).
Worst case I suppose we could always arrange to compile a few .c files twice, once for each case.
What would be possible is to invoke SYSTEM_RESET from reset_cpu. Not much to gain, though, as only the sun7i has PSCI, and its logic is also used by 4i and 5i.
In theory I think 4i and 5i are both capable of running NS and therefore supporting PSCI, it's just they don't have virt extensions (and are single processor, IIRC) so there isn't really much reason to want to do so.
Ian.