mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
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:
1 parent
80a3e68b59
commit
17c74c21f0
2 files changed
+9
-7
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user