Code: Select all
mov $gdt, %eax
addl $FIRST_LDT_SELECTOR, %eax
movw $(ldt0end - ldt0 - 1), (%eax)
movl $ldt0, %ebx
movw %bx, 2(%eax)
shr $16, %ebx
movb %bl, 4(%eax)
movb %bh, 7(%eax)
movb $0x82,5(%eax)
and ldt is defined as below:
Code: Select all
ldt0:
.quad 0x0000000000000000 # first is not in use
.quad 0x00cf981000c1ffff
ldt0end:
Code: Select all
movl $FIRST_LDT_SELECTOR, %eax
lldt %ax # error
jmp $0x0c, $0
i'm confused with this problem several days.
Any help will be great appreciated.Thank you.