From patchwork Wed Apr 21 23:02:03 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: 50683 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 A3A72B7C48 for ; Thu, 22 Apr 2010 09:23:44 +1000 (EST) Received: from localhost ([127.0.0.1]:41696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4ixB-0006sN-Qe for incoming@patchwork.ozlabs.org; Wed, 21 Apr 2010 19:03:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4ivw-0006ql-0k for qemu-devel@nongnu.org; Wed, 21 Apr 2010 19:02:16 -0400 Received: from [140.186.70.92] (port=46511 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4ivu-0006p9-6X for qemu-devel@nongnu.org; Wed, 21 Apr 2010 19:02:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4ivs-00075y-1X for qemu-devel@nongnu.org; Wed, 21 Apr 2010 19:02:13 -0400 Received: from mail-qy0-f188.google.com ([209.85.221.188]:42226) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4ivr-00075h-UK for qemu-devel@nongnu.org; Wed, 21 Apr 2010 19:02:11 -0400 Received: by qyk26 with SMTP id 26so1416764qyk.19 for ; Wed, 21 Apr 2010 16:02:10 -0700 (PDT) Received: by 10.229.250.211 with SMTP id mp19mr4936269qcb.42.1271890926373; Wed, 21 Apr 2010 16:02:06 -0700 (PDT) Received: from localhost (207-172-165-101.c3-0.avec-ubr1.nyr-avec.ny.cable.rcn.com [207.172.165.101]) by mx.google.com with ESMTPS id f5sm4774796qcg.14.2010.04.21.16.02.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Apr 2010 16:02:05 -0700 (PDT) Date: Wed, 21 Apr 2010 19:02:03 -0400 From: Kevin O'Connor To: Gerhard Wiesinger Subject: Re: [SeaBIOS] [Qemu-devel] QEMU regression problems Message-ID: <20100421230203.GA5193@morn.localdomain> References: <20100414011646.GA28219@morn.localdomain> <4BCBF60B.50809@wiesinger.com> <20100420012619.GA16298@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 eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: seabios@seabios.org, qemu-devel@nongnu.org, Roy Tam 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 Wed, Apr 21, 2010 at 09:16:54PM +0200, Gerhard Wiesinger wrote: > On Mon, 19 Apr 2010, Kevin O'Connor wrote: > >SeaBIOS will lock parts of ram from 0xc0000-0xfffff so that the option > >roms aren't writable. I wonder if that is confusing qemm when it > >tries to locate the ebda into that area. From your initial log, it looks like QEMM tried to relocate the ebda to CEB5h-D035h. However, the seabios log shows the last rom (genroms/vapic.bin) at 0xce800-0xd0a00. So, SeaBIOS would have locked that ram. Can you see if the patch below shows a different result for you? > Is the area from 0xc0000-0xfffff only read only when an option ROM > is installed at some part of the memory area (e.g. option ROM at > 0xD0000 to 0xDFFFF only 0xD0000 to 0xDFFFF is made read only) or the > comple area is made read only? SeaBIOS will lock only those areas it deployed option roms into. However, the chipset only allows locking of 16K chunks - so SeaBIOS will round up the option rom storage to the nearest 16K block. For example, should the last rom end at 0xd0a00, then SeaBIOS would lock up to 0xd4000. -Kevin --- a/src/shadow.c +++ b/src/shadow.c @@ -104,6 +104,8 @@ make_bios_readonly(void) // Flush any pending writes before locking memory. wbinvd(); + dprintf(1, "RomEnd=%x\n", RomEnd); +#if 0 // Write protect roms from 0xc0000-0xf0000 int i; for (i=0; i<6; i++) { @@ -115,6 +117,7 @@ make_bios_readonly(void) } pci_config_writeb(bdf, 0x5a + i, 0x11); } +#endif // Write protect 0xf0000-0x100000 pci_config_writeb(bdf, 0x59, 0x10);