aboutsummaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2024-10-21 03:22:22 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-10-22 01:55:18 +0200
commitc5660b2f4659887a3a8be7a91c9d6a30d47ed12b (patch)
treea2b74130368a82613793faaf3374dc271cb27ca2 /i386
parent93798030db00d191a159608b4ae43772d31f17f3 (diff)
downloadgnumach-c5660b2f4659887a3a8be7a91c9d6a30d47ed12b.tar.gz
gnumach-c5660b2f4659887a3a8be7a91c9d6a30d47ed12b.tar.bz2
gnumach-c5660b2f4659887a3a8be7a91c9d6a30d47ed12b.zip
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>
Diffstat (limited to 'i386')
-rw-r--r--i386/i386at/ioapic.c9
1 files changed, 9 insertions, 0 deletions
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);