On 9/1/23 13:08, Philippe Mathieu-Daudé wrote:
> Since v1:
> - Do not introduce pflash_cfi_create(), directly
> open-code pflash_cfi_register() before removing it (Peter)
> - Added R-b tags
Sigh, my sendemail.cccmd command didn't work, so Cc'ing manually the cover.
> Paving the road toward heterogeneous QEMU, the limitations of
> having a single machine sysbus become more apparent.
>
> The sysbus_mmio_map() API forces the caller to map a sysbus
> device to an address on the system bus (system bus here is
> the root MemoryRegion returned by get_system_memory() ).
>
> This is not practical when each core has its own address
> space and group of cores have access to a part of the
> peripherals.
>
> Experimenting with the PFLASH devices. Here the fix is
> quite easy: open-code the pflash_cfi_register() functions.
>
> Since we were touching the PFLASH API, we restricted the
> PFlashCFI0X structures to their models. The API now deals
> with a generic qdev pointer (DeviceState*).
>
> Please review,
>
> Phil.
>
> Based-on: <20230109115316.2235-1-philmd@linaro.org>
> "hw/arm: Cleanups before pflash refactor"
> Based-on: <20230109120154.2868-1-philmd@linaro.org>
> "hw/misc: Cleanups around PFLASH use"
>
> Philippe Mathieu-Daudé (21):
> hw/block: Rename TYPE_PFLASH_CFI02 'width' property as 'device-width'
> hw/block: Pass DeviceState to pflash_cfi01_get_blk()
> hw/block: Use pflash_cfi01_get_blk() in pflash_cfi01_legacy_drive()
> hw/block: Pass DeviceState to pflash_cfi01_get_memory()
> hw/arm: Use generic DeviceState instead of PFlashCFI01
> hw/loongarch: Use generic DeviceState instead of PFlashCFI01
> hw/riscv: Use generic DeviceState instead of PFlashCFI01
> hw/i386: Use generic DeviceState instead of PFlashCFI01
> hw/xtensa: Use generic DeviceState instead of PFlashCFI01
> hw/sh4: Open-code pflash_cfi02_register()
> hw/arm/digic: Open-code pflash_cfi02_register()
> hw/arm/musicpal: Open-code pflash_cfi02_register()
> hw/arm/xilinx_zynq: Open-code pflash_cfi02_register()
> hw/block: Remove unused pflash_cfi02_register()
> hw/block: Make PFlashCFI02 QOM declaration internal
> hw/arm: Open-code pflash_cfi01_register()
> hw/microblaze: Open-code pflash_cfi01_register()
> hw/mips: Open-code pflash_cfi01_register()
> hw/ppc: Open-code pflash_cfi01_register()
> hw/block: Remove unused pflash_cfi01_register()
> hw/block: Make PFlashCFI01 QOM declaration internal