ioapic: make init-time RTE masking optional

In some cases we can either assume they are already masked
at boot and save some cycles, or the IOAPIC has configuration
from a prior boot stage that needs to be preserved.

Change-Id: I0c71ff0f01a6ee13a3b9c9e239d5a933d6cb6542
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-09-22 09:46:35 -07:00
commit 7c385bd8b1
2 changed files with 12 additions and 0 deletions

View file

@ -91,6 +91,16 @@ config IOAPIC_NUM_RTES
most efficient usage of memory, it should match the number of IRQ lines
needed by devices connected to the IO-APIC.
config IOAPIC_MASK_RTE
bool "Mask out RTE entries on boot"
default y
depends on IOAPIC
help
At boot, mask all IOAPIC RTEs if they may be in an undefined state.
You don't need this if the RTEs are either all guaranteed to be masked
when the OS starts up, or a previous boot stage has done some IOAPIC
configuration that needs to be preserved.
config MVIC
bool "Intel Quark D2000 Interrupt Controller (MVIC)"
default n

View file

@ -112,6 +112,7 @@ static void _IoApicRedUpdateLo(unsigned int irq, uint32_t value,
int _ioapic_init(struct device *unused)
{
ARG_UNUSED(unused);
#ifdef CONFIG_IOAPIC_MASK_RTE
int32_t ix; /* redirection table index */
uint32_t rteValue; /* value to copy into redirection table entry */
@ -131,6 +132,7 @@ int _ioapic_init(struct device *unused)
ioApicRedSetHi(ix, 0);
ioApicRedSetLo(ix, rteValue);
}
#endif
return 0;
}