[edk2-devel] [edk2-platforms PATCH 1/4] BeagleBoardPkg: Remove the configuration and image headers from flash

Rebecca Cran posted 4 patches 1 month, 1 week ago

[edk2-devel] [edk2-platforms PATCH 1/4] BeagleBoardPkg: Remove the configuration and image headers from flash

Posted by Rebecca Cran 1 month, 1 week ago
Remove the configuration and image headers from the flash image.
This was likely intended for the UEFI firmware to be loaded by the ROM
code, but the BeagleBoard only has 64KB SRAM and so EDK2 needs to be
executed as a second stage loader.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
index a2cfeb3bc27b..dbae015ff382 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
@@ -23,7 +23,7 @@
 
 
 [FD.BeagleBoard_EFI]
-BaseAddress   = 0x80007DF8|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
+BaseAddress   = 0x80008000|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
 Size          = 0x000B0000|gArmTokenSpaceGuid.PcdFdSize         #The size in bytes of the FLASH Device
 ErasePolarity = 1
 BlockSize     = 0x1
@@ -44,16 +44,7 @@ NumBlocks     = 0xB0000
 # RegionType <FV, DATA, or FILE>
 #
 ################################################################################
-0x00000000|0x00000200
-FILE = Platform/BeagleBoard/BeagleBoardPkg/ConfigurationHeader.bin
-
-0x00000200|0x00000008
-DATA = {
-  0xF8, 0xFD, 0x0A, 0x00,   # image size:   0xB0000 - 0x208 == 0xAFDF8
-  0x00, 0x80, 0x00, 0x80    # entry point:  0x80008000
-}
-
-0x00000208|0x000AFDF8
+0x00000000|0x000B0000
 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
 FV = FVMAIN_COMPACT
 
-- 
2.31.1




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80530): https://edk2.groups.io/g/devel/message/80530
Mute This Topic: https://groups.io/mt/85526129/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-platforms PATCH 1/4] BeagleBoardPkg: Remove the configuration and image headers from flash

Posted by Leif Lindholm 1 month, 1 week ago
Ard, I think you were the one who converted the old crazy header stuff
to what we have now. Do you remember how this all fits together?

For the *other* 3 patches, but not this one:
Reviewed-by: Leif Lindholm <leif@nuviainc.com>


On Fri, Sep 10, 2021 at 20:57:11 -0600, Rebecca Cran wrote:
> Remove the configuration and image headers from the flash image.
> This was likely intended for the UEFI firmware to be loaded by the ROM
> code, but the BeagleBoard only has 64KB SRAM and so EDK2 needs to be
> executed as a second stage loader.
> 
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
>  Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> index a2cfeb3bc27b..dbae015ff382 100644
> --- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> +++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> @@ -23,7 +23,7 @@
>  
>  
>  [FD.BeagleBoard_EFI]
> -BaseAddress   = 0x80007DF8|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
> +BaseAddress   = 0x80008000|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
>  Size          = 0x000B0000|gArmTokenSpaceGuid.PcdFdSize         #The size in bytes of the FLASH Device
>  ErasePolarity = 1
>  BlockSize     = 0x1
> @@ -44,16 +44,7 @@ NumBlocks     = 0xB0000
>  # RegionType <FV, DATA, or FILE>
>  #
>  ################################################################################
> -0x00000000|0x00000200
> -FILE = Platform/BeagleBoard/BeagleBoardPkg/ConfigurationHeader.bin
> -
> -0x00000200|0x00000008
> -DATA = {
> -  0xF8, 0xFD, 0x0A, 0x00,   # image size:   0xB0000 - 0x208 == 0xAFDF8
> -  0x00, 0x80, 0x00, 0x80    # entry point:  0x80008000
> -}
> -
> -0x00000208|0x000AFDF8
> +0x00000000|0x000B0000
>  gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
>  FV = FVMAIN_COMPACT
>  
> -- 
> 2.31.1
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80662): https://edk2.groups.io/g/devel/message/80662
Mute This Topic: https://groups.io/mt/85526129/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-platforms PATCH 1/4] BeagleBoardPkg: Remove the configuration and image headers from flash

