Skip to content

Commit

Permalink
arch/x86: disable i8259 in crt0.S
Browse files Browse the repository at this point in the history
drivers/interrupt_controller/i8259.c is not a driver; it exists
solely to disable the i8259s when the configuration calls for it.
The six-byte sequence to mask the controllers is moved to crt0.S
and the pseudo-driver is removed.

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
  • Loading branch information
Charles E. Youse authored and nashif committed Jun 8, 2019
1 parent a348c8c commit 6aedb6f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 54 deletions.
11 changes: 11 additions & 0 deletions arch/x86/core/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,17 @@ __csSet:
1:
#endif

#if defined(CONFIG_PIC_DISABLE)
/*
* "Disable" legacy i8259 interrupt controllers. Note that we
* can't actually disable them, but we mask all their interrupt
* sources which is effectively the same thing (almost).
*/
movb $0xff, %al /* all bits set = mask all interrupts */
outb %al, $0x21 /* set i8259 master mask (IRQs 0-7) */
outb %al, $0xA1 /* set i8259 slave mask (IRQs 8-15) */
#endif

/* Jump to C portion of kernel initialization and never return */

jmp z_cstart
Expand Down
1 change: 0 additions & 1 deletion drivers/interrupt_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ zephyr_sources_ifdef(CONFIG_IOAPIC ioapic_intr.c)
zephyr_sources_ifdef(CONFIG_LOAPIC loapic_intr.c system_apic.c)
zephyr_sources_ifdef(CONFIG_LOAPIC_SPURIOUS_VECTOR loapic_spurious.S)
zephyr_sources_ifdef(CONFIG_MVIC mvic.c)
zephyr_sources_ifdef(CONFIG_PIC_DISABLE i8259.c)
zephyr_sources_ifdef(CONFIG_PLIC plic.c)
zephyr_sources_ifdef(CONFIG_SHARED_IRQ shared_irq.c)
zephyr_sources_ifdef(CONFIG_EXTI_STM32 exti_stm32.c)
Expand Down
53 changes: 0 additions & 53 deletions drivers/interrupt_controller/i8259.c

This file was deleted.

0 comments on commit 6aedb6f

Please sign in to comment.