[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/14] Convert Sun devices to memory API.
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] [PATCH 00/14] Convert Sun devices to memory API. |
Date: |
Tue, 15 Nov 2011 19:48:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 |
On 11/15/2011 05:22 PM, Benoît Canet wrote:
> When converting lines like :
>
> - cpu_register_physical_memory_offset(0x1f800000, 0x1000,
> - sh7750_io_memory, 0x1f800000);
> - cpu_register_physical_memory_offset(0xff800000, 0x1000,
> - sh7750_io_memory, 0x1f800000);
>
> I'm tempted to do :
>
> + memory_region_init_alias(&s->iomem_1f8, "memory-1f8",
> + &s->iomem, 0x1f800000, 0x1000);
> + memory_region_add_subregion(sysmem, 0x1f800000, &s->iomem_1f8);
> +
> + memory_region_init_alias(&s->iomem_ff8, "memory-ff8",
> + &s->iomem, 0xff800000, 0x1000);
> + memory_region_add_subregion(sysmem, 0xff800000, &s->iomem_ff8);
>
> but I'm affraid to loose some information contained in the offset
> different from the base address (0xff800000 != 0x1f800000).
>
I think the last lines need to be
memory_region_init_alias(&s->iomem_ff8, "memory-ff8",
&s->iomem, 0x1f800000, 0x1000);
memory_region_add_subregion(sysmem, 0xff800000, &s->iomem_ff8);
This redirects writes to 0xff800xxx in sysmem to 0x1f800xxx in iomem,
which is what I think the original code intends.
--
error compiling committee.c: too many arguments to function
- [Qemu-devel] [PATCH 09/14] slavio_intctl: convert master interrupt controller to memory API, (continued)
- [Qemu-devel] [PATCH 09/14] slavio_intctl: convert master interrupt controller to memory API, Benoît Canet, 2011/11/15
- [Qemu-devel] [PATCH 10/14] slavio_intctl: convert slaves interrupt controllers to memory API, Benoît Canet, 2011/11/15
- [Qemu-devel] [PATCH 05/14] slavio_misc: convert leds to memory API, Benoît Canet, 2011/11/15
- [Qemu-devel] [PATCH 08/14] slavio_misc: convert aux2 to memory API, Benoît Canet, 2011/11/15
- [Qemu-devel] [PATCH 13/14] sun4m_iommu: convert to memory API, Benoît Canet, 2011/11/15
- [Qemu-devel] [PATCH 11/14] sun4c_intctl: convert to memory API, Benoît Canet, 2011/11/15
- [Qemu-devel] [PATCH 12/14] slavio_timer: convert to memory API, Benoît Canet, 2011/11/15
- [Qemu-devel] [PATCH 14/14] esp: Fix memory API conversion, Benoît Canet, 2011/11/15
- Re: [Qemu-devel] [PATCH 00/14] Convert Sun devices to memory API., Avi Kivity, 2011/11/15