Hi David, On Thu, 8 May 2025 at 00:41, David Garske <da...@wolfssl.com> wrote: > > Hi Denx, > > We at wolfSSL have developed a port for wolfTPM in U-Boot. The patch allows > using the current built-in TPM 2.0 support or switching to wolfTPM via > CONFIG_TPM_WOLF=y. It also supports TPM 2.0 firmware update for the Infineon > SLB9672 and SLB9673. > > I think there is probably some more cleanup and testing needed, but I wanted > to submit this to start the discussion and see your thoughts. > > The wolfTPM library is GPLv2 and added as a submodule. If the license or > submodule is an issue let’s discuss! I’m positive we can resolve anything. > > Attached is the patch based on latest master 3b6760ddeb4 to review.
Thank you for doing this! Here are a few thoughts: - Use lower case for function names - Avoid camel case - What is XMEMSET()? - Can you use memset() ? - Convert most prinf() functions to log_debug() - Can you use subcommands (from command.h) instead of parsing the subcommand yourself? - put the FIRMWARE_UPGRADE thing into Kconfig, as well as WOLFTPM_SLB9672/3 - put the driver code into drivers/ with just the command code in cmd/ - add config WOLFTPM, separate from CMD_WOLFTPM - can you add a test in test/ and docs in doc/usage/cmd/ ? Regards, Simon > >  > > Thanks, > David Garske > Software Engineer, wolfSSL > +1 (530) 409-2990 > https://www.wolfssl.com <https://www.wolfssl.com/> > https://github.com/wolfssl >