1. A computer implemented method for securely saving a program's context, the method comprising: receiving an interrupt from a general purpose processor core at a special purpose processor core that is running in an isolation mode and executing a secured program, wherein: a heterogeneous processor includes a plurality of heterogeneous processor cores, the plurality of heterogeneous processor cores including the general purpose processor core and the isolated special purpose processor core; the isolated special purpose processor core includes a local memory that is inaccessible from other processor cores included in the heterogeneous processor while the special purpose processor core is running in the isolation mode; and each of the heterogeneous processor's cores can access a shared memory; and in response to receiving the interrupt, securely saving, at the special purpose processor core, the secured program's context to the shared memory, wherein the context comprises code lines and data values, the saving including: generating a random persistent security data; reading the code lines from the isolated special purpose processor core's local memory; reading the data values from the isolated special purpose processor core's local memory; encrypting the code lines and the data values using the generated persistent security data; storing the encrypted code lines and the encrypted data values in an unprotected open memory space included in the isolated special purpose processor core; and performing a direct memory access (DMA) transfer that reads the encrypted code lines stored in the unprotected open memory space and writes the encrypted code lines to the shared memory.