From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10528 invoked by alias); 16 Mar 2011 17:49:17 -0000 Received: (qmail 10506 invoked by uid 22791); 16 Mar 2011 17:49:15 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_OV X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Mar 2011 17:49:11 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 205192F78004 for ; Wed, 16 Mar 2011 17:49:09 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0JQQ8QWUaqtG; Wed, 16 Mar 2011 17:49:02 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001174] New: i386 PC floppy boot fails in Bochs and with some real BIOSes X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: horst@schirmeier.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 16 Mar 2011 17:49:00 -0000 Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2011-03/txt/msg00041.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001174 Summary: i386 PC floppy boot fails in Bochs and with some real BIOSes Product: eCos Version: CVS Platform: pc (i386 PC target) OS/Version: IA32 Status: UNCONFIRMED Severity: enhancement Priority: low Component: Patches and contributions AssignedTo: unassigned@bugs.ecos.sourceware.org ReportedBy: horst@schirmeier.com CC: ecos-patches@ecos.sourceware.org Class: Advice Request Created an attachment (id=1175) --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1175) pcmb.inc: enable interrupts before waiting for the BIOS In Bochs (releases 2.3.7 and 2.4.5, and current SVN head -r10265) and on some (but by far not all) tested PCs, eCos (2.0, 3.0, and CVS head as of 2011-03-16) does not boot but stalls after printing a line of dots. Further analysis showed that the boot process is stuck in packages/hal/i386/pcmb/current/include/pcmb.inc in this loop beginning at line 223 (as of eCos 3.0): /* Lets be nice and wait for the diskette drive motor to go off * before continuing. */ movw $0x40, %ax movw %ax, %es movl $0x40, %ebx 2: es movb (%bx), %al cmpb $0, %al jne 2b eCos polls for the BIOS data area variable at 0040:0040 to become zero, as an indication that the INT08 handler has switched off the floppy drive motor. Unfortunately, the Bochs BIOS (and supposedly a number of real-world BIOSes, too) passes control to boot sector with the Interrupt Enable Flag (IF) in EFLAGS disabled, and the timer interrupt is never triggered. Therefore the variable won't turn 0, the drive motor never gets switched off, and eCos stalls. One fix is to enable interrupts right before entering the polling loop (see attached patch), or to switch off the drive motor by yourself (out 0x0 to the floppy drive's Digital Output Register 0x3F2, cf. http://wiki.osdev.org/Floppy_Disk_Controller). The latter variant would remove the 2s waiting time until the BIOS counter times out. -- Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.