public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
@ 2023-09-18 11:03 Marcin Juszkiewicz
  2023-09-18 11:35 ` Leif Lindholm
  2023-09-20 19:22 ` Leif Lindholm
  0 siblings, 2 replies; 9+ messages in thread
From: Marcin Juszkiewicz @ 2023-09-18 11:03 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Ard Biesheuvel, Graeme Gregory, Marcin Juszkiewicz

There are some changes in progress which make BL1 bigger than 0x8000
which EDK2 uses.

TF-A defines BL1 size to be 0x12000 one. So let follow it.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 Platform/Qemu/SbsaQemu/SbsaQemu.fdf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
index bc432cac6fc8..6bc55d701120 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
@@ -43,11 +43,11 @@ [FD.SBSA_FLASH0]
 ################################################################################
 ## Place for Trusted Firmware
 # flash0 is secure so we put here the BL1
-0x00000000|0x00008000
+0x00000000|0x00012000
 FILE = Platform/Qemu/Sbsa/bl1.bin
 
 # and FIP (BL2 + BL31)
-0x00008000|0x00020000
+0x00012000|0x00020000
 FILE = Platform/Qemu/Sbsa/fip.bin
 
 ################################################################################
-- 
2.41.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108771): https://edk2.groups.io/g/devel/message/108771
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
  2023-09-18 11:03 [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes Marcin Juszkiewicz
@ 2023-09-18 11:35 ` Leif Lindholm
  2023-09-18 12:33   ` Ard Biesheuvel
  2023-09-19 12:03   ` Marcin Juszkiewicz
  2023-09-20 19:22 ` Leif Lindholm
  1 sibling, 2 replies; 9+ messages in thread
From: Leif Lindholm @ 2023-09-18 11:35 UTC (permalink / raw)
  To: Marcin Juszkiewicz; +Cc: devel, Ard Biesheuvel, Graeme Gregory

On Mon, Sep 18, 2023 at 13:03:12 +0200, Marcin Juszkiewicz wrote:
> There are some changes in progress which make BL1 bigger than 0x8000
> which EDK2 uses.
> 
> TF-A defines BL1 size to be 0x12000 one. So let follow it.
> 
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

This fixes a TF-A bug that you uncovered this morning, and I think
that's worth pointing out in the commit message.

However,
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>

*But* this is a breaking change SoI want to hold off on merging
this until the TF-A bugfix has been merged, so we can update the
edk2-non-osi binaries at the same time, and minimise the amount of
pain.

Note for the interested:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23417
TL;DR: the fip base and bl1 size don't line up. The bl1 size was
already set to sufficient size, but after RME support in TF-A, bl1
size grows beyond start of fip.

/
    Leif

> ---
>  Platform/Qemu/SbsaQemu/SbsaQemu.fdf | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> index bc432cac6fc8..6bc55d701120 100644
> --- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> @@ -43,11 +43,11 @@ [FD.SBSA_FLASH0]
>  ################################################################################
>  ## Place for Trusted Firmware
>  # flash0 is secure so we put here the BL1
> -0x00000000|0x00008000
> +0x00000000|0x00012000
>  FILE = Platform/Qemu/Sbsa/bl1.bin
>  
>  # and FIP (BL2 + BL31)
> -0x00008000|0x00020000
> +0x00012000|0x00020000
>  FILE = Platform/Qemu/Sbsa/fip.bin
>  
>  ################################################################################
> -- 
> 2.41.0
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108772): https://edk2.groups.io/g/devel/message/108772
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
  2023-09-18 11:35 ` Leif Lindholm
@ 2023-09-18 12:33   ` Ard Biesheuvel
  2023-09-18 13:06     ` Marcin Juszkiewicz
  2023-09-19 12:03   ` Marcin Juszkiewicz
  1 sibling, 1 reply; 9+ messages in thread
From: Ard Biesheuvel @ 2023-09-18 12:33 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: Marcin Juszkiewicz, devel, Ard Biesheuvel, Graeme Gregory

