diff options
author | sobomax <sobomax@FreeBSD.org> | 2006-04-11 20:53:49 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2006-04-11 20:53:49 +0000 |
commit | 913293e6360d5e73afcde065a3748b735fe248dd (patch) | |
tree | 4deb067f6faed7fa7e1c85c0b25aea3a46fd67e7 /sys | |
parent | f701a00d00ba5cf28bf717582d64bd141bc10a05 (diff) | |
download | FreeBSD-src-913293e6360d5e73afcde065a3748b735fe248dd.zip FreeBSD-src-913293e6360d5e73afcde065a3748b735fe248dd.tar.gz |
Merge in timeout into A20-enable routine from cdboot/boot1.
MFC after: 1 day
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/i386/pxeldr/pxeldr.S | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/boot/i386/pxeldr/pxeldr.S b/sys/boot/i386/pxeldr/pxeldr.S index 25ab5c0..12b008b 100644 --- a/sys/boot/i386/pxeldr/pxeldr.S +++ b/sys/boot/i386/pxeldr/pxeldr.S @@ -227,10 +227,17 @@ putc: movw $0x7,%bx # attribute for output 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.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? jnz seta20.1 # Yes movb $0xd1,%al # Command: Write @@ -240,7 +247,7 @@ seta20.2: inb $0x64,%al # Get status jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 - sti # Enable interrupts +seta20.3: sti # Enable interrupts retw # To caller /* |