diff options
author | Danny Holman <dholman@gymli.org> | 2022-01-21 12:10:05 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2022-01-21 12:10:05 -0600 |
commit | 8cd22309667cf3da9c357e5b7dca43e8b6a2f9c0 (patch) | |
tree | 05a7e450a702a5fc744b4bd1f96abf1952ece566 /arch/i386/boot/tss.c | |
parent | 5fe27abd6204dd17787d7d0046015777444357ff (diff) |
arch: i386: move non-critial files out of boot
Move all files not needed for the bootstrap process out of boot and into
the main x86 source directory.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/boot/tss.c')
-rw-r--r-- | arch/i386/boot/tss.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/arch/i386/boot/tss.c b/arch/i386/boot/tss.c deleted file mode 100644 index 2edfa76..0000000 --- a/arch/i386/boot/tss.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "tss.h" -#include <kernel/string.h> - -struct tss tss_entry; - -uint64_t create_tss_entry(uint16_t ss0, uint32_t esp0) { - uint32_t base = (uint32_t)&tss_entry; - uint32_t limit = base + sizeof(&tss_entry); - uint64_t ret = create_gdt_entry(base, limit, 0xE9); - - memset(&tss_entry, 0, sizeof(struct tss)); - tss_entry.ss0 = ss0; - tss_entry.esp0 = esp0; - tss_entry.cs = 0x08; - tss_entry.ss = 0x13; - tss_entry.ds = 0x13; - tss_entry.es = 0x13; - tss_entry.fs = 0x13; - tss_entry.gs = 0x13; - tss_entry.io_offset = sizeof(struct tss) & 0xFFFF; - return ret; -} - -void set_kernel_stack(uint32_t stack) { - tss_entry.esp0 = stack; -} |