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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux