[U-Boot] [PATCH 1/4] x86: Call cpu_init_interrupts() from interrupt_init()

Bin Meng bmeng.cn at gmail.com
Thu Nov 20 09:10:49 CET 2014


Currently cpu_init_interrupts() is called from cpu_init_r() to
setup the interrupt and exception of the cpu core, but at that
time the i8259 has not been initialized to mask all the irqs
and remap the master i8259 interrupt vector base, so the whole
system is at risk of being interrupted, and if interrupted,
wrong interrupt/exception message is shown.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
---
 arch/x86/cpu/cpu.c             | 2 --
 arch/x86/lib/pcat_interrupts.c | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 97c77ba..cf0606e 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -321,8 +321,6 @@ int x86_cpu_init_f(void)
 
 int x86_cpu_init_r(void)
 {
-	/* Initialize core interrupt and exception functionality of CPU */
-	cpu_init_interrupts();
 	return 0;
 }
 int cpu_init_r(void) __attribute__((weak, alias("x86_cpu_init_r")));
diff --git a/arch/x86/lib/pcat_interrupts.c b/arch/x86/lib/pcat_interrupts.c
index 4c86f7f..2ce371e 100644
--- a/arch/x86/lib/pcat_interrupts.c
+++ b/arch/x86/lib/pcat_interrupts.c
@@ -62,6 +62,9 @@ int interrupt_init(void)
 	 */
 	unmask_irq(2);
 
+	/* Initialize core interrupt and exception functionality of CPU */
+	cpu_init_interrupts();
+
 	enable_interrupts();
 
 	return 0;
-- 
1.8.2.1



More information about the U-Boot mailing list