Control Registers

The five control registers determine various characteristics of the currently executing program. These registers are: CR0, CR2, CR3, CR4, and CR8.

List of Control Registers

The five registers are:

  • CR0: Flags controlling the operating mode and status of the processor.
  • CR2: The page fault linear address (the address that last caused a page fault).
  • CR3: The physical address of the base of the paging structure.
  • CR4: Flags to enable various processor extensions.
  • CR8: Access to the "Task Priority Register" (TPR).

CR2

TODO

CR8

TODO

Undefined Registers

Currently, only five registers are defined: CR0, CR2, CR3, CR4, and CR8. Despite this, the instruction encodings allow the possibility of registers all the way through CR15; Accessing any of the undefined registers will result in #UD.

Accessing the Registers

Control registers are accessed using two special forms of the MOV instruction. These instructions are detailed on their specific page: MOV-CR.

Access to the control registers is only allowed through general purpose registers; Memory forms of the ModR/M byte (i.e. where mod is not 0b11) are not allowed.