forked from lolo859/vystem
708 B
708 B
TSS structure generation and loading
The TSS management is defined in shelter/lib/include/irq/tss.h and implemented in shelter/lib/include/irq/tss.c.
This implementation provides the following types:
sh_tss_TSS: a full structure of a 64 bits TSSsh_tss_TR: a structure used to load the TSS
The following functions are provided:
sh_tss_fill_tss(sh_tss_TSS *tss): fill a TSS structure with 4 stacks dedicated for double faults, NMI, page faults and stack-related faults. Heap must be available for using this function. All stacks are 4 pages longsh_tss_load_tr(sh_tss_TSS* tss): load the provided TSS into the task register. Always assume that the TSS selector in the GDT is0x28