2008-03-30 Pavel Roskin <proski@gnu.org>
* 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.
This commit is contained in:
parent
80a3e68b59
commit
17c74c21f0
2 changed files with 9 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-03-30 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* 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 <proski@gnu.org>
|
2008-03-28 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* kern/i386/pc/startup.S: Assert that uncompressed functions
|
* kern/i386/pc/startup.S: Assert that uncompressed functions
|
||||||
|
|
|
@ -291,7 +291,7 @@ real_to_prot:
|
||||||
cli
|
cli
|
||||||
|
|
||||||
/* load the GDT register */
|
/* load the GDT register */
|
||||||
DATA32 ADDR32 lgdt gdtdesc
|
DATA32 ADDR32 lgdt %cs:gdtdesc
|
||||||
|
|
||||||
/* turn on protected mode */
|
/* turn on protected mode */
|
||||||
movl %cr0, %eax
|
movl %cr0, %eax
|
||||||
|
@ -649,9 +649,6 @@ FUNCTION(grub_biosdisk_rw_int13_extensions)
|
||||||
movw %cx, %ds
|
movw %cx, %ds
|
||||||
int $0x13 /* do the operation */
|
int $0x13 /* do the operation */
|
||||||
movb %ah, %dl /* save return value */
|
movb %ah, %dl /* save return value */
|
||||||
/* clear the data segment */
|
|
||||||
xorw %ax, %ax
|
|
||||||
movw %ax, %ds
|
|
||||||
/* back to protected mode */
|
/* back to protected mode */
|
||||||
DATA32 call real_to_prot
|
DATA32 call real_to_prot
|
||||||
.code32
|
.code32
|
||||||
|
@ -824,9 +821,6 @@ FUNCTION(grub_biosdisk_get_diskinfo_int13_extensions)
|
||||||
movw %bx, %ds
|
movw %bx, %ds
|
||||||
int $0x13 /* do the operation */
|
int $0x13 /* do the operation */
|
||||||
movb %ah, %bl /* save return value in %bl */
|
movb %ah, %bl /* save return value in %bl */
|
||||||
/* clear the data segment */
|
|
||||||
xorw %ax, %ax
|
|
||||||
movw %ax, %ds
|
|
||||||
/* back to protected mode */
|
/* back to protected mode */
|
||||||
DATA32 call real_to_prot
|
DATA32 call real_to_prot
|
||||||
.code32
|
.code32
|
||||||
|
|
Loading…
Reference in a new issue