[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH v3 1/6] aspeed: add support for the witherspoon-bm
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH v3 1/6] aspeed: add support for the witherspoon-bmc board |
Date: |
Wed, 18 Oct 2017 17:29:43 +0100 |
On 18 October 2017 at 17:10, Cédric Le Goater <address@hidden> wrote:
> On 10/17/2017 05:39 PM, Peter Maydell wrote:
>> A "reads like RAM but writes are ignored" lump of memory is easy...
>
> yes. It seems but I haven't found my way through :/
memory_region_init_rom_device() creates a memory region
which is backed by RAM for reads (and for debug writes,
like ELF file loading), but backed by the usual
device callback functions for writes. So I think you should
just be able to use one of those but with the write
functions doing nothing (or warning about unimp. behaviour,
assuming that your flash devices actually have some
kind of command behaviour for writes).
This is how we implement the flash device with actual
behaviour behind them.
hw/mips/boston.c actually has an example of doing a dummy
flash device like this (though it uses
memory_region_init_rom_device_nomigrate(), which is a bug
because your memory contents won't get migrated if you
do that. Use the plain function instead.)
thanks
-- PMM
- [Qemu-arm] [PATCH v3 0/6] aspeed: add a witherspoon-bmc machine, Cédric Le Goater, 2017/10/13
- [Qemu-arm] [PATCH v3 2/6] aspeed: add an I2C RTC device to all machines, Cédric Le Goater, 2017/10/13
- [Qemu-arm] [PATCH v3 3/6] smbus: add a smbus_eeprom_init_one() routine, Cédric Le Goater, 2017/10/13
- [Qemu-arm] [PATCH v3 4/6] aspeed: Add EEPROM I2C devices, Cédric Le Goater, 2017/10/13
- [Qemu-arm] [PATCH v3 5/6] misc: add pca9552 LED blinker model, Cédric Le Goater, 2017/10/13
- [Qemu-arm] [PATCH v3 6/6] aspeed: add the pc9552 chips to the witherspoon machine, Cédric Le Goater, 2017/10/13