예제 #1
0
void base_tss_load(void)
{
	/* Make sure the TSS isn't marked busy.  */
	base_gdt[BASE_TSS / 8].access &= ~ACC_TSS_BUSY;

	/* Load the TSS.  */
	set_tr(BASE_TSS);
}
예제 #2
0
파일: vmem.c 프로젝트: Debug-Orz/ramooflax
static void segmem_init()
{
   gdt_reg_t        gdtr;
   seg_desc_t       *gdt;
   sys64_seg_desc_t *tss;

   gdt = info->vmm.cpu.sg->gdt;

   gdt[0].raw                = null_desc;
   gdt[vmm_code_seg_idx].raw = code64_desc;
   gdt[vmm_data_seg_idx].raw = data32_desc;

   tss = (sys64_seg_desc_t*)&gdt[vmm_tss_seg_idx];
   tss64_desc(tss, (offset_t)&info->vmm.cpu.sg->tss);

   gdtr.desc  = gdt;
   gdtr.limit = sizeof(info->vmm.cpu.sg->gdt) - 1;

   set_gdtr(gdtr);
   set_tr(vmm_tss_sel);
   segmem_reload(vmm_code_sel, vmm_data_sel);
}