security/tpm: resolve conflicts in TSS implementations

No functional changes.  Refactor code such that there won't be any
compiler or linker errors if TSS 1.2 and TSS 2.0 were both compiled
in.

One might want to support both TPM families for example if TPM is
pluggable, while currently one has to reflash firmware along with
switching TPM device.

Change-Id: Ia0ea5a917c46ada9fc3274f17240e12bca98db6a
Ticket: https://ticket.coreboot.org/issues/433
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69160
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Sergii Dmytruk 2022-10-31 18:41:52 +02:00 committed by Martin L Roth
commit 094a051732
15 changed files with 412 additions and 295 deletions

View file

@ -22,7 +22,7 @@ static void disable_platform_hierarchy(void *unused)
return;
}
rc = tlcl_disable_platform_hierarchy();
rc = tlcl2_disable_platform_hierarchy();
if (rc != TPM_SUCCESS)
printk(BIOS_ERR, "Platform hierarchy disablement failed: %#x\n",
rc);