qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 7/8] hw: sun4c: add read memory region callback


From: Artyom Tarasenko
Subject: Re: [Qemu-devel] [PATCH 7/8] hw: sun4c: add read memory region callback
Date: Wed, 12 Sep 2018 21:22:34 +0200

Please correct the typo in the subject. I was scared that someone dug
out the sun4c zombie emulation.

In the particular case of sun4u, I think the proper way is not to have
the read callback, but throw an 'Unassigned memory access' exception

Regards,
Artyom
On Wed, Sep 12, 2018 at 6:09 PM Li Qiang <address@hidden> wrote:
>
> From: Li Qiang <address@hidden>
>
> Signed-off-by: Li Qiang <address@hidden>
> ---
>  hw/sparc64/sun4u.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
> index d16843b30e..74c55a82f4 100644
> --- a/hw/sparc64/sun4u.c
> +++ b/hw/sparc64/sun4u.c
> @@ -212,6 +212,11 @@ typedef struct PowerDevice {
>      MemoryRegion power_mmio;
>  } PowerDevice;
>
> +static uint64_t power_mem_read(void *opaque, hwaddr addr, unsigned size)
> +{
> +    return 0;
> +}
> +
>  /* Power */
>  static void power_mem_write(void *opaque, hwaddr addr,
>                              uint64_t val, unsigned size)
> @@ -223,6 +228,7 @@ static void power_mem_write(void *opaque, hwaddr addr,
>  }
>
>  static const MemoryRegionOps power_mem_ops = {
> +    .read = power_mem_read,
>      .write = power_mem_write,
>      .endianness = DEVICE_NATIVE_ENDIAN,
>      .valid = {
> --
> 2.17.1
>
>
>


-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu



reply via email to

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