[PATCH 1/7] memory: request RO data section as separate region

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Jun 13 02:15:57 PDT 2025


On 6/13/25 09:58, Sascha Hauer wrote:
> Map the RO data section as separate region so that it becomes visible in
> the iomem output.
> 
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>

> ---
>  common/memory.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/common/memory.c b/common/memory.c
> index a5b081be2c709f04667a67fbd2110520ab4973e3..708bfd26a0fc3d295d09632fb92e89f474bb7422 100644
> --- a/common/memory.c
> +++ b/common/memory.c
> @@ -103,8 +103,12 @@ static int mem_malloc_resource(void)
>  			malloc_end - malloc_start + 1);
>  	request_barebox_region("barebox code",
>  			(unsigned long)&_stext,
> -			(unsigned long)&_etext -
> +			(unsigned long)&__start_rodata -
>  			(unsigned long)&_stext);
> +	request_barebox_region("barebox RO data",
> +			(unsigned long)&__start_rodata,
> +			(unsigned long)&__end_rodata -
> +			(unsigned long)&__start_rodata);
>  	request_barebox_region("barebox data",
>  			(unsigned long)&_sdata,
>  			(unsigned long)&_edata -
> 

-- 
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 |




More information about the barebox mailing list