[U-Boot-Users] [PATCH] 405 OCM warning

Robert Schwebel r.schwebel at pengutronix.de
Fri Jul 2 09:41:11 CEST 2004


> > NOTE: for IBM 405GP the On Chip Memory (OCM) is mapped on virtual
> > addresses! So take care that you configure it to be mapped
> > (CFG_OCM_DATA_ADDR) in an area which is not used by your operating
> > system's virtual addresses. For Linux it has to be located above the
> > maximum task size (see CONFIG_TASK_SIZE in the Linux configuration).
> > Otherwhise you will see strange effects with your user land stack. 
> 
> Isn't it the other way round? U-Boot does not use "virtual addresses"
> as it doesn't enable the MMU  for  virtual  memory.  It's  the  Linux
> kernel  which  uses  a  1:1  physical  to virtual mapping for certain
> address ranges. 

But U-Boot initializes CFG_OCM_DATA_ADDR. When I started with the 405
port I had this macro pointing to 0x4000'0000 which is right in the
middle of the Linux user space task virtual address range. I doubt that
the kernel makes a 1:1 mapping for this memory area ;) I don't have the
405 manual here for reference, but if I remember correctly it was the
virtual address you could configure here. Although this is not directly
a problem which influences U-Boot it should IMHO be noted in the
description of U-Boot's config variable that this is dangerous, and not
only with Linux. 

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hornemannstraße 12,  31137 Hildesheim, Germany
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4




More information about the U-Boot mailing list