FrostWing
A lightweight raw-control operating system.
Loading...
Searching...
No Matches
tss.h
Go to the documentation of this file.
11#ifndef TSS_H
12#define TSS_H
13
14#include <basics.h> // uint64_t, uint8_t, etc.
15#include <graphics.h>
16#include <gdt.h> // gdt_set_entry
17
22struct __attribute__((packed)) tss_entry {
23 uint32_t reserved0;
24 uint64_t rsp0;
25 uint64_t rsp1;
26 uint64_t rsp2;
27 uint64_t reserved1;
28 uint64_t ist1;
29 uint64_t ist2;
30 uint64_t ist3;
31 uint64_t ist4;
32 uint64_t ist5;
33 uint64_t ist6;
34 uint64_t ist7;
35 uint64_t reserved2;
36 uint16_t reserved3;
37 uint16_t iomap_base;
38};
39
40struct __attribute__((packed)) tss_descriptor {
41 uint16_t limit_low;
42 uint16_t base_low;
43 uint8_t base_mid;
44 uint8_t access;
45 uint8_t gran;
46 uint8_t base_high;
47 uint32_t base_upper;
48 uint32_t reserved;
49};
50
51extern struct tss_entry tss;
56extern uint8_t kernel_stack[0x4000];
57
62extern uint64_t kernel_stack_top;
63
69
74void tss_load();
75
76#endif
struct acpi_gas __attribute__
Physical Region Descriptor Table (PRDT) entry.
Definition ahci.h:71
This is a basic header files with FrostWing specific short forms and basically a good for life header...
The Header file for Global Descriptor Table.
Contains all the print functions.
void kernel_tss_init()
Initialize TSS.
uint64_t kernel_stack_top
The starting address of kernel's stack.
uint8_t kernel_stack[0x4000]
16 KB kernel stack
void tss_load()
Load the TSS.