Skip to content

Commit

Permalink
plat-nuvoton: update HUK reading
Browse files Browse the repository at this point in the history
Reading HUK from UUID stored in two scratchpad registers

Co-developed-by: Hila Miranda-Kuzi <hila.miranda.kuzi1@gmail.com>
Signed-off-by: Hila Miranda-Kuzi <hila.miranda.kuzi1@gmail.com>
Signed-off-by: Margarita Glushkin <rutigl@gmail.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
rutigl authored and jforissier committed Oct 23, 2023
1 parent bb053cc commit 512f443
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/arch/arm/plat-nuvoton/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#define COLOR_WHITE "\x1B[37m"

#define NPCM_MEASURE_BASE 0xF0848000
#define NPCM_MEASURE_DME 0x0E0
#define NPCM_MEASURE_SIZE 64
#define NPCM_MEASURE_UUID 0xC50
#define NPCM_MEASURE_SIZE 5

static struct ns16550_data console_data __nex_bss;

Expand Down Expand Up @@ -76,7 +76,7 @@ TEE_Result tee_otp_get_hw_unique_key(struct tee_hw_unique_key *hwkey)
if (npcm_hwkey.ready)
goto out;

vaddr = phys_to_virt(NPCM_MEASURE_BASE + NPCM_MEASURE_DME,
vaddr = phys_to_virt(NPCM_MEASURE_BASE + NPCM_MEASURE_UUID,
MEM_AREA_RAM_NSEC, NPCM_MEASURE_SIZE);
if (!vaddr) {
EMSG("Not enough memory mapped");
Expand Down

0 comments on commit 512f443

Please sign in to comment.