From 285affc2121f9a87f9f32767384a173361a78687 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Sun, 5 Nov 2017 15:29:44 +0000 Subject: [PATCH] Add function "tss_flush" --- arch/Makefile | 2 +- arch/tss.asm | 8 ++++++++ arch/tss.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 arch/tss.asm diff --git a/arch/Makefile b/arch/Makefile index fd371a5..bedcf42 100644 --- a/arch/Makefile +++ b/arch/Makefile @@ -18,7 +18,7 @@ OBJS += kprintf.c.o OBJS += protected.c.o protected.asm.cpp.o -OBJS += tss.c.o +OBJS += tss.c.o tss.asm.cpp.o OBJS += interrupt.asm.cpp.o diff --git a/arch/tss.asm b/arch/tss.asm new file mode 100644 index 0000000..7b9b580 --- /dev/null +++ b/arch/tss.asm @@ -0,0 +1,8 @@ +#include "config.h" + +[GLOBAL tss_flush] + +tss_flush: + mov ax, GDT_TSS_SELECTOR + ltr ax + ret diff --git a/arch/tss.h b/arch/tss.h index 8abd73a..a63b9b5 100644 --- a/arch/tss.h +++ b/arch/tss.h @@ -5,4 +5,6 @@ void tss_write_to_gdt(const struct KernelMQ_Info *kinfo, void *gdt_entry); +void tss_flush(); + #endif