summaryrefslogtreecommitdiffstats
path: root/arch/x86/gdt/SwitchToGdt.s
diff options
context:
space:
mode:
authorAlexey Gavrilov <rebovas@yahoo.com>2024-03-05 17:20:53 +0700
committerAlexey Gavrilov <rebovas@yahoo.com>2024-03-05 17:20:53 +0700
commit1af53b431da6d3b5dcf7132f98f9eb2af88b57fa (patch)
tree730528109a1ffbd5505f05f3457156a68394d339 /arch/x86/gdt/SwitchToGdt.s
parent976575c12b5da66996a3204ec711e4937a3ef240 (diff)
GDT rename procedure + edit .gitignore
Diffstat (limited to 'arch/x86/gdt/SwitchToGdt.s')
-rw-r--r--arch/x86/gdt/SwitchToGdt.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/gdt/SwitchToGdt.s b/arch/x86/gdt/SwitchToGdt.s
new file mode 100644
index 0000000..52ebbc7
--- /dev/null
+++ b/arch/x86/gdt/SwitchToGdt.s
@@ -0,0 +1,13 @@
+global SWITCHTOGDT
+SWITCHTOGDT:
+ lgdt [esp + 4]
+ jmp 0x08:.reloadCS
+.reloadCS:
+ mov ax, 0x10
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+ mov ss, ax
+ ret
+.end: