Test register

Last updated

A test register, in the Intel 80386 and Intel 80486 processor, was a register used by the processor, usually to do a self-test. Most of these registers were undocumented, and used by specialized software. The test registers were named TR3 to TR7. Regular programs don't usually require these registers to work. With the Pentium, the test registers were replaced by a variety of model-specific registers (MSRs). [1]

In the 80386, two test registers, TR6 and TR7, were provided for the purpose of TLB testing. TR6 was the test command register, and TR7 was the test data register. The 80486 provided three additional registers, TR3, TR4 and TR5, for testing of the L1 cache. TR3 was a data register, TR4 was an address register and TR5 was a command register. These registers were accessed by variants of the MOV instruction. A test register may either be the source operand or the destination operand. The MOV instructions are defined in both real-address mode and protected mode. The test registers are privileged resources. In protected mode, the MOV instructions that access them can only be executed at privilege level 0. An attempt to read or write the test registers when executing at any other privilege level causes a general protection exception. Also, those instructions generate invalid opcode exception on most CPUs newer than 80486.

The instruction is encoded in two ways, depending on the flow of data. Moving data from a general purpose register into a test register is encoded as 0F 26 /r (with r/m being the GPR, and reg being the test register). Moving data the other way (i.e. from the test register into a general purpose register) is encoded as 0F 24 /r (with r/m being the GPR, and reg being the test register). [2] Only register-register moves are allowed; memory forms of the ModR/M byte are undefined. In other words, the mod field (the two MSBs) must be set to 1.

The test registers and/or associated opcodes were supported in the following x86 processors:

ProcessorsCache Test RegistersTLB Test Registers
TR0TR1TR2TR3TR4TR5TR6TR7
Intel 386 (all models)NoNoundoc [lower-alpha 1] Yes
Intel 486 (all models)NoYesYes
AMD 386 (all models)
AMD Élan SC3xx
NoNo?Yes [4]
AMD 486 (all models)
AMD 5x86
AMD Élan SC4xx,SC5xx
NoYes [5] Yes
Cyrix [lower-alpha 2] 486 (all models [lower-alpha 3] )
Cyrix 5x86
NoYes [7] Yes
Cyrix 6x86 Noundoc [lower-alpha 4] YesYes (VSPM [lower-alpha 5] )
Cyrix 6x86MX, MII
VIA Cyrix III [lower-alpha 6]
NoYes (scratchpad) [lower-alpha 7] Yes
Cyrix MediaGX
NatSemi Geode GX
NoYes [13] Yes
NatSemi Geode GX2
AMD Geode GX, LX
TR0-TR7 registers present as 32-bit read/write data registers
without any cache/TLB test functionality. [14]
IDT WinChip (all models)Registers not present. The MOV TRx opcodes can be enabled
with the WinChip's FCR.EMOVTR [15] bit, but will act as NOPs.
Intel Quark X1000NoYes [16] Yes
  1. On the Intel 386, the TR4 and TR5 registers have been reported to act as undocumented read-only registers returning a data item related to instruction prefetch. [3]
  2. Cyrix manufacturing partner CPU models from IBM, TI and ST also all supported the same test registers as their corresponding Cyrix-branded CPU models.
  3. SoCs based on the Cyrix-derived ST486 CPU core also supported the same set of test registers as the Cyrix 486 - such SoCs include e.g. STPC Atlas and ZFMicro ZFx86. [6]
  4. On the Cyrix 6x86, the TR1 and TR2 registers could be enabled by setting bit 6 of Cyrix confguration register 30h. These registers are not documented, but example code using them has been published by Cyrix. [8]
  5. On the Cyrix 6x86, the TR6 and TR7 registers could be used not only to test the TLB, but also to configure the processor's VSPM (Variable-Size Paging Mechanism). [9] The VSPM was a 4-entry [10] software TLB with a per-entry mask to support all power-of-2 page sizes from to bytes. It was present in the Cyrix 6x86 only - it was removed in 6x86MX and later processors.
  6. "Joshua" core only. "Samuel" core variants of Cyrix III did not support the TRx test registers.
  7. On the 6x86MX, MII, and "Joshua" Cyrix III processors, the TR3-TR5 registers could be used not just to test the L1 cache but to lock individual L1 cache-lines to specific addresses for scratchpad memory use. [11] [12]

See also

Related Research Articles

<span class="mw-page-title-main">Cyrix 6x86</span> Microprocessor

