about summary refs log tree commit diff stats
path: root/tools/iso/kernel.soso/utils.asm
diff options
context:
space:
mode:
Diffstat (limited to 'tools/iso/kernel.soso/utils.asm')
-rw-r--r--tools/iso/kernel.soso/utils.asm18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/iso/kernel.soso/utils.asm b/tools/iso/kernel.soso/utils.asm
new file mode 100644
index 00000000..568bfb02
--- /dev/null
+++ b/tools/iso/kernel.soso/utils.asm
@@ -0,0 +1,18 @@
+[GLOBAL readEip]
+readEip:
+    pop eax
+    jmp eax
+
+[GLOBAL disablePaging]
+disablePaging:
+    mov edx, cr0
+    and edx, 0x7fffffff
+    mov cr0, edx
+    ret
+
+[GLOBAL enablePaging]
+enablePaging:
+    mov edx, cr0
+    or edx, 0x80000000
+    mov cr0, edx
+    ret