Re: [edk2] [PATCH edk2-non-osi 2/2] Silicon/AMD/Styx: update ArmTrustedFirmware.bin

2018-02-03 Thread Ard Biesheuvel
On 3 February 2018 at 14:44, Marc Zyngier  wrote:
> On Thu, 1 Feb 2018 16:42:53 +
> Ard Biesheuvel  wrote:
>
>> On 1 February 2018 at 16:04, Ard Biesheuvel  
>> wrote:
>> > The ARM Trusted Firmware build we have been using up until now was built
>> > with optimizations disabled (which means every variable manipulation
>> > involves a load, the operation itself and a store), and runs with the
>> > MMU disabled, making it needlessly slow.
>> >
>> > This appears to be due to the fact that
>> > a) the page tables are not set up correctly, so not all memory can be
>> >accessed from EL3
>> > b) the handling of SMC service calls does not take into account that
>> >these calls may be made with the MMU off (e.g., by UEFI PEI).
>> >
>> > These issues have been fixed in the source code, which should hopefully
>> > remove any performance bottlenecks that may become more noticeable now
>> > that we are going to call into the secure firmware more often to perform
>> > Spectre variant 2 mitigations, which have been backported as well.
>> >
>> > So update the binary image to a RELEASE build that was created with
>> > optimizations enabled, and has the above fixes incorporated.
>> >
>> > Contributed-under: TianoCore Contribution Agreement 1.1
>> > Signed-off-by: Ard Biesheuvel 
>> > ---
>> >  Silicon/AMD/Styx/ArmTrustedFirmware.bin | Bin 75344 -> 34320 bytes
>> >  1 file changed, 0 insertions(+), 0 deletions(-)
>> >
>>
>> Note to Marc: this is the exact image I shared with you as
>> bl31.bin-release earlier today, so if that works as expected, could
>> you report back here please? Thanks.
>
> To confirm, this firmware boots perfectly on Cello, and the new SMCCC
> 1.1 is now reported by the kernel (with in-flight patches):
>
> [0.00] psci: probing for conduit method from DT.
> [0.00] psci: PSCIv1.0 detected in firmware.
> [0.00] psci: Using standard PSCI v0.2 function IDs
> [0.00] psci: MIGRATE_INFO_TYPE not supported.
> [0.00] psci: SMC Calling Convention v1.1
>
> as well as ARM_SMCCC_ARCH_WORKAROUND_1, allowing for efficient
> mitigation of Spectre v2. I guess we have quite a few Seattle/Overdrive
> and OD1000 that now need this to be deployed.
>
> Thanks a lot Ard!
>

Liekwise. Let me know if you need help upgrading those Overdrive systems.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-non-osi 2/2] Silicon/AMD/Styx: update ArmTrustedFirmware.bin

2018-02-03 Thread Marc Zyngier
On Thu, 1 Feb 2018 16:42:53 +
Ard Biesheuvel  wrote:

> On 1 February 2018 at 16:04, Ard Biesheuvel  wrote:
> > The ARM Trusted Firmware build we have been using up until now was built
> > with optimizations disabled (which means every variable manipulation
> > involves a load, the operation itself and a store), and runs with the
> > MMU disabled, making it needlessly slow.
> >
> > This appears to be due to the fact that
> > a) the page tables are not set up correctly, so not all memory can be
> >accessed from EL3
> > b) the handling of SMC service calls does not take into account that
> >these calls may be made with the MMU off (e.g., by UEFI PEI).
> >
> > These issues have been fixed in the source code, which should hopefully
> > remove any performance bottlenecks that may become more noticeable now
> > that we are going to call into the secure firmware more often to perform
> > Spectre variant 2 mitigations, which have been backported as well.
> >
> > So update the binary image to a RELEASE build that was created with
> > optimizations enabled, and has the above fixes incorporated.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ard Biesheuvel 
> > ---
> >  Silicon/AMD/Styx/ArmTrustedFirmware.bin | Bin 75344 -> 34320 bytes
> >  1 file changed, 0 insertions(+), 0 deletions(-)
> >  
> 
> Note to Marc: this is the exact image I shared with you as
> bl31.bin-release earlier today, so if that works as expected, could
> you report back here please? Thanks.

To confirm, this firmware boots perfectly on Cello, and the new SMCCC
1.1 is now reported by the kernel (with in-flight patches):

[0.00] psci: probing for conduit method from DT.
[0.00] psci: PSCIv1.0 detected in firmware.
[0.00] psci: Using standard PSCI v0.2 function IDs
[0.00] psci: MIGRATE_INFO_TYPE not supported.
[0.00] psci: SMC Calling Convention v1.1

