From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: takasi-y@ops.dti.ne.jp
Cc: KAWASAKI <kawasaki@juno.dti.ne.jp>,
Shin-ichiro@game.jcrosoft.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] [PATCH] r2d add pflash support
Date: Sun, 25 Jan 2009 10:18:11 +0100 [thread overview]
Message-ID: <20090125091811.GA13277@game.jcrosoft.org> (raw)
In-Reply-To: <200901250521.n0P5LLgo024436@smtp09.dti.ne.jp>
On 14:21 Sun 25 Jan , takasi-y@ops.dti.ne.jp wrote:
> Hi,
> Sorry for slow response (as is usual....)
>
> > +#define FLASH_BASE 0xa0000000
> I think this should be physical address but P2.
> Like #define FLASH_BASE 0x00000000
>
> > + } else {
> > + env->pc = FLASH_BASE;
> > + }
> I think "-pflash" should not set PC, but simply provede initial content
> of FLASH.
no you need it other wise you can not boot from the bootloader
> On the other hand, "-kernel" sets PC because it is a pseudo firmware task.
>
> > - env->pc = (SDRAM_BASE + 0x80000) | 0xa0000000;
> > + env->pc = (SDRAM_BASE + 0x80000) | FLASH_BASE;
> ...
> > - env->pc = SDRAM_BASE | 0xa0000000; /* Start from P2 area */
> > + env->pc = SDRAM_BASE | FLASH_BASE; /* Start from P2 area */
> These are not needed.
> These 0xa0000000 mean P2, nothing related with FLASH.
the FLASH is connected to there
>
> > --- a/target-sh4/helper.c
> > +++ b/target-sh4/helper.c
> > @@ -436,8 +436,8 @@ int get_physical_address(CPUState * env, target_ulong * physical,
> > else
> > return MMU_IADDR_ERROR;
> > }
> > - if (address >= 0x80000000 && address < 0xc0000000) {
> > - /* Mask upper 3 bits for P1 and P2 areas */
> > + if (address >= 0x80000000 && address < 0xa0000000) {
> > + /* Mask upper 3 bits for P1 area */
> > *physical = address & 0x1fffffff;
> > } else {
> > *physical = address;
> You needed this because you have defined FLASH address as P2.
> Chaning it to physical as shown above makes this not be needed.
But the flash is map to P2
Best Regards,
J.
next prev parent reply other threads:[~2009-01-25 9:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-18 8:25 [Qemu-devel] [FYI] sh: QEMU-SH patch list Shin-ichiro KAWASAKI
2009-01-18 16:35 ` [Qemu-devel] [PATCH 1/1] sh: fix TMU init Jean-Christophe PLAGNIOL-VILLARD
2009-01-19 20:19 ` [Qemu-devel] [RFC] [PATCH] r2d add pflash support Jean-Christophe PLAGNIOL-VILLARD
2009-01-25 5:21 ` takasi-y
2009-01-25 9:18 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-02-07 15:19 ` [Qemu-devel] [PATCH 1/1] sh: fix TMU init Aurelien Jarno
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=20090125091811.GA13277@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=Shin-ichiro@game.jcrosoft.org \
--cc=kawasaki@juno.dti.ne.jp \
--cc=qemu-devel@nongnu.org \
--cc=takasi-y@ops.dti.ne.jp \
/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).