Intel Microcode

Last updated

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. [1] Intel had originally designed microcode updates for processor debugging under its design for testing (DFT) initiative. [2]

Contents

Following the Pentium FDIV bug, the patchable microcode function took on a wider purpose to allow in-field updating without needing to do a product recall. [1]

In the P6 and later microarchitectures, x86 instructions are internally converted into simpler RISC-style micro-operations that are specific to a particular processor and stepping level. [1]

Micro-operations

On the Intel 80486 and AMD Am486 there are approximately 250 lines of microcode, totalling 12,032 bits stored in the microcode ROM. [3]

On the Pentium Pro, each micro-operation is 72-bits wide, [4] :43 or 118-bits wide. [5] :2 [6] :14 This includes an opcode, two source fields, and one destination field, [7] :7 with the ability to hold a 32-bit immediate value. [5] [6] :14 The Pentium Pro is able to detect parity errors in its internal microcode ROM and report these via the Machine Check Architecture. [8]

Micro-operations have a consistent format with up to three source inputs, and two destination outputs. [9] The processor performs register renaming to map these inputs to and from the real register file (RRF) before and after their execution. [9] Out-of-order execution is used, so the micro-operations and instructions they represent may not appear in the same order.

During development of the Pentium Pro, several microcode fixes were included between the A2 and B0 steppings. [10] For the Pentium II (based on the P6 Pentium Pro), additional micro-operations were added to support the MMX instruction set. [11] In several cases, "microcode assists" were added to handle rare corner-cases in a reliable way. [11]

The Pentium 4 can have 126 micro-operations in flight at the same time. [12] :10 Micro-operations are decoded and stored in an Execution Trace Cache with 12,000 entries, to avoid repeated decoding of the same x86 instructions. [12] :5 Groups of six micro-operations are packed into a trace line. [12] :5 Micro-operations can borrow extra immediate data space within the same cache-line. [13] :49 Complex instructions, such as exception handling, result in jumping to the microcode ROM. [12] :6 During development of the Pentium 4, microcode accounted for 14% of processor bugs versus 30% of processor bugs during development of the Pentium Pro. [14] :35

The Intel Core microarchitecture introduced in 2006 added "micro-operations fusion" for some common pairs of instructions including comparison followed by a jump. [15] The instruction decoders in the Core convert x86 instructions into microcode in three different ways:

Conversion of x86 instructions to micro-operations on Core [15]
x86 instructionsx86 decodersmicro-operations
commonsimple decoder × 31–3
most otherscomplex decoder × 1≤4
very complexmicrocode sequencermany

For Intel's hyper-threading implementation of simultaneous multithreading, the microcode ROM, trace cache, and instruction decoders are shared, but the micro-operation queue is not shared. [16]

Update facility

In the mid-1990s, a facility for supplying new microcode was initially referred to as the Pentium Pro BIOS Update Feature. [17] [18] It was intended that user-mode applications should make a BIOS interrupt call to supply a new "BIOS Update Data Block", which the BIOS would partially validate and save to nonvolatile BIOS memory; this could be supplied to the installed processors on next boot. [17]

Intel distributed a program called BUP_UTIL.EXE, renamed CHECKUP3.EXE that could be run under DOS. Collections of multiple microcode updates were concatenated together and numerically numbered with the extension .PDB, such as PEP6.PDB. [19] :79

Processor interface

The processor boots up using a set of microcode held inside the processor and stored in an internal ROM. [1] A microcode update populates a separate SRAM and set of "match registers" that act as breakpoints within the microcode ROM, to allow jumping to the updated list of micro-operations in the SRAM. [1] A match is performed between the Microcode Instruction Pointer (UIP) all of the match registers, with any match resulting in a jump to the corresponding destination microcode address. [2] :3 In the original P6 architecture there is space in the SRAM for 60 micro-operations, and multiple match/destination register pairs. [1] [2] :3 It takes one processor instruction cycle to jump from ROM microcode to patched microcode held in SRAM. [1] Match registers consist of a microcode match address, and a microcode destination address. [20]

The processor must be in protection ring zero ("Ring 0") in order to initiate a microcode update. [20] :1 Each CPU in a symmetric multiprocessing arrangement needs to be updated individually. [20] :1

An update is initiated by placing its address in eax register, setting ecx = 0x79, and executing a wrmsr (Write model-specific register). [21] :435

Microcode update format

