[0/3] Improve U-Boot's TPM handling in the non-EFI case

Simon Glass sjg at chromium.org
Mon May 4 14:27:28 CEST 2026


Hi Ludwig,

On 2026-04-29T11:41:40, Ludwig Nussel <ludwig.nussel at siemens.com> wrote:

> U-Boot might be the first component to start the event log, eg when
> used in qemu. So allocate and attach the TPM event log to the TPM
> device if not initialized yet.

Thanks for looking at this. The cover letter should really mention
patches 1 and 2 - the pcr_read changes are definitely user-visible.

> I am not sure the allocation is the right way to do it for stuff
> that gets passed to the kernel though. Advice welcome.

Handing devm-allocated memory to the kernel is risky - devres can free
it on device removal, and the kernel expects the buffer to live
forever once linux,sml-base points at it. For memory the kernel will
own you want a reserved-memory region (or at least an lmb_reserve())
so it isn't reused later in the boot. What do you think?

Can we have a test and a note in doc/usage/ describing the new
behaviour and the linux,sml-base/linux,sml-size handoff?

Regards,
Simon


More information about the U-Boot mailing list