pintos/src/userprog/gdt.c File Reference

#include "userprog/gdt.h"
#include <debug.h>
#include "userprog/tss.h"
#include "threads/palloc.h"
#include "threads/vaddr.h"

Go to the source code of this file.

Enumerations

enum  seg_class { CLS_SYSTEM = 0, CLS_CODE_DATA = 1 }
enum  seg_granularity { GRAN_BYTE = 0, GRAN_PAGE = 1 }

Functions

static uint64_t make_code_desc (int dpl)
static uint64_t make_data_desc (int dpl)
static uint64_t make_tss_desc (void *laddr)
static uint64_t make_gdtr_operand (uint16_t limit, void *base)
void gdt_init (void)
static uint64_t make_seg_desc (uint32_t base, uint32_t limit, enum seg_class class, int type, int dpl, enum seg_granularity granularity)

Variables

static uint64_t gdt [SEL_CNT]


Enumeration Type Documentation

enum seg_class

Enumerator:
CLS_SYSTEM 
CLS_CODE_DATA 

Definition at line 58 of file gdt.c.

Enumerator:
GRAN_BYTE 
GRAN_PAGE 

Definition at line 65 of file gdt.c.


Function Documentation

void gdt_init ( void   ) 

static uint64_t make_code_desc ( int  dpl  )  [static]

Definition at line 117 of file gdt.c.

References CLS_CODE_DATA, GRAN_PAGE, and make_seg_desc().

Referenced by gdt_init().

static uint64_t make_data_desc ( int  dpl  )  [static]

Definition at line 125 of file gdt.c.

References CLS_CODE_DATA, GRAN_PAGE, and make_seg_desc().

Referenced by gdt_init().

static uint64_t make_gdtr_operand ( uint16_t  limit,
void *  base 
) [static]

Definition at line 144 of file gdt.c.

Referenced by gdt_init().

static uint64_t make_seg_desc ( uint32_t  base,
uint32_t  limit,
enum seg_class  class,
int  type,
int  dpl,
enum seg_granularity  granularity 
) [static]

Definition at line 83 of file gdt.c.

References ASSERT, CLS_CODE_DATA, CLS_SYSTEM, GRAN_BYTE, and GRAN_PAGE.

Referenced by make_code_desc(), make_data_desc(), and make_tss_desc().

static uint64_t make_tss_desc ( void *  laddr  )  [static]

Definition at line 135 of file gdt.c.

References CLS_SYSTEM, GRAN_BYTE, and make_seg_desc().

Referenced by gdt_init().


Variable Documentation

uint64_t gdt[SEL_CNT] [static]

Definition at line 26 of file gdt.c.

Referenced by gdt_init().


Generated on Mon Jan 10 16:43:58 2011 for Pintos by  doxygen 1.5.6