The Cyrix 6x86 is a line of sixth-generation, 32-bit x86 microprocessors designed and released by Cyrix in 1995. Cyrix, being a fabless company, had the chips manufactured by IBM and SGS-Thomson. The 6x86 was made as a direct competitor to Intel's Pentium microprocessor line, and was pin compatible. During the 6x86's development, the majority of applications performed almost entirely integer operations. The designers foresaw that future applications would most likely maintain this instruction focus. So, to optimize the chip's performance for what they believed to be the most likely application of the CPU, the integer execution resources received most of the transistor budget. This would later prove to be a strategic mistake, as the popularity of the P5 Pentium caused many software developers to hand-optimize code in assembly language, to take advantage of the P5 Pentium's tightly pipelined and lower latency FPU. For example, the highly anticipated first-person shooter Quake used highly optimized assembly code designed almost entirely around the P5 Pentium's FPU. As a result, the P5 Pentium significantly outperformed other CPUs in the game.

IA-32 is the 32-bit version of the x86 instruction set architecture, designed by Intel and first implemented in the 80386 microprocessor in 1985. IA-32 is the first incarnation of x86 that supports 32-bit computing; as a result, the "IA-32" term may be used as a metonym to refer to all x86 versions that support 32-bit computing.

i386 32-bit microprocessor by Intel

The Intel 386, originally released as 80386 and later renamed i386, is a 32-bit microprocessor introduced in 1985. The first versions had 275,000 transistors and were the CPU of many workstations and high-end personal computers of the time. As the original implementation of the 32-bit extension of the 80286 architecture, the i386 instruction set, programming model, and binary encodings are still the common denominator for all 32-bit x86 processors, which is termed the i386-architecture, x86, or IA-32, depending on context.

i486 Successor to the Intel 386

The Intel 486, officially named i486 and also known as 80486, is a microprocessor. It is a higher-performance follow-up to the Intel 386. The i486 was introduced in 1989. It represents the fourth generation of binary compatible CPUs following the 8086 of 1978, the Intel 80286 of 1982, and 1985's i386.

<span class="mw-page-title-main">Pentium (original)</span> Intel microprocessor

The Pentium is a fifth generation, 32-bit x86 microprocessor that was introduced by Intel on March 22, 1993, as the very first CPU in the Pentium brand. It was instruction set compatible with the 80486 but was a new and very different microarchitecture design from previous iterations. The P5 Pentium was the first superscalar x86 microarchitecture and the world's first superscalar microprocessor to be in mass production—meaning it generally executes at least 2 instructions per clock mainly because of a design-first dual integer pipeline design previously thought impossible to implement on a CISC microarchitecture. Additional features include a faster floating-point unit, wider data bus, separate code and data caches, and many other techniques and features to enhance performance and support security, encryption, and multiprocessing, for workstations and servers when compared to the next best previous industry standard processor implementation before it, the Intel 80486.

x86 Family of instruction set architectures

x86 is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel based on the Intel 8086 microprocessor and its 8088 variant. The 8086 was introduced in 1978 as a fully 16-bit extension of Intel's 8-bit 8080 microprocessor, with memory segmentation as a solution for addressing more memory than can be covered by a plain 16-bit address. The term "x86" came into being because the names of several successors to Intel's 8086 processor end in "86", including the 80186, 80286, 80386 and 80486 processors.

<span class="mw-page-title-main">Cyrix</span> American microprocessor developer

Cyrix Corporation was a microprocessor developer that was founded in 1988 in Richardson, Texas, as a specialist supplier of floating point units for 286 and 386 microprocessors. The company was founded by Tom Brightman and Jerry Rogers.

<span class="mw-page-title-main">Cyrix 5x86</span>

The Cyrix 5x86 was a line of x86 microprocessors designed by Cyrix and released on June 5 of 1995. Cyrix, being a fabless company, had the chips manufactured by IBM. The line came out about 5 months before the more famous Cyrix 6x86. The Cyrix 5x86 was one of the fastest CPUs ever produced for Socket 3 computer systems. With better performance in most applications than an Intel Pentium processor at 75 MHz, the Cyrix Cx5x86 filled a gap by providing a medium-performance processor option for 486 Socket 3 motherboards.

<span class="mw-page-title-main">Am5x86</span> 486 computer chip made by AMD

The Am5x86 processor is an x86-compatible CPU announced in November of 1995 by AMD for use in 486-class computer systems. It began shipping in December of 1995, with a base price of $93 per unit in bulk quantities. Before being released, it was in development under the codename "X5".

The PR system was a figure of merit developed by AMD, Cyrix, IBM Microelectronics and SGS-Thomson in the mid-1990s as a method of comparing their x86 processors to those of rival Intel. The idea was to consider instructions per cycle (IPC) in addition to the clock speed, so that the processors become comparable with Intel's Pentium that had a higher clock speed with overall lower IPC.