as well as ARM_SMCCC_ARCH_WORKAROUND_1, allowing for efficient
mitigation of Spectre v2. I guess we have quite a few Seattle/Overdrive
and OD1000 that now need this to be deployed.

Thanks a lot Ard!

M.
-- 
Without deviation from the norm, progress is not possible.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-non-osi 2/2] Silicon/AMD/Styx: update ArmTrustedFirmware.bin

2018-02-01 Thread Marc Zyngier
On 01/02/18 16:42, Ard Biesheuvel wrote:
> On 1 February 2018 at 16:04, Ard Biesheuvel  wrote:
>> The ARM Trusted Firmware build we have been using up until now was built
>> with optimizations disabled (which means every variable manipulation
>> involves a load, the operation itself and a store), and runs with the
>> MMU disabled, making it needlessly slow.
>>
>> This appears to be due to the fact that
>> a) the page tables are not set up correctly, so not all memory can be
>>accessed from EL3
>> b) the handling of SMC service calls does not take into account that
>>these calls may be made with the MMU off (e.g., by UEFI PEI).
>>
>> These issues have been fixed in the source code, which should hopefully
>> remove any performance bottlenecks that may become more noticeable now
>> that we are going to call into the secure firmware more often to perform
>> Spectre variant 2 mitigations, which have been backported as well.
>>
>> So update the binary image to a RELEASE build that was created with
>> optimizations enabled, and has the above fixes incorporated.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Ard Biesheuvel 
>> ---
>>  Silicon/AMD/Styx/ArmTrustedFirmware.bin | Bin 75344 -> 34320 bytes
>>  1 file changed, 0 insertions(+), 0 deletions(-)
>>
> 
> Note to Marc: this is the exact image I shared with you as
> bl31.bin-release earlier today, so if that works as expected, could
> you report back here please? Thanks.

Absolutely. I'll give it a shot at the weekend (or earlier if I can).

Thanks,

M.
-- 
Jazz is not dead. It just smells funny...
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH edk2-non-osi 2/2] Silicon/AMD/Styx: update ArmTrustedFirmware.bin

2018-02-01 Thread Ard Biesheuvel
On 1 February 2018 at 16:04, Ard Biesheuvel  wrote:
> The ARM Trusted Firmware build we have been using up until now was built
> with optimizations disabled (which means every variable manipulation
> involves a load, the operation itself and a store), and runs with the
> MMU disabled, making it needlessly slow.
>
> This appears to be due to the fact that
> a) the page tables are not set up correctly, so not all memory can be
>accessed from EL3
> b) the handling of SMC service calls does not take into account that
>these calls may be made with the MMU off (e.g., by UEFI PEI).
>
> These issues have been fixed in the source code, which should hopefully
> remove any performance bottlenecks that may become more noticeable now
> that we are going to call into the secure firmware more often to perform
> Spectre variant 2 mitigations, which have been backported as well.
>
> So update the binary image to a RELEASE build that was created with
> optimizations enabled, and has the above fixes incorporated.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel 
> ---
>  Silicon/AMD/Styx/ArmTrustedFirmware.bin | Bin 75344 -> 34320 bytes
>  1 file changed, 0 insertions(+), 0 deletions(-)
>

Note to Marc: this is the exact image I shared with you as
bl31.bin-release earlier today, so if that works as expected, could
you report back here please? Thanks.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-non-osi 2/2] Silicon/AMD/Styx: update ArmTrustedFirmware.bin

2018-02-01 Thread Ard Biesheuvel
The ARM Trusted Firmware build we have been using up until now was built
with optimizations disabled (which means every variable manipulation
involves a load, the operation itself and a store), and runs with the
MMU disabled, making it needlessly slow.

This appears to be due to the fact that
a) the page tables are not set up correctly, so not all memory can be
   accessed from EL3
b) the handling of SMC service calls does not take into account that
   these calls may be made with the MMU off (e.g., by UEFI PEI).

These issues have been fixed in the source code, which should hopefully
remove any performance bottlenecks that may become more noticeable now
that we are going to call into the secure firmware more often to perform
Spectre variant 2 mitigations, which have been backported as well.

So update the binary image to a RELEASE build that was created with
optimizations enabled, and has the above fixes incorporated.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel 
---
 Silicon/AMD/Styx/ArmTrustedFirmware.bin | Bin 75344 -> 34320 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/Silicon/AMD/Styx/ArmTrustedFirmware.bin 
b/Silicon/AMD/Styx/ArmTrustedFir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