Skip to contentSkip to conversation

ARM: PSCI 0.1 vs 0.2

U-Boot Jan Kiszka 4 participants 9 messages Nov 10, 2014 – Nov 28, 2014

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can avoid this).

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Jan

#1 lore raw
Quoted 6 lines · Jan Kiszka

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can avoid this).

The initial rational was simple: at the time this code was written, the 0.2 spec still in review, and nobody was implementing it. Supporting 0.1 was the only viable use-case.

Quoted 2 lines

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Supporting both is very easy. Just output the 0.2 function numbers that actually make sense for 0.1 and have both compatible strings.

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
author
#2 lore raw
Quoted 12 lines · Marc Zyngier
Quoted 6 lines · Jan Kiszka

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can avoid this).

The initial rational was simple: at the time this code was written, the 0.2 spec still in review, and nobody was implementing it. Supporting 0.1 was the only viable use-case.

Quoted 5 lines
Quoted 2 lines

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Supporting both is very easy. Just output the 0.2 function numbers that actually make sense for 0.1 and have both compatible strings.

Ah, cool - parameters and return values of, say, CPU_ON/OFF are compatible across both versions?

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
#3 lore raw

Hi,

Quoted 29 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Jan Kiszka
Sent: Monday, November 10, 2014 6:56 PM
To: Marc Zyngier
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] ARM: PSCI 0.1 vs 0.2

Quoted 7 lines · Marc Zyngier
Quoted 6 lines · Jan Kiszka

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can

avoid this).

Quoted 11 lines

The initial rational was simple: at the time this code was written, the
0.2 spec still in review, and nobody was implementing it. Supporting 0.1 was the only viable use-case.

Quoted 2 lines

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Supporting both is very easy. Just output the 0.2 function numbers that actually make sense for 0.1 and have both compatible strings.

Quoted 6 lines

Ah, cool - parameters and return values of, say, CPU_ON/OFF are compatible across both versions?

Jan

--

We did send out some ARMv8 PSCI v0.2 u-boot patches, which can be seen here:

http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/194210

Regards,
Bhupesh

author
#4 lore raw
Quoted 34 lines · bhupesh.sharma at freescale.com

Hi,

Quoted 32 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Jan Kiszka
Sent: Monday, November 10, 2014 6:56 PM
To: Marc Zyngier
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] ARM: PSCI 0.1 vs 0.2

Quoted 7 lines · Marc Zyngier
Quoted 6 lines · Jan Kiszka

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can

avoid this).

Quoted 11 lines

The initial rational was simple: at the time this code was written, the
0.2 spec still in review, and nobody was implementing it. Supporting 0.1 was the only viable use-case.

Quoted 2 lines

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Supporting both is very easy. Just output the 0.2 function numbers that actually make sense for 0.1 and have both compatible strings.

Ah, cool - parameters and return values of, say, CPU_ON/OFF are compatible across both versions?

Quoted 7 lines
Quoted 3 lines

Jan

--

We did send out some ARMv8 PSCI v0.2 u-boot patches, which can be seen here:

http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/194210

Nice. I guess that could be reused for ARMv7 as well, at least conceptually. You are using C for some PSCI functions, specifically for cache flushing? Need to dig deeper...

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
#5 lore raw
In reply to Jan Kiszka
Quoted 13 lines · Jan Kiszka
Quoted 12 lines · Marc Zyngier
Quoted 6 lines · Jan Kiszka

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can avoid this).

The initial rational was simple: at the time this code was written, the 0.2 spec still in review, and nobody was implementing it. Supporting 0.1 was the only viable use-case.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Supporting both is very easy. Just output the 0.2 function numbers that actually make sense for 0.1 and have both compatible strings.

Ah, cool - parameters and return values of, say, CPU_ON/OFF are compatible across both versions?

That was the idea of the spec (broadly compatible across revisions...).

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#6 lore raw
Quoted 17 lines · Marc Zyngier
Quoted 16 lines · Jan Kiszka
Quoted 15 lines · Marc Zyngier
Quoted 6 lines · Jan Kiszka

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can avoid this).

The initial rational was simple: at the time this code was written, the 0.2 spec still in review, and nobody was implementing it. Supporting 0.1 was the only viable use-case.

Quoted 2 lines

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Supporting both is very easy. Just output the 0.2 function numbers that actually make sense for 0.1 and have both compatible strings.

