Skip to content

Commit

Permalink
pistachio.c: initialise tpm on boot
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Ham22 committed Sep 15, 2016
1 parent 68ec9d3 commit f55662b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions board/imgtec/pistachio_bub/pistachio.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <asm/pistachio.h>
#include <asm-generic/sections.h>
#include <watchdog.h>
#include <tpm.h>

#include "mfio.h"

Expand Down Expand Up @@ -172,6 +173,12 @@ int board_early_init_f(void)

int board_late_init(void)
{
#ifdef CONFIG_TPM
if (tpm_init() || tpm_startup(TPM_ST_CLEAR)) {
printf("Failed to enable tpm!\n");
return 1;
}
#endif
#ifdef CONFIG_PISTACHIO_WATCHDOG
hw_watchdog_init();
#endif
Expand Down

0 comments on commit f55662b

Please sign in to comment.