Patent attributes
There is provided mechanisms for handling instances of a trusted execution environment on an execution platform. The trusted execution environment is associated with a secure cryptoprocessor. The secure cryptoprocessor holds a register. The trusted execution environment is configured to read from and write to a volatile part of the register at a given index i. A method is performed by the trusted execution environment. The method comprises checking, upon start of a new instance of the trusted execution environment, status of the register at the given index i. The method comprises enabling the new instance to keep running only when successfully reading a first value representing no currently run instance of the trusted execution environment from the register at the index i or if the register at the given index i has its status set to “undefined” when checking the status. The method comprises writing a second value representing one currently run instance of the trusted execution environment to the register at the given index i.