Attention is currently required from: Christian Walter, Julius Werner, Krystian Hebel, Lance Zhao, Michał Żygowski, Sergii Dmytruk, Tim Wawrzynczak.
Martin L Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/69161?usp=email )
Change subject: security/tpm: replace CONFIG(TPMx) checks with runtime check ......................................................................
Patch Set 13:
(1 comment)
File src/security/tpm/tss/tss.c:
https://review.coreboot.org/c/coreboot/+/69161/comment/98971f51_cca474d2 : PS13, Line 48: return family; Doing this strictly at runtime adds code to the build and lengthens the boot time by probing. For platforms that know the TPM type ahead of time, it would be good to add the build options here so that if *only* TPM1 or TPM2 is desired in the build, that's still possible.
I think the below should be enough for the compiler, though I'm not positive.
``` num tpm_family tlcl_get_family(void) { if (CONFIG(TPM1)) return TPM1; if (CONFIG(TPM2)) return TPM2 return family; } ```
You can see this size increase in the failed veyron builds: ``` arm-eabi-ld.bfd: Verstage exceeded its allotted size! (47K + 768) arm-eabi-ld.bfd: preram_cbfs_cache overlaps the previous region! arm-eabi-ld.bfd: warning: /cb-build/coreboot-gerrit.0/gcc-chromeos/GOOGLE_VEYRON_JAQ/cbfs/fallback/verstage.debug has a LOAD segment with RWX permissions make[2]: *** [src/arch/arm/Makefile.inc:64: /cb-build/coreboot-gerrit.0/gcc-chromeos/GOOGLE_VEYRON_JAQ/cbfs/fallback/verstage.debug] Error 1 make[2]: Leaving directory '/home/coreboot/node-root/workspace/coreboot-gerrit' ```