From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael Casadevall <Michael.casadevall@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs
Date: Tue, 10 Jun 2014 17:17:48 +0100 [thread overview]
Message-ID: <CAFEAcA_fL=t6GeHhygJTYSKBggakG9ZzErf6QVdoq+K8FP5rCA@mail.gmail.com> (raw)
In-Reply-To: <53972F12.4030900@redhat.com>
On 10 June 2014 17:15, Paolo Bonzini <pbonzini@redhat.com> wrote:
> 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?
We'll create the device and then overlay it with the "ROM"
image, same as for vexpress. (If the bios image is short
then the underlying pflash contents will be visible.)
thanks
-- PMM
next prev parent reply other threads:[~2014-06-10 16:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 14:51 [Qemu-devel] [PATCH 0/2] hw/arm/virt: Add flash and RTC devices Peter Maydell
2014-06-10 14:51 ` [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs Peter Maydell
2014-06-10 16:15 ` Paolo Bonzini
2014-06-10 16:17 ` Peter Maydell [this message]
2014-06-10 16:23 ` Paolo Bonzini
2014-06-10 16:38 ` Peter Maydell
2014-06-10 16:48 ` Paolo Bonzini
2014-06-10 16:50 ` Peter Maydell
2014-06-10 14:51 ` [Qemu-devel] [PATCH 2/2] hw/arm/virt: Provide PL031 RTC Peter Maydell
2014-06-20 22:51 ` Aurelien Jarno
2014-06-26 12:48 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFEAcA_fL=t6GeHhygJTYSKBggakG9ZzErf6QVdoq+K8FP5rCA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=Michael.casadevall@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.