[PATCH 2/3] cmd: add maximum boot option index Kconfig option

Jerome Forissier jerome.forissier at linaro.org
Wed Nov 23 11:57:31 CET 2022


Hi,

On 11/23/22 08:17, Masahisa Kojima wrote:
> eficonfig command reads the all possible UEFI boot options
> from 0x0000 to 0xFFFF to construct the menu. This takes too much
> time in some environment, especially for the platform using
> OP-TEE and RPMB based secure storage.
> For example, on Socionext Developerbox, it takes more than 30 seconds
> to draw the boot option menu.

How are you configuring the RPMB FS driver in OP-TEE [1]?
CFG_RPMB_FS_RD_ENTRIES and CFG_RPMB_FS_CACHE_ENTRIES affect how OP-TEE
reads and caches the File Allocation Table from RPMB, they have an
impact on the performance of file lookup. The default values are quite
conservative in terms of memory, with no caching and a read buffer
capable of holding entries for 8 files only. This can result is poor
performance but was considered a reasonable default considering
memory-constrained platforms.

Since Developerbox has lots of RAM, I suggest experimenting with larger
values. For the initial file enumeration, I think increasing
CFG_RPMB_FS_RD_ENTRIES should be enough to improve the situation quite
a bit. Subsequent enumerations and access to the file contents could be
improved by also increasing CFG_RPMB_FS_CACHE_ENTRIES. I would recommend
setting both to the same "rather large" value (128?). You might need
to increase the TEE core heap size though (CFG_CORE_HEAP_SIZE).

Then it would be nice to have these values defined as platform defaults
upstream rather than in some downstream fork of OP-TEE (I am saying this
because I suppose you already have custom values as part of some Yocto
build or something).

[1] https://github.com/OP-TEE/optee_os/blob/master/mk/config.mk#L170-L201

Thanks,
-- 
Jerome


More information about the U-Boot mailing list