]> git.baikalelectronics.ru Git - uboot.git/commit
efi_loader: Don't limit the StMM buffer size explicitly
authorIlias Apalodimas <apalos@gmail.com>
Fri, 24 Dec 2021 08:08:41 +0000 (10:08 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 31 Dec 2021 05:44:29 +0000 (06:44 +0100)
commitca1ce9da45004a2845cf417dbf13b196bb857ad1
tree3e7ae84ab05db35831364720cbc15c5111f6277e
parent22268915ad164167720f231d54539d1d3924ba00
efi_loader: Don't limit the StMM buffer size explicitly

Currently we allow and explicitly check a single shared page with
StandAloneMM.  This is dictated by OP-TEE which runs the application.
However there's no way for us dynamically discover the number of pages we
are allowed to use.  Since writing big EFI signature list variable
requires more than a page, OP-TEE has bumped the number of shared pages to
four.

Let's remove our explicit check and allow the request to reach OP-TEE even
if it's bigger than what it supports.  There's no need to sanitize the
number of pages internally.  OP-TEE will fail if we try to write more
than it's allowed. The error will just trigger later on,  during the
StMM access.

While at it add an error message to help users figure out what failed.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
Signed-off-by: Ilias Apalodimas <apalos@gmail.com>
include/tee.h
lib/efi_loader/efi_variable_tee.c