Open jovanbulck opened 7 years ago
We can use the Special Function Registers (SFRs) located in the lower 16 bytes of the address space. Specifically, the openMSP430 core features a 32-bit read-only CPUID register from address 0x0004
. Including a 5-bit USER_VERSION that we could use to encode the Sancus security level.
And there's 3 more bits in the CPU_VERSION field. The current sancus-core is based on openMSP430 v2, and upstream openMSP430 is currently at version 3. We could thus encode the "Sancus version number" from 0x7
downwards to try and avoid clashes with openMSP430 version numbers.
For future reference: core configuration details can also be recognized/printed in openmsp430-loader
by editing omsp_alias.xml
.
To facilitate portable Sancus application code, we should add a
CPUID
-like instruction that returns at least: