Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-12-06 Thread Marc Zyngier
On 06/12/13 17:21, Ian Campbell wrote:
> On Fri, 2013-12-06 at 16:48 +0100, Andre Przywara wrote:
>> On 12/06/2013 04:44 PM, Ian Campbell wrote:
>>> (damn linux-sunxi reply-to vs. evolution madness ate your copy Marc,
>>> sorry!)
>>>
>>> On Fri, 2013-12-06 at 12:59 +, Ian Campbell wrote:
 On Fri, 2013-12-06 at 12:12 +, Marc Zyngier wrote:
>> BTW: Yesterday my PSCI host patches for Xen have been committed, so Xen
>> should be able to use that feature just like the kernel does.
>
> Excellent! I really need to sort these patches out and repost the whole
> series...

 I was hoping to give this a go on my cb2 this afternoon. Do you happen
 to have a public git tree of either this version or the upcoming new one
 handy?
>>>
>>> Actually, since this series doesn't build ("no rule to make
>>> sunxi-psci.bin"...) I guess I'll wait for the upcoming one.
>>
>> Have you observed this sentence is Marc's mail?
>>
>> "The patches are against a merge of u-boot mainline and the sunxi tree 
>> as of ten days ago."
> 
> The sunxi tree today has mainline v2014.01-rc1 in it, which I'd assumed
> was new enough because it was tagged after Marc posted these patches.
> 
> Nothing between v2013.01-rc1 and the current mainline looks related.

Don't underestimate my own capacity to screw things up in a devastating
way... ;-)

I'll try to sort my patches tomorrow morning, and hopefully won't mess
it up this time. And given that I'm heading for Devonshire in a couple
of hours (hint, hint!), it is not a strong guarantee... :D

M.
-- 
Jazz is not dead. It just smells funny...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-12-06 Thread Ian Campbell
On Fri, 2013-12-06 at 16:48 +0100, Andre Przywara wrote:
> On 12/06/2013 04:44 PM, Ian Campbell wrote:
> > (damn linux-sunxi reply-to vs. evolution madness ate your copy Marc,
> > sorry!)
> >
> > On Fri, 2013-12-06 at 12:59 +, Ian Campbell wrote:
> >> On Fri, 2013-12-06 at 12:12 +, Marc Zyngier wrote:
>  BTW: Yesterday my PSCI host patches for Xen have been committed, so Xen
>  should be able to use that feature just like the kernel does.
> >>>
> >>> Excellent! I really need to sort these patches out and repost the whole
> >>> series...
> >>
> >> I was hoping to give this a go on my cb2 this afternoon. Do you happen
> >> to have a public git tree of either this version or the upcoming new one
> >> handy?
> >
> > Actually, since this series doesn't build ("no rule to make
> > sunxi-psci.bin"...) I guess I'll wait for the upcoming one.
> 
> Have you observed this sentence is Marc's mail?
> 
> "The patches are against a merge of u-boot mainline and the sunxi tree 
> as of ten days ago."

The sunxi tree today has mainline v2014.01-rc1 in it, which I'd assumed
was new enough because it was tagged after Marc posted these patches.

Nothing between v2013.01-rc1 and the current mainline looks related.

Ian.

> Not sure if that really helps, though, I stopped at this point and just 
> tried the first 7 patches.
> 
> But you may give this another shot as long as there are still the winds 
> outside ;-) Or is it already over on the isles?
> 
> Regards,
> Andre.
> 
> 


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-12-06 Thread Andre Przywara

On 12/06/2013 04:44 PM, Ian Campbell wrote:

(damn linux-sunxi reply-to vs. evolution madness ate your copy Marc,
sorry!)

On Fri, 2013-12-06 at 12:59 +, Ian Campbell wrote:

On Fri, 2013-12-06 at 12:12 +, Marc Zyngier wrote:

BTW: Yesterday my PSCI host patches for Xen have been committed, so Xen
should be able to use that feature just like the kernel does.


Excellent! I really need to sort these patches out and repost the whole
series...


I was hoping to give this a go on my cb2 this afternoon. Do you happen
to have a public git tree of either this version or the upcoming new one
handy?


Actually, since this series doesn't build ("no rule to make
sunxi-psci.bin"...) I guess I'll wait for the upcoming one.


