[PATCH v2] efi_loader: Don't limit the StMM buffer size explicitly
Ilias Apalodimas
ilias.apalodimas at linaro.org
Sat Dec 25 20:39:23 CET 2021
On Sat, Dec 25, 2021 at 05:13:23PM +0100, Heinrich Schuchardt wrote:
> On 12/25/21 16:04, Ilias Apalodimas wrote:
> >
> >
> > On Sat, 25 Dec 2021, 16:28 Heinrich Schuchardt, <xypron.glpk at gmx.de
> > <mailto:xypron.glpk at gmx.de>> wrote:
> >
> >
> >
> > Am 25. Dezember 2021 12:16:29 MEZ schrieb Ilias Apalodimas
> > <ilias.apalodimas at linaro.org <mailto:ilias.apalodimas at linaro.org>>:
> > >> >
> > >[...]
> > >> > rc = tee_invoke_func(conn.tee, &arg, 2, param);
> > >> > tee_shm_free(shm);
> > >> > + /*
> > >> > + * Although the max payload is configurable on StMM, we
> > only share
> > >> > + * four pages from OP-TEE for the non-secure buffer used to
> > communicate
> > >> > + * with StMM. OP-TEE will reject anything bigger than that
> > and will
> > >> > + * return. So le'ts at least warn users
> > >> > + */
>
> The comment mentioning four pages does not make too much sense to me as
> both OP-TEE as well as U-Boot can be configured to other sizes.
>
The pages that op-tee uses are not configurable. What is configurable is
the number of pages you can request op-tee to map from the non-secure
world for u-boot sharing. However the four page restriction I refer to
is an internal op-tee one and refers to the non-secure world buffer it
shares with StandAloneMM, not u-boot [1]
[...]
[1] https://github.com/OP-TEE/optee_os/blob/master/core/arch/arm/kernel/stmm_sp.c#L73
Cheers
/Ilias
More information about the U-Boot
mailing list