Intel distributes microcode updates as a 2,048 (2 kilobyte) binary blob. [1] The update contains information about which processors it is designed for, so that this can be checked against the result of the CPUID instruction. [1] The structure is a 48-byte header, followed by 2,000 bytes intended to be read directly by the processor to be updated: [1]

  1. A microcode program that is executed by the processor during the microcode update process. [1] This microcode is able to reconfigure and enable or disable components using a special register, and it must update the breakpoint match registers. [1]
  2. Up to sixty patched micro-operations to be populated into the SRAM. [1]
  3. Padding consisting of random values, to obfuscate understanding of the format of the microcode update. [1]

Each block is encoded differently, and the majority of the 2,000 bytes are not used as configuration program and SRAM micro-operation contents themselves are much smaller. [1] Final determination and validation of whether an update can be applied to a processor is performed during decryption via the processor. [17] Each microcode update is specific to a particular CPU revision, and is designed to be rejected by CPUs with a different stepping level. Microcode updates are encrypted to prevent tampering and to enable validation. [22]

With the Pentium there are two layers of encryption and the precise details explicitly not documented by Intel, instead being only known to fewer than ten employees. [23]

Microcode updates for Intel Atom, Nehalem and Sandy Bridge additionally contain an extra 520-byte header containing a 2048-bit RSA modulus with an exponent of 17 decimal. [20] :7,8

Observed Intel microcode data-block lengths (in bytes) [20] :16
Micro architectureExample processorsSupplied lengthFunctional lengthSuspected encoding
P6Pentium Pro2000864; 872; 944; 196864-bit block cipher
CorePIII … Core 240483096
NetburstP4, Pentium D, Celeron2000–71202000 + N*1024chained block cipher
Atom, Nehalem, Sandy BridgeCore i3/i5/i7976–16336976 + N*1024; 5120AES + RSA signature

Debugging

Special debugging-specific microcode can be loaded to enable Extended Execution Trace, which then outputs extra information via the Breakpoint Monitor Pins. [24] On the Pentium 4, loading special microcode can give access to Microcode Extended Execution Trace mode. [24] When using the JTAG Test Access Port (TAP), a pair of Breakpoint Control registers allow breaking on microcode addresses. [24]

During the mid-1980s NEC and Intel had a long-running US federal court case about microcode copyright. [25] NEC had been acting as a second source for Intel 8086 CPUs with its NEC μPD8086, and held long-term patent and copyright cross-licensing agreements with Intel. In August 1982 Intel sued NEC for copyright infringement over the microcode implementation. [26] [27] NEC prevailed by demonstrating via cleanroom software engineering that the similarities in the implementation of microcode on its V20 and V30 processors was the result of the restrictions demanded by the architecture, rather than via copying. [25]

The Intel 386 can perform a built-in self-test of the microcode and programmable logic arrays, with the value of the self-test placed in the EAX register. [28] During the BIST, the microprogram counter is re-used to walk through all of the ROMs, with the results being collated via a network of multiple-input signature registers (MISRs) and linear-feedback shift registers. [29] On start up of the Intel 486, a hardware-controlled BIST runs for 220 clock cycles to check various arrays including the microcode ROM, after which control is transferred to the microcode for further self-testing of registers and computation units. [30] The Intel 486 microcode ROM has 250,000 transistors. [30]

AMD had a long-term contract to reuse Intel's 286, 386 and 486 microcode. [31] In October 2004, a court ruled that the agreement did not cover AMD distributing Intel's 486 in-circuit emulation (ICE) microcode. [31]

Direct Access Testing

Direct Access Testing (DAT) is included in Intel CPUs as part of the design for testing (DFT) and Design for Debug (DFD) initiatives allow full coverage testing of individual CPUs prior to sale. [32]

In May 2020, a script reading directly from the Control Register Bus (CRBUS) [33] (after exploiting "Red Unlock" in JTAG USB-A to USB-A 3.0 with Debugging Capabilities, without D+, D− and Vcc [34] ) was used to read from the Local Direct Access Test (LDAT) port of the Intel Goldmont CPU and the loaded microcode and patch arrays were read. [35] These arrays are only accessible after the CPU has been put into a specific mode, and consist of five arrays accessed through offset 0x6a0: [36]

  1. ROM: Microcode triads
  2. ROM: Sequence Words
  3. RAM: Sequence Words (updatable)
  4. RAM: Match/Patch pairs (updatable)
  5. RAM: Microcode triads (updatable)

Related Research Articles

