Patent ID: 7788487

Claim:
A data processing apparatus that executes programs while switching between a secure mode and a normal mode, the secure mode being a mode in which use of a secure resource to be protected is permitted and the normal mode being a mode in which only use of a normal resource outside of protection is permitted, the data processing apparatus comprising: a normal storing unit storing therein a normal program that includes one or more processing procedures which use the normal resource; a secure storing unit storing therein a secure program that (i) includes one or more processing procedures which use the secure resource, and (ii) includes a call instruction for calling at least the normal program; a judgment unit operable to judge, in the secure mode, whether or not an instruction to be executed next is the call instruction; an output unit operable to output, in the secure mode, in a case where the instruction to be executed next is judged to be the call instruction, a piece of identification information which identifies the normal program to be called by the call instruction; a switching unit operable to, in the case where the instruction to be executed next is judged to be the call instruction, protect the secure resource and switch from the secure mode to the normal mode; a receiving unit operable to receive, in the normal mode, the piece of identification information; a reading unit operable to read, in the normal mode, the normal program identified by the received piece of identification information from the normal storing unit; and a processing unit operable to operate, in the normal mode, according to the read normal program.