[PATCH 4/4] start: reserve OP-TEE memory for PBL-OPTEE

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Nov 2 05:23:55 EST 2020



On 11/2/20 10:30 AM, Rouven Czerwinski wrote:
> Instead of only adding the reserved memory entry in case of an OP-TEE
> start before the kernel, also do this in case we may have started OP-TEE
> during the PBL.
> 
> Signed-off-by: Rouven Czerwinski <r.czerwinski at pengutronix.de>
> ---
>  arch/arm/cpu/start.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
> index 5f43f9e546..0abe92036b 100644
> --- a/arch/arm/cpu/start.c
> +++ b/arch/arm/cpu/start.c
> @@ -238,7 +238,7 @@ __noreturn __no_sanitize_address void barebox_non_pbl_start(unsigned long membas
>  
>  	mem_malloc_init((void *)malloc_start, (void *)malloc_end - 1);
>  
> -	if (IS_ENABLED(CONFIG_BOOTM_OPTEE))
> +	if (OPTEE_SIZE > 0)
>  		of_add_reserve_entry(endmem - OPTEE_SIZE, endmem - 1,
>  				OF_RESERVE_ENTRY_FLAG_UNCACHED);
>  
> 

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

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