A control store is the part of a CPU's control unit that stores the CPU's microprogram. It is usually accessed by a microsequencer. A control store implementation whose contents are unalterable is known as a Read Only Memory (ROM) or Read Only Storage (ROS); one whose contents are alterable is known as a Writable Control Store (WCS).

<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.

A complex instruction set computer is a computer architecture in which single instructions can execute several low-level operations or are capable of multi-step operations or addressing modes within single instructions. The term was retroactively coined in contrast to reduced instruction set computer (RISC) and has therefore become something of an umbrella term for everything that is not RISC, where the typical differentiating characteristic is that most RISC designs use uniform instruction length for almost all instructions, and employ strictly separate load and store instructions.

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">AMD K6</span> Computer microprocessor

The K6 microprocessor was launched by AMD in 1997. The main advantage of this particular microprocessor is that it was designed to fit into existing desktop designs for Pentium-branded CPUs. It was marketed as a product that could perform as well as its Intel Pentium II equivalent but at a significantly lower price. The K6 had a considerable impact on the PC market and presented Intel with serious competition.

In processor design, microcode serves as an intermediary layer situated between the central processing unit (CPU) hardware and the programmer-visible instruction set architecture of a computer, also known as its machine code. It consists of a set of hardware-level instructions that implement the higher-level machine code instructions or control internal finite-state machine sequencing in many digital processing components. While microcode is utilized in general-purpose CPUs in contemporary desktops, it also functions as a fallback path for scenarios that the faster hardwired control unit is unable to manage.

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

The Pentium is a x86 microprocessor introduced by Intel on March 22, 1993. It is the first CPU using the Pentium brand. Considered the fifth generation in the 8086 compatible line of processors, its implementation and microarchitecture was internally called P5.

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. Colloquially, their names were "186", "286", "386" and "486".

<span class="mw-page-title-main">Pentium III</span> Line of desktop and mobile microprocessors produced by Intel

The Pentium III brand refers to Intel's 32-bit x86 desktop and mobile CPUs based on the sixth-generation P6 microarchitecture introduced on February 28, 1999. The brand's initial processors were very similar to the earlier Pentium II-branded processors. The most notable differences were the addition of the Streaming SIMD Extensions (SSE) instruction set, and the introduction of a controversial serial number embedded in the chip during manufacturing. The Pentium III is also a single-core processor.

<span class="mw-page-title-main">Pentium Pro</span> Sixth-generation x86 microprocessor by Intel

The Pentium Pro is a sixth-generation x86 microprocessor developed and manufactured by Intel and introduced on November 1, 1995. It introduced the P6 microarchitecture and was originally intended to replace the original Pentium in a full range of applications. While the Pentium and Pentium MMX had 3.1 and 4.5 million transistors, respectively, the Pentium Pro contained 5.5 million transistors. Later, it was reduced to a more narrow role as a server and high-end desktop processor and was used in supercomputers like ASCI Red, the first computer to reach the trillion floating point operations per second (teraFLOPS) performance mark in 1996. The Pentium Pro was capable of both dual- and quad-processor configurations. It only came in one form factor, the relatively large rectangular Socket 8. The Pentium Pro was succeeded by the Pentium II Xeon in 1998.

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.

The NetBurst microarchitecture, called P68 inside Intel, was the successor to the P6 microarchitecture in the x86 family of central processing units (CPUs) made by Intel. The first CPU to use this architecture was the Willamette-core Pentium 4, released on November 20, 2000 and the first of the Pentium 4 CPUs; all subsequent Pentium 4 and Pentium D variants have also been based on NetBurst. In mid-2001, Intel released the Foster core, which was also based on NetBurst, thus switching the Xeon CPUs to the new architecture as well. Pentium 4-based Celeron CPUs also use the NetBurst architecture.

A CPU cache is a hardware cache used by the central processing unit (CPU) of a computer to reduce the average cost to access data from the main memory. A cache is a smaller, faster memory, located closer to a processor core, which stores copies of the data from frequently used main memory locations. Most CPUs have a hierarchy of multiple cache levels, with different instruction-specific and data-specific caches at level 1. The cache memory is typically implemented with static random-access memory (SRAM), in modern CPUs by far the largest part of them by chip area, but SRAM is not always used for all levels, or even any level, sometimes some latter or all levels are implemented with eDRAM.

