u-boot/lib/optee/Kconfig
Alexandru Gagniuc f6953047cb lib: optee: Remove CONFIG_OPTEE_LOAD_ADDR
This value is not used by u-boot, and it should not. The load address
of an OPTEE image is defined by said image. Either a uImage or a FIT
will have a defined load address and entry point. Those values are the
correct ones, not CONFIG_OPTEE_LOAD_ADDR.

Commit f25006b96e ("optee: Add CONFIG_OPTEE_LOAD_ADDR") justifies
this config by requiring its presence in u-boot's .config for other
images as part of a larger build, claiming it is "the best way".

This argument is not persuasive. U-boot's configuration is driven by
platform requirements, not the other way around. It seems more likely
that the argument is conflating tooling issues with Kconfig. Yocto and
buildroot have excellent mechanisms for defining values across the
board (pun intended). u-boot's Kconfig is the wrong place to do it.

Furthermore, it is not "best" for u-boot because it hardcodes a value
which is then not used. In fact the load address that u-boot uses is
the one derived from the OPTEE image.

Confused yet? I sure was. To prevent future confusion, remove
CONFIG_OPTEE_LOAD_ADDR.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-05 08:47:13 -04:00

29 lines
835 B
Text

config OPTEE_LIB
bool "Support OPTEE library"
default y if OPTEE || OPTEE_IMAGE
help
Selecting this option will enable the shared OPTEE library code.
config OPTEE_IMAGE
bool "Support OPTEE images"
help
Selecting this option to boot OPTEE images.
This option enable the OPTEE specific checks done before booting
an OPTEE image created with mkimage
config OPTEE_TZDRAM_SIZE
hex "Amount of Trust-Zone RAM for the OPTEE image"
default 0x0000000
depends on OPTEE_LIB
help
The size of pre-allocated Trust Zone DRAM to allocate for the OPTEE
runtime.
config BOOTM_OPTEE
bool "Support OPTEE bootm command"
select BOOTM_LINUX
select OPTEE_IMAGE
help
Select this command to enable chain-loading of a Linux kernel
via an OPTEE firmware.
The bootflow is BootROM -> u-boot -> OPTEE -> Linux in this case.