hex-five / multizone-sdk

MultiZone® Security TEE is the quick and safe way to add security and separation to any RISC-V processors. The RISC-V standard ISA doesn't define TrustZone-like primitives to provide hardware separation. To shield critical functionality from untrusted third-party components, MultiZone provides hardware-enforced, software-defined separation of multi
https://hex-five.com/multizone-security-tee-riscv/
Other
79 stars 24 forks source link

libhexfive wrong return values for rv32 #36

Closed cgarlati closed 5 years ago

cgarlati commented 5 years ago

On rv32 the higher part of the return value is undetermined - i.e. getting 0x1_0000057c as a return from ECALL_CSRR_MVENDIND() instead of just 0x0000057c in certain cases.

Affected APIs:

uint64_t ECALL_CSRR_MISA(); uint64_t ECALL_CSRR_MVENDID(); uint64_t ECALL_CSRR_MARCHID(); uint64_t ECALL_CSRR_MIMPID(); uint64_t ECALL_CSRR_MHARTID();