From patchwork Mon Oct 19 09:46:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 36367 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 40843B7B69 for ; Mon, 19 Oct 2009 20:47:56 +1100 (EST) Received: from localhost ([127.0.0.1]:59692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzoqH-0004n4-2P for incoming@patchwork.ozlabs.org; Mon, 19 Oct 2009 05:47:53 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzopZ-0004m2-3Z for qemu-devel@nongnu.org; Mon, 19 Oct 2009 05:47:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzopT-0004jO-Fk for qemu-devel@nongnu.org; Mon, 19 Oct 2009 05:47:07 -0400 Received: from [199.232.76.173] (port=41779 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzopT-0004jC-2s for qemu-devel@nongnu.org; Mon, 19 Oct 2009 05:47:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42251) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzopS-0004xF-HO for qemu-devel@nongnu.org; Mon, 19 Oct 2009 05:47:02 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9J9l1RH005029 for ; Mon, 19 Oct 2009 05:47:01 -0400 Received: from zweiblum.home.kraxel.org (vpn2-9-74.ams2.redhat.com [10.36.9.74]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n9J9kvhi026165; Mon, 19 Oct 2009 05:47:00 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id AE759700FF; Mon, 19 Oct 2009 11:46:56 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 19 Oct 2009 11:46:55 +0200 Message-Id: <1255945615-2853-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1255945615-2853-1-git-send-email-kraxel@redhat.com> References: <1255945615-2853-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH v3 4/4] use rom loader for pc bios. 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 The pc bios shows up in 'info roms' now. Note that the BIOS is mapped to two places: The complete rom at the top of the memory, and the first 128k at 0xe0000. Only the first place is listed in 'info roms'. Signed-off-by: Gerd Hoffmann --- hw/pc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 7fcc4b0..9a9d196 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1115,8 +1115,8 @@ static void pc_init1(ram_addr_t ram_size, goto bios_error; } bios_offset = qemu_ram_alloc(bios_size); - ret = load_image(filename, qemu_get_ram_ptr(bios_offset)); - if (ret != bios_size) { + ret = rom_add_file_fixed(bios_name, (uint32_t)(-bios_size)); + if (ret != 0) { bios_error: fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name); exit(1);