[U-Boot-Users] MIPS question

Tim Braun tim.braun at librestream.com
Thu Oct 11 16:36:17 CEST 2007


> From: Vlad Lungu <vlad at comsys.ro>
> Shinya Kuribayashi wrote:
> > Vlad Lungu wrote:
> >   
> >> in include/asm-mips/addrspace.h line 52, there is a
> >>
> >> #define UNCACHED_SDRAM(a) PHYSADDR(a)
> >>
> >> The question is: shouldn't we use KSEG1ADDR() instead of 
> PHYSADDR()?
> >>     
> >
> > I think we should. At least my target boards need that change.


> The RAM might be mapped at 0 too on some boards, that's why 
> it works with PHYSADDR(). ...

My code base is unchanged from U-Boot 1.1.1 :

#if defined(CONFIG_AU1X00) || defined(CONFIG_TB0229)
/* We use a 36 bit physical address map here and
   cannot access physical memory directly from core */
#define UNCACHED_SDRAM(a) (((unsigned long)(a)) | 0x20000000)
#else	/* !CONFIG_AU1X00 */
#define UNCACHED_SDRAM(a) PHYSADDR(a)
#endif	/* CONFIG_AU1X00 */

Since the name is uncached, you want an uncached address, so I think we
want

#define UNCACHED_SDRAM(a) KSEG1ADDR(a)

In the Au1x00 based systems (like ours), the SDRAM is generally mapped
to 
physical address 0x80000000, so it works out as valid KSEG0 / KSEG1
addresses.

Tim Braun, Sr. Des. Eng.
LibreStream Technologies
200-55 Rothwell Rd, Winnipeg, R3P 2M5  http://www.librestream.com 





More information about the U-Boot mailing list