Skip to content

Commit

Permalink
plat-ti: Add support for using HUK on DRA7xx/AM57xx
Browse files Browse the repository at this point in the history
On DRA7xx/AM57xx the initial secure software will pass OP-TEE a
Hardware Unique Key (HUK), use this key when requested.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
glneo committed Apr 21, 2017
1 parent b57bfad commit 4e33fa9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/arch/arm/plat-ti/conf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $(call force,CFG_PL310_LOCKED,y)
$(call force,CFG_SECURE_TIME_SOURCE_REE,y)
arm32-platform-cpuarch := cortex-a9
else
CFG_OTP_SUPPORT ?= y
$(call force,CFG_HWSUPP_MEM_PERM_PXN,y)
$(call force,CFG_SECURE_TIME_SOURCE_CNTPCT,y)
arm32-platform-cpuarch := cortex-a15
Expand Down
10 changes: 10 additions & 0 deletions core/arch/arm/plat-ti/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <kernel/misc.h>
#include <kernel/mutex.h>
#include <kernel/tee_time.h>
#include <kernel/tee_common_otp.h>
#include <mm/core_mmu.h>
#include <mm/core_memprot.h>
#include <tee/entry_std.h>
Expand Down Expand Up @@ -175,3 +176,12 @@ void console_init(void)
CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE);
register_serial_console(&console_data.chip);
}

#if defined(CFG_OTP_SUPPORT)

void tee_otp_get_hw_unique_key(struct tee_hw_unique_key *hwkey)
{
memcpy(&hwkey->data[0], &plat_huk[0], sizeof(hwkey->data));
}

#endif

0 comments on commit 4e33fa9

Please sign in to comment.