On Mon, 18 Sept 2023 at 13:35, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> On Mon, Sep 18, 2023 at 13:03:12 +0200, Marcin Juszkiewicz wrote:
> > There are some changes in progress which make BL1 bigger than 0x8000
> > which EDK2 uses.
> >
> > TF-A defines BL1 size to be 0x12000 one. So let follow it.
> >
> > Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
>
> This fixes a TF-A bug that you uncovered this morning, and I think
> that's worth pointing out in the commit message.
>
> However,
> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
>
> *But* this is a breaking change SoI want to hold off on merging
> this until the TF-A bugfix has been merged, so we can update the
> edk2-non-osi binaries at the same time, and minimise the amount of
> pain.
>
> Note for the interested:
> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23417
> TL;DR: the fip base and bl1 size don't line up. The bl1 size was
> already set to sufficient size, but after RME support in TF-A, bl1
> size grows beyond start of fip.
>

Are you saying that Platform/Qemu/Sbsa/bl1.bin was more than 0x8000
bytes in size, and the EDK2 build tools happily truncated it?


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108773): https://edk2.groups.io/g/devel/message/108773
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
  2023-09-18 12:33   ` Ard Biesheuvel
@ 2023-09-18 13:06     ` Marcin Juszkiewicz
  2023-09-19 13:13       ` Ard Biesheuvel
  0 siblings, 1 reply; 9+ messages in thread
From: Marcin Juszkiewicz @ 2023-09-18 13:06 UTC (permalink / raw)
  To: Ard Biesheuvel, Leif Lindholm; +Cc: devel, Ard Biesheuvel, Graeme Gregory

W dniu 18.09.2023 o 14:33, Ard Biesheuvel pisze:
> On Mon, 18 Sept 2023 at 13:35, Leif Lindholm <quic_llindhol@quicinc.com> wrote:

>> Note for the interested:
>> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23417
>> TL;DR: the fip base and bl1 size don't line up. The bl1 size was
>> already set to sufficient size, but after RME support in TF-A, bl1
>> size grows beyond start of fip.

> Are you saying that Platform/Qemu/Sbsa/bl1.bin was more than 0x8000
> bytes in size, and the EDK2 build tools happily truncated it?

The size was more than 0x8000 bytes in size and EDK2 build tools refused 
to finish build:

error F003: Size of File 
(/home/marcin/devel/linaro/sbsa-qemu/code/edk2-non-osi/Platform/Qemu/Sbsa/bl1.bin) 
is larger than Region Size 0x8000 specified.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108776): https://edk2.groups.io/g/devel/message/108776
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
  2023-09-18 11:35 ` Leif Lindholm
  2023-09-18 12:33   ` Ard Biesheuvel
@ 2023-09-19 12:03   ` Marcin Juszkiewicz
  2023-09-19 14:17     ` Leif Lindholm
  1 sibling, 1 reply; 9+ messages in thread
From: Marcin Juszkiewicz @ 2023-09-19 12:03 UTC (permalink / raw)
  To: devel, quic_llindhol; +Cc: Ard Biesheuvel, Graeme Gregory

W dniu 18.09.2023 o 13:35, Leif Lindholm pisze:
> On Mon, Sep 18, 2023 at 13:03:12 +0200, Marcin Juszkiewicz wrote:
>> There are some changes in progress which make BL1 bigger than 0x8000
>> which EDK2 uses.
>>
>> TF-A defines BL1 size to be 0x12000 one. So let follow it.
>>
>> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> 
> This fixes a TF-A bug that you uncovered this morning, and I think
> that's worth pointing out in the commit message.
> 
> However,
> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
> 
> *But* this is a breaking change SoI want to hold off on merging
> this until the TF-A bugfix has been merged, so we can update the
> edk2-non-osi binaries at the same time, and minimise the amount of
> pain.
> 
> Note for the interested:
> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23417
> TL;DR: the fip base and bl1 size don't line up. The bl1 size was
> already set to sufficient size, but after RME support in TF-A, bl1
> size grows beyond start of fip.

TF-A part is now merged.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108827): https://edk2.groups.io/g/devel/message/108827
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
  2023-09-18 13:06     ` Marcin Juszkiewicz