Ah, cool - parameters and return values of, say, CPU_ON/OFF are compatible across both versions?

That was the idea of the spec (broadly compatible across revisions...).

There is one major problem with v0.2, though, and I bet this also applies to the ARMv8 implementation:

v0.2 mandates that the firmware provides SYSTEM_RESET - that's rather simple - and SYSTEM_OFF. The latter seems non-trivial for the sunxi as the power controller is attached via i2c. I guess that will be quite a bit of code in the PSCI monitor for a feature that already works fine for Linux with v0.1. Or am I missing something?

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141128/fb097821/attachment.pgp>

#7 lore raw
Quoted 26 lines · Jan Kiszka
Quoted 17 lines · Marc Zyngier
Quoted 16 lines · Jan Kiszka
Quoted 15 lines · Marc Zyngier
Quoted 6 lines · Jan Kiszka

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can avoid this).

The initial rational was simple: at the time this code was written, the 0.2 spec still in review, and nobody was implementing it. Supporting 0.1 was the only viable use-case.

Quoted 2 lines

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Supporting both is very easy. Just output the 0.2 function numbers that actually make sense for 0.1 and have both compatible strings.

Ah, cool - parameters and return values of, say, CPU_ON/OFF are compatible across both versions?

That was the idea of the spec (broadly compatible across revisions...).

Quoted 8 lines

There is one major problem with v0.2, though, and I bet this also applies to the ARMv8 implementation:

v0.2 mandates that the firmware provides SYSTEM_RESET - that's rather simple - and SYSTEM_OFF. The latter seems non-trivial for the sunxi as the power controller is attached via i2c. I guess that will be quite a bit of code in the PSCI monitor for a feature that already works fine for Linux with v0.1. Or am I missing something?

I seem to remember that you're allowed to return something like "Not Implemented" (of course, I could be wrong).

But even that is not that hard. I'm pretty sure the i2c pins can be switched to be GPIOs, and bit-banging i2c is not too difficult (see drivers/i2c/algos/i2c-algo-bit.c).

I was hoping for something slightly simpler though...

Thanks,

	M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#8 lore raw
Quoted 30 lines · Marc Zyngier
Quoted 29 lines · Jan Kiszka
Quoted 17 lines · Marc Zyngier
Quoted 16 lines · Jan Kiszka
Quoted 15 lines · Marc Zyngier
Quoted 6 lines · Jan Kiszka

Hi Marc,

what is the motivation to expose a PSCI 0.1 interface in U-boot, instead of 0.2? Support for preexisting users of 0.1? The kernel seems to be happy with both, and I'm now wondering if we should actually add the legacy version to Jailhouse as well (I hope we can avoid this).

The initial rational was simple: at the time this code was written, the 0.2 spec still in review, and nobody was implementing it. Supporting 0.1 was the only viable use-case.

Quoted 2 lines

Still studying the logic: Is it possible to provide both interfaces, and would it make sense?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Supporting both is very easy. Just output the 0.2 function numbers that actually make sense for 0.1 and have both compatible strings.

Ah, cool - parameters and return values of, say, CPU_ON/OFF are compatible across both versions?

That was the idea of the spec (broadly compatible across revisions...).

There is one major problem with v0.2, though, and I bet this also applies to the ARMv8 implementation:

Quoted 8 lines
Quoted 5 lines

v0.2 mandates that the firmware provides SYSTEM_RESET - that's rather simple - and SYSTEM_OFF. The latter seems non-trivial for the sunxi as the power controller is attached via i2c. I guess that will be quite a bit of code in the PSCI monitor for a feature that already works fine for Linux with v0.1. Or am I missing something?

I seem to remember that you're allowed to return something like "Not Implemented" (of course, I could be wrong).

The spec says that both SYSTEM functions do not return, thus also return no error code.

Quoted 4 lines

But even that is not that hard. I'm pretty sure the i2c pins can be switched to be GPIOs, and bit-banging i2c is not too difficult (see drivers/i2c/algos/i2c-algo-bit.c).

I'm still searching for specs that describe all the interfaces and chips...

Quoted 2 lines

I was hoping for something slightly simpler though...

What concerns me in addition are potential variations due to different boards and such - the PSCI code base may quickly grow. Too bad the standard does not allow this to be optional. Then it could be activated as needed, e.g. when running in a hypervisor.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141128/2c25ed8d/attachment.pgp>