gdt: add TSS entries for application processors

This commit is contained in:
Michael Shaw 2023-11-01 15:55:29 -04:00
commit c2daea8b18
4 changed files with 60 additions and 9 deletions

View file

@ -26,6 +26,24 @@ struct gdt_desc {
uint8_t base_3;
} PACKED;
struct gdt_desc_tss {
uint32_t reserved;
uint64_t rsp0;
uint64_t rsp1;
uint64_t rsp2;
uint64_t reserved2;
uint64_t ist1;
uint64_t ist2;
uint64_t ist3;
uint64_t ist4;
uint64_t ist5;
uint64_t ist6;
uint64_t ist7;
uint64_t reserved3;
uint16_t reserved4;
uint16_t iomap_base;
} PACKED;
struct gdtr {
uint16_t size;
uint64_t offset;
@ -35,6 +53,8 @@ extern struct gdtr __gdtr;
extern struct gdt_desc __gdt[GDT_NUMDESC];
void gdt_init();
uint16_t gdt_insert_tss(uintptr_t rsp0);
void ltr(uint16_t selector);
#endif /* __ASM__ */
#endif /* _GDT_H_ */