diff options
author | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2021-09-07 12:07:06 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-05 08:46:23 -0400 |
commit | 26fc66709c0de7732a12fd59dbce5a83eb454bae (patch) | |
tree | 1e1e7490038e9712139e68a4ba7c91bbe3c427d4 /api | |
parent | 4f53ac2adbc0f4d3bfebee1b414870e228469989 (diff) |
lib: optee: Avoid CONFIG_TZDRAM_* in optee_verify_bootm_image()
The configs TZDRAM_BASE and TZDRAM_SIZE are expected to describe the
memory allocated to the OPTEE region. according to according to commit
c5a6e8bd00cc ("optee: Add optee_verify_bootm_image()"). The TZDRAM is
with some limitations, described by "/reserved-memory" nodes in the
devicetree.
Consequently TZDRAM_BASE and TZDRAM_SIZE can point to imaginary
regions which have nothing to do with actual DRAM. They are not used
to configure the hardware or set up the Trust Zone Controller (TZC)
for OP-TEE -- the devicetree values are used instead.
When a valid OP-TEE image does not fall within the region described by
these configs, u-boot will refuse to load it. In fact, it mostly
serves to cause "bootm" to reject perfectly good OP-TEE images.
Ironically, someone has to correctly configure the devicetree for
TZDRAM, then go back and enter the same information in Kconfig for
"bootm". To remedy this, do not use TZDRAM_BASE and TZDRAM_SIZE in the
verification of OPTEE images.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'api')
0 files changed, 0 insertions, 0 deletions