summaryrefslogtreecommitdiff
path: root/src/nasty.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/nasty.S')
-rw-r--r--src/nasty.S19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/nasty.S b/src/nasty.S
index f3d958e..997fb6c 100644
--- a/src/nasty.S
+++ b/src/nasty.S
@@ -79,7 +79,8 @@ get_cr3:
ISR(28) \
ISR(29) \
ISR(30) \
- ISR(31)
+ ISR(31) \
+ ISR(32)
.extern interrupt_handler
#define ISR(n) \
@@ -147,3 +148,19 @@ dump_regs:
mov [rdi+192], fs
mov [rdi+194], gs
ret
+
+.global get_msr
+get_msr:
+ mov ecx, edi
+ mov rax, 0 /* Not sure if this and the next line are needed. My assembly skills are lacking. */
+ mov rdx, 0
+ rdmsr
+ shl rdx, 32
+ or rax, rdx
+ ret
+
+.global in_uint8
+in_uint8:
+ mov dx, di
+ in ax, dx
+ ret