From owner-freebsd-current@FreeBSD.ORG Sun May 30 01:32:45 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C70A416A4CF for ; Sun, 30 May 2004 01:32:45 -0700 (PDT) Received: from pfepa.post.tele.dk (pfepa.post.tele.dk [195.41.46.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8462C43D5D for ; Sun, 30 May 2004 01:32:45 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (0x50c7994c.naenxx7.adsl-dhcp.tele.dk [80.199.153.76]) by pfepa.post.tele.dk (Postfix) with ESMTP id AA41E47FE23 for ; Sun, 30 May 2004 10:32:44 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i4TLLk7I005105 for ; Sat, 29 May 2004 23:21:47 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: current@FreeBSD.org From: Poul-Henning Kamp Date: Sat, 29 May 2004 23:21:46 +0200 Message-ID: <5104.1085865706@critter.freebsd.dk> Subject: boot2 patch, please test. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 May 2004 08:32:46 -0000 Some embedded boxes do not have the keyboard controller, and this patch adds a timeout so they do not get stuck waiting for it to become ready. Please test that this patch does not have any effect on normal PC architecture machines. Index: i386/boot2/boot1.S =================================================================== RCS file: /home/ncvs/src/sys/boot/i386/boot2/boot1.S,v retrieving revision 1.27 diff -u -r1.27 boot1.S --- i386/boot2/boot1.S 14 May 2004 20:29:29 -0000 1.27 +++ i386/boot2/boot1.S 29 May 2004 19:49:52 -0000 @@ -203,7 +203,9 @@ * Enable A20 so we can access memory above 1 meg. */ seta20: cli # Disable interrupts -seta20.1: inb $0x64,%al # Get status +seta20.1: dec %cx + jz seta20.3 + inb $0x64,%al # Get status testb $0x2,%al # Busy? jnz seta20.1 # Yes movb $0xd1,%al # Command: Write @@ -213,6 +215,7 @@ jnz seta20.2 # Yes movb $0xdf,%al # Enable outb %al,$0x60 # A20 +seta20.3: sti # Enable interrupts retw # To caller /* -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.