From mboxrd@z Thu Jan 1 00:00:00 1970 From: Georges Savoundararadj Date: Mon, 22 Sep 2014 20:24:08 +0200 Subject: [U-Boot] [PATCH 0/3] arm: add interrupt support In-Reply-To: <20140922103459.0A0D.AA925319@jp.panasonic.com> References: <1411335230-26907-1-git-send-email-savoundg@gmail.com> <20140922103459.0A0D.AA925319@jp.panasonic.com> Message-ID: <54206948.3090001@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 22/09/2014 03:35, Masahiro Yamada a ?crit : > On Sun, 21 Sep 2014 23:33:47 +0200 > Georges Savoundararadj 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