Hi, every body ,I am looking in setup.S 
code.
Whn setup GDT ,GDTR save the base address of GDT .

gdt:    
        .word   0,0,0,0         ! dummy   
!!!gdt+8   ( added by me)
        .word   0,0,0,0         ! unused   

        .word   0xFFFF          ! 4Gb - (0x100000*0x1000 = 4Gb)
        .word   0x0000          ! base address=0
        .word   0x9A00          ! code read/exec
        .word   0x00CF          ! granularity=4096, 386 (+5th nibble of limit)

        
        !!kernel code segmentation
        .word   0xFFFF          ! 4Gb - (0x100000*0x1000 = 4Gb)
        .word   0x0000          ! base address=0
        .word   0x9200          ! data read/write
        .word   0x00CF          ! granularity=4096, 386 (+5th nibble of limit)
 !!!gdt+32   ( added by me)
idt_48:  
        .word   0                       ! idt limit=0
        .word   0,0                     ! idt base=0L
    !!!gdt+38   ( added by me)
gdt_48:  
        .word   0x800           ! gdt limit=2048, 256 GDT entries 最多256个GDT表项
        .word   512+gdt,0x9     ! gdt base = 0X9xxxx
    .............

Why  is 512 ???? 
>From the lable of gdt to gdt_48 ,there are not 512 bytes distance .

Can anyone tell me the reason  ???

            



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to