[U-Boot] [PATCH V2] i.MX28: Drop __naked function from spl_mem_init

Wolfgang Denk wd at denx.de
Tue Mar 20 18:38:48 CET 2012


Dear Marek Vasut,

In message <201203201009.43717.marex at denx.de> you wrote:
> 
> > > > +	const uint32_t data_abort_memdetect_handler = 0xe25ef004;
...
> Because it rewrites piece of RAM, which is then called in the Data abort 
> context.

This is a mere implementation detail.  You could use a pointer
instead, which would then point to the RO data segment.  You could
even use some  __attribute__ ((section(".text")))  to make sure the
"instruction" is really in the text segment, for example (untested):

	const uint32_t insn __attribute__ ((section(".text"))) = 0xe25ef004;
	...
	vt[4] = &insn;

?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Without facts, the decision cannot be made logically. You  must  rely
on your human intuition.
	-- Spock, "Assignment: Earth", stardate unknown


More information about the U-Boot mailing list