Posted by Ard Biesheuvel 1 month ago
On Tue, 14 Sept 2021 at 16:39, Leif Lindholm <leif@nuviainc.com> wrote:
>
> Ard, I think you were the one who converted the old crazy header stuff
> to what we have now. Do you remember how this all fits together?
>

I had to page it in (edk2:a1123292a80608a69df89b6dd264c4656b618aec)
but given that I never used a BeagleBoard in my life, I'm sure this
was a theoretical exercise mostly, and I just compared the resulting
images before and after.

So this looks fine to me - if don't have a use for the configuration
header we should just remove it.

> For the *other* 3 patches, but not this one:
> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
>
>
> On Fri, Sep 10, 2021 at 20:57:11 -0600, Rebecca Cran wrote:
> > Remove the configuration and image headers from the flash image.
> > This was likely intended for the UEFI firmware to be loaded by the ROM
> > code, but the BeagleBoard only has 64KB SRAM and so EDK2 needs to be
> > executed as a second stage loader.
> >
> > Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> > ---
> >  Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf | 13 ++-----------
> >  1 file changed, 2 insertions(+), 11 deletions(-)
> >
> > diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> > index a2cfeb3bc27b..dbae015ff382 100644
> > --- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> > +++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> > @@ -23,7 +23,7 @@
> >
> >
> >  [FD.BeagleBoard_EFI]
> > -BaseAddress   = 0x80007DF8|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
> > +BaseAddress   = 0x80008000|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
> >  Size          = 0x000B0000|gArmTokenSpaceGuid.PcdFdSize         #The size in bytes of the FLASH Device
> >  ErasePolarity = 1
> >  BlockSize     = 0x1
> > @@ -44,16 +44,7 @@ NumBlocks     = 0xB0000
> >  # RegionType <FV, DATA, or FILE>
> >  #
> >  ################################################################################
> > -0x00000000|0x00000200
> > -FILE = Platform/BeagleBoard/BeagleBoardPkg/ConfigurationHeader.bin
> > -
> > -0x00000200|0x00000008
> > -DATA = {
> > -  0xF8, 0xFD, 0x0A, 0x00,   # image size:   0xB0000 - 0x208 == 0xAFDF8
> > -  0x00, 0x80, 0x00, 0x80    # entry point:  0x80008000
> > -}
> > -
> > -0x00000208|0x000AFDF8
> > +0x00000000|0x000B0000
> >  gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
> >  FV = FVMAIN_COMPACT
> >
> > --
> > 2.31.1
> >
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80954): https://edk2.groups.io/g/devel/message/80954
Mute This Topic: https://groups.io/mt/85526129/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-platforms PATCH 1/4] BeagleBoardPkg: Remove the configuration and image headers from flash

Posted by Ard Biesheuvel 1 month ago
On Wed, 22 Sept 2021 at 13:20, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Tue, 14 Sept 2021 at 16:39, Leif Lindholm <leif@nuviainc.com> wrote:
> >
> > Ard, I think you were the one who converted the old crazy header stuff
> > to what we have now. Do you remember how this all fits together?
> >
>
> I had to page it in (edk2:a1123292a80608a69df89b6dd264c4656b618aec)
> but given that I never used a BeagleBoard in my life, I'm sure this
> was a theoretical exercise mostly, and I just compared the resulting
> images before and after.
>
> So this looks fine to me - if don't have a use for the configuration
> header we should just remove it.
>

... which you can take as a

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

for the series.

