qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Michael Casadevall <Michael.casadevall@linaro.org>,
	Christoffer Dall <christoffer.dall@linaro.org>,
	patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs
Date: Tue, 10 Jun 2014 18:15:14 +0200	[thread overview]
Message-ID: <53972F12.4030900@redhat.com> (raw)
In-Reply-To: <1402411908-25821-2-git-send-email-peter.maydell@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

  reply	other threads:[~2014-06-10 16:15 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 [this message]
2014-06-10 16:17     ` Peter Maydell
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=53972F12.4030900@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Michael.casadevall@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).