<span class="mw-page-title-main">Am486</span> 80486-class computer processor family by AMD

The Am486 is a 80486-class family of computer processors that was produced by AMD in the 1990s. Intel beat AMD to market by nearly four years, but AMD priced its 40 MHz 486 at or below Intel's price for a 33 MHz chip, offering about 20% better performance for the same price.

<span class="mw-page-title-main">Am386</span> Processor

The Am386 CPU is a 100%-compatible clone of the Intel 80386 design released by AMD in March 1991. It sold millions of units, positioning AMD as a legitimate competitor to Intel, rather than being merely a second source for x86 CPUs.

NexGen was a private semiconductor company that designed x86 microprocessors until it was purchased by AMD in 1996. NexGen was a fabless design house that designed its chips but relied on other companies for production. NexGen's chips were produced by IBM's Microelectronics division in Burlington, Vermont alongside PowerPC and DRAM parts.

The x86 instruction set refers to the set of instructions that x86-compatible microprocessors support. The instructions are usually part of an executable program, often stored as a computer file and executed on the processor.

x87 is a floating-point-related subset of the x86 architecture instruction set. It originated as an extension of the 8086 instruction set in the form of optional floating-point coprocessors that worked in tandem with corresponding x86 CPUs. These microchips had names ending in "87". This was also known as the NPX. Like other extensions to the basic instruction set, x87 instructions are not strictly needed to construct working programs, but provide hardware and microcode implementations of common numerical tasks, allowing these tasks to be performed much faster than corresponding machine code routines can. The x87 instruction set includes instructions for basic floating-point operations such as addition, subtraction and comparison, but also for more complex numerical operations, such as the computation of the tangent function and its inverse, for example.

A model-specific register (MSR) is any of various control registers in the x86 instruction set used for debugging, program execution tracing, computer performance monitoring, and toggling certain CPU features.

<span class="mw-page-title-main">UMC Green CPU</span>

The UMC Green CPU was an x86-compatible microprocessor produced by UMC, a Taiwanese semiconductor company, in the early- to mid-1990s. It was offered as an alternative to the Intel 80486 with which it was pin compatible, enabling it to be installed in most 80486 motherboards. All models had power management features intended to reduce electricity consumption.

Intel microcode is microcode that runs inside x86 processors made by Intel. Since the P6 microarchitecture introduced in the mid-1990s, the microcode programs can be patched by the operating system or BIOS firmware to work around bugs found in the CPU after release. Intel had originally designed microcode updates for processor debugging under its design for testing (DFT) initiative.

References

  1. Intel, Pentium® Processor Family Developer’s Manual, order no. 241428-005, 1997, section 16.1.2, page 442 - provides a list of Pentium MSRs that provide the same functionality as the 386/486 TRx registers.
  2. Introduction to the 80386 Including the 80386 Data Sheet. Intel. April 1986. p. 122.
  3. Robert Collins, Move Special Registers, archived on 5 Jun 1997.
  4. AMD, Am386 Microprocessors Data Book, 1992, pages 21 and 151
  5. AMD, Am486® Microprocessor Software User’s Manual, rev.1, 1994, section 1.59, p. 82
  6. ZFMicro, ZFx86 Data Book 1.0 Rev D, 5 June 2006, page 101
  7. Cyrix, Cx486DLC Microprocessor Data Sheet, order no. 94706-01, May 1992, section 2.3.2.6, p.37
  8. Cyrix, 6x86 BIOS Writer’s Guide, revision 4.1, 29 July 1996, page 43.
  9. Cyrix, 6x86 Processor data book, order no. 94175-01, March 1996, section 2.6.5, p. 74
  10. Linux kernel archive, Re: Cyrix 6x86 Patch.., 4 Nov 1996
  11. Cyrix, 6x86MX Processor Data Book, order no. 94329-00, 15 July 1997, section 2.13.1.1, page 87
  12. VIA-Cyrix Corp., Cyrix III Processor Data Book, v1.0, 25 January 2000, section 2.9.1.1, page 86
  13. Cyrix, MediaGX Processor Data Book, rev 2.0, 29 October 1998, section 3.3.2.4, p.59
  14. AMD, Geode™ LX Processors Data Book, publication ID: 33234H, February 2009, section 8.3.4.3, p.648
  15. IDT, WinChip C6 Processor Data Sheet, section A.2, p.79
  16. Intel, Quark SOC X1000 Core Developer's Manual, order no. 329679-001, October 2013, appendix B, page 296