diff options
-rw-r--r-- | src/arch/x86/include/arch/ioapic.h | 2 | ||||
-rw-r--r-- | src/arch/x86/ioapic.c | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/ioapic.h b/src/arch/x86/include/arch/ioapic.h index 9e524e250f..288f54cefc 100644 --- a/src/arch/x86/include/arch/ioapic.h +++ b/src/arch/x86/include/arch/ioapic.h @@ -37,6 +37,8 @@ void ioapic_set_max_vectors(void *ioapic_base, int mre_count); void ioapic_lock_max_vectors(void *ioapic_base); void setup_ioapic(void *ioapic_base, u8 ioapic_id); +void register_new_ioapic(void *ioapic_base); +void register_new_ioapic_gsi0(void *ioapic_base); void ioapic_set_boot_config(void *ioapic_base, bool irq_on_fsb); #endif diff --git a/src/arch/x86/ioapic.c b/src/arch/x86/ioapic.c index d65637c662..1440bb4331 100644 --- a/src/arch/x86/ioapic.c +++ b/src/arch/x86/ioapic.c @@ -163,3 +163,16 @@ void setup_ioapic(void *ioapic_base, u8 ioapic_id) clear_vectors(ioapic_base, 0, ioapic_get_max_vectors(ioapic_base) - 1); route_i8259_irq0(ioapic_base); } + +void register_new_ioapic_gsi0(void *ioapic_base) +{ + setup_ioapic(ioapic_base, 0); +} + +void register_new_ioapic(void *ioapic_base) +{ + static u8 ioapic_id; + ioapic_id++; + set_ioapic_id(ioapic_base, ioapic_id); + clear_vectors(ioapic_base, 0, ioapic_get_max_vectors(ioapic_base) - 1); +} |