SYSTEM AND METHOD FOR SYNCHRONIZING DISPARATE PROCESSING MODES AND FOR CONTROLLING ACCESS TO SHARED RESOURCES
First Claim
1. A method for synchronizing first and second processing modes executed by a processing unit and for controlling access to a shared resource, comprising the steps of:
- providing a lock for controlling access to the shared resource, the lock being accessible to the first and second processing modes;
attempting, from the first processing mode, to acquire the lock;
if the lock is acquired by the first processing mode, accessing the shared resource from the first processing mode;
releasing the lock after accessing the shared resource from the first processing mode;
determining whether the second processing mode has requested the lock; and
if the second processing mode has requested the lock, sending a release signal to the second processing mode.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method for synchronizing disparate processing modes and for providing mutually exclusive access to shared system resources. A processing unit operates in disparate first and second processing modes. In the first processing mode, the computer is under the control of an operating system. In the other processing mode, the computer is under the control of a system management mode interrupt handling routine. To synchronize the two processing modes and allow mutually exclusive access to shared hardware resources, the computer system includes shared memory, which contains an intermodal lock, and a mechanism for allowing each processing mode to signal the other. Before either processing mode can access the shared resource, the processing mode must attempt to acquire the intermodal lock. If the lock is acquired, the processing mode accesses the shared resource. If the lock cannot be acquired, the processing mode sets a pending bit and resumes other tasks until it receives a lock release signal from the other processing mode. When a processing mode has finished accessing the shared resource, it releases the lock and checks to see if the pending bit was set. If so, the processing mode sends a lock release signal to the other mode.
39 Citations
21 Claims
-
1. A method for synchronizing first and second processing modes executed by a processing unit and for controlling access to a shared resource, comprising the steps of:
-
providing a lock for controlling access to the shared resource, the lock being accessible to the first and second processing modes;
attempting, from the first processing mode, to acquire the lock;
if the lock is acquired by the first processing mode, accessing the shared resource from the first processing mode;
releasing the lock after accessing the shared resource from the first processing mode;
determining whether the second processing mode has requested the lock; and
if the second processing mode has requested the lock, sending a release signal to the second processing mode. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer system, comprising:
-
a processing unit capable of executing first and second processing modes;
a shared resource accessible to the first and second processing modes; and
a lock for controlling access to the shared resource, the lock including a lock data register accessible to the first and second processing modes;
the processing unit, responsive to instructions from a program module running on the computer system, being operative to;
attempt, from the first processing mode, to acquire the lock;
access the shared resource from the first processing mode if the lock is acquired by the first processing mode, otherwise, set a pending indicator associated with the lock;
release the lock after accessing the shared resource from the first processing mode;
determine, after accessing the shared resource from the first processing mode, whether the second processing mode has attempted to acquire the lock; and
if the second processing mode has attempted to acquire the lock, send a signal to the second processing mode. - View Dependent Claims (12, 13, 14, 15)
-
-
16. A computer-readable medium on which is stored a computer program for synchronizing first and second processing modes executed by a processing unit and for controlling access to a shared resource, the computer program comprising instructions which, when executed by the processing unit, perform the steps of:
-
providing a lock for controlling access to the shared resource, the lock including a register accessible to the first and second processing modes and indicating the availability of access to the shared resource;
attempting, from the first processing mode, to acquire the lock;
if the lock is acquired by the first processing mode, accessing the shared resource from the first processing mode;
releasing the lock after accessing the shared resource from the first processing mode;
determining whether the second processing mode has attempted to acquire the lock; and
if the second processing mode has attempted to acquire the lock, sending a signal to the second processing mode. - View Dependent Claims (17, 18, 19, 20, 21)
-
Specification