diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2014-11-20 16:10:49 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-11-25 06:34:02 -0700 |
commit | 4372a9eca5561ec21277b616b5223cf23ab526ca (patch) | |
tree | 7cdca6fa7bc4553c1c079feb03a01fc0eb95abe4 | |
parent | 18739e2ccc66e13dba10a7cb4578910daf455f01 (diff) | |
download | u-boot-imx-4372a9eca5561ec21277b616b5223cf23ab526ca.zip u-boot-imx-4372a9eca5561ec21277b616b5223cf23ab526ca.tar.gz u-boot-imx-4372a9eca5561ec21277b616b5223cf23ab526ca.tar.bz2 |
x86: Call cpu_init_interrupts() from interrupt_init()
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@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | arch/x86/cpu/cpu.c | 2 | ||||
-rw-r--r-- | 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 b391b7a..ac25392 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -322,8 +322,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 2dc2fbd..f388db2 100644 --- a/arch/x86/lib/pcat_interrupts.c +++ b/arch/x86/lib/pcat_interrupts.c @@ -65,6 +65,9 @@ int interrupt_init(void) /* Interrupt 9 should be level triggered (SCI). The OS might do this */ configure_irq_trigger(9, true); + /* Initialize core interrupt and exception functionality of CPU */ + cpu_init_interrupts(); + enable_interrupts(); return 0; |