[U-Boot] [1/5]devkit8000 nand_spl: armv7 support nand_spl boot

Aneesh V aneesh at ti.com
Thu Jun 30 13:10:52 CEST 2011


This seems to be an extension of the work I did for OMAP4. So, I shall
respond for the code I had added.

On Wednesday 29 June 2011 01:57 PM, Andreas Bießmann wrote:
> Dear Simon Schwarz,

[snip ..]

>> +#ifdef CONFIG_PRELOADER
>> +/* If in Preloader don't use interrupts...*/
>> +_undefined_instruction: .word undefined_instruction
>> +_software_interrupt:    .word _software_interrupt
>> +_prefetch_abort:    .word _prefetch_abort
>> +_data_abort:        .word data_abort
>> +_not_used:      .word _not_used
>> +_irq:           .word _irq
>> +_fiq:           .word _fiq
>> +_pad:           .word 0x12345678 /* now 16*4=64 */
>> +#else
>>   _undefined_instruction: .word undefined_instruction
>>   _software_interrupt:	.word software_interrupt
>>   _prefetch_abort:	.word prefetch_abort
>> @@ -51,6 +67,7 @@ _not_used:		.word not_used
>>   _irq:			.word irq
>>   _fiq:			.word fiq
>>   _pad:			.word 0x12345678 /* now 16*4=64 */
>> +#endif /* CONFIG_PRELOADER */
>
> why resetting the vector table? just do not enable irq at all should
> also do the job, isn't it?

The main purpose was to compile out the exception handlers and related
code down below, that would not be much needed in SPL. In the absence
of these handlers I wanted spin-loops in the vector so that we get
some debugging hints with JTAG debuggers.

>
>>   .global _end_vect
>>   _end_vect:
[snip ..]
>> +#endif /* #ifdef CONFIG_PRELOADER */
>
> ok to mark this #endif, but do not use  '/* #ifdef', it looks like
> commented out ifdef.

Ok.

>
>> +

[snip ..]

>>   	adr	r0, _start
>> -#ifndef CONFIG_PRELOADER
>
> hmm ... that ifndef was intentionally there

I wanted to skip relocation but allow clear_bss() for SPL.

>
>>   	cmp	r0, r6
>>   	beq	clear_bss		/* skip relocation */

[snip ..]

>> +#ifdef CONFIG_PRELOADER
>> +	.align 	5
>> +undefined_instruction:
>> +	b undefined_instruction
>> +
>> +	.align	5
>> +data_abort:
>> +	b data_abort
>> +#endif
>
> I guess you want to save space by reducing the irq vector overhead. But
> shouldn't this be some #ifdef CONFIG_USE_IRQ instead of CONFIG_PRELOADER?

Not just IRQ but all exception handelrs.


More information about the U-Boot mailing list