The present invention relates generally to microprocessor systems, and more specifically to microprocessor systems that may use control registers to set system parameters and present system status information.
Microprocessor systems may use various forms of control registers to support their operation. One form of control register may be written to in order to set system parameters and otherwise configure the system. Various combinations of bits in such a register may set operational limits, such as depth of speculative execution or the size of a cache, or may turn on or off optional functional circuitry, such as branch predictors and prefetch units, or may enable or disable interrupts for certain events. Other forms of control registers may be read from in order to receive system status. Such control registers may also be called status registers. The status registers may provide information about system health, contents of program registers associated with a fault condition, operational temperature, and other forms of status. Many control registers may be both written to and read from. Examples of control registers may be the Model Specific Registers (MSRs) implemented in Pentium® class compatible microprocessors.
Control registers generally may be accessed through specific instructions for control register access, or through specific forms of general-purpose user instructions such as input/output (I/O) user instructions. The specific control register access instructions, which may be used for control registers located within a processor, may be limited to executing under high levels of software privilege.
Additionally, various control registers may be required in portions of the system circuitry that are architecturally separate from the processor functional units. For example, such portions may include various chipset functions or may include various intra-system bus bridges. Often these portions of the system circuitry may not be accessible via dedicated circuitry but only by predetermined data paths, including system busses. Conventional control registers located outside of a processor, such as control registers located within a chipset, may need to be accessed via general-purpose I/O user instructions that may be executed under lower levels of software privilege.
The present disclosure is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:
The following description includes techniques for control registers that may have enhanced access protection and that may be located in system components architecturally separate from processor functional blocks. In the following description, numerous specific details such as logic implementations, software module allocation, bus and other interface signaling techniques, and details of operation are set forth in order to provide a more thorough understanding of the present invention. It will be appreciated, however, by one skilled in the art that the invention may be practiced without such specific details. In other instances, control structures, gate level circuits and full software instruction sequences have not been shown in detail in order not to obscure the invention. Those of ordinary skill in the art, with the included descriptions, will be able to implement appropriate functionality without undue experimentation. In certain embodiments, the invention is disclosed in the environment of a Pentium® compatible processor system (such as those produced by Intel® Corporation) and the associated system and processor firmware. However, the invention may be practiced with other kinds of processor systems, such as with an Itanium® Processor Family compatible processor (such as those produced by Intel® Corporation), an X-Scale® family compatible processor, or any of a wide variety of different general-purpose processors from any of the processor architectures of other vendors or designers. Additionally, some embodiments may include or may be special purpose processors, such as graphics, network, image, communications, or any other known or otherwise available type of processor in connection with its firmware.
Referring now to
Processor 110 may execute user instructions from an instruction set under the control of microcode. A microcode read-only-memory (ROM) 112 may be provided to store a base microcode set. In addition, a writeable microcode random-access-memory (RAM) 114 may be present to receive another microcode set. In one embodiment, this other microcode set may be loaded from a microcode patch image 144 in system memory 142 or from a microcode patch image 148 in a basic-input/output-system (BIOS) programmable-read-only-memory (PROM) 146. In other embodiments, other forms of system firmware may be used other than BIOS, such as extensible firmware interface (EFI), and other forms of storage other than PROM may be used, such as flash memory.
The
In one embodiment, there may be new embodiment control registers of the present disclosure. Such new control registers may be control registers 1-N (136-138) located within the chipset 130 and control registers A and B (120, 122) located within the processor 110. In each case, the new control registers may have an address outside of the I/O address space. In one embodiment, control registers 1-N (136-138) and control registers A and B (120, 122) have addresses between the top of the Pentium® class compatible processor's I/O address space and the top of the physical address space. In varying embodiments the top of the physical address space may be at (232-1) or (264-1). In other embodiments, other boundaries may exist that delineate I/O address space from the total physical memory space.
Since the address of the control registers 1-N (136-138) are outside of the user I/O address space of processor 110, they may not be accessed via conventional user I/O instructions. Instead, in one embodiment a non-user accessible microcode set may include microcode that permits writing to and reading from control registers 1-N (136-138). In other embodiments, other forms of private operations other than microcode execution may be used to access control registers 1-N (136-138).
In one embodiment, the microcode that permits writing to and reading from control registers 1-N (136-138) and control registers A and B (120, 122) may be modified from existing microcode that implements the user instructions RDMSR and WRMSR. The existing microcode for implementing RDMSR and WRMSR includes a micro-operation that takes the data contained in a 32-bit physical register, representing logical general-purpose register ECX. This 32 bit address is then issued as the address of the desired MSR in the separate address space that contains control registers.
In order to produce microcode that may access the new control registers, such as control registers 1-N (136-138) and control registers A and B (120, 122), the existing microcode for user instructions RDMSR and WRMSR may be modified to convert certain MSR addresses into I/O addresses. In one embodiment the converted address is outside of the user-addressable address range limit that is inherent in conventional user I/O instructions. This resulting modified microcode may then be placed into an alternate microcode set. In other embodiments, microcode other than that of a modified RDMSR or modified WRMSR microcode may be developed to support accessing the new control registers.
It is noteworthy that this technique for accessing control registers 1-N (134-138) may operate across bus 150 via the two bus interface modules 118, 140. In one embodiment bus 150 may support addresses outside the I/O addressable memory space, if for no other reason than that it may support memory accesses across bus 150 and memory interface 132, 152. As the chipset functional circuits of chipset 130 are here shown as being capable of being implemented on a module architecturally separate from processor 110, and being capable of connecting via a bus 150 without additional dedicated signal lines, this technique for accessing control registers may be performed across existing conventional busses such as the FSB.
Because the resulting modified microcode for accessing control registers 1-N (136-138) and control registers A and B (120, 122) is not normally available to the user, specific triggering conditions for its execution may be imposed. For example, in one embodiment the loading of microcode patch image 144 or microcode patch image 148 into microcode RAM 114 may trigger the execution of the modified microcode. (The loading of either microcode patch image 144 or microcode patch image 148 may in turn be triggered by the removing of the RESET# signal from processor 110.) In this manner, control bits from the microcode patch may be written into control registers 1-N (136-138) and control registers A and B (120, 122) as part of the loading of the microcode patch.
In another embodiment, there may be two sets of microcode in microcode ROM 112: one set for user instruction microcode and another for use in debug mode. In other embodiments, the two sets of microcode may be split between microcode ROM 112 and microcode RAM 114. A debug flag 124 may be used to indicate whether processor 110 is in user mode or in debug mode. Debug flag 124 may in some embodiments be set (logic true) during manufacture and may be cleared (logic false) during some part of final manufacturing test or preparation for delivery. In some embodiments, there may be a special electronic procedure to set and later clear debug flag 124 after delivery of the processor 110.
When the debug flag 124 is set, the second set of microcode may be enabled for execution by a privileged user. In this manner the microcode for accessing selected new control registers, such as control registers 1-N (136-138) and control registers A and B (120, 122), may be restricted to executing only in debug mode. When the debug flag is cleared prior to delivery of processor 110, this clearing may prevent end users from accessing the control registers.
Referring now to
In
Referring now to
The debug port 374 may permit a user to access portions of the logic of processor 310 not normally accessible by that user. In one embodiment, the debug port 373 may permit the user to execute non-user-instruction microcode. This may permit the user to execute the microcode that may access control registers, such as control registers 1-N (334-338) and control register A 320, that have addresses outside the I/O addressable memory space. Here, as in the
In other embodiments, the debug port 374 may be used to write directly to the control registers, such as control registers 1-N (334-338) and control register A 320.
Referring now to
Processor 410 may include control registers of the present disclosure, such as control registers 1-N (434-438). Processor 480 may also include control registers capable of being accessed from processor 410, control registers A and B (484, 486). It is noteworthy that this technique for accessing control registers A and B (484, 486) may operate across point-to-point data link 460 via the two point-to-point interface modules 462, 464. In one embodiment point-to-point data link 460 may support addresses outside the I/O addressable memory space, if for no other reason than that it may support memory accesses from processor B 480 across point-to-point data link 460 and memory interface 472, 452. Each of control registers 1-N (434-438) and control registers A and B (484, 486) have addresses outside of the I/O addressable memory space.
A microcode ROM 412 may be provided to store a base microcode set, and a microcode RAM 414 may be present to receive another microcode set. In one embodiment, this other microcode set may be loaded from a microcode patch image 444 or from a microcode patch image 448. In one embodiment a non-user accessible microcode set may include microcode that permits writing to and reading from control registers 1-N (434-438) and control registers A and B (484, 486).
Because the microcode for accessing control registers 1-N (434-438) and control registers A and B (484, 486) is not normally available to the user, specific triggering conditions for its execution may again be imposed. For example, in one embodiment the loading of microcode patch image 444 or microcode patch image 448 into microcode RAM 414 may trigger the execution of the modified microcode. In this manner, control bits from the microcode patch may be written into control registers control registers 1-N (434-438) and control registers A and B (484, 486) as part of the loading of the microcode patch. Alternatively, the second set of microcode may be present in microcode ROM 412, and the microcode for accessing control registers 1-N (434-438) and control registers A and B (484, 486) may be executed during a debug mode as discussed above in connection with
Referring now to
The
Memory controller 34 may permit processors 40, 60 to read and write from system memory 10 and from a firmware erasable programmable read-only memory (EPROM) 36. In some embodiments the firmware may present a microcode patch image for loading into a microcode RAM (not shown) of processors 40, 60. In some embodiments firmware EPROM 36 may utilize flash memory. Memory controller 34 may include a bus interface 8 to permit memory read and write data to be carried to and from bus agents on system bus 6. Memory controller 34 may also connect with a high-performance graphics circuit 38 across a high-performance graphics interface 39. In certain embodiments the high-performance graphics interface 39 may be an advanced graphics port AGP interface. Memory controller 34 may direct data from system memory 10 to the high-performance graphics circuit 38 across high-performance graphics interface 39.
The
In the
In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.