[Top][All Lists]

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

Re: [Qemu-devel] [PATCH for 2.4 2/3] net/dp8393x: specify memory operati

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH for 2.4 2/3] net/dp8393x: specify memory operations for PROM PROM
Date: Mon, 27 Jul 2015 12:38:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

On 26/07/2015 22:35, Hervé Poussineau wrote:
> +    memory_region_init_ram(&s->prom, OBJECT(dev),
> +                           "dp8393x-prom", SONIC_PROM_SIZE, &local_err);
> +    if (local_err) {
> +        error_propagate(errp, local_err);
> +        return;
> +    }
> +    memory_region_set_readonly(&s->prom, true);

Yup, this is better.  memory_region_init_rom_device is used whenever you
want to catch writes and do something about them.  For example, flash
devices enable ROMD mode, where reads also go down the MMIO path.


reply via email to

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