Subversion Repositories HelenOS-historic

Rev

Rev 1051 | Rev 1187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1051 Rev 1186
Line 213... Line 213...
213
    tss_desc->dpl = PL_KERNEL;
213
    tss_desc->dpl = PL_KERNEL;
214
   
214
   
215
    gdt_tss_setbase(&gdt_p[TSS_DES], (__address) tss_p);
215
    gdt_tss_setbase(&gdt_p[TSS_DES], (__address) tss_p);
216
    gdt_tss_setlimit(&gdt_p[TSS_DES], sizeof(struct tss) - 1);
216
    gdt_tss_setlimit(&gdt_p[TSS_DES], sizeof(struct tss) - 1);
217
 
217
 
218
    __asm__("lgdt %0" : : "m"(gdtr));
218
    gdtr_load(&gdtr);
219
    __asm__("lidt %0" : : "m"(idtr));
219
    idtr_load(&idtr);
220
    /*
220
    /*
221
     * As of this moment, the current CPU has its own GDT pointing
221
     * As of this moment, the current CPU has its own GDT pointing
222
     * to its own TSS. We just need to load the TR register.
222
     * to its own TSS. We just need to load the TR register.
223
     */
223
     */
224
    __asm__("ltr %0" : : "r" ((__u16) gdtselector(TSS_DES)));
224
    tr_load(gdtselector(TSS_DES));
225
}
225
}