next up previous contents index
Next: 10.7.7 base_tss_init: initialize the Up: (X86) Base Environment: Segmentation Previous: 10.7.5 base_idt_load: load the

10.7.6 base_tss: default task state segment

   

SYNOPSIS

#include <oskit/x86/base_tss.h>

extern struct x86_tss base_tss ;

DESCRIPTION

The base_tss variable provides a default task state segment that the OS can use for privilege level switching if it does not otherwise use the x86's task switching mechanisms. The x86 architecture requires every protected-mode OS to have at least one TSS even if no task switching is done; however, many x86 kernels do not use the processor's task switching features because it is faster to context switch manually. Even if special TSS segments are used sometimes (e.g., to take advantage of the I/O bitmap feature when running MS-DOS programs), the OS can still use a common TSS for all tasks that do not need to use these special features; this is the strategy taken by the Mach kernel, for example. The base_tss provided by the toolkit serves in this role as a generic ``default'' TSS.

The base_tss is a minimal TSS, in that it contains no I/O bitmap or interrupt redirection map. XXX The toolkit also supports an alternate default TSS with a full I/O permission bitmap, but it isn't fully integrated or documented yet.



University of Utah Flux Research Group