next up previous contents index
Next: 10.3.9 gate_init.h: Gate descriptor Up: (X86) Generic Low-level Definitions Previous: 10.3.7 pio.h: Programmed I/O

10.3.8 seg.h: Segment descriptor data structure definitions and constants

   

SYNOPSIS

#include <oskit/x86/seg.h>

DESCRIPTION

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.



University of Utah Flux Research Group