From patchwork Wed Mar 25 23:02:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin O'Connor X-Patchwork-Id: 454816 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CDC931400D5 for ; Thu, 26 Mar 2015 10:03:25 +1100 (AEDT) Received: from localhost ([::1]:41721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YauKa-00006i-1O for incoming@patchwork.ozlabs.org; Wed, 25 Mar 2015 19:03:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YauKI-0008Hr-TG for qemu-devel@nongnu.org; Wed, 25 Mar 2015 19:03:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YauKD-0001dp-SY for qemu-devel@nongnu.org; Wed, 25 Mar 2015 19:03:06 -0400 Received: from mail-qg0-f41.google.com ([209.85.192.41]:35065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YauKD-0001dg-P4 for qemu-devel@nongnu.org; Wed, 25 Mar 2015 19:03:01 -0400 Received: by qgh3 with SMTP id 3so56615852qgh.2 for ; Wed, 25 Mar 2015 16:03:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=FRDpUN/Qn/Lw6KXfGais4QLdDTbLMu6IfJHzWamP4Cg=; b=gU/KXhhhupdAzwpmlMb6iUv5bk16fgmQdKaPbE+HS0LOgOC39UcAIkDTWsbHZjcxcx GWZVpsRbEJr3ergBYNnjQ0VmxVJ2AkbhINuMrFKMtgu2HK16NYR0bgGVp4B9a2hGZ2Gs f8aBTKRq0l9cUKpXBYVfAF8Uzr20mXDY8VkeGaZReQDZBlW0ZDeYIZE/xcf20RbcSSW9 76wE6fdcIdie+asTXGer+enZXVXn5y/ynMAVHd9NUjpQY4HQYWSgjiY6QPKs7AWwh09l AnqMDJH6pNxkL/hIl14TY4253I2q0CMxR/NQVWPqbOFpVROPIKMIwi8FlHzA3qs/HH/Q UX9g== X-Gm-Message-State: ALoCoQnNhB9LgdFynFh5PAzb8KCUVOEUCjVdGDeltrq4oGQVq1uUX4VjMbO1O9T+zJxUQ4HoFbo7 X-Received: by 10.140.233.204 with SMTP id e195mr15169425qhc.74.1427324581314; Wed, 25 Mar 2015 16:03:01 -0700 (PDT) Received: from localhost (207-172-170-53.c3-0.avec-ubr1.nyr-avec.ny.cable.rcn.com. [207.172.170.53]) by mx.google.com with ESMTPSA id h35sm2412843qgd.26.2015.03.25.16.02.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2015 16:03:00 -0700 (PDT) Date: Wed, 25 Mar 2015 19:02:59 -0400 From: Kevin O'Connor To: Andrey Korolyov Message-ID: <20150325230259.GA29924@morn.localdomain> References: <20150311193337.GA13162@work-vm> <20150311195920.GR2334@work-vm> <20150312095902.GC2330@work-vm> <20150325205439.GA21667@morn.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.41 Cc: "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , "Dr. David Alan Gilbert" , Bandan Das , Gerd Hoffmann , Paolo Bonzini Subject: Re: [Qemu-devel] E5-2620v2 - emulation stop error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On Thu, Mar 26, 2015 at 01:31:11AM +0300, Andrey Korolyov wrote: > On Wed, Mar 25, 2015 at 11:54 PM, Kevin O'Connor wrote: > > > > Can you add something like: > > > > -chardev file,path=seabioslog.`date +%s`,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios > > > > to the qemu command line and forward the resulting log from both a > > succesful boot and a failed one? > > > > -Kevin > > Of course, logs are attached. Thanks. From a diff of the two logs: 4: 000000003ffe0000 - 0000000040000000 = 2 RESERVED 5: 00000000feffc000 - 00000000ff000000 = 2 RESERVED 6: 00000000fffc0000 - 0000000100000000 = 2 RESERVED -enter handle_19: - NULL -Booting from Hard Disk... -Booting from 0000:7c00 So, it got most of the way through the reboot - there's only a few function calls between the e820 map being dumped and the handle_19 call. The fault also seems to show it stopped in the BIOS in 16bit mode: > EIP=0000d331 EFL=00010202 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0000 00000000 0000ffff 00009300 > CS =f000 000f0000 0000ffff 00009b00 Can you add the patch below, force the fault, and forward the log. Also, if you recreate the failure can you take the EIP from the fault (eg, d331) and search for the corresponding function in the output of: objdump -m i386 -M i8086 -M suffix -ldr out/rom16.o | less (That is, search for "d331:".) If that's too much of a pain, just send me a direct email with the seabios out/rom16.o file and the new EIP of the fault. (I need the out/rom16.o that was used to build the version of SeaBIOS that faulted.) -Kevin diff --git a/src/post.c b/src/post.c index 9ea5620..bbd19c0 100644 --- a/src/post.c +++ b/src/post.c @@ -185,21 +185,24 @@ prepareboot(void) pmm_prepboot(); malloc_prepboot(); memmap_prepboot(); + dprintf(1, "a\n"); HaveRunPost = 2; // Setup bios checksum. BiosChecksum -= checksum((u8*)BUILD_BIOS_ADDR, BUILD_BIOS_SIZE); + dprintf(1, "b\n"); } // Begin the boot process by invoking an int0x19 in 16bit mode. void VISIBLE32FLAT startBoot(void) { + dprintf(1, "e\n"); // Clear low-memory allocations (required by PMM spec). memset((void*)BUILD_STACK_ADDR, 0, BUILD_EBDA_MINIMUM - BUILD_STACK_ADDR); - dprintf(3, "Jump to int19\n"); + dprintf(1, "Jump to int19 (vector=%x)\n", GET_IVT(0x19).segoff); struct bregs br; memset(&br, 0, sizeof(br)); br.flags = F_IF; @@ -239,9 +242,11 @@ maininit(void) // Prepare for boot. prepareboot(); + dprintf(1, "c\n"); // Write protect bios memory. make_bios_readonly(); + dprintf(1, "d\n"); // Invoke int 19 to start boot process. startBoot(); }