[PATCH 1/7] at91: add test commamd to emulate bootrom boot

Sascha Hauer s.hauer at pengutronix.de
Sun Jan 20 04:41:56 EST 2013


On Sat, Jan 19, 2013 at 05:32:08PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > +	shutdown_barebox();
> > > > > +
> > > > > +	__asm__ __volatile__(
> > > > > +		"mov pc, %0\n"
> > > > > +		:
> > > > > +		: "r"(jump)
> > > > > +		:);
> > > > 
> > > > Is this inline assemble needed? Why not
> > > > 
> > > > 	void (*jump)(void);
> > > > 
> > > > 	jump();
> > > jump can be NULL
> > 
> > But that's not a reason for inline assembly.
> except if use call we get a NULL exception

You won't get a NULL pointer exception when the MMU is disabled (which
is the case after shutdown_basebox()), no matter which method you choose
to jump to 0x0.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list