- Mastering Assembly Programming
- Alexey Lyashko
- 211字
- 2021-08-20 10:23:27
Control registers
Processors based on the Intel architecture have a set of control registers that are used for configuration of the processor at run time (such as switching between execution modes). These registers are 32-bit wide on x86 and 64-bit wide on AMD64 (long mode).
There are six control registers and one Extended Feature Enable Register (EFER):
- CR0: This register contains various control flags that modify the basic operation of the processor.
- CR1: This register is reserved for future use.
- CR2: This register contains the Page Fault Linear Address when a page fault occurs.
- CR3: This register is used when virtual addressing is enabled (paging) and contains the physical address of the page directory, page directory pointer table, or page map level 4 table, depending on the current mode of operation.
- CR4: This register is used in the protected mode for controlling different options of the processor.
- CR8: This register is new and is only available in long mode. It is used for prioritization of external interrupts.
- EFER: This register is one of the several model-specific registers. It is used for enabling/disabling SYSCALL/SYSRET instructions, entering/exiting long mode, and a few other features. Other model-specific registers are of no interest for us.
However, these registers are not accessible in ring3 (user land).
推薦閱讀
- Learning Microsoft Windows Server 2012 Dynamic Access Control
- Web程序設計及應用
- OpenCV實例精解
- Scala Design Patterns
- Vue.js快跑:構建觸手可及的高性能Web應用
- 深入理解Java7:核心技術與最佳實踐
- Learning Firefox OS Application Development
- 名師講壇:Java微服務架構實戰(SpringBoot+SpringCloud+Docker+RabbitMQ)
- Lighttpd源碼分析
- Image Processing with ImageJ
- 從程序員角度學習數據庫技術(藍橋杯軟件大賽培訓教材-Java方向)
- Java從入門到精通(視頻實戰版)
- Instant Pygame for Python Game Development How-to
- 精益軟件開發管理之道
- Building Apple Watch Projects