From: Avi Kivity <avi@redhat.com>
To: "Benoît Canet" <benoit.canet@gmail.com>
Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 00/14] Convert Sun devices to memory API.
Date: Tue, 15 Nov 2011 19:48:46 +0200 [thread overview]
Message-ID: <4EC2A5FE.1040408@redhat.com> (raw)
In-Reply-To: <CAOh3yaxPFunJ9dzh2hc3F46SXJoCZganXe5u-qfLjF7wZ4CeFg@mail.gmail.com>
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
next prev parent reply other threads:[~2011-11-15 17:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-15 11:13 [Qemu-devel] [PATCH 00/14] Convert Sun devices to memory API Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 01/14] slavio_misc: convert apc " Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 02/14] slavio_misc: convert configuration " Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 03/14] slavio_misc: convert diagnostic " Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 04/14] slavio_misc: convert modem " Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 05/14] slavio_misc: convert leds " Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 06/14] slavio_misc: convert system control " Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 07/14] slavio_misc: convert aux1 " Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 08/14] slavio_misc: convert aux2 " Benoît Canet
2011-11-15 11:13 ` [Qemu-devel] [PATCH 09/14] slavio_intctl: convert master interrupt controller " Benoît Canet
2011-11-15 11:14 ` [Qemu-devel] [PATCH 10/14] slavio_intctl: convert slaves interrupt controllers " Benoît Canet
2011-11-15 11:14 ` [Qemu-devel] [PATCH 11/14] sun4c_intctl: convert " Benoît Canet
2011-11-15 11:14 ` [Qemu-devel] [PATCH 12/14] slavio_timer: " Benoît Canet
2011-11-15 11:14 ` [Qemu-devel] [PATCH 13/14] sun4m_iommu: " Benoît Canet
2011-11-15 11:14 ` [Qemu-devel] [PATCH 14/14] esp: Fix memory API conversion Benoît Canet
2011-11-15 12:20 ` [Qemu-devel] [PATCH 00/14] Convert Sun devices to memory API Avi Kivity
2011-11-15 15:22 ` Benoît Canet
2011-11-15 17:48 ` Avi Kivity [this message]
2011-11-15 20:03 ` Benoît Canet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC2A5FE.1040408@redhat.com \
--to=avi@redhat.com \
--cc=benoit.canet@gmail.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.