From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuOhs-0008Ix-BI for qemu-devel@nongnu.org; Tue, 10 Jun 2014 12:15:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WuOhj-0002p0-AL for qemu-devel@nongnu.org; Tue, 10 Jun 2014 12:15:28 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:43122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WuOhj-0002op-4J for qemu-devel@nongnu.org; Tue, 10 Jun 2014 12:15:19 -0400 Received: by mail-wi0-f176.google.com with SMTP id n3so3781155wiv.15 for ; Tue, 10 Jun 2014 09:15:17 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53972F12.4030900@redhat.com> Date: Tue, 10 Jun 2014 18:15:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1402411908-25821-1-git-send-email-peter.maydell@linaro.org> <1402411908-25821-2-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1402411908-25821-2-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Michael Casadevall , Christoffer Dall , patches@linaro.org Il 10/06/2014 16:51, Peter Maydell ha scritto: > + /* Create two flash devices to fill the VIRT_FLASH space in the memmap. > + * Any file passed via -bios goes in the first of these. > + */ > + hwaddr flashsize = vbi->memmap[VIRT_FLASH].size / 2; > + hwaddr flashbase = vbi->memmap[VIRT_FLASH].base; > + char *nodename; > + > + if (bios_name) { > + const char *fn = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); > + if (!fn || load_image_targphys(fn, flashbase, flashsize) < 0) { > + error_report("Could not load ROM image '%s'", bios_name); > + exit(1); > + } > + } > + > + create_one_flash("virt.flash0", flashbase, flashsize); > + create_one_flash("virt.flash1", flashbase + flashsize, flashsize); What happens if you specify both -bios and -drive if=pflash? Can you check that the user does not specify both? Paolo