Merge in timeout into A20-enable routine from cdboot/boot1.
MFC after: 1 day
This commit is contained in:
parent
31062da1b0
commit
e101181393
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157669
@ -227,10 +227,17 @@ putc: movw $0x7,%bx # attribute for output
|
|||||||
jmp putstr # keep looping
|
jmp putstr # keep looping
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable A20
|
* Enable A20. Put an upper limit on the amount of time we wait for the
|
||||||
|
* keyboard controller to get ready (65K x ISA access time). If
|
||||||
|
* we wait more than that amount, the hardware is probably
|
||||||
|
* legacy-free and simply doesn't have a keyboard controller.
|
||||||
|
* Thus, the A20 line is already enabled.
|
||||||
*/
|
*/
|
||||||
seta20: cli # Disable interrupts
|
seta20: cli # Disable interrupts
|
||||||
seta20.1: inb $0x64,%al # Get status
|
xor %cx,%cx # Clear
|
||||||
|
seta20.1: inc %cx # Increment, overflow?
|
||||||
|
jz seta20.3 # Yes
|
||||||
|
inb $0x64,%al # Get status
|
||||||
testb $0x2,%al # Busy?
|
testb $0x2,%al # Busy?
|
||||||
jnz seta20.1 # Yes
|
jnz seta20.1 # Yes
|
||||||
movb $0xd1,%al # Command: Write
|
movb $0xd1,%al # Command: Write
|
||||||
@ -240,7 +247,7 @@ seta20.2: inb $0x64,%al # Get status
|
|||||||
jnz seta20.2 # Yes
|
jnz seta20.2 # Yes
|
||||||
movb $0xdf,%al # Enable
|
movb $0xdf,%al # Enable
|
||||||
outb %al,$0x60 # A20
|
outb %al,$0x60 # A20
|
||||||
sti # Enable interrupts
|
seta20.3: sti # Enable interrupts
|
||||||
retw # To caller
|
retw # To caller
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user