Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CPUID-like instruction #3

Open
jovanbulck opened this issue Jun 28, 2017 · 3 comments
Open

Add CPUID-like instruction #3

jovanbulck opened this issue Jun 28, 2017 · 3 comments
Labels

Comments

@jovanbulck
Copy link
Member

To facilitate portable Sancus application code, we should add a CPUID-like instruction that returns at least:

  • Sancus version implemented by the processor (if any)
  • Number of SMs supported by the processor
  • Security level (key length) the cryptographic core was configured with
@jovanbulck
Copy link
Member Author

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.

@jovanbulck
Copy link
Member Author

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.

@jovanbulck
Copy link
Member Author

For future reference: core configuration details can also be recognized/printed in openmsp430-loader by editing omsp_alias.xml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant