]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2002-12-21 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Sat, 21 Dec 2002 00:34:33 +0000 (00:34 +0000)
committerokuji <okuji@localhost>
Sat, 21 Dec 2002 00:34:33 +0000 (00:34 +0000)
* stage2/asm.S (gateA20): First, try a BIOS call (INT 15H,
AX=2400/2401). Use the keyboard controller, only if that failed.

ChangeLog
stage2/asm.S

index 7bb210ccfd5c0538450ac0fbe14e90fcc6a30f55..1b526ce5904dde253003319c25aeceb8335a33d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-21  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * stage2/asm.S (gateA20): First, try a BIOS call (INT 15H,
+       AX=2400/2401). Use the keyboard controller, only if that failed.
+
 2002-12-11  Yoshinori K. Okuji  <okuji@enbug.org>
 
        Add a workaround for buggy BIOSes which don't pass boot drive
index d56e0f747b7a4e4e8cdae7c3e9cf20eb916e0a37..fd5e50b9b03a239ef455151f350965f45e99fbc2 100644 (file)
@@ -1660,6 +1660,36 @@ ENTRY(set_vbe_mode)
  */
 
 ENTRY(gateA20)
+       /* first, try a BIOS call */
+       pushl   %ebp
+       movl    8(%esp), %edx
+       
+       call    EXT_C(prot_to_real)
+       
+       .code16
+       movw    $0x2400, %ax
+       testw   %dx, %dx
+       jz      1f
+       incw    %ax
+1:     stc
+       int     $0x15
+       jnc     2f
+
+       /* set non-zero if failed */
+       movb    $1, %ah
+
+       /* save the status */
+2:     movb    %ah, %dl
+
+       DATA32  call    EXT_C(real_to_prot)
+       .code32
+
+       popl    %ebp
+       testb   %dl, %dl
+       jnz     3f
+       ret
+
+3:     /* use keyboard controller */
        pushl   %eax
 
        call    gloop1