From 226bcbaed18fad6064dec37501693bc9e16512cf Mon Sep 17 00:00:00 2001 From: Michael Cardell Widerkrantz Date: Thu, 16 Mar 2023 13:30:56 +0100 Subject: [PATCH] fw: Update comments --- hw/application_fpga/fw/tk1/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/application_fpga/fw/tk1/main.c b/hw/application_fpga/fw/tk1/main.c index d9e9799..c54fdc8 100644 --- a/hw/application_fpga/fw/tk1/main.c +++ b/hw/application_fpga/fw/tk1/main.c @@ -125,7 +125,8 @@ static void compute_cdi(const uint8_t digest[32], const uint8_t use_uss, // Write hashed result to Compound Device Identity (CDI) blake2s_final(&secure_ctx, local_cdi); - // Clear secure_ctx of any residue + // Clear secure_ctx of any residue of UDS. Don't want to keep + // that for long even though fw_ram is cleared later. memset(&secure_ctx, 0, sizeof(secure_ctx)); // CDI only word writable @@ -379,7 +380,7 @@ static void scramble_ram() int main() { struct context ctx = {0}; - struct frame_header hdr; // Used in both directions + struct frame_header hdr; uint8_t cmd[CMDLEN_MAXBYTES]; enum state state = FW_STATE_INITIAL; @@ -414,7 +415,6 @@ int main() break; case FW_STATE_RUN: - htif_puts("state_run\n"); run(&ctx); break; // This is never reached!