@ 2023-09-19 13:13       ` Ard Biesheuvel
  2023-09-20 19:24         ` Leif Lindholm
  0 siblings, 1 reply; 9+ messages in thread
From: Ard Biesheuvel @ 2023-09-19 13:13 UTC (permalink / raw)
  To: Marcin Juszkiewicz; +Cc: Leif Lindholm, devel, Ard Biesheuvel, Graeme Gregory

On Mon, 18 Sept 2023 at 15:06, Marcin Juszkiewicz
<marcin.juszkiewicz@linaro.org> wrote:
>
> W dniu 18.09.2023 o 14:33, Ard Biesheuvel pisze:
> > On Mon, 18 Sept 2023 at 13:35, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> >> Note for the interested:
> >> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23417
> >> TL;DR: the fip base and bl1 size don't line up. The bl1 size was
> >> already set to sufficient size, but after RME support in TF-A, bl1
> >> size grows beyond start of fip.
>
> > Are you saying that Platform/Qemu/Sbsa/bl1.bin was more than 0x8000
> > bytes in size, and the EDK2 build tools happily truncated it?
>
> The size was more than 0x8000 bytes in size and EDK2 build tools refused
> to finish build:
>
> error F003: Size of File
> (/home/marcin/devel/linaro/sbsa-qemu/code/edk2-non-osi/Platform/Qemu/Sbsa/bl1.bin)
> is larger than Region Size 0x8000 specified.

Ah ok, good to know.

Acked-by: Ard Biesheuvel <ardb@kernel.org>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108829): https://edk2.groups.io/g/devel/message/108829
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
  2023-09-19 12:03   ` Marcin Juszkiewicz
@ 2023-09-19 14:17     ` Leif Lindholm
  0 siblings, 0 replies; 9+ messages in thread
From: Leif Lindholm @ 2023-09-19 14:17 UTC (permalink / raw)
  To: Marcin Juszkiewicz, devel; +Cc: Ard Biesheuvel, Graeme Gregory

On 2023-09-19 13:03, Marcin Juszkiewicz wrote:
> W dniu 18.09.2023 o 13:35, Leif Lindholm pisze:
>> On Mon, Sep 18, 2023 at 13:03:12 +0200, Marcin Juszkiewicz wrote:
>>> There are some changes in progress which make BL1 bigger than 0x8000
>>> which EDK2 uses.
>>>
>>> TF-A defines BL1 size to be 0x12000 one. So let follow it.
>>>
>>> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
>>
>> This fixes a TF-A bug that you uncovered this morning, and I think
>> that's worth pointing out in the commit message.
>>
>> However,
>> Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
>>
>> *But* this is a breaking change SoI want to hold off on merging
>> this until the TF-A bugfix has been merged, so we can update the
>> edk2-non-osi binaries at the same time, and minimise the amount of
>> pain.
>>
>> Note for the interested:
>> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23417
>> TL;DR: the fip base and bl1 size don't line up. The bl1 size was
>> already set to sufficient size, but after RME support in TF-A, bl1
>> size grows beyond start of fip.
> 
> TF-A part is now merged.

Excellent!

Could you roll up a new set of binaries for edk2-non-osi?
Then I can merge them at the same time and leave only a minor gap of 
brokenness.

