Functions for reading/writing some special registers

This commit is contained in:
2018-02-13 12:47:50 +01:00
parent 96d2ebd977
commit c1c3842ace
5 changed files with 37 additions and 9 deletions

View File

@@ -0,0 +1,23 @@
.intel_syntax noprefix
.global load_idt
load_idt:
lidt [rdi]
ret
.global read_cr0
read_cr0:
mov rax, cr0
ret
.global read_cr2
read_cr2:
mov rax, cr2
ret
.global read_cr3
read_cr3:
mov rax, cr3
ret
.global read_cr4
read_cr4:
mov rax, cr4
ret