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.
This commit is contained in:
parent
f8111d3b54
commit
ee9202997b
2 changed files with 35 additions and 0 deletions
|
@ -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>
|
2002-12-11 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
Add a workaround for buggy BIOSes which don't pass boot drive
|
Add a workaround for buggy BIOSes which don't pass boot drive
|
||||||
|
|
30
stage2/asm.S
30
stage2/asm.S
|
@ -1660,6 +1660,36 @@ ENTRY(set_vbe_mode)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ENTRY(gateA20)
|
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
|
pushl %eax
|
||||||
|
|
||||||
call gloop1
|
call gloop1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue