From 05e1fedcc9cd30d1a34a65e640da45e980b4f859 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 19 Sep 2019 19:56:59 +0200 Subject: Moved source to kernel directory --- src/kernel/gdt/gdt.asm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/kernel/gdt/gdt.asm (limited to 'src/kernel/gdt/gdt.asm') diff --git a/src/kernel/gdt/gdt.asm b/src/kernel/gdt/gdt.asm new file mode 100644 index 0000000..c2128e4 --- /dev/null +++ b/src/kernel/gdt/gdt.asm @@ -0,0 +1,14 @@ +; GDT flush function +global gdt_flush +extern gp +gdt_flush: + lgdt [gp] + mov ax, 0x10 ; Data segment offset of GDT + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + jmp 0x08:flush2 ; Code segment offset +flush2: + ret ; Returns to C code \ No newline at end of file -- cgit v1.2.3