From 9b9a125c6625ab58291105f7af98f59203a522e7 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Mon, 19 Dec 2022 11:41:07 +0100 Subject: [PATCH] Purge UDA; never implemented, now deprecated Fixes #58 Signed-off-by: Daniel Lublin --- doc/system_description/software.md | 1 - hw/application_fpga/fw/testfw/main.c | 23 ----------------------- hw/application_fpga/fw/tk1_mem.h | 2 -- 3 files changed, 26 deletions(-) diff --git a/doc/system_description/software.md b/doc/system_description/software.md index dfdc134..fc16560 100644 --- a/doc/system_description/software.md +++ b/doc/system_description/software.md @@ -513,7 +513,6 @@ Assigned core prefixes: | `TOUCH_STATUS` | r/w | r/w | | | | TOUCH_STATUS_EVENT_BIT is 1 when touched. After detecting a touch | | | | | | | | event (reading a 1), write anything here to acknowledge it. | | `FW_RAM` | r/w | invisible | 1 kiB | u8[1024] | | Firmware-only RAM. | -| `UDA` | r | invisible | 16B | u8[16] | | Unique Device Authentication key. | | `UDI` | r | r | 8B | u64 | | Unique Device ID (UDI). | | `QEMU_DEBUG` | w | w | | u8 | | Debug console (only in QEMU) | | `NAME0` | r | r | 4B | char[4] | "tk1 " | ID of core/stick | diff --git a/hw/application_fpga/fw/testfw/main.c b/hw/application_fpga/fw/testfw/main.c index 4a623fe..a10c16d 100644 --- a/hw/application_fpga/fw/testfw/main.c +++ b/hw/application_fpga/fw/testfw/main.c @@ -13,7 +13,6 @@ volatile uint32_t *tk1name0 = (volatile uint32_t *)TK1_MMIO_TK1_NAME0; volatile uint32_t *tk1name1 = (volatile uint32_t *)TK1_MMIO_TK1_NAME1; volatile uint32_t *uds = (volatile uint32_t *)TK1_MMIO_UDS_FIRST; -volatile uint32_t *uda = (volatile uint32_t *)TK1_MMIO_QEMU_UDA; // Only in QEMU right now volatile uint32_t *cdi = (volatile uint32_t *)TK1_MMIO_TK1_CDI_FIRST; volatile uint32_t *udi = (volatile uint32_t *)TK1_MMIO_TK1_UDI_FIRST; volatile uint32_t *switch_app = (volatile uint32_t *)TK1_MMIO_TK1_SWITCH_APP; @@ -30,9 +29,6 @@ volatile uint32_t *fw_blake2s_addr = (volatile uint32_t *)TK1_MMIO_TK1_BLAKE2S; volatile int (*fw_blake2s)(void *, unsigned long, const void *, unsigned long, const void *, unsigned long, blake2s_ctx *); // clang-format on -// TODO Real UDA is 4 words (16 bytes) -#define UDA_WORDS 1 - void puts(char *reason) { for (char *c = reason; *c != '\0'; c++) { @@ -133,17 +129,6 @@ int main() anyfailed = 1; } - // TODO test UDA once we have it in real hw - // uint32_t uda_local[UDA_WORDS]; - // uint32_t uda_zeros[UDA_WORDS]; - // memset(uda_zeros, 0, UDA_WORDS*4); - // // Should get non-empty UDA - // wordcpy(uda_local, (void *)uda, UDA_WORDS); - // if (memeq(uda_local, uda_zeros, UDA_WORDS*4)) { - // test_puts("FAIL: UDA empty\r\n"); - // anyfailed = 1; - // } - uint32_t udi_local[2]; uint32_t udi_zeros[2]; memset(udi_zeros, 0, 2 * 4); @@ -199,14 +184,6 @@ int main() anyfailed = 1; } - // TODO test UDA once we have in in real hw - // // Now we should NOT be able to read from UDA. - // wordcpy(uda_local, (void *)uda, UDA_WORDS); - // if (!memeq(uda_local, uda_zeros, UDA_WORDS*4)) { - // test_puts("FAIL: Read from UDA in app-mode\r\n"); - // anyfailed = 1; - // } - uint32_t cdi_local[8]; uint32_t cdi_local2[8]; uint32_t cdi_zeros[8]; diff --git a/hw/application_fpga/fw/tk1_mem.h b/hw/application_fpga/fw/tk1_mem.h index 3e10e32f..0952ef0 100644 --- a/hw/application_fpga/fw/tk1_mem.h +++ b/hw/application_fpga/fw/tk1_mem.h @@ -67,8 +67,6 @@ enum { TK1_MMIO_TOUCH_STATUS = TK1_MMIO_TOUCH_BASE | 0x24, TK1_MMIO_TOUCH_STATUS_EVENT_BIT = 0, - // TODO HW core/addr is not yet defined for this: - TK1_MMIO_QEMU_UDA = TK1_MMIO_QEMU_BASE | 0x20, // This will only ever exist in QEMU: TK1_MMIO_QEMU_DEBUG = TK1_MMIO_QEMU_BASE | 0x1000,