[U-Boot] [PATCH 0/3] arm: add interrupt support

Georges Savoundararadj
2014-09-22T18:24:08Z

Le 22/09/2014 03:35, Masahiro Yamada a ?crit :
> On Sun, 21 Sep 2014 23:33:47 +0200
> Georges Savoundararadj<savoundg@gmail.com> wrote:
>
>> Hi folks,
>>
>> I wanted to use interrupt on U-Boot on my Raspberry Pi but I have
>> found that it did not work properly.
>>
>> My patches intend to make interrupt work.
>
> I am not sure if interrupt feature is necessary for a boot loader.
Of course, It is not necessary.

But for U-boot, I think it is still important to handle exception
correctly even if interrupts are not used. Don't you?

For instance, without these patches an undefined instruction or any
other exception causes an unexpected behavior. It is better to handle
properly these cases (dump registers and reset CPU, see functions do_*
in arch/arm/lib/interrupts.c).
My patches should better be considered as *bugfixes*.

I should have explained better what these patches do:

* [PATCH 1/3] arm: make .vectors section allocatable:
This patch makes the symbols in the section .vectors relocatable. If the
symbols address of undefined_instruction, for instance, is not fixed up
after relocation, this could lead to an unexpected behavior. It fixes a
regression introduced in commit 41623c91.

* [PATCH 2/3] arm1176: move exception vectors after relocation:
Without this patch, an exception will jump to the before relocation base
address which is clearly a bug.

* [PATCH 3/3] arm: enable_interrupts: set sp in IRQ/FIQ modes:
The init_interrupt function is not complete because it does not
configure the computed stack pointers. So, why should we compute
IRQ_STACK_START and FIQ_STACK_START without using them?

I hope I am clear.

Regards,

Georges