fw: load app at the start of RAM

Since app is always loaded at the start of RAM, the TK1_APP_ADDR define
is no longer needed.

Signed-off-by: Daniel Lublin <daniel@lublin.se>
This commit is contained in:
Daniel Lublin 2023-03-06 14:07:03 +01:00
parent 425fdb4b90
commit 7eb4d0304b
No known key found for this signature in database
GPG key ID: 75BD0FEB8D3E7830
5 changed files with 12 additions and 14 deletions

View file

@ -147,7 +147,7 @@ int main()
struct frame_header hdr; // Used in both directions
uint8_t cmd[CMDLEN_MAXBYTES];
uint8_t rsp[CMDLEN_MAXBYTES];
uint8_t *loadaddr = (uint8_t *)TK1_APP_ADDR;
uint8_t *loadaddr = (uint8_t *)TK1_RAM_BASE;
int left = 0; // Bytes left to receive
uint8_t use_uss = FALSE;
uint8_t uss[32] = {0};
@ -183,7 +183,7 @@ int main()
case FW_STATE_RUN:
htif_puts("state_run\n");
*app_addr = TK1_APP_ADDR;
*app_addr = TK1_RAM_BASE;
// CDI = hash(uds, hash(app), uss)
compute_cdi(digest, use_uss, uss);
@ -382,7 +382,7 @@ int main()
blake2s_ctx ctx;
blake2s(digest, 32, NULL, 0,
(const void *)TK1_APP_ADDR, *app_size,
(const void *)TK1_RAM_BASE, *app_size,
&ctx);
print_digest(digest);