Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs

2014-06-10 Thread Peter Maydell
On 10 June 2014 17:48, Paolo Bonzini wrote: > Il 10/06/2014 18:38, Peter Maydell ha scritto: >> Heh. How about: >> * if both bios_name and pflash drive 0 specified, this is an error >> * otherwise use whichever we have >> * (NB that bios_name + pflash drive 1 is a reasonable combination) > > >

Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs

2014-06-10 Thread Paolo Bonzini
Il 10/06/2014 18:38, Peter Maydell ha scritto: On 10 June 2014 17:23, Paolo Bonzini wrote: Il 10/06/2014 18:17, Peter Maydell ha scritto: +create_one_flash("virt.flash0", flashbase, flashsize); +create_one_flash("virt.flash1", flashbase + flashsize, flashsize); What happens if yo

Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs

2014-06-10 Thread Peter Maydell
On 10 June 2014 17:23, Paolo Bonzini wrote: > Il 10/06/2014 18:17, Peter Maydell ha scritto: > >> +create_one_flash("virt.flash0", flashbase, flashsize); >> +create_one_flash("virt.flash1", flashbase + flashsize, >> flashsize); >>> >>> > >>> > >>> > What happens if you speci

Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs

2014-06-10 Thread Paolo Bonzini
Il 10/06/2014 18:17, Peter Maydell ha scritto: >> +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 spec

Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs

2014-06-10 Thread Peter Maydell
On 10 June 2014 17:15, Paolo Bonzini 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

Re: [Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs

2014-06-10 Thread Paolo Bonzini
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_FLA

[Qemu-devel] [PATCH 1/2] hw/arm/virt: Provide flash devices for boot ROMs

2014-06-10 Thread Peter Maydell
Add two flash devices to the virt board, so that it can be used for running guests which want a bootrom image such as UEFI. We provide two flash devices to make it more convenient to provide both a read-only UEFI image and a read-write place to store guest-set UEFI config variables. The '-bios' com