Skip to content

Commit 929d7bc

Browse files
committed
[ot] hw/opentitan: ot_flash: Fix word calculation
This wasn't causing any major problems (accidentally reading too many words from flash when reading keymgr seeds, but the right number of bytes were copied out when sending to the keymgr), but should be fixed regardless. Signed-off-by: Alex Jones <[email protected]>
1 parent c232d98 commit 929d7bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/opentitan/ot_flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
#define FLASH_SEED_BANK 0u
8484
#define FLASH_SEED_INFO_PARTITION 0u
8585
#define FLASH_SEED_WIDTH 256u
86-
#define FLASH_SEED_WORDS ((FLASH_SEED_WIDTH) / sizeof(uint32_t))
8786
#define FLASH_SEED_BYTES ((FLASH_SEED_WIDTH) / 8u)
87+
#define FLASH_SEED_WORDS ((FLASH_SEED_BYTES) / sizeof(uint32_t))
8888

8989
static_assert(FLASH_SEED_BYTES == OT_FLASH_KEYMGR_SECRET_BYTES,
9090
"Flash seed & keymgr secret sizes do not match");

0 commit comments

Comments
 (0)