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: 6095871 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 91C89BF90F for ; Wed, 25 Mar 2015 23:03:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9640C20381 for ; Wed, 25 Mar 2015 23:03:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 98F9B2035E for ; Wed, 25 Mar 2015 23:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751729AbbCYXDE (ORCPT ); Wed, 25 Mar 2015 19:03:04 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:34519 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbbCYXDB (ORCPT ); Wed, 25 Mar 2015 19:03:01 -0400 Received: by qgep97 with SMTP id p97so69563094qge.1 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=Nu20ocKYZOOp352OdrV4s7HcO3yqmYZwugthM5H/5PgNIyDqnelx8Fj5AkutyXqYe+ A/uJ0XalQjvxH2xW978yFjf4MWtd6X3iPmed74Cv+AAzV7TIqZlHLCnMCTIYd98miwHm KneOmi6/Q1QeHrwy3zAdbwgH/IpRp8obeVefsfxGoshVpTOG8vcNyW8B1sls/OdxC51l WWFA3pJT671Y5oD/+11IUZZBsm0pYuOqEMouWbvY9UsVzL4DszLA+OSkGPZ+Otzsx5Mq 9vH0QA8VYk/AB7e46rgZR+6ca1Gwpxn+E5mPGo3plVoDas7ytFY/x0sAwN2L2swEZrIP jh/Q== X-Gm-Message-State: ALoCoQlF2KptL526ao0YcTAa/P4j9s9YWo/aSeYcAWkGxbIjuhApgbBMO+1eIzfxNNN0MNjmaIPB 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 Cc: "Dr. David Alan Gilbert" , Bandan Das , Paolo Bonzini , Gerd Hoffmann , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" Subject: Re: [Qemu-devel] E5-2620v2 - emulation stop error 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) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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(); }