Patent ID: 7797681

Claim:
Apparatus for processing data, said apparatus comprising: a memory configured to store data values; processing logic configured to execute a sequence of program instructions and having a plurality of privilege levels including at least a user level and a privileged level; a process stack memory pointer configured to point to a process stack memory region within said memory for use when said processing logic is at said user level; a main stack memory pointer configured to point to a main stack memory region within said memory for use when said processing logic is at said privileged level; and exception logic, responsive to an exception occurring when said processing logic is executing a process sequence of program instructions at said user level, said exception logic configured to operate in the following sequence: (i) to stop executing said process sequence of program instructions; (ii) to save user level state data representing one or more state variables of said apparatus when said exception occurred to said process stack memory region; (iii) to switch said processing logic from said user level to said privileged level; and (iv) to start executing a privileged level sequence of program instructions.