qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 4/4] pc: Support firmware configuration with


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [RFC PATCH 4/4] pc: Support firmware configuration with -blockdev
Date: Tue, 5 Mar 2019 18:34:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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

Thanks
Laszlo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]