From: Robert Schwebel Date: Fri, 2 Jul 2004 09:41:11 +0200 Subject: [U-Boot-Users] [PATCH] 405 OCM warning In-Reply-To: <20040701220014.94310C109F@atlas.denx.de> References: <20040612190145.GF12815@pengutronix.de> <20040701220014.94310C109F@atlas.denx.de> Message-ID: <20040702074111.GB32518@pengutronix.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > > 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