Mechanism for using common code to handle hardware interrupts in multiple processor modes
First Claim
1. In a data processing system having a processor for executing instructions and operating in different processor modes, a storage for storing information and an interrupt handler for handling a type of interrupt, a method of handling interrupts comprising the steps of:
- a) storing an indicator of a current processor mode in the storage;
b) storing information to be used by the interrupt handler when run in a first processor mode in the storage and storing information to be used by the interrupt handler when run in a second processor mode in the storage;
c) receiving an interrupt of the type handled by the interrupt handler responds;
d) in response to receiving the interrupt, determining what the current processor mode is by examining the indicator in storage;
e) running the interrupt handler using the stored information for the first processor mode in response to determining that the current processor mode is the first mode to avoid switching processor modes; and
f) running the interrupt handler using the stored information for the second processor mode in response to determining that the current processor mode is the second processor mode to avoid switching processor modes.
2 Assignments
0 Petitions
Accused Products
Abstract
An interrupt handler may be run in multiple processor modes on a data processing system having a processor for executing instructions and a memory for storing information. The sharing of interrupt handler code across multiple processor modes minimizes the switching between processor modes during the handling of interrupts. The mode in which the interrupt handler executes is dictated by the current processor mode. The indicator of the current processor mode directs the interrupt handler to use information that is appropriate for the current processor mode.
-
Citations
13 Claims
-
1. In a data processing system having a processor for executing instructions and operating in different processor modes, a storage for storing information and an interrupt handler for handling a type of interrupt, a method of handling interrupts comprising the steps of:
-
a) storing an indicator of a current processor mode in the storage; b) storing information to be used by the interrupt handler when run in a first processor mode in the storage and storing information to be used by the interrupt handler when run in a second processor mode in the storage; c) receiving an interrupt of the type handled by the interrupt handler responds; d) in response to receiving the interrupt, determining what the current processor mode is by examining the indicator in storage; e) running the interrupt handler using the stored information for the first processor mode in response to determining that the current processor mode is the first mode to avoid switching processor modes; and f) running the interrupt handler using the stored information for the second processor mode in response to determining that the current processor mode is the second processor mode to avoid switching processor modes. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
Specification