Skip to content

Commit f55662b

Browse files
committed
pistachio.c: initialise tpm on boot
If tpm support is enabled then initialise it on boot. Note that the tpm will need to be provisioned (possibly at factory) in order to allow users to enable the physical presence line and enable/activate/takeowenership of their tpm. The following commands can be used from the uboot prompt to do this: tpm tsc_physical_presence 0x60 tpm tsc_physical_presence 0x08 tpm physical_enable tpm physical_set_deactivated 0 Signed-off-by: Ian Pozella <[email protected]>
1 parent 68ec9d3 commit f55662b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

board/imgtec/pistachio_bub/pistachio.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <asm/pistachio.h>
2121
#include <asm-generic/sections.h>
2222
#include <watchdog.h>
23+
#include <tpm.h>
2324

2425
#include "mfio.h"
2526

@@ -172,6 +173,12 @@ int board_early_init_f(void)
172173

173174
int board_late_init(void)
174175
{
176+
#ifdef CONFIG_TPM
177+
if (tpm_init() || tpm_startup(TPM_ST_CLEAR)) {
178+
printf("Failed to enable tpm!\n");
179+
return 1;
180+
}
181+
#endif
175182
#ifdef CONFIG_PISTACHIO_WATCHDOG
176183
hw_watchdog_init();
177184
#endif

0 commit comments

Comments
 (0)