Implementing the System Call Vectored Instruction in the Power 4 Microprocessor
Original Publication Date: 2000-Mar-01
Included in the Prior Art Database: 2003-Jun-20
AbstractImplementing the System Call Vectored Instruction in the Power 4 Microprocessor
Implementing the System Call Vectored Instruction in the Power 4
Disclosed is a mechanism for supporting the System Call Vectored instruction in the Power 4 superscalar, superpipelined, out-of-order gigahertz processor core. This instruction provides many challenges to an out-of-order processor, and these challenges were aggravated by the high frequency target of the design.
This mechanism uses many existing mechanisms within the Power 4 core instruction control circuitry to satisfy the architectural requirements of the 'scv' PowerPC/AS instruction. This instruction is unique within the PowerPC/AS architecture; it has aspects that are similar to interrupts, and it has other aspects that are similar to branches. This instruction stores the return address in the Link Register, which is often used for subroutine calls. Interrupts, however, use the Save and Restore Register 0 (SRR0) for the same purpose. Likewise, this instruction uses the Count Register in place of SRR1 to save the Machine State Register (MSR). But, this instruction also acts very much like an interrupt in that it redirects the fetch address and alters the MSR.
The implementation of this mechanism uses the microcode table in the Power 4 processor core. This microcode table translates a single PowerPC/AS instruction into a series of grouped internal operations (IOPs). This processor achieves its high frequency goals by only supporting a limited set of instruction primitives, called internal operations, and organizing these IOPs into instruction groups (or simply groups). A group of four non-branch IOPs with a single branch IOP comprise a group. These groups define the allowable precise interrupt boundaries as well as provide issue control boundaries.
Table 1: 'scv' microcode sequence Group IOP1 IOP2 IOP3 IOP4 Branch_IOP 1 scv_mfnia
addi eGPR0, eGPR0eGPR0, 4 noop noop branch_noop 2 move_to_LR
noopeGPR0 noop noop branch_noop 3 scv_mfmsr noop noop noop branch_noop 4 scv_mtctr noop noop noop branch_noop
The microcode table translates the PowerPC/AS instruction 'svc' into four IOP groups. The first instruction in the first group is named 'scv_mfnia'. This instruction serves two purposes. First, it indicates to the global completion table (GCT) that an 'scv' instruction is pending, and that it should prevent any asynchronous interrupt from occurring until the 'scv' has been fully executed and committed. In addition, this instruction is issued to the Condition Register logic engine, which supports Special Purpose Register (SPR) reads for most of the processor core. This execution engine signals the GCT to forw...