[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] [PATCH] r2d add pflash support
From: |
Jean-Christophe PLAGNIOL-VILLARD |
Subject: |
Re: [Qemu-devel] [RFC] [PATCH] r2d add pflash support |
Date: |
Sun, 25 Jan 2009 10:18:11 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On 14:21 Sun 25 Jan , address@hidden 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.