x86: Call cpu_init_interrupts() from interrupt_init()
PATCH 1/4 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.
--- arch/x86/cpu/cpu.c | 2 -- arch/x86/lib/pcat_interrupts.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/cpu/cpu.c +0 -2
@@ -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" )));
arch/x86/lib/pcat_interrupts.c +3 -0
@@ -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 ;
Signature · 1 line
1.8.2.1
PATCH 1/4 x86: Call cpu_init_interrupts() from interrupt_init()
Quoted 7 lines · Bin Meng
Currently
cpu_init_interrupts()is called fromcpu_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.
Quoted 5 lines
Signed-off-by Bin Meng <[email protected]>--- arch/x86/cpu/cpu.c | 2 -- arch/x86/lib/pcat_interrupts.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-)
Tested on chromebook_link:
PATCH 1/4 x86: Call cpu_init_interrupts() from interrupt_init()
Quoted 14 lines · Simon Glass
Quoted 7 lines · Bin Meng
Currently
cpu_init_interrupts()is called fromcpu_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.Quoted 5 lines
Signed-off-by Bin Meng <[email protected]>--- arch/x86/cpu/cpu.c | 2 -- arch/x86/lib/pcat_interrupts.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-)
Quoted 4 lines
Acked-by Simon Glass <[email protected]>Tested on
chromebook_link:Tested-by Simon Glass <[email protected]>
Applied to u-boot-x86, thanks!