1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/console.h>
5 #include <security/tpm/tss.h>
8 static void disable_platform_hierarchy(void *unused
)
15 if (!CONFIG(RESUME_PATH_SAME_AS_BOOT
))
20 if (rc
!= TPM_SUCCESS
) {
21 printk(BIOS_ERR
, "tlcl_lib_init() failed: %#x\n", rc
);
25 /* In case both families are enabled, but TPM1 is in use. */
26 if (tlcl_get_family() != TPM_2
)
29 rc
= tlcl2_disable_platform_hierarchy();
30 if (rc
!= TPM_SUCCESS
)
31 printk(BIOS_ERR
, "Platform hierarchy disablement failed: %#x\n",
35 BOOT_STATE_INIT_ENTRY(BS_OS_RESUME
, BS_ON_ENTRY
, disable_platform_hierarchy
,