#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] |
enum seg_granularity |
void gdt_init | ( | void | ) |
Definition at line 37 of file gdt.c.
References gdt, make_code_desc(), make_data_desc(), make_gdtr_operand(), make_tss_desc(), SEL_KCSEG, SEL_KDSEG, SEL_NULL, SEL_TSS, SEL_UCSEG, SEL_UDSEG, and tss_get().
Referenced by main().
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_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().