diff --git a/hw/application_fpga/fw/testloadapp/main.c b/hw/application_fpga/fw/testloadapp/main.c index c839d46..05a22fe 100644 --- a/hw/application_fpga/fw/testloadapp/main.c +++ b/hw/application_fpga/fw/testloadapp/main.c @@ -121,6 +121,15 @@ int verify(uint8_t pubkey[32]) return -2; } +void reset_from_client(void) +{ + struct reset rst = {0}; + + rst.type = START_CLIENT; + + syscall(TK1_SYSCALL_RESET, (uint32_t)&rst, 0, 0); +} + int main(void) { uint8_t secret_key[64]; @@ -143,7 +152,7 @@ int main(void) } puts(IO_CDC, "Hello from testloadapp! 0 = install app in slot 1, 1 = " - "verify app\r\n"); + "verify app, 2 == load app from client\r\n"); for (;;) { if (readselect(IO_CDC, &endpoint, &available) < 0) { @@ -175,6 +184,10 @@ int main(void) break; + case '2': + reset_from_client(); + break; + default: break; } diff --git a/hw/application_fpga/fw/tk1/mgmt_app.c b/hw/application_fpga/fw/tk1/mgmt_app.c index 20afe4e..7ec4cdf 100644 --- a/hw/application_fpga/fw/tk1/mgmt_app.c +++ b/hw/application_fpga/fw/tk1/mgmt_app.c @@ -12,9 +12,9 @@ // // To update this, compute the BLAKE2s digest of the app.bin static const uint8_t allowed_app_digest[32] = { - 0xc0, 0xa2, 0x8e, 0x4e, 0x35, 0x90, 0xe3, 0x4, 0x8, 0x63, 0xd4, - 0x2e, 0x51, 0xb, 0x6f, 0xc7, 0x2, 0x8b, 0xf6, 0x33, 0x18, 0x9f, - 0xca, 0xcc, 0xe8, 0x33, 0xf0, 0xd5, 0xd2, 0x72, 0x68, 0xd7, + 0x98, 0xeb, 0x74, 0xdf, 0xd1, 0x7d, 0x06, 0xb1, 0x3f, 0xe4, 0x7d, 0x32, + 0x60, 0x71, 0xeb, 0x34, 0x0e, 0x40, 0xb1, 0x06, 0xf4, 0x0b, 0x15, 0x06, + 0x3c, 0xc5, 0xbc, 0x6d, 0x71, 0x9e, 0x4f, 0xe9, }; static uint8_t current_app_digest[32];