> > For the *other* 3 patches, but not this one:
> > Reviewed-by: Leif Lindholm <leif@nuviainc.com>
> >
> >
> > On Fri, Sep 10, 2021 at 20:57:11 -0600, Rebecca Cran wrote:
> > > Remove the configuration and image headers from the flash image.
> > > This was likely intended for the UEFI firmware to be loaded by the ROM
> > > code, but the BeagleBoard only has 64KB SRAM and so EDK2 needs to be
> > > executed as a second stage loader.
> > >
> > > Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> > > ---
> > >  Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf | 13 ++-----------
> > >  1 file changed, 2 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> > > index a2cfeb3bc27b..dbae015ff382 100644
> > > --- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> > > +++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
> > > @@ -23,7 +23,7 @@
> > >
> > >
> > >  [FD.BeagleBoard_EFI]
> > > -BaseAddress   = 0x80007DF8|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
> > > +BaseAddress   = 0x80008000|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
> > >  Size          = 0x000B0000|gArmTokenSpaceGuid.PcdFdSize         #The size in bytes of the FLASH Device
> > >  ErasePolarity = 1
> > >  BlockSize     = 0x1
> > > @@ -44,16 +44,7 @@ NumBlocks     = 0xB0000
> > >  # RegionType <FV, DATA, or FILE>
> > >  #
> > >  ################################################################################
> > > -0x00000000|0x00000200
> > > -FILE = Platform/BeagleBoard/BeagleBoardPkg/ConfigurationHeader.bin
> > > -
> > > -0x00000200|0x00000008
> > > -DATA = {
> > > -  0xF8, 0xFD, 0x0A, 0x00,   # image size:   0xB0000 - 0x208 == 0xAFDF8
> > > -  0x00, 0x80, 0x00, 0x80    # entry point:  0x80008000
> > > -}
> > > -
> > > -0x00000208|0x000AFDF8
> > > +0x00000000|0x000B0000
> > >  gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
> > >  FV = FVMAIN_COMPACT
> > >
> > > --
> > > 2.31.1
> > >
> > >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80955): https://edk2.groups.io/g/devel/message/80955
Mute This Topic: https://groups.io/mt/85526129/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [edk2-platforms PATCH 1/4] BeagleBoardPkg: Remove the configuration and image headers from flash

Posted by Rebecca Cran 1 month ago
Since it's been a week - "ping".


-- 
Rebecca Cran


On 9/14/21 8:39 AM, Leif Lindholm wrote:
> Ard, I think you were the one who converted the old crazy header stuff
> to what we have now. Do you remember how this all fits together?
>
> For the *other* 3 patches, but not this one:
> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
>
>
> On Fri, Sep 10, 2021 at 20:57:11 -0600, Rebecca Cran wrote:
>> Remove the configuration and image headers from the flash image.
>> This was likely intended for the UEFI firmware to be loaded by the ROM
>> code, but the BeagleBoard only has 64KB SRAM and so EDK2 needs to be
>> executed as a second stage loader.
>>
>> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
>> ---
>>   Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf | 13 ++-----------
>>   1 file changed, 2 insertions(+), 11 deletions(-)
>>
>> diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
>> index a2cfeb3bc27b..dbae015ff382 100644
>> --- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
>> +++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.fdf
>> @@ -23,7 +23,7 @@
>>   
>>   
>>   [FD.BeagleBoard_EFI]
>> -BaseAddress   = 0x80007DF8|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
>> +BaseAddress   = 0x80008000|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
>>   Size          = 0x000B0000|gArmTokenSpaceGuid.PcdFdSize         #The size in bytes of the FLASH Device
>>   ErasePolarity = 1
>>   BlockSize     = 0x1
>> @@ -44,16 +44,7 @@ NumBlocks     = 0xB0000
>>   # RegionType <FV, DATA, or FILE>
>>   #
>>   ################################################################################
>> -0x00000000|0x00000200
>> -FILE = Platform/BeagleBoard/BeagleBoardPkg/ConfigurationHeader.bin
>> -
>> -0x00000200|0x00000008
>> -DATA = {
>> -  0xF8, 0xFD, 0x0A, 0x00,   # image size:   0xB0000 - 0x208 == 0xAFDF8
>> -  0x00, 0x80, 0x00, 0x80    # entry point:  0x80008000
>> -}
>> -
>> -0x00000208|0x000AFDF8
>> +0x00000000|0x000B0000
>>   gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
>>   FV = FVMAIN_COMPACT
>>   
>> -- 
>> 2.31.1
>>
>>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80937): https://edk2.groups.io/g/devel/message/80937
Mute This Topic: https://groups.io/mt/85526129/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-