Re: [U-Boot] [PATCH v3 3/3] sunxi: add support for Lichee Pi Zero

2017年2月13日 15:17于 Maxime Ripard maxime.ripard@free-electrons.com写道:
Hi,
On Sat, Feb 11, 2017 at 07:11:02PM +0800, Icenowy Zheng wrote:
@@ -0,0 +1,13 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +# CONFIG_ARMV7_NONSEC is not set
Why? It doesn't have Trustzone?
The CPU has Secure mode, but no TrustZone Peripheral Controller, neither SMP.
Thanks, Maxime
-- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com

On Mon, Feb 13, 2017 at 04:12:04PM +0800, Icenowy Zheng wrote:
2017年2月13日 15:17于 Maxime Ripard maxime.ripard@free-electrons.com写道:
Hi,
On Sat, Feb 11, 2017 at 07:11:02PM +0800, Icenowy Zheng wrote:
@@ -0,0 +1,13 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +# CONFIG_ARMV7_NONSEC is not set
Why? It doesn't have Trustzone?
The CPU has Secure mode, but no TrustZone Peripheral Controller, neither SMP.
Still, booting in HYP and having PSCI sounds like a good idea.
Maxime

On 14/02/17 07:36, Maxime Ripard wrote:
On Mon, Feb 13, 2017 at 04:12:04PM +0800, Icenowy Zheng wrote:
2017年2月13日 15:17于 Maxime Ripard maxime.ripard@free-electrons.com写道:
Hi,
On Sat, Feb 11, 2017 at 07:11:02PM +0800, Icenowy Zheng wrote:
@@ -0,0 +1,13 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +# CONFIG_ARMV7_NONSEC is not set
Why? It doesn't have Trustzone?
The CPU has Secure mode, but no TrustZone Peripheral Controller, neither SMP.
Still, booting in HYP and having PSCI sounds like a good idea.
Yes, so without this option Linux will run in secure state, if I am not mistaken, which is discouraged. Instead we should enter Linux in (non-secure) HYP mode [1], which will allow KVM, for instance. So I'd recommend to remove this last line. Whether we need PSCI on an UP system is a separate question, I don't know from the top of my head if ARM(32) uses it for suspend/resume. But anyway this is not implemented in U-Boot's PSCI implementation, IIRC. So for just disabling PSCI we could use:
+# CONFIG_ARMV7_PSCI is not set
Cheers, Andre.
[1] http://lxr.free-electrons.com/source/Documentation/arm/Booting#L188

On Thu, Feb 16, 2017 at 9:32 AM, André Przywara andre.przywara@arm.com wrote:
On 14/02/17 07:36, Maxime Ripard wrote:
On Mon, Feb 13, 2017 at 04:12:04PM +0800, Icenowy Zheng wrote:
2017年2月13日 15:17于 Maxime Ripard maxime.ripard@free-electrons.com写道:
Hi,
On Sat, Feb 11, 2017 at 07:11:02PM +0800, Icenowy Zheng wrote:
@@ -0,0 +1,13 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +# CONFIG_ARMV7_NONSEC is not set
Why? It doesn't have Trustzone?
The CPU has Secure mode, but no TrustZone Peripheral Controller, neither SMP.
Still, booting in HYP and having PSCI sounds like a good idea.
Yes, so without this option Linux will run in secure state, if I am not mistaken, which is discouraged. Instead we should enter Linux in (non-secure) HYP mode [1], which will allow KVM, for instance. So I'd recommend to remove this last line. Whether we need PSCI on an UP system is a separate question, I don't know from the top of my head if ARM(32) uses it for suspend/resume. But anyway this is not implemented in U-Boot's PSCI implementation, IIRC. So for just disabling PSCI we could use:
+# CONFIG_ARMV7_PSCI is not set
We'll need to add some more code (or disable some) though. If PSCI isn't enabled, U-boot will try to bring up the cores (by calling some non-existent- in-sunxi function) and put them in a holding pen.
I guess Icenowy can figure that bit out.
ChenYu
Cheers, Andre.
[1] http://lxr.free-electrons.com/source/Documentation/arm/Booting#L188
-- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

On Thu, Feb 16, 2017 at 01:32:19AM +0000, André Przywara wrote:
Whether we need PSCI on an UP system is a separate question, I don't know from the top of my head if ARM(32) uses it for suspend/resume. But anyway this is not implemented in U-Boot's PSCI implementation, IIRC.
Antoine (in CC) did this for the A13 in order to implement cpuidle.
http://lists.denx.de/pipermail/u-boot/2016-October/271038.html
So it's definitely something we can (and should) do.
Maxime
participants (4)
-
André Przywara
-
Chen-Yu Tsai
-
Icenowy Zheng
-
Maxime Ripard