Atomic update of CPO state
First Claim
1. A microprocessor having a control register that is atomically modifiable by a privileged (kernel) instruction, the control register having bit fields, the microprocessor comprising:
- a core, for receiving the privileged instruction and for atomically modifying the control register upon execution of the privileged instruction, wherein the control register is not accessible when the microprocessor is executing unprivileged instructions;
the privileged instruction comprising;
an opcode, for identifying the instruction as a privileged instruction;
a first operand, for specifying the control register as a register to be modified; and
a second operand, for specifying a location of a second register within the microprocessor, said second register containing a bit mask, said bit mask determining which of the bit fields within the control register are to be modified;
wherein said bit mask is used to atomically set or clear the bit fields in the control register;
whereby the bit fields in the control register are modified atomically by the privileged instruction.
11 Assignments
0 Petitions
Accused Products
Abstract
A group of bit set and bit clear instructions are provided for a microprocessor to allow atomic modification of privileged architecture control registers. The bit set and bit clear instructions include an opcode that designates to the microprocessor that the instructions are to execute in privileged (kernel) state only, and that the instructions are to communicate with privileged control registers. Two operands are provided for the instructions, the first designating which of the privileged control registers is to be modified, the second designating a general purpose register that contains a bit mask. The bit set instructions set bits in the designated control register according to bits set in the bit mask. The bit clear instructions clear bits in the designated control register according to bits set in the bit mask. By atomically modifying privileged control registers, a requirement for strict nesting of interrupt routines is eliminated.
-
Citations
21 Claims
-
1. A microprocessor having a control register that is atomically modifiable by a privileged (kernel) instruction, the control register having bit fields, the microprocessor comprising:
-
a core, for receiving the privileged instruction and for atomically modifying the control register upon execution of the privileged instruction, wherein the control register is not accessible when the microprocessor is executing unprivileged instructions; the privileged instruction comprising; an opcode, for identifying the instruction as a privileged instruction; a first operand, for specifying the control register as a register to be modified; and a second operand, for specifying a location of a second register within the microprocessor, said second register containing a bit mask, said bit mask determining which of the bit fields within the control register are to be modified; wherein said bit mask is used to atomically set or clear the bit fields in the control register; whereby the bit fields in the control register are modified atomically by the privileged instruction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method for atomically modifying bits within a privileged control register of a microprocessor, the method comprising:
-
providing a privileged instruction which instructs the microprocessor to atomically modify specified ones of the bits, wherein the control register is not accessible when the microprocessor is executing unprivileged instructions; providing a register, for specifying which of the particular ones of the bits are to be modified; and upon receipt of an interrupt by the microprocessor, atomically clearing the particular ones of the bits as specified by the register. - View Dependent Claims (13, 14, 15, 16, 20)
-
-
17. A tangible computer readable medium comprising program instructions executable by a microprocessor, wherein the program instructions include program code for receiving and executing a privileged instruction, wherein when executed the privileged instruction is operable to:
-
modify a control register of the microprocessor, wherein the control register is not accessible when the microprocessor is executing unprivileged instructions; wherein the privileged instruction comprises; an opcode, for identifying the instruction as a privileged instruction; a first operand, for specifying the control register as a register to be modified; and a second operand, for specifying a location of a second register within the microprocessor, said second register containing a bit mask, said bit mask determining which of the bit fields within the control register are to be modified; wherein said bit mask is used to set or clear the bit fields in the control register; whereby the bit fields in the control register are modified atomically by the privileged instruction. - View Dependent Claims (18, 19, 21)
-
Specification