#include <oskit/x86/seg.h>
XXX
- struct x86_desc
- Normal segment descriptors.
- struct x86_gate
- Trap, interrupt, and call gates.
- struct pseudo_descriptor
- Used to load the IDT and GDT (and LDT).
- sel_idx(sel)
- Converts the selector into an index in the descriptor table.
- ISPL(s)
- Returns the selector's privilege level.
- USERMODE(s, f)
- KERNELMODE(s, f)
- fill_descriptor(struct x86_desc *desc, unsigned base, unsigned limit, unsigned char access, unsigned char sizebits)
- Fill a segment descriptor.
- fill_descriptor_base(struct x86_desc *desc, unsigned base)
- Set the base address in a segment descriptor.
- fill_descriptor_limit(struct x86_desc *desc, unsigned limit)
- Set the limit in a segment descriptor.
- fill_gate(struct x86_gate *gate, unsigned offset, unsigned short selector, unsigned char access, unsigned char word_count)
- Fill an x86 gate descriptor.
This header file is based on a file in CMU's Mach kernel.