qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Benoît Canet" <benoit.canet@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/5] sh7750: convert memory controller/ioport to memory API
Date: Thu, 17 Nov 2011 14:46:17 +0200	[thread overview]
Message-ID: <4EC50219.603@redhat.com> (raw)
In-Reply-To: <1321532700-8929-2-git-send-email-benoit.canet@gmail.com>

On 11/17/2011 02:24 PM, Benoît Canet wrote:
> Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
>  
>  /* sh775x interrupt controller tables for sh_intc.c
> @@ -706,30 +714,40 @@ static CPUWriteMemoryFunc * const sh7750_mmct_write[] = {
>      sh7750_mmct_writel
>  };
>  
> -SH7750State *sh7750_init(CPUSH4State * cpu)
> +SH7750State *sh7750_init(CPUSH4State * cpu, MemoryRegion *sysmem)
>  {
>      SH7750State *s;
> -    int sh7750_io_memory;
>      int sh7750_mm_cache_and_tlb; /* memory mapped cache and tlb */
>  
>      s = g_malloc0(sizeof(SH7750State));
>      s->cpu = cpu;
>      s->periph_freq = 60000000;	/* 60MHz */
> -    sh7750_io_memory = cpu_register_io_memory(sh7750_mem_read,
> -					      sh7750_mem_write, s,
> -                                              DEVICE_NATIVE_ENDIAN);
> -    cpu_register_physical_memory_offset(0x1f000000, 0x1000,
> -                                        sh7750_io_memory, 0x1f000000);
> -    cpu_register_physical_memory_offset(0xff000000, 0x1000,
> -                                        sh7750_io_memory, 0x1f000000);
> -    cpu_register_physical_memory_offset(0x1f800000, 0x1000,
> -                                        sh7750_io_memory, 0x1f800000);
> -    cpu_register_physical_memory_offset(0xff800000, 0x1000,
> -                                        sh7750_io_memory, 0x1f800000);
> -    cpu_register_physical_memory_offset(0x1fc00000, 0x1000,
> -                                        sh7750_io_memory, 0x1fc00000);
> -    cpu_register_physical_memory_offset(0xffc00000, 0x1000,
> -                                        sh7750_io_memory, 0x1fc00000);
> +    memory_region_init_io(&s->iomem, &sh7750_mem_ops, s,
> +                          "memory", 0x1fe00000);

Any size >= 0x1fc01000 will work here, why did you pick px1fe00000? 
just curious.

I see serial starts at that address, but note that even a larger size
won't interfere, since we never add anything to sysmem at that address.

Anyway, no need to change the patch, since it will work just fine.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2011-11-17 12:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 12:24 [Qemu-devel] [PATCH 0/5] Convert remaining sh4 devices to memory API Benoît Canet
2011-11-17 12:24 ` [Qemu-devel] [PATCH 1/5] sh7750: convert memory controller/ioport " Benoît Canet
2011-11-17 12:46   ` Avi Kivity [this message]
2011-11-17 12:24 ` [Qemu-devel] [PATCH 2/5] sh7750: convert cache and tlb " Benoît Canet
2011-11-17 12:24 ` [Qemu-devel] [PATCH 3/5] sh_timer: convert " Benoît Canet
2011-11-17 12:24 ` [Qemu-devel] [PATCH 4/5] sh_intc: convert interrupt controller " Benoît Canet
2011-11-17 12:56   ` Peter Maydell
2011-11-17 13:02     ` Avi Kivity
2011-11-17 13:11     ` Benoît Canet
2011-11-17 12:25 ` [Qemu-devel] [PATCH 5/5] sh_serial: convert " 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=4EC50219.603@redhat.com \
    --to=avi@redhat.com \
    --cc=benoit.canet@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).