A register file is an array of processor registers in a central processing unit (CPU). The instruction set architecture of a CPU will almost always define a set of registers which are used to stage data between memory and the functional units on the chip. The register file is part of the architecture and visible to the programmer, as opposed to the concept of transparent caches. In simpler CPUs, these architectural registers correspond one-for-one to the entries in a physical register file (PRF) within the CPU. More complicated CPUs use register renaming, so that the mapping of which physical entry stores a particular architectural register changes dynamically during execution.

<span class="mw-page-title-main">P6 (microarchitecture)</span> Intel processor microarchitecture

The P6 microarchitecture is the sixth-generation Intel x86 microarchitecture, implemented by the Pentium Pro microprocessor that was introduced in November 1995. It is frequently referred to as i686. It was planned to be succeeded by the NetBurst microarchitecture used by the Pentium 4 in 2000, but was revived for the Pentium M line of microprocessors. The successor to the Pentium M variant of the P6 microarchitecture is the Core microarchitecture which in turn is also derived from P6.

The Intel Core microarchitecture is a multi-core processor microarchitecture launched by Intel in mid-2006. It is a major evolution over the Yonah, the previous iteration of the P6 microarchitecture series which started in 1995 with Pentium Pro. It also replaced the NetBurst microarchitecture, which suffered from high power consumption and heat intensity due to an inefficient pipeline designed for high clock rate. In early 2004 the new version of NetBurst (Prescott) needed very high power to reach the clocks it needed for competitive performance, making it unsuitable for the shift to dual/multi-core CPUs. On May 7, 2004 Intel confirmed the cancellation of the next NetBurst, Tejas and Jayhawk. Intel had been developing Merom, the 64-bit evolution of the Pentium M, since 2001, and decided to expand it to all market segments, replacing NetBurst in desktop computers and servers. It inherited from Pentium M the choice of a short and efficient pipeline, delivering superior performance despite not reaching the high clocks of NetBurst.

<span class="mw-page-title-main">Micro-operation</span> Low-level instructions used in some designs to implement complex machine instructions

In computer central processing units, micro-operations are detailed low-level instructions used in some designs to implement complex machine instructions.

<span class="mw-page-title-main">Pentium</span> Brand of semi-discontinued microprocessors produced by Intel

Pentium is a semi-discontinued series of x86 architecture-compatible microprocessors produced by Intel. The original Pentium was first released on March 22, 1993. The name "Pentium" is originally derived from the Greek word pente (πεντε), meaning "five", a reference to the prior numeric naming convention of Intel's 80x86 processors (8086–80486), with the Latin ending -ium since the processor would otherwise have been named 80586 using that convention.

