From c5660b2f4659887a3a8be7a91c9d6a30d47ed12b Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Mon, 21 Oct 2024 03:22:22 +0000 Subject: ioapic: Initially mask all IRQs individually This fixes a spurious intnull(9) from occurring on real hardware during ACPI startup when compiled with --enable-apic Message-ID: <20241021032217.2915842-1-damien@zamaudio.com> --- i386/i386at/ioapic.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/i386/i386at/ioapic.c b/i386/i386at/ioapic.c index 2553a2c9..845d1249 100644 --- a/i386/i386at/ioapic.c +++ b/i386/i386at/ioapic.c @@ -402,6 +402,9 @@ ioapic_configure(void) entry.both.vector = IOAPIC_INT_BASE + gsi; ioapic_write_entry(apic, pin, entry.both); + /* Set initial state to masked */ + mask_irq(pin); + /* Timer workaround for x86 */ if (pin == 0) { /* Save timer info */ @@ -431,6 +434,9 @@ ioapic_configure(void) } entry.both.vector = IOAPIC_INT_BASE + gsi; ioapic_write_entry(apic, pin, entry.both); + + /* Set initial state to masked */ + mask_irq(pin); } printf("IOAPIC 0 configured with GSI 0-%d\n", ngsis - 1); @@ -452,6 +458,9 @@ ioapic_configure(void) } entry.both.vector = IOAPIC_INT_BASE + gsi; ioapic_write_entry(apic, pin, entry.both); + + /* Set initial state to masked */ + mask_irq(pin + ngsis); } printf("IOAPIC 1 configured with GSI %d-%d\n", ngsis, ngsis + ngsis2 - 1); -- cgit v1.2.3