Have you observed this sentence is Marc's mail?

"The patches are against a merge of u-boot mainline and the sunxi tree 
as of ten days ago."


Not sure if that really helps, though, I stopped at this point and just 
tried the first 7 patches.


But you may give this another shot as long as there are still the winds 
outside ;-) Or is it already over on the isles?


Regards,
Andre.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-12-06 Thread Ian Campbell
(damn linux-sunxi reply-to vs. evolution madness ate your copy Marc,
sorry!)

On Fri, 2013-12-06 at 12:59 +, Ian Campbell wrote:
> On Fri, 2013-12-06 at 12:12 +, Marc Zyngier wrote:
> > > BTW: Yesterday my PSCI host patches for Xen have been committed, so Xen 
> > > should be able to use that feature just like the kernel does.
> > 
> > Excellent! I really need to sort these patches out and repost the whole
> > series...
> 
> I was hoping to give this a go on my cb2 this afternoon. Do you happen
> to have a public git tree of either this version or the upcoming new one
> handy?

Actually, since this series doesn't build ("no rule to make
sunxi-psci.bin"...) I guess I'll wait for the upcoming one.

Ian.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-12-06 Thread Ian Campbell
On Fri, 2013-12-06 at 12:12 +, Marc Zyngier wrote:
> > BTW: Yesterday my PSCI host patches for Xen have been committed, so Xen 
> > should be able to use that feature just like the kernel does.
> 
> Excellent! I really need to sort these patches out and repost the whole
> series...

I was hoping to give this a go on my cb2 this afternoon. Do you happen
to have a public git tree of either this version or the upcoming new one
handy?

Ian.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-11-22 Thread Christoffer Dall
On Fri, Nov 22, 2013 at 02:30:27PM +0530, Anup Patel wrote:
> On Fri, Nov 22, 2013 at 2:12 PM, Ian Campbell  wrote:
> > On Fri, 2013-11-22 at 09:28 +0530, Anup Patel wrote:
> >> An Independent binary of a secured firmware makes more sense here.
> >> Also, if secured firmware is an independent binary then it need not be
> >> open source.
> >
> > In which case it should/can not have anything to do with u-boot nor
> > reuse any GPL'd u-boot code. The platform should supply the PSCI service
> > itself if you want to do this.
> >
> > I for one don't see this as an advantage.
> 
> Further, independent secure firmware can be also used by UEFI or other
> bootloaders.
> 
> For now we just need secure firmware loading service from u-boot, which
> is what this patchset does.
> 
As I see it this patchset seeks to provide (and does a good job of it)
you with PSCI services on platforms where you don't already have this,
so you avoid having to implement yet another platform-specific SMP
boot-up sequence in the kernel.  This is not about providing any generic
support for secure firmware.

Ideally, the platform would just ship with PSCI support and boot U-Boot
in Hyp mode and everyone would be happy - whichever way vendors wish to
do that is a completely different discussion than this patch set.

-Christoffer
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-11-22 Thread Marc Zyngier
On 22/11/13 08:40, Ian Campbell wrote:
> On Thu, 2013-11-21 at 15:04 +, Marc Zyngier wrote:
>> Hi Rob,
>>
>> On 21/11/13 14:28, Rob Herring wrote:
>>> On Thu, Nov 21, 2013 at 2:59 AM, Marc Zyngier  wrote:
 PSCI is an ARM standard that provides a generic interface that
 supervisory software can use to manage power in the following
 situations:
 - Core idle management
 - CPU hotplug
 - big.LITTLE migration models
 - System shutdown and reset

 It basically allows the kernel to offload these tasks to the firmware,
 and rely on common kernel side code.

 More importantly, it gives a way to ensure that CPUs enter the kernel
 at the appropriate exception level (ie HYP mode, to allow the use of
 the virtualization extensions), even across events like CPUs being
 powered off/on or suspended.

 The main idea here is to reuse some of the existing u-boot code to
 create a separate blob that can live in SRAM (or a reserved page of
 memory), containing a secure monitor that will implement the PSCI
 operations. This code will still be alive when u-boot is long gone,
 hence the need for a piece of memory that will not be touched by the
 OS.
