qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] SM501 emulation for R2D-SH4
Date: Tue, 4 Nov 2008 21:11:22 +0200	[thread overview]
Message-ID: <f43fc5580811041111u1cfeff55jf456077c6b4a900d@mail.gmail.com> (raw)
In-Reply-To: <491065DB.1040204@juno.dti.ne.jp>

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?

  reply	other threads:[~2008-11-04 19:11 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 [this message]
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
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=f43fc5580811041111u1cfeff55jf456077c6b4a900d@mail.gmail.com \
    --to=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).