Patent ID: 8381182

Claim:
A method for context-switching when processing a system management interrupt (SMI), comprising: in response to receiving a first request to process a system management interrupt (SMI), creating, a second context stack that is different from a first context stack, wherein the first context stack comprises instructions currently being executed by a central processing unit (CPU); after creating the second context stack, directing the CPU to execute instructions in the second context stack, instead of executing instructions in the first context stack, to process the system management interrupt (SMI); upon determining that a time limit is about to expire, maintaining the state of the second context stack while directing the CPU to return to executing instructions in the first context stack; and in response to (a) receiving a second request to process a system management interrupt (SMI) and (b) determining that the second request requests the continuation of the performance of the same task requested by the first request, directing the CPU to return to executing instructions in the second context stack while maintaining the state of the first context stack.