On Sat, Oct 03, 2026 at 04:35:24PM +0200, Michael Haener wrote:
> Hi Ilias,
> 
> On Thu, 1 Oct 2026 at 11:41, Ilias Apalodimas <[email protected]> 
> wrote:
> > Any reason why we can't add this directly to the uclass probe instead?
> > According to our docs, the probe is supposed to 'make a device ready
> > for use'.
> 
> I tried that, but there are two problems:
> 
> 1. On a plain booti/bootm nothing probes the TPM, so post_probe() never
>    runs. Something still has to probe it during init, which is what the
>    event handler does.
> 
> 2. It changes probe behaviour for every caller. Once post_probe() has
>    started the chip, tpm_init() returns -EBUSY. With that change, five
>    existing sandbox tests in test/dm/tpm.c fail.
> 
> The existing users (tpm command, efi_tcg2, tpm_tcg2) already call
> tpm_auto_start() when they need it. Since a full self-test adds boot
> time, I would prefer to keep this opt-in and explicit.
> 
> Following Simon's suggestion, I have moved the handler to lib/ for v2.
> Are you OK with that direction?

This does show a concern I've long had which is that we wrote this "test
this in sandbox" in mind, rather than "make real world use of this" in
mind. If we need to refactor the sandbox tests so that they become one
of the "reset the system" types while making real world usage match
expectations and requirements, I'm fine with it. But it's still Ilias'
area, so whatever he thinks is best here I'm ultimately OK with.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to