[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [RFC PATCH 4/4] pc: Support firmware configuration with
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-block] [RFC PATCH 4/4] pc: Support firmware configuration with -blockdev |
Date: |
Tue, 5 Mar 2019 18:53:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
Hi Laszlo!
On 3/5/19 6:34 PM, Laszlo Ersek wrote:
> Hi Phil,
>
> On 03/04/19 20:48, Philippe Mathieu-Daudé wrote:
>
>> [PMD: rebased on 'pflash: Fixes and cleanups'
>> replaced CFI_PFLASH01 -> PFLASH_CFI01]
>
> [...]
>
>> -#define FLASH_MAP_UNIT_MAX 2
>> +static PFlashCFI01 *pc_pflash_create(const char *name)
>> +{
>> + DeviceState *dev = qdev_create(NULL, TYPE_PFLASH_CFI01);
>> +
>> + qdev_prop_set_uint64(dev, "sector-length", 4096);
>
> [...]
>
>> -static void pc_system_flash_init(MemoryRegion *rom_memory)
>> +static void pc_system_flash_map(PCMachineState *pcms,
>> + MemoryRegion *rom_memory)
>> {
>> - int unit;
>> - DriveInfo *pflash_drv;
>> + hwaddr total_size = 0;
>> + int i;
>> BlockBackend *blk;
>> int64_t size;
>> - char *fatal_errmsg = NULL;
>> - hwaddr phys_addr = 0x100000000ULL;
>> uint32_t sector_size = 4096;
>
> [...]
>
>> + if (size == 0) {
>> + error_report("system firmware block device %s is empty",
>> + blk_name(blk));
>> + exit(1);
>> + }
>> + if (size == 0 || size % sector_size != 0) {
>
> I think you missed my points (1) and (2), and Markus's followup, here:
>
> https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg07018.html
Actually I missed your whole mail...
I'll let Markus take what he likes from this 'splitting' series, and
apply your comments on top if it :)
Markus: you can also drop patches 3/4 of this series if it makes your
work harder.
Thanks both!
Phil.
- [Qemu-block] [PATCH 1/4] pflash_cfi01: Add pflash_cfi01_get_blk() helper, (continued)
- [Qemu-block] [PATCH 1/4] pflash_cfi01: Add pflash_cfi01_get_blk() helper, Philippe Mathieu-Daudé, 2019/03/04
- [Qemu-block] [PATCH 2/4] hw/i386/pc_sysfw: Remove obsolete PcSysFwDevice, Philippe Mathieu-Daudé, 2019/03/04
- [Qemu-block] [PATCH 3/4] hw/i386/pc_sysfw: Let pc_system_firmware_init() access PCMachineState, Philippe Mathieu-Daudé, 2019/03/04
- [Qemu-block] [RFC PATCH 4/4] pc: Support firmware configuration with -blockdev, Philippe Mathieu-Daudé, 2019/03/04
- Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/4] pc: Support firmware configuration with -blockdev (splitted), Markus Armbruster, 2019/03/06