Hi, All,

Why kernel reloads these segment registers in startup_32 again ? Just liking 
the following:

=======================
ENTRY(startup_32)
    movl pa(stack_start),%ecx

    /* test KEEP_SEGMENTS flag to see if the bootloader is asking
        us to not reload segments */
    testb $(1<<6), BP_loadflags(%esi)
    jnz 2f

/*
 * Set segments to known values.
 */
    lgdt pa(boot_gdt_descr)
    movl $(__BOOT_DS),%eax
    movl %eax,%ds
    ...
======================

Considering bootloader, such as GRUB has already load these segments, so why 
kernel reloads them again while wasting CPU ?

Thanks,
Jacky


_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to