diff options
author | phk <phk@FreeBSD.org> | 2004-06-02 09:38:32 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-06-02 09:38:32 +0000 |
commit | 85f8b889c52bdacc53608fad651b73260d4180f4 (patch) | |
tree | 35739f9872bf775c331896dc4b68a44a62d64904 /sys/boot | |
parent | b335f63ed5f49a63ea604f409b3d508aa41d7662 (diff) | |
download | FreeBSD-src-85f8b889c52bdacc53608fad651b73260d4180f4.zip FreeBSD-src-85f8b889c52bdacc53608fad651b73260d4180f4.tar.gz |
Some embedded platforms have no keyboard controller. Give up waiting
for it to react after a timeout.
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/i386/boot2/boot1.S | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/boot/i386/boot2/boot1.S b/sys/boot/i386/boot2/boot1.S index badaee8..44af56b 100644 --- a/sys/boot/i386/boot2/boot1.S +++ b/sys/boot/i386/boot2/boot1.S @@ -197,13 +197,16 @@ main.5: mov %dx,MEM_ARG # Save args xorb %al,%al # Zero assumed bss from rep # the end of boot2.bin stosb # up to 0x10000 - callw seta20 # Enable A20 - jmp start+MEM_JMP-MEM_ORG # Start BTX + /* * Enable A20 so we can access memory above 1 meg. + * Use the zero-valued %cx as a timeout for embedded hardware which do not + * have a keyboard controller. */ seta20: cli # Disable interrupts -seta20.1: inb $0x64,%al # Get status +seta20.1: dec %cx # Timeout? + jz seta20.3 # Yes + inb $0x64,%al # Get status testb $0x2,%al # Busy? jnz seta20.1 # Yes movb $0xd1,%al # Command: Write @@ -213,8 +216,12 @@ seta20.2: inb $0x64,%al # Get status jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 +seta20.3: sti # Enable interrupts - retw # To caller + + jmp start+MEM_JMP-MEM_ORG # Start BTX + + /* * Trampoline used to call read from within boot1. */ |