>>>
>>> Interesting. As a separate binary, I'm not sure this belongs or
>>> benefits from being in u-boot. I would like to see this as a more
>>> generic secure firmware loader or PSCI code be a part of u-boot code
>>> directly. With the latter, you could extend it beyond PSCI to things
>>> like env variable access (basically equivalent to UEFI runtime
>>> services). I'm not saying we should do that though.
>>
>> So I started this by having something that was actually part of u-boot,
>> and copying itself into SRAM, patching stuff as it went. The net result
>> was that I was reinventing a runtime linker. Needless to say, I gave up
>> quickly... ;-)
>>
>> What could be done would be for u-boot to be at least partially linked
>> to run from some other region.
> 
> Can't you just build and link it as you do now and then link it into
> the .rodata section of the final u-boot image as a blob to copy out to
> the defined address at runtime?
> 
>>  That would allow for the secure mode
>> services to be both part of u-boot, and stay resident.
>>
>> That'd probably be a good thing to have a look at.
>>
>>> BTW, you will need to mark this region reserved in the dtb if in system RAM.
>>
>> Yes. Eventually, I'd like the psci mode to be entirely generated from
>> u-boot, as well as the eventual RAM reserved.
> 
> Did you mean "psci node" here? In which case yes please.

Yes, that's what I meant. More. Coffee.

M.
-- 
Jazz is not dead. It just smells funny...

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-11-22 Thread Ian Campbell
On Fri, 2013-11-22 at 14:26 +0530, Anup Patel wrote:
> If you link secure firmware inside u-boot image then we will have to reflash
> or update entire u-boot image whenever we want to update the secure
> firmware.

Only if you make your secure firmware part of u-boot. Nothing says you
have to. You could equally well integrate with some existing blob
provided by lower level firmware.

Ian.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-11-22 Thread Anup Patel
On Fri, Nov 22, 2013 at 2:10 PM, Ian Campbell  wrote:
> On Thu, 2013-11-21 at 15:04 +, Marc Zyngier wrote:
>> Hi Rob,
>>
>> On 21/11/13 14:28, Rob Herring wrote:
>> > On Thu, Nov 21, 2013 at 2:59 AM, Marc Zyngier  wrote:
>> >> PSCI is an ARM standard that provides a generic interface that
>> >> supervisory software can use to manage power in the following
>> >> situations:
>> >> - Core idle management
>> >> - CPU hotplug
>> >> - big.LITTLE migration models
>> >> - System shutdown and reset
>> >>
>> >> It basically allows the kernel to offload these tasks to the firmware,
>> >> and rely on common kernel side code.
>> >>
>> >> More importantly, it gives a way to ensure that CPUs enter the kernel
>> >> at the appropriate exception level (ie HYP mode, to allow the use of
>> >> the virtualization extensions), even across events like CPUs being
>> >> powered off/on or suspended.
>> >>
>> >> The main idea here is to reuse some of the existing u-boot code to
>> >> create a separate blob that can live in SRAM (or a reserved page of
>> >> memory), containing a secure monitor that will implement the PSCI
>> >> operations. This code will still be alive when u-boot is long gone,
>> >> hence the need for a piece of memory that will not be touched by the
>> >> OS.
>> >
>> > Interesting. As a separate binary, I'm not sure this belongs or
>> > benefits from being in u-boot. I would like to see this as a more
>> > generic secure firmware loader or PSCI code be a part of u-boot code
>> > directly. With the latter, you could extend it beyond PSCI to things
>> > like env variable access (basically equivalent to UEFI runtime
>> > services). I'm not saying we should do that though.
>>
>> So I started this by having something that was actually part of u-boot,
>> and copying itself into SRAM, patching stuff as it went. The net result
>> was that I was reinventing a runtime linker. Needless to say, I gave up
>> quickly... ;-)
>>
>> What could be done would be for u-boot to be at least partially linked
>> to run from some other region.
>
> Can't you just build and link it as you do now and then link it into
> the .rodata section of the final u-boot image as a blob to copy out to
> the defined address at runtime?

If you link secure firmware inside u-boot image then we will have to reflash
or update entire u-boot image whenever we want to update the secure
firmware.

--
Anup

