diff options
| author | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-09-03 23:53:53 +0200 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-09-04 16:42:56 +0200 |
| commit | 6e9b3275d75e0cdbae1e8f7e4dda8880bb6346bc (patch) | |
| tree | d6c7daf073f41ec2df196a322e8d1210d8e126a1 /kernel/include/tss.h | |
| parent | 11ced165e0df11cc3c889eb0cc402467361c421b (diff) | |
gdt & tss
Diffstat (limited to 'kernel/include/tss.h')
| -rw-r--r-- | kernel/include/tss.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/kernel/include/tss.h b/kernel/include/tss.h new file mode 100644 index 0000000..f1af6d6 --- /dev/null +++ b/kernel/include/tss.h @@ -0,0 +1,42 @@ +#ifndef TSS_H +#define TSS_H + +#include <types.h> + +struct tss_type { + uint32_t reserved1; + uint32_t rsp0_low; + uint32_t rsp0_high; + uint32_t rsp1_low; + uint32_t rsp1_high; + uint32_t rsp2_low; + uint32_t rsp2_high; + uint32_t reserved2; + uint32_t reserved3; + uint32_t ist1_low; + uint32_t ist1_high; + uint32_t ist2_low; + uint32_t ist2_high; + uint32_t ist3_low; + uint32_t ist3_high; + uint32_t ist4_low; + uint32_t ist4_high; + uint32_t ist5_low; + uint32_t ist5_high; + uint32_t ist6_low; + uint32_t ist6_high; + uint32_t ist7_low; + uint32_t ist7_high; + uint32_t reserved4; + uint32_t reserved5; + uint16_t reserved6; + uint16_t iopb; +} __attribute__((packed, aligned(4096))); +typedef struct tss_type tss_type; + +extern tss_type tss; + +void load_tss(void); +void init_tss(void); + +#endif |
