All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: avi@redhat.com
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 01/13] mips_jazz: convert to memory API
Date: Sat, 24 Sep 2011 10:29:57 +0200	[thread overview]
Message-ID: <4E7D9505.6000605@reactos.org> (raw)

Avi Kivity wrote:

 > Signed-off-by: Avi Kivity <avi@redhat.com>
 > ---
 >
 > hw/mips_jazz.c | 90 
++++++++++++++++++++++++++++----------------------------
 > 1 files changed, 45 insertions(+), 45 deletions(-)
 >
 > diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
 > index f3c9f93..7cac5da 100644
 > --- a/hw/mips_jazz.c
 > +++ b/hw/mips_jazz.c
 >@@ -203,10 +203,11 @@ void mips_jazz_init (ram_addr_t ram_size,
 >         sysbus_connect_irq(sysbus, 0, rc4030[3]);
 >         {
 >             /* Simple ROM, so user doesn't have to provide one */
 > -            ram_addr_t rom_offset = qemu_ram_alloc(NULL, "g364fb.rom",
 >                                                     0x80000);
 > -            uint8_t *rom = qemu_get_ram_ptr(rom_offset);
 > -            cpu_register_physical_memory(0x60000000, 0x80000,
 > -                                         rom_offset | IO_MEM_ROM);
 > +            MemoryRegion *rom_mr = g_new(MemoryRegion, 1);
 > +            memory_region_init_ram(rom_mr, NULL, "g364fb.rom", 0x80000);
 > +            memory_region_set_readonly(rom_mr, true);
 > +            uint8_t *rom = memory_region_get_ram_ptr(rom_mr);
 > +            memory_region_add_subregion(address_space, 0x60000000, 
rom_mr);
 >              rom[0] = 0x10; /* Mips G364 */
 >          }
 >          break;

This part breaks Magnum emulation, where firmware writes to 0x60000000, 
and then checks if value has been modified.
This is not working as expected (value is modified) because 
memory_region_set_readonly() is unimplemented...

Hervé

             reply	other threads:[~2011-09-24  8:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-24  8:29 Hervé Poussineau [this message]
2011-09-25  9:18 ` [Qemu-devel] [PATCH 01/13] mips_jazz: convert to memory API Avi Kivity
2011-09-25 11:51   ` Avi Kivity
2011-09-25 12:37     ` Hervé Poussineau
  -- strict thread matches above, loose matches on Subject: below --
2011-09-21  8:19 [Qemu-devel] [PULL 00/13] Memory API conversion, batch 8 Avi Kivity
2011-09-21  8:19 ` [Qemu-devel] [PATCH 01/13] mips_jazz: convert to memory API Avi Kivity
2011-09-18 14:15 [Qemu-devel] [PATCH 00/13] Memory API conversion, batch 8 Avi Kivity
2011-09-18 14:15 ` [Qemu-devel] [PATCH 01/13] mips_jazz: convert to memory API Avi Kivity

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=4E7D9505.6000605@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=avi@redhat.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.