From 65ec5ccea2dc93dc9521b3ca45e1a59f320e35e9 Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Fri, 9 Dec 2022 08:32:17 +0100 Subject: [PATCH] testfw: test that UDI can't be read app-mode --- hw/application_fpga/fw/testfw/main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/application_fpga/fw/testfw/main.c b/hw/application_fpga/fw/testfw/main.c index 5935027..b1744c0 100644 --- a/hw/application_fpga/fw/testfw/main.c +++ b/hw/application_fpga/fw/testfw/main.c @@ -185,6 +185,13 @@ int main() // anyfailed = 1; // } + // Should NOT be able to read from UDI in app-mode. + wordcpy(udi_local, (void *)udi, UDI_WORDS); + if (!memeq(udi_local, zeros, UDI_WORDS * 4)) { + puts("FAIL: Read from UDI in app-mode\r\n"); + anyfailed = 1; + } + uint32_t cdi_local[CDI_WORDS]; uint32_t cdi_local2[CDI_WORDS]; wordcpy(cdi_local, (void *)cdi, CDI_WORDS);