Claims
- 1. A method of operating a digital system in a secure mode of operation, the digital system having a CPU with at least one interrupt source, comprising the steps of:
authorizing entry of the CPU into the secure mode of operation; enabling access to a secure memory only when in secure mode: executing an environment setting routine from a portion of the secure memory, wherein the environment setting routine re-maps interrupts from a non-secure interrupt vector table (IVT) in a non-secure memory to a secure IVT in a portion of the secure memory and then enables interrupts; executing a secure instruction routine from the secure instruction memory; and receiving an interrupt while executing the secure instruction routine such that the secure code routine is pre-empted and execution is transferred via the secure IVT to a secure interrupt service routine (ISR) in the secure memory.
- 2. The method according to claim 1, wherein the secure ISR redirects the CPU to perform an exception exit sequence that performs the steps of:
saving state of the secure instruction routine in a portion of the secure memory; sanitizing non-secure resources used to execute the secure instruction routine; setting a return pointer to cause the secure mode to be re-entered at the completion of a non-secure ISR; and redirecting the CPU to the non-secure ISR, such that the secure mode of operation is terminated.
- 3. The method according to claim 2, further comprising the steps of:
upon return from the non-secure ISR, the step of authorizing entry into secure mode is repeated and if successful secure mode is re-entered; restoring state of the pre-empted secure instruction routine; and resuming execution of the pre-empted secure instruction routine.
- 4. The method according to claim 3, further comprising the step of setting an exit indicator to indicate an exception exit occurred.
- 5. The method according to claim 4, wherein the environment setting routine performs the steps of:
checking the exit indicator to determine if the last exit was an exception exit: and if so, then performing the steps of restoring state and resuming execution, otherwise starting execution of a secure instruction routine.
- 6. The method according to claim 1, wherein the step of entering the secure mode of operation comprises the steps of:
jumping to an entry address at a particular address in an instruction memory; executing an activation sequence of instructions beginning at the entry address; and entering the secure mode of operation only if the activation sequence of instruction is executed by the CPU in a pre-defined order.
- 7. The method of claim 6, wherein the activation sequence of instructions is longer than the length of an instruction execution pipeline of the CPU.
- 8. A digital system, comprising:
a CPU with an instruction execution pipeline; a public memory for holding non-secure instructions connected to the CPU, the public memory being always accessible by the CPU; a secure read only ROM for holding secure instructions connected to the CPU, the secure ROM being accessible only when a security signal is asserted; a security state machine (SSM) connected to the CPU for monitoring a set of status signals, the SSM having an output for asserting the security signal when a secure mode of operation is established; and wherein a secure interrupt vector table (IVT) is present in the secure ROM and a non-secure IVT is present in the public memory, the CPU being operable to use only the secure IVT while in the secure mode of operation.
- 9. The digital system of claim 8, further comprising an interrupt wrapper circuit that receives a plurality of interrupt signals and provides an interrupt request signal to the CPU, wherein the interrupt wrapper is responsive to a control signal to mask interrupts from the CPU; and
wherein a mask signal output by the wrapper is connected to the SSM for indicating when interrupts are masked, the SSM being operable to assert the security signal only when the mask signal indicates interrupts are masked.
- 10. The digital system of claim 9, wherein a portion of the public memory is a public ROM, and wherein the public ROM holds an activation sequence, and wherein the SSM enables the secure mode of operation only if the activation sequence is executed by the CPU in a pre-defined order.
- 11. The digital system according to claim 8 being a wireless device, further comprising:
an integrated keyboard connected to the CPU via a keyboard adapter; a display, connected to the CPU via a display adapter; radio frequency (RF) circuitry connected to the CPU; and an aerial connected to the RF circuitry.
Priority Claims (2)
Number |
Date |
Country |
Kind |
02290115.1 |
Jan 2002 |
EP |
|
02100727.3 |
Jun 2002 |
EP |
|
Parent Case Info
[0001] This application incorporates by reference and claims priority under 35 USC 119(a) to European patent application Serial Number 02290115.1, filed Jan. 16, 2002 entitled Secure Mode For Processors Supporting MMU And Interrupts (TI-33762.1EU) and European patent application Serial Number 02100727.3, filed Jun. 30, 2002 entitled Secure Mode For Processors Supporting MMU And Interrupts (TI-33762.2EU).