/
     Leif




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108838): https://edk2.groups.io/g/devel/message/108838
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
  2023-09-18 11:03 [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes Marcin Juszkiewicz
  2023-09-18 11:35 ` Leif Lindholm
@ 2023-09-20 19:22 ` Leif Lindholm
  1 sibling, 0 replies; 9+ messages in thread
From: Leif Lindholm @ 2023-09-20 19:22 UTC (permalink / raw)
  To: Marcin Juszkiewicz; +Cc: devel, Ard Biesheuvel, Graeme Gregory

On Mon, Sep 18, 2023 at 13:03:12 +0200, Marcin Juszkiewicz wrote:
> There are some changes in progress which make BL1 bigger than 0x8000
> which EDK2 uses.
> 
> TF-A defines BL1 size to be 0x12000 one. So let follow it.
> 
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

Tweaked the commit message a bit, and pushed as
88ea1c2b62d4

Thanks!

/
    Leif

> ---
>  Platform/Qemu/SbsaQemu/SbsaQemu.fdf | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> index bc432cac6fc8..6bc55d701120 100644
> --- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
> @@ -43,11 +43,11 @@ [FD.SBSA_FLASH0]
>  ################################################################################
>  ## Place for Trusted Firmware
>  # flash0 is secure so we put here the BL1
> -0x00000000|0x00008000
> +0x00000000|0x00012000
>  FILE = Platform/Qemu/Sbsa/bl1.bin
>  
>  # and FIP (BL2 + BL31)
> -0x00008000|0x00020000
> +0x00012000|0x00020000
>  FILE = Platform/Qemu/Sbsa/fip.bin
>  
>  ################################################################################
> -- 
> 2.41.0
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108925): https://edk2.groups.io/g/devel/message/108925
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes
  2023-09-19 13:13       ` Ard Biesheuvel
@ 2023-09-20 19:24         ` Leif Lindholm
  0 siblings, 0 replies; 9+ messages in thread
From: Leif Lindholm @ 2023-09-20 19:24 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: Marcin Juszkiewicz, devel, Ard Biesheuvel, Graeme Gregory

On Tue, Sep 19, 2023 at 15:13:46 +0200, Ard Biesheuvel wrote:
> On Mon, 18 Sept 2023 at 15:06, Marcin Juszkiewicz
> <marcin.juszkiewicz@linaro.org> wrote:
> >
> > W dniu 18.09.2023 o 14:33, Ard Biesheuvel pisze:
> > > On Mon, 18 Sept 2023 at 13:35, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
> >
> > >> Note for the interested:
> > >> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/23417
> > >> TL;DR: the fip base and bl1 size don't line up. The bl1 size was
> > >> already set to sufficient size, but after RME support in TF-A, bl1
> > >> size grows beyond start of fip.
> >
> > > Are you saying that Platform/Qemu/Sbsa/bl1.bin was more than 0x8000
> > > bytes in size, and the EDK2 build tools happily truncated it?
> >
> > The size was more than 0x8000 bytes in size and EDK2 build tools refused
> > to finish build:
> >
> > error F003: Size of File
> > (/home/marcin/devel/linaro/sbsa-qemu/code/edk2-non-osi/Platform/Qemu/Sbsa/bl1.bin)
> > is larger than Region Size 0x8000 specified.
> 
> Ah ok, good to know.
> 
> Acked-by: Ard Biesheuvel <ardb@kernel.org>

Apologies, in all the biting my tongue over trying to push
edk2-platforms and edk2-non-osi part at the same time, I failed to add
this ack.

/
    Leif


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108926): https://edk2.groups.io/g/devel/message/108926
Mute This Topic: https://groups.io/mt/101430708/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-20 19:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-18 11:03 [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: enlarge BL1/FIP sizes Marcin Juszkiewicz
2023-09-18 11:35 ` Leif Lindholm
2023-09-18 12:33   ` Ard Biesheuvel
2023-09-18 13:06     ` Marcin Juszkiewicz
2023-09-19 13:13       ` Ard Biesheuvel
2023-09-20 19:24         ` Leif Lindholm
2023-09-19 12:03   ` Marcin Juszkiewicz
2023-09-19 14:17     ` Leif Lindholm
2023-09-20 19:22 ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox