[PATCH 1/2] lib: optee: remove the duplicate CONFIG_OPTEE

Alex G. mr.nuke.me at gmail.com
Tue Sep 7 20:46:41 CEST 2021



On 9/6/21 5:39 PM, Alex G. wrote:
> 
> 
> On 9/6/21 11:53 AM, Patrick DELAUNAY wrote:
>>>
>>>> In fact, the SPL boot path for OP-TEE doesn't use this function. That's
>>>> intentional.
>>>>
>>>> Here's what I suggest:
>>>>     - Remove OPTEE_TZDRAM_BASE and _SIZE
>>> There is some legacy here, board/warp7and board/technexion/pico-imx7d.
>>
>>
>> it is not possible, it is used for U-Boot proper on other platforms
>>
>> board/warp7/warp7.c:38:        gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE;
>> board/warp7/warp7.c:122:    optee_start = optee_end - 
>> CONFIG_OPTEE_TZDRAM_SIZE;
>> board/technexion/pico-imx7d/pico-imx7d.c:56: gd->ram_size -= 
>> CONFIG_OPTEE_TZDRAM_SIZE;
>> include/configs/mx7_common.h:52:#if (CONFIG_OPTEE_TZDRAM_SIZE != 0)
> 
> I have an idea how to work around that.

This is what I had in mind [1]. With this, optee_verify_bootm_image() is 
just three or four checks.

I propose that code which would have been under CONFIG_OPTEE_IMAGE, is 
instead moved under CONFIG_BOOTM_OPTEE. Thus there's no need for 
CONFIG_OPTEE_IMAGE in the first place, and all the other changes make sense.

Alex


[1] https://lists.denx.de/pipermail/u-boot/2021-September/459981.html


More information about the U-Boot mailing list