From patchwork Fri Mar 12 01:59:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin O'Connor X-Patchwork-Id: 47659 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8A0DEB7BEE for ; Fri, 12 Mar 2010 13:01:26 +1100 (EST) Received: from localhost ([127.0.0.1]:54452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpuAk-0005DO-EF for incoming@patchwork.ozlabs.org; Thu, 11 Mar 2010 21:00:18 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpuAI-0005DJ-O1 for qemu-devel@nongnu.org; Thu, 11 Mar 2010 20:59:50 -0500 Received: from [199.232.76.173] (port=60334 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpuAI-0005DB-4N for qemu-devel@nongnu.org; Thu, 11 Mar 2010 20:59:50 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NpuAF-00041K-Nu for qemu-devel@nongnu.org; Thu, 11 Mar 2010 20:59:49 -0500 Received: from mail-qy0-f177.google.com ([209.85.221.177]:64338) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NpuAE-000416-Lc for qemu-devel@nongnu.org; Thu, 11 Mar 2010 20:59:47 -0500 Received: by qyk7 with SMTP id 7so725768qyk.21 for ; Thu, 11 Mar 2010 17:59:41 -0800 (PST) Received: by 10.224.107.8 with SMTP id z8mr102511qao.275.1268359181088; Thu, 11 Mar 2010 17:59:41 -0800 (PST) Received: from localhost (207-172-165-101.s101.tnt1.nywnj.ny.dialup.rcn.com [207.172.165.101]) by mx.google.com with ESMTPS id 5sm1679617qwg.33.2010.03.11.17.59.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Mar 2010 17:59:39 -0800 (PST) Date: Thu, 11 Mar 2010 20:59:37 -0500 From: Kevin O'Connor To: Natalia Portillo Subject: Re: [Qemu-devel] SeaBIOS error with Nextstep bootloader Message-ID: <20100312015937.GA24688@morn.localdomain> References: <20100221040555.GA16455@morn.localdomain> <16B78474-99FE-4671-8428-21CE0B12425A@claunia.com> <20100228195107.GB15352@morn.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: seabios@seabios.org, qemu-devel@nongnu.org X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Thu, Mar 11, 2010 at 09:44:42AM +0000, Natalia Portillo wrote: > This is everything I got. Thanks Natalia! > NextStep floppy images can be downloaded from http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/MultiCountry/Enterprise/nextstep/floppyimages/ > OpenStep floppy images can be downloaded from http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/MultiCountry/Enterprise/openstep/floppyimages/ These floppy images are failing because they spin waiting for a keypress with irqs disabled, and SeaBIOS doesn't enable irqs in the handlers being called (same issue seen on "d090723b.zip" image reported by Roy). I've put a test image with a workaround for the issue at: http://linuxtogo.org/~kevin/SeaBIOS/test/bios.bin-0.5.1-debug-20100311 See below for the patch I used - I'm still researching it, but the image can be used for testing. > Rhapsody floppy images are under NDA. > Darwin CD images and bootloader source code can be downloaded from http://www.opensource.apple.com/ I was unable to locate CD images that I could download from that site. I'm also not familiar with Darwin, and I do not know which package to download for bootloader source. Thanks again, -Kevin diff --git a/src/clock.c b/src/clock.c index 5a30e35..9afa71d 100644 --- a/src/clock.c +++ b/src/clock.c @@ -226,6 +226,7 @@ timer_setup(void) static void handle_1a00(struct bregs *regs) { + yield(); u32 ticks = GET_BDA(timer_counter); regs->cx = ticks >> 16; regs->dx = ticks; diff --git a/src/config.h b/src/config.h index 5316f22..226919b 100644 --- a/src/config.h +++ b/src/config.h @@ -16,9 +16,9 @@ #define CONFIG_COREBOOT 0 // Control how verbose debug output is. -#define CONFIG_DEBUG_LEVEL 1 +#define CONFIG_DEBUG_LEVEL 8 // Send debugging information to serial port -#define CONFIG_DEBUG_SERIAL 0 +#define CONFIG_DEBUG_SERIAL 1 // Screen writes are also sent to debug ports. #define CONFIG_SCREEN_AND_DEBUG 1 diff --git a/src/kbd.c b/src/kbd.c index 44dce57..72f4c02 100644 --- a/src/kbd.c +++ b/src/kbd.c @@ -51,6 +51,7 @@ enqueue_key(u8 scan_code, u8 ascii_code) static void dequeue_key(struct bregs *regs, int incr, int extended) { + yield(); u16 buffer_head; u16 buffer_tail; for (;;) { @@ -530,9 +531,19 @@ process_key(u8 key) // allow for keyboard intercept u32 eax = (0x4f << 8) | key; u32 flags; +#if 0 call16_simpint(0x15, &eax, &flags); if (!(flags & F_CF)) return; +#else + struct bregs br; + memset(&br, 0, sizeof(br)); + br.eax = eax; + call16_int(0x15, &br); + flags = br.flags; + if (!(flags & F_CF)) + return; +#endif key = eax; } __process_key(key);