From: "andrzej zaborowski" <balrogg@gmail.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] [RESEND] SM501 emulation for R2D-SH4
Date: Wed, 5 Nov 2008 21:13:35 +0100 [thread overview]
Message-ID: <fb249edb0811051213r509799f1of6e5724190defecf@mail.gmail.com> (raw)
In-Reply-To: <f43fc5580811051025p2fab5629ie324460515b1257f@mail.gmail.com>
2008/11/5 Blue Swirl <blauwirbel@gmail.com>:
> On 11/5/08, Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> wrote:
>> Blue Swirl wrote:
>>
>> > On 11/4/08, Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> wrote:
>> >
>> > > Thank you for reviewing!
>> > >
>> > > I add the new version of patch to this mail, which reflects
>> > > you and andrzej's comments. Some more comments on it will be
>> > > appreciated. Especially advice on VRAM implementation with
>> > > normal RAM will be useful for me.
>> > >
>> > > > The display buffer should be allocated using machine definition
>> > > >
>> > > .ram_require.
>> > > I tried normal RAM implementation : "#define USE_NORMAL_RAM" in the
>> patch
>> > > will
>> > > turn the new implementation on. But it causes system hang during
>> SH-Linux
>> > > boot up.
>> > > The initial VRAM clearance seems to cause the hang.
>> > > The reason might be my wrong implementation, or any MMU problem of SH4.
>> > >
>> > > I did,
>> > > - added VRAM size to .ram_require
>> > > - invoked qemu_ram_alloc() with the VRAM size parameter,
>> > > - and invoked cpu_register_physical_memory(), passing
>> the
>> > > return value of
>> > > qemu_ram_alloc() as third parameter.
>> > >
>> > > Is this sequence correct?
>> > >
>> >
>> > Yes, but the system RAM is not allocated using qemu_ram_alloc. Now
>> > qemu_ram_alloc gives the same area (0 to VRAM_SIZE) the second time.
>> >
>> > So the following:
>> > /* Allocate memory space */
>> > cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE,
>> 0);
>> > should be changed to:
>> > ram_addr = qemu_ram_alloc(SDRAM_SIZE);
>> > cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE,
>> ram_addr);
>> >
>> > Maybe that helps?
>> >
>>
>> Yes, it helps. Thank you!
>>
>> Here's the new patch which uses normal RAM as the VRAM, and
>> checks VGA_DIRTY_FLAG for partial update.
>>
>> I think it is ready for merge to the trunk.
>> Could anyone help it?
>
> Looks good to me. What about you, Andrzej?
While I don't know the hardware, it looks correct to me, feel free to merge.
One nit is that qemu_ram_alloc() makes it possible for ram to be
allocked inside devices, so for example the local_mem_base and
local_mem_bytes parameters can be removed.
Cheers
next prev parent reply other threads:[~2008-11-05 20:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-02 2:12 [Qemu-devel] [PATCH] SM501 emulation for R2D-SH4 Shin-ichiro KAWASAKI
2008-11-02 3:27 ` andrzej zaborowski
2008-11-04 14:31 ` Shin-ichiro KAWASAKI
2008-11-02 6:52 ` Blue Swirl
2008-11-04 15:10 ` Shin-ichiro KAWASAKI
2008-11-04 19:11 ` Blue Swirl
2008-11-05 17:09 ` [Qemu-devel] [PATCH] [RESEND] " Shin-ichiro KAWASAKI
2008-11-05 18:25 ` Blue Swirl
2008-11-05 20:13 ` andrzej zaborowski [this message]
2008-11-05 20:26 ` Blue Swirl
2008-11-04 15:27 ` [Qemu-devel] When should I use qemu_ram_alloc(), and how? takasi-y
2008-11-04 19:14 ` [Qemu-devel] " Blue Swirl
2008-11-04 19:32 ` Anthony Liguori
2008-11-05 13:29 ` takasi-y
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=fb249edb0811051213r509799f1of6e5724190defecf@mail.gmail.com \
--to=balrogg@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 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).