Re: [PATCH v2 04/13] ARM: lds: Add SoC specific sections to go before .text_head_prologue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On June 1, 2023 8:34:21 AM GMT+02:00, Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> wrote:
> On 25.05.23 01:43, Jules Maselbas wrote:
> > On sunxi platforms the boot rom (BROM) looks for a specific header which
> > will also be loaded in memory, causing pbl, or barebox, image not loaded
> > at the expected BASE addresse. This also cause an issue with relocatable
> > pbl: instruction used for relocation expect the image to be aligned on a
> > 4K page boundary.
> > 
> > The proposed solution here is to allow to soc specific section to be put
> > in the very begging of the .text section, before anything else.
> > 
> > Signed-off-by: Jules Maselbas <jmaselbas@xxxxxxxx>
> > ---
> > rfc->v2:
> >  - fix typo in commit title
> >  - replace the use of macro with SORT_BY_NAME(.text_head_soc_header*)
> > 
> >  arch/arm/lib/pbl.lds.S | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
> > index 114ec7bc81..059909806e 100644
> > --- a/arch/arm/lib/pbl.lds.S
> > +++ b/arch/arm/lib/pbl.lds.S
> > @@ -27,6 +27,7 @@ SECTIONS
> >  	.text      :
> >  	{
> >  		_stext = .;
> > +		*(SORT_BY_NAME(.text_head_soc_header*))
> 
> You shouldn't need SORT_BY_NAME here, because they should be just one.
sadly there isnt one but two:
 - egon header
 - switch to aarch64 header

moreover the egon header is only needed once ... well actually egon header cannot be executed in aarch64 so it should never came after it (hence only once)
This makes two configurations:
 - eGON header followed by switch to aarch64 (xload conf)
 - only te switch to aarch64 (boot from USB/fel)

maybe this wont be an issue if there is only one image (not xload).

> 
> >  		*(.text_head_prologue*)
> >  		*(.text_head_entry*)
> >  		__bare_init_start = .;
> 





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux