From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MxnLv-0005o0-ML for qemu-devel@nongnu.org; Tue, 13 Oct 2009 15:48:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MxnLp-0005nQ-R1 for qemu-devel@nongnu.org; Tue, 13 Oct 2009 15:48:10 -0400 Received: from [199.232.76.173] (port=34536 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxnLp-0005nN-Np for qemu-devel@nongnu.org; Tue, 13 Oct 2009 15:48:05 -0400 Received: from mail.gmx.net ([213.165.64.20]:51926) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MxnLo-0003av-IY for qemu-devel@nongnu.org; Tue, 13 Oct 2009 15:48:05 -0400 Message-ID: <4AD4D966.8040005@gmx.net> Date: Tue, 13 Oct 2009 21:47:50 +0200 From: Carl-Daniel Hailfinger MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 4/4] use rom loader for pc bios. References: <1255431978-4992-1-git-send-email-kraxel@redhat.com> <1255431978-4992-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1255431978-4992-5-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On 13.10.2009 13:06, Gerd Hoffmann wrote: > 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 c4fa3f7..06e9143 100644 > --- a/hw/pc.c > +++ b/hw/pc.c > @@ -1108,8 +1108,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)); > Memory leak? AFAICS the qemu_ram_alloc above should be removed and maybe bios_offset needs to be killed completely. > + if (ret != 0) { > bios_error: > fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name); > exit(1); > Regards, Carl-Daniel -- Developer quote of the week: "We are juggling too many chainsaws and flaming arrows and tigers."