qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 1/4] hw/i386/pc: Get pflash MemoryRegion with sysbus_mmio_get


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 1/4] hw/i386/pc: Get pflash MemoryRegion with sysbus_mmio_get_region()
Date: Tue, 9 Mar 2021 12:01:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Michael, Paolo, if you Ack this patch I can queue the series
via pflash-next.

On 3/7/21 11:26 PM, Philippe Mathieu-Daudé wrote:
> TYPE_PFLASH_CFI01 is a TYPE_SYS_BUS_DEVICE which registers its romd
> MemoryRegion with sysbus_init_mmio(), so we can use the generic
> sysbus_mmio_get_region() to get the region, no need for a specific
> pflash_cfi01_get_memory() helper.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/i386/pc_sysfw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
> index 9fe72b370e8..caad9cbd5eb 100644
> --- a/hw/i386/pc_sysfw.c
> +++ b/hw/i386/pc_sysfw.c
> @@ -297,7 +297,7 @@ static void pc_system_flash_map(PCMachineState *pcms,
>                          0x100000000ULL - total_size);
>  
>          if (i == 0) {
> -            flash_mem = pflash_cfi01_get_memory(system_flash);
> +            flash_mem = sysbus_mmio_get_region(SYS_BUS_DEVICE(system_flash), 
> 0);
>              pc_isa_bios_init(rom_memory, flash_mem, size);
>  
>              /* Encrypt the pflash boot ROM */
> 




reply via email to

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