[uClinux-dev] init problems

Claude cmhintl at gmail.com
Wed Jun 6 04:24:57 EDT 2007


Hi again,
With regard to my init problems, I think I have found the problem. What really 
halts is the function __flush_cache_all() that is called by do_mmap(). In my 
case (working with MCF5282) this is an inline function that implements some 
assembly code, in particular the following one:
static inline void __flush_cache_all(void)
{
	...
#if defined(CONFIG_M527x) || defined(CONFIG_M528x)
	__asm__ __volatile__ (
        	"movel	#0x81400100, %%d0\n\t"
        	"movec	%%d0, %%CACR\n\t"
		"nop\n\t"
		: : : "d0" );
#endif /* CONFIG_M527x || CONFIG_M528x */

	...
}

As I can see, this code affects the MCF5282's CACHE module which, according to 
Freescale's MCF5282 device errata, it does not work. I have revised the 
initial start up code (i.e. head.S) and the macro CACHE_ENABLE is always 
called. Thus, I have uClinux playing with a dangerous toy: the MCF5282's 
cache.

I know that the answer to my problem may be trivial: just disable CACHE. The 
question is that I don't know whether there are other modules that may use 
CACHE as __flush_cache_all() does. Although I could disable cache in the 
start up code, functions as __flush_cache_all would activate it again.



Could you help me?

Thanks in advance


More information about the uClinux-dev mailing list