diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-06-02 09:38:32 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-06-02 09:38:32 +0000 |
| commit | d7d485798f1a84b0cf0f2fc375ca53408555dee5 (patch) | |
| tree | 35739f9872bf775c331896dc4b68a44a62d64904 | |
| parent | 94dffc977ca7439178f0a5e5e5aed48c63575ec6 (diff) | |
Notes
| -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 badaee8615f90..44af56b242595 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. */ |
