Re: [RFC PATCH 03/11] ARM: dls: Add ENTRY_HEADER macro to add .text section

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

 



On 11.05.23 01:37, 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 specify custom sections to put
> in the very begging of the .text section.
> ---
>  arch/arm/lib/pbl.lds.S            | 1 +
>  include/asm-generic/barebox.lds.h | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
> index 114ec7bc81..6fc97c6c34 100644
> --- a/arch/arm/lib/pbl.lds.S
> +++ b/arch/arm/lib/pbl.lds.S
> @@ -27,6 +27,7 @@ SECTIONS
>  	.text      :
>  	{
>  		_stext = .;
> +		ENTRY_HEADER

Let's just have *(.text_head_soc_header*) here unconditionally. The use of ifdefs
will clash with multiarch.

>  		*(.text_head_prologue*)
>  		*(.text_head_entry*)
>  		__bare_init_start = .;
> diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h
> index d3736ebaed..9915ead8a7 100644
> --- a/include/asm-generic/barebox.lds.h
> +++ b/include/asm-generic/barebox.lds.h
> @@ -12,6 +12,10 @@
>  #define PRE_IMAGE
>  #endif
>  
> +#ifndef ENTRY_HEADER
> +#define ENTRY_HEADER
> +#endif
> +
>  #define BAREBOX_INITCALLS			\
>  	STRUCT_ALIGN();				\
>  	__barebox_initcalls_start = .;		\

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |





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

  Powered by Linux