diff --git a/ChangeLog b/ChangeLog index e55acf9ce..b6753c10c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-03-30 Pavel Roskin + + * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load + GDT. This is more robust, as %ds can change. + (grub_biosdisk_rw_int13_extensions): Don't clear %ds before + calling real_to_prot(). + (grub_biosdisk_get_diskinfo_int13_extensions): Likewise. + 2008-03-28 Pavel Roskin * kern/i386/pc/startup.S: Assert that uncompressed functions diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index fa404a003..5d4bbcb99 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -291,7 +291,7 @@ real_to_prot: cli /* load the GDT register */ - DATA32 ADDR32 lgdt gdtdesc + DATA32 ADDR32 lgdt %cs:gdtdesc /* turn on protected mode */ movl %cr0, %eax @@ -649,9 +649,6 @@ FUNCTION(grub_biosdisk_rw_int13_extensions) movw %cx, %ds int $0x13 /* do the operation */ movb %ah, %dl /* save return value */ - /* clear the data segment */ - xorw %ax, %ax - movw %ax, %ds /* back to protected mode */ DATA32 call real_to_prot .code32 @@ -824,9 +821,6 @@ FUNCTION(grub_biosdisk_get_diskinfo_int13_extensions) movw %bx, %ds int $0x13 /* do the operation */ movb %ah, %bl /* save return value in %bl */ - /* clear the data segment */ - xorw %ax, %ax - movw %ax, %ds /* back to protected mode */ DATA32 call real_to_prot .code32