testfw: test that UDI can't be read app-mode

This commit is contained in:
Daniel Lublin 2022-12-09 08:32:17 +01:00 committed by Michael Cardell Widerkrantz
parent 11c8eec7b8
commit c1b71b7ba6
No known key found for this signature in database
GPG Key ID: D3DB3DDF57E704E5

View File

@ -187,6 +187,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);