>
>>  That would allow for the secure mode
>> services to be both part of u-boot, and stay resident.
>>
>> That'd probably be a good thing to have a look at.
>>
>> > BTW, you will need to mark this region reserved in the dtb if in system 
>> > RAM.
>>
>> Yes. Eventually, I'd like the psci mode to be entirely generated from
>> u-boot, as well as the eventual RAM reserved.
>
> Did you mean "psci node" here? In which case yes please.
>
> Ian.
>
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-11-22 Thread Anup Patel
On Fri, Nov 22, 2013 at 2:12 PM, Ian Campbell  wrote:
> On Fri, 2013-11-22 at 09:28 +0530, Anup Patel wrote:
>> An Independent binary of a secured firmware makes more sense here.
>> Also, if secured firmware is an independent binary then it need not be
>> open source.
>
> In which case it should/can not have anything to do with u-boot nor
> reuse any GPL'd u-boot code. The platform should supply the PSCI service
> itself if you want to do this.
>
> I for one don't see this as an advantage.

Further, independent secure firmware can be also used by UEFI or other
bootloaders.

For now we just need secure firmware loading service from u-boot, which
is what this patchset does.

--
Anup

>
> Ian.
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-11-22 Thread Ian Campbell
On Fri, 2013-11-22 at 09:28 +0530, Anup Patel wrote:
> An Independent binary of a secured firmware makes more sense here.
> Also, if secured firmware is an independent binary then it need not be
> open source.

In which case it should/can not have anything to do with u-boot nor
reuse any GPL'd u-boot code. The platform should supply the PSCI service
itself if you want to do this.

I for one don't see this as an advantage.

Ian.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [linux-sunxi] Re: [PATCH 0/9] ARMv7: add PSCI support to u-boot

2013-11-22 Thread Ian Campbell
On Thu, 2013-11-21 at 15:04 +, Marc Zyngier wrote:
> Hi Rob,
> 
> On 21/11/13 14:28, Rob Herring wrote:
> > On Thu, Nov 21, 2013 at 2:59 AM, Marc Zyngier  wrote:
> >> PSCI is an ARM standard that provides a generic interface that
> >> supervisory software can use to manage power in the following
> >> situations:
> >> - Core idle management
> >> - CPU hotplug
> >> - big.LITTLE migration models
> >> - System shutdown and reset
> >>
> >> It basically allows the kernel to offload these tasks to the firmware,
> >> and rely on common kernel side code.
> >>
> >> More importantly, it gives a way to ensure that CPUs enter the kernel
> >> at the appropriate exception level (ie HYP mode, to allow the use of
> >> the virtualization extensions), even across events like CPUs being
> >> powered off/on or suspended.
> >>
> >> The main idea here is to reuse some of the existing u-boot code to
> >> create a separate blob that can live in SRAM (or a reserved page of
> >> memory), containing a secure monitor that will implement the PSCI
> >> operations. This code will still be alive when u-boot is long gone,
> >> hence the need for a piece of memory that will not be touched by the
> >> OS.
> > 
> > Interesting. As a separate binary, I'm not sure this belongs or
> > benefits from being in u-boot. I would like to see this as a more
> > generic secure firmware loader or PSCI code be a part of u-boot code
> > directly. With the latter, you could extend it beyond PSCI to things
> > like env variable access (basically equivalent to UEFI runtime
> > services). I'm not saying we should do that though.
> 
> So I started this by having something that was actually part of u-boot,
> and copying itself into SRAM, patching stuff as it went. The net result
> was that I was reinventing a runtime linker. Needless to say, I gave up
> quickly... ;-)
> 
> What could be done would be for u-boot to be at least partially linked
> to run from some other region.

Can't you just build and link it as you do now and then link it into
the .rodata section of the final u-boot image as a blob to copy out to
the defined address at runtime?

>  That would allow for the secure mode
> services to be both part of u-boot, and stay resident.
> 
> That'd probably be a good thing to have a look at.
> 
> > BTW, you will need to mark this region reserved in the dtb if in system RAM.
> 
> Yes. Eventually, I'd like the psci mode to be entirely generated from
> u-boot, as well as the eventual RAM reserved.

Did you mean "psci node" here? In which case yes please.

Ian.


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot