[RFC 2/2] ARM omap: Add CONFIG_SILENT

Sascha Hauer s.hauer at pengutronix.de
Fri Jan 13 06:43:55 EST 2012


On Thu, Jan 12, 2012 at 03:51:49PM +0000, Premi, Sanjeev wrote:
> > -----Original Message-----
> > From: Sascha Hauer [mailto:s.hauer at pengutronix.de] 
> > Sent: Thursday, January 12, 2012 2:59 PM
> > To: Premi, Sanjeev
> > Cc: barebox at lists.infradead.org; Jean-Christophe PLAGNIOL-VILLARD
> > Subject: Re: [RFC 2/2] ARM omap: Add CONFIG_SILENT
> > 
> 
> [snip]
> 
> > BTW you seem to be very concerned about the codesize in the xloader
> > environments, which I can understand. How about giving my 
> > thumb2 patches
> > a try?
> 
> I tried pulling these patches on the latest master, but git am failed.
> Manual patching reports previously applied patches. (I was able to find
> few patches in the series already in master)
> 
> Some hunks don't apply cleanly. For example:
> 
> diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
> index bd9b72a..3fafb4b 100644
> --- a/arch/arm/lib/armlinux.c
> +++ b/arch/arm/lib/armlinux.c
> @@ -253,6 +253,8 @@ void start_linux(void *adr, int swap, struct image_data *data)
>  {
>  	void (*kernel)(int zero, int arch, void *params) = adr;
>  	void *params = NULL;
> +	int architecture = armlinux_get_architecture();
> +
>  #ifdef CONFIG_OFTREE
>  	params = of_get_fixed_tree();
>  	if (params)
> 
> I did quick fix-ups at few places to make compiler happy, but got
> stuck with this:
> 
>   AS      arch/arm/mach-omap/omap3_core.o
> arch/arm/mach-omap/omap3_core.S: Assembler messages:
> arch/arm/mach-omap/omap3_core.S:116: Error: shift must be constant -- `orr r11,r10,r9,lsl r5'
> arch/arm/mach-omap/omap3_core.S:117: Error: shift must be constant -- `orr r11,r11,r7,lsl r2'

This can be fixed with the following:

ARM(	orr	r11, r10, r9, lsl r5	) /* factor way and cache number into r11 */
ARM(	orr	r11, r11, r7, lsl r2	) /* factor index number into r11 */
THUMB(	lsl	r6, r9, r5		)
THUMB(	orr	r11, r10, r6		) /* factor way and cache number into r11 */
THUMB(	lsl	r6, r7, r2		)
THUMB(	orr	r11, r11, r6		) /* factor index number into r11 */

Just how it is done in arch/arm/cpu/cache-armv7.S. Anyway, this is
only the top of the iceberg. All Assembly code must be carefully
reviewed in thumb mode and omap3 has quite a lot of it. I managed
to start a second stage barebox (compiled with xloader defconfig +
THUMB) in which I commented out arch_init_lowlevel() and
board_init_lowlevel().

I see if I can sort some of this stuff out on the weekend.

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