Attention is currently required from: Christian Walter, Krystian Hebel, Lance Zhao, Martin L Roth, Michał Żygowski, Sergii Dmytruk, Tim Wawrzynczak.
Julius Werner 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/d1f2c95d_6be37ec2 :
PS13, Line 48: return family;
Doing this strictly at runtime adds code to the build and lengthens the boot time by probing. […]
Yeah, we definitely need to make sure everything else optimizes out when only one of the two is enabled. I think a static inline in the header file should work:
```
static inline enum tpm_family tlcl_get_family(void)
{
if (CONFIG(TPM1) && CONFIG(TPM2)) {
extern enum tpm_family tlcl_tpm_family;
return tlcl_tpm_family;
} else if (CONFIG(TPM1)) {
return TPM_1;
} else if (CONFIG(TPM2)) {
return TPM_2;
}
return TPM_UNKNOWN;
}
```
--
To view, visit
https://review.coreboot.org/c/coreboot/+/69161?usp=email
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id9cc25aad8d1d7bfad12b7a92059b1b3641bbfa9
Gerrit-Change-Number: 69161
Gerrit-PatchSet: 13
Gerrit-Owner: Sergii Dmytruk
sergii.dmytruk@3mdeb.com
Gerrit-Reviewer: Christian Walter
christian.walter@9elements.com
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Krystian Hebel
krystian.hebel@3mdeb.com
Gerrit-Reviewer: Lance Zhao
lance.zhao@gmail.com
Gerrit-Reviewer: Michał Żygowski
michal.zygowski@3mdeb.com
Gerrit-Reviewer: Tim Wawrzynczak
inforichland@gmail.com
Gerrit-Reviewer: Yu-Ping Wu
yupingso@google.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Martin L Roth
gaumless@gmail.com
Gerrit-Attention: Lance Zhao
lance.zhao@gmail.com
Gerrit-Attention: Martin L Roth
gaumless@gmail.com
Gerrit-Attention: Michał Żygowski
michal.zygowski@3mdeb.com
Gerrit-Attention: Christian Walter
christian.walter@9elements.com
Gerrit-Attention: Tim Wawrzynczak
inforichland@gmail.com
Gerrit-Attention: Krystian Hebel
krystian.hebel@3mdeb.com
Gerrit-Attention: Sergii Dmytruk
sergii.dmytruk@3mdeb.com
Gerrit-Comment-Date: Tue, 15 Aug 2023 01:14:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Martin L Roth
gaumless@gmail.com
Gerrit-MessageType: comment