From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rafal Jaworowski Date: Wed, 02 Jan 2008 18:40:15 +0100 Subject: [U-Boot-Users] disabling d-cache in 'bootelf' for QNX Message-ID: <477BCC7F.4030709@semihalf.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, Currently do_bootelf() disables data cache just before passing control to the entry point: /* * QNX images require the data cache is disabled. * Data cache is already flushed, so just turn it off. */ if (dcache_status ()) dcache_disable (); With this piece of code present I'm seeing strange effects (corrupt data access, hangs) in standalone apps running from the ELF envelope. A pure binary made of this same ELF works without problems. Contrary to the comment above, there's no quarantee in do_bootelf() code flow that all data cache has been flushed and it seems there needs to be flush_data_cache() executed before the disable. 1. Does it really hold true that QNX requires d-cache disabled upon passing control to it? 2. If so, this is a custom QNX thing that belongs to do_bootm_qnxelf() and should be handled there and not at the common ELF handling level. Any objections to pushing this down to do_bootm_qnxelf()? I can provide a patch, but cannot test it with any QNX system. Is there anyone with such setup that would give this a try? Rafal