References

  1. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Gwennap, Linley (15 September 1997). "P6 Microcode Can Be Patched" (PDF). Microprocessor Report . Archived from the original (PDF) on 21 December 2009. Retrieved 23 January 2018. Intel has implemented a microcode patch capability in its P6 processors, including Pentium Pro and Pentium II … allows the microcode to be altered after the processor is fabricated, repairing bugs that are found after the processor is designed. … originally intended the feature to be used only for debugging, but after dealing with the expense of the Pentium FDIV bug … Intel decided to make it usable in the field. … P6 chip contains a complete set of microcode in an internal ROM … BIOS writes a memory address into a special CPU register to trigger a download sequence … P6 processors contain a small SRAM that holds up to 60 microinstructions. The patch code is downloaded into this SRAM … also contains a set of "match" registers that cause a trap when a particular microcode address is encountered. (This is similar to the "instruction breakpoint" capability used to debug assembly code.) This trap, which takes a single cycle to process, vectors microcode execution into the patch RAM. … downloaded microcode consists of two segments. … first is an initialization routine that is run immediately … also initializes the match registers, if necessary. … second segment contains one or more patches that remain in the patch RAM during normal operation and are accessed via a match-register trap. … original microcode is stored in ROM, … match registers allow the operation of the microcode to be changed. In this way, an x86 instruction that is operating incorrectly can be repaired, assuming it is implemented in microcode. … a patch is created to replace a section of the original microcode, performing the correct operation and then jumping back. … number of match registers, … more than one. … single bug, … might require multiple patches, and some bugs are too complex to repair … mechanism could allow multiple bugs to be fixed, … features of the P6 processor can be disabled via a special register … 2,048-byte block of data. The block contains a 48-byte header—which includes a date code, the CPU ID (which includes the stepping level) of the target processor, and a checksum—and 2,000 bytes of data to be downloaded by the processor. … checksum … is not used by the CPU. … 2,000 data bytes are encrypted in a way that Intel claims will be extremely difficult to break. The bytes are divided into blocks of varying lengths, each of which is encoded differently. … typically much smaller than 2,000 bytes, the remaining data is random noise intended to confuse anyone attempting to break the encryption. … Intel has not published any information on the format of its microcode, … is deliberately designed to be difficult to understand. Only a small number of Intel employees know the P6 microcode formats.
  2. 1 2 3 Yeoh Eng Hong; Lim Seong Leong; Wong Yik Choong; Lock Choon Hou; Mahmud Adnan (20 April 1998). Chao, Lin (ed.). "An Overview of Advanced Failure Analysis Techniques for Pentium and Pentium Pro Microprocessors" (PDF). Intel Technology Journal (Q2). Pentium Pro microprocessor ... Micropatching DFT feature. ... consists of two key elements: the microcode patch RAM and several pairs of Match and Destination registers. ... Microcode Instruction Pointer (UIP) matches the content of a Match register, the UIP will be reloaded with a new address from the Destination register. ... UIP for the reset subroutine can be set in the Match register ... thereby bypassing the reset subroutine altogether.
  3. Trumbull, Patricia V. (1994-10-07). Intel Corporation v. Advanced Micro Devices (Findings of fact and conclusions of law following "ICE" module of trial). United States District Court for the Northern District of California. San Jose. Retrieved 2021-05-10 via Advanced Micro Devices. Twelve pins are affiliated with the "ICE" circuitry. … AMD 486DXL and DXLV connect three pins associated with "ICE" in order to implement its "SMM" feature. … 250 lines or 12,032 bits of the "ICE" microcode in the 486. "ICE" constitutes about five percent of the total 486 microcode. … two lines … (used to set the "ICE" mode "flip flop") … blue coded lines of microcode are associated with production testing and not used for "ICE" related purposes. … Seventy-five red coded lines were used by Intel to perform "SMM" in its 486SL, a data sheet function of this version of the chip. About 32 yellow coded lines perform routine operations which are not unique to "ICE." About two lines remain dedicated solely to "ICE."
  4. Kubiatowicz, John (3 May 2004). "Dynamic Scheduling in P6 (Pentium Pro, II, III)" (PDF). Low Power Design, Advanced Intel Processors. CS152 Computer Architecture and Engineering (Lecture 25). Complex 80x86 instructions are executed by a conventional microprogram (8K x 72 bits) that issues long sequences of micro-operations
  5. 1 2 Gwennap, Linley (16 February 1995). "Intel's P6 Uses Decoupled Superscalar Design" (PDF). Microprocessor Report . Vol. 9, no. 2. MicroDesign Resources. pp. 1–7. S2CID   14414612. Archived from the original (PDF) on 8 October 2018. P6 uops have a fixed length of 118 bits, using a regular structure to encode an operation, two sources, and a destination. The source and destination fields are each wide enough to contain a 32-bit operand.
  6. 1 2 Asanovic, Krste (2002). "P6 uops" (PDF). Microprocessor Evolution: 4004 to Pentium Pro (Spring): 14. Retrieved 23 January 2018. Each uop has fixed format of around 118 bits … – opcode, two sources, and destination … – sources and destination fields are 32-bits wide to hold immediate or operand
  7. Colwell, Robert P.; Steck, Randy L.; Intel Corporation (1995-04-12). "A 0.6 μm BiCMOS Processor With Dynamic Execution" (PDF). p. 7. Retrieved 2020-05-27. Micro-ops are the atomic unit of work in the P6 processor and are comprised of an opcode, two source and one destination operand. These micro-ops are fixed length and are more general than the Pentium(R) processor's microcode since they need to be scheduled.
  8. 16.6.1. Simple Error Codes (PDF). Machine Check Architecture (Report). Pentium® Pro Family Developer's Manual. Vol. 3: Operating System Writer's Guide. 3 January 1996. p. 401. Archived from the original on 6 September 2001. Retrieved 1 October 2018. unique codes indicate global error information … Microcode ROM Parity Error{{cite report}}: CS1 maint: unfit URL (link)
  9. 1 2 Ronen, Ronny; Intel Labs (18 January 2005). Micro Operations (Uops) (PDF). The Pentium II/III Processor "Compiler on a Chip" (Report). Haifa: Tel Aviv University. pp. 26, 31, 32, 43, 44, 46. Archived from the original (PDF) on 16 April 2007. Retrieved 23 January 2018. Each "CISC" inst is broken into one or more uops … Canonical representation of src/dest (3 src, 2 dest) … e.g., pop eax becomes esp1<-esp0+4, eax1<-[esp0]ID: Convert instructions into uops. Buffers up to 6 uopsAlloc & RAT … able to work on up to 3 uops per clock … Reservation station (RS) … Pool of all "not yet executed" uops (up to 20) … In order Retirement: … Retires up to 3 uops per clock … OOO Cluster … Up to 5 resource-ready uops are selected, and dispatched per clock
  10. Papworth, David B.; Intel Corporation (April 1996). "Tuning the Pentium Pro Microarchitecture" (PDF). IEEE Micro. p. 14. ISSN   0272-1732. Archived from the original (PDF) on 8 October 2018. Retrieved 8 October 2018. B0 stepping incorporated several microcode bugs and speed path fixes for problems discovered on the A-step silicon
  11. 1 2 Kagan, Michael; Gochman, Simcha; Orenstien, Doron; Lin, Derrick (1997). "MMX Microarchitecture of Pentium Processors With MMX Technology and Pentium II Microprocessors" (PDF). Intel Technology Journal (Q3): 6, 7. Pentium II processor's microarchitecture is similar to that of the Pentium Pro microprocessor … modified to convert the new MMX instructions to Pentium Pro processor-specific uops (new Single Instruction Multiple Data [SIMD] uops were added to implement the new functionality). … A microcode assist was created to correct the problem and redo the operation. An assist is a customer-invisible event that flushes out the machine and allows microcode to handle rare but difficult-to-handle problems. Since all MMX instructions zero the TOS, the assist needs to write the TOS to zero and restart the operation. … Illegal opcodes that are instruction holes in the MMX instruction opcode map are defined to generate a one uop assist call. This assist call instructs the ROB to flush the machine and causes an assist microcode flow to cause the processor to handle illegal opcode faults.
  12. 1 2 3 4 Hinton, Glenn; Sager, Dave; Upton, Mike; Boggs, Darrell; Carmean, Doug; Kyker, Alan; Roussel, Patrice (2001). Chao, Lin (ed.). "The Microarchitecture of the Pentium 4 Processor" (PDF). Intel Technology Journal. No. Q1. IA-32 instruction bytes are then decoded into basic operations called uops (micro-operations) … advanced form of a Level 1 (L1) instruction cache called the Execution Trace Cache … between the instruction decode logic and the execution core … to store the already decoded … uops. … instructions are decoded once … then used repeatedly from there … has a capacity to hold up to 12K uops … similar hit rate to an 8K to 16K byte conventional instruction cache. … packs the uops into groups of six uops per trace line … microcode ROM … for complex IA-32 instructions, such as string move, and for fault and interrupt handling … Trace Cache jumps into the microcode ROM which then issues the uops … After the microcode ROM finishes sequencing uops … front end of the machine resumes fetching uops from the Trace Cache. … deep buffering of the Pentium 4 processor (126 uops and 48 loads in flight)
  13. Fog, Agner (2020-05-25). "The microarchitecture of Intel, AMD and VIA CPUs" (PDF) (An optimization guide for assembly programmers and compiler makers). Technical University of Denmark. p. 49. … If a μop has an immediate 32-bit operand outside the ±215 interval so that it cannot be represented as a 16-bit signed integer, then it will use two trace cache entries unless it can borrow storage space from a nearby μop. … A μop in need of extra storage space can borrow 16 bits of extra storage space from a nearby μop that doesn't need its own data space.
  14. Bentley, Bob; Gray, Rand (2001). Chao, Lin (ed.). "Validating The Intel® Pentium® 4 Processor" (PDF). Intel Technology Journal (Q1): 29–26. Bug Discussion
  15. 1 2 De Gelas, Johan (1 May 2006). "Intel Core versus AMD's K8 architecture". AnandTech . p. 3. Retrieved 23 January 2018. Core architecture is equipped with four x86 decoders, 3 simple decoders and 1 complex decoder … to translate the 1 to 15 byte variable length x86 instructions into … fixed length RISC-like instructions (called micro-ops). … common x86 instructions are translated into a single micro-op … complex decoder is responsible for the instructions that produce up to 4 micro-ops. … really long and complex x86 instructions are handled by a microcode sequencer. … macro-op fusion … the x86 compare instruction (CMP) is fused with a jump (JNE TARG).
  16. Kim, Dongkeun; Shih-wei Liao, Steve; Wang, Perry H.; del Cuvillo, Juan; Tian, Xinmin; Zou, Xiang; Wang, Hong; Yeung, Donald; Girkar, Milind; Shen, John P. (11 January 2004). "Physical Experimentation with Prefetching Helper Threads on Intels Hyper-Threaded Processors" (PDF). pp. 4, 5. Retrieved 24 January 2018. L1 Trace cache: 12K micro-ops, 8-way set associative, 6 micro-ops per line … Shared: Trace cache, … IA-32 instruction decode, Microcode ROM, Uop retirement logic, … Partitioned: Uop queue
  17. 1 2 3 8: Pentium Pro Processor BIOS Update Feature (PDF) (Report). 2.0. Intel. 12 January 1996. p. 45. Retrieved 3 November 2020. authentication procedure relies upon the decryption provided by the processor to verify an update from a potentially hostile sources.
  18. Stiller, Andreas; Paul, Matthias R. (1996-05-12). "Prozessorgeflüster". c't – magazin für computertechnik . Trends & News / aktuell - Prozessoren (in German). Vol. 1996, no. 6. Verlag Heinz Heise GmbH & Co KG. p. 20. ISSN   0724-8679. Archived from the original on 2017-08-28. Retrieved 2017-08-28.
  19. Mueller, Scott; Zacker, Craig (September 1998). Minatel, Jim; Byus, Jill; Kughen, Rick (eds.). Upgrading and Repairing PCs (PDF) (Tenth Anniversary ed.). Que Publishing. p. 79. ISBN   0-7897-1636-4 . Retrieved 1 October 2018. Processor Steppings (Revisions) and Microcode Update Revisions Supported by the Update Database File PEP6.PDB … Using the processor update utility (CHECKUP3.EXE), … can easily verify … the correct microcode update
  20. 1 2 3 4 5 Chen, Daming Dominic; Ahn, Gail-Joon (11 December 2014). "Security Analysis of x86 Processor Microcode" (PDF). Arizona State University. pp. 1, 5, 7. Retrieved 23 January 2018. supervisor privileges (ring zero) are required to update processor microcode … Since the 1970s, processor manufacturers have decoded the x86 … into a sequence of … (RISC) micro-operations (uops) … introduced writable patch memory to provide an update mechanism for implementing dynamic debugging capabilities and correcting processor errata, especially after the infamous Pentium FDIV bug of 1994. … P6 (Pentium Pro) microarchitecture in 1995, … K7 microarchitecture in 1999 … with symmetric multiprocessing (SMP) … should be executed synchronously on each logical processor … patch RAM in addition to the MROM … up to 60 microinstructions, with patching implemented by pairs of match and destination registers. … a 520 byte block containing a 2048-bit RSA modulus that appears to be constant within each processor family. This is followed by a four byte RSA exponent with the fixed value 11h
  21. Shanley, T. (1998). Pentium Pro and Pentium II System Architecture. Addison-Wesley Professional. p. 435. ISBN   9780201309737.
  22. Wolfe, Alexander (30 June 1997). "Intel preps plan to bust bugs in Pentium MPUs". EE Times . No. 960. Archived from the original on 1999-11-13. Retrieved 3 October 2018 via Techweb. obscure moniker "BIOS Update Feature." … "Each BIOS Update is tailored for a particular stepping of [a] processor," … data block is mapped directly-… after decryption-to the microcode itself.
  23. Wolfe, Alexander (30 June 1997). "Hole seen in Intel's bug-busting feature". EE Times . Santa Clara. Archived from the original on 2003-03-09. Ajay Malhortra, a technical marketing manager based here at Intel's microprocessor group. "Not only is the data block containing the microcode patch encrypted, but once the processor examines the header of the BIOS update, there are two levels of encryption in the processor that must occur before it will successfully load the update." … closely guarded secret. "There is no documentation," said Frank Binns, an architect in Intel's microprocessor group. "It's not as if you can get an Intel 'Red Book' with this stuff written down. It's actually in the heads of less than 10 people in the whole of Intel."
  24. 1 2 3 "Details of Intel Probe mode". Hardice. Retrieved 23 January 2018. emit a packet over the BPM when special instructions are executed … To enable Extended Execution Trace, special microcode patches must be applied … For the Pentium 4 only, there exists a second type … called microcode Extended Execution Trace … Control Register Bus in turn allows access to internal arrays and functions on the processor, such as accessing the LLC and the microcode/Virtual Fuse PROM. … that sits on the CPU package but is not within the CPU silicon die. This PROM also contains the microcode that the CPU loads during cold boot. … breakpoint on a 48-bit microcode address … accessed by the TAP commands BRKPTCTLA and BRKPTCTLB.
  25. 1 2 Elkins, David S. (Winter 1990). "NEC v. Intel: A Guide to Using "Clean Room" Procedures as Evidence". Computer/Law Journal. 10 (4): 453. NEC's use of its clean room procedures as trial evidence … Judge Gray defined microcode … within the Copyright Act's definition of a "computer program," … Intel's microcode is copyrightable. … Intel's microcode did not contain the required copyright notice. … copyrights had been forfeited. … Intel was left with no basis for its claim of copying
  26. Hinckley, Robert C. (January 1987). "NEC v. Intel: Will Hardware Be Drawn into the Black Hole of Copyright Editors'". Santa Clara High Technology Law Journal. 3 (1). Appendix: Microcode formats; 8086/8088 Format; V20/V30 format
  27. Leong, Kathy Chin (28 March 1988). "Intel witness recants story". Computerworld . Vol. 22, no. 13. San Jose. pp. 83, 84. ISSN   0010-4841 . Retrieved 2 October 2018.
  28. "Intel386 DX Microprocessor 32-BIT CHMOS Microprocessor with Integrated Memory Management" (PDF). December 1995. Archived from the original on 3 September 2004. self-test checks the function of all of the Control ROM … EAX register will contain a signature of 00000000h indicating the Intel386 DX passed its self-test of microcode and major PLA contents{{cite web}}: CS1 maint: unfit URL (link)
  29. "5.1 Exhaustive Test in the Intel 80386" (PDF). Built-In-Self-Test (BIST) for Embedded Systems. Testing of Embedded System. IIT Kharagpur: 21. 7 October 2006. Retrieved 6 October 2018. For ROMs, the patterns are generated by the microprogram counter which is part of the normal logic.
  30. 1 2 Gelsinger, Patrick; lyengar, Sundar; Krauskopf, Joseph; Nadir, James; Intel (1999). Computer Aided Design and Built In Self Test on the i486™ CPU (PDF). 1989 IEEE International Conference on Computer Design: VLSI in Computers and Processors. IEEE. pp. 200–201.
  31. 1 2 "Court ruling against AMD causes some concern". InfoWorld . 17 October 1994. p. 5. Retrieved 24 January 2018. The decision by the federal district court in San Jose, Calif., said that AMD does not have the right to use Intel's in-circuit emulation (ICE) code in the AMD microprocessors. This code is present on all AMD 486s but is only used in a low-power 486-DXL and 486-DXLV processors. … AMD has started to rework its entire line of 486s to eliminate the code.
  32. Wu, David M.; Lin, Mike; Reddy, Madhukar; Jaber, Talal; Sabbavarapu, Anil; Thatcher, Larry; Intel Corporation (2004). "An An optimized DFT and test pattern generation strategy for an Intel high performance microprocessor" (PDF). pp. 38, 43, 44. Direct Access Testing (DAT) for array access and diagnosis and Programmable Weak Write Test Mode (PWWTM) for memory cell stability test to reduce the test time. … Array DFT test strategy is to use PBIST (Programmable Built-In Self Test) to test the second level cache and use DAT to test the remaining arrays … PBIST is available through the JTAG TAP controller. … DAT mode in PX as shown in Figure 4 … PX has more arrays (>110) … array test coverage of PX is 99.3% ‒ the highest in Pentium 4 family
  33. Team, uCode Research (25 May 2020). "chip-red-pill/crbus_scripts". GitHub . Retrieved 26 May 2020.
  34. Positive Research (2020-07-21), ptresearch/IntelTXE-PoC , retrieved 2020-07-25
  35. Ermolov, Mark [@_markel___] (May 19, 2020). "Using the Local Direct Access Test (LDAT) DFT feature of Intel Atom CPU, we dumped Microcode Sequencer ROM. Also, we extracted what we think is IROM (Immediates for uops) and even managed to modify MS Patch RAM and Match/Patch registers" (Tweet) via Twitter.
  36. Bosch, Peter (2020-05-22). "Intel LDAT notes" . Retrieved 2020-05-26. PDAT CR: 0x6A0; Array Select: 0‒4

Further reading