aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include/arch/cpu/registers.hpp
blob: 62206bfbddd830ffac74db8332ac88ea19e9a380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef TEACHOS_X86_64_CPU_REGISTERS_HPP
#define TEACHOS_X86_64_CPU_REGISTERS_HPP

#include "arch/cpu/control_register.hpp"         // IWYU pragma: export
#include "arch/cpu/model_specific_register.hpp"  // IWYU pragma: export

#include "kapi/memory.hpp"

namespace arch::cpu
{

  //! Configuration Register 0.
  //!
  //! This configuration register holds various control flags to configure the configure the basic operation of the CPU.
  using cr0 = control_register<cr0_flags, &impl::cr0_asm>;

  //! Configuration Register 2.
  //!
  //! This configuration register holds the memory address the access to which has triggered the most recent page fault.
  using cr2 = control_register<kapi::memory::linear_address, &impl::cr2_asm>;

  //! Configuration Register 3.
  //!
  //! This register holds the configuration of the virtual memory protection configuration.
  using cr3 = control_register<cr3_value, &impl::cr3_asm>;

  //! The I32_EFER (Extended Feature Enable Register) MSR
  using i32_efer = model_specific_register<ia32_efer_number, ia32_efer_flags>;

}  // namespace arch::cpu

#endif