:: commit 27b209aee83c941d912ec6d633c5e242463dee07

Mintsuki <mintsuki@protonmail.com> — 2026-02-24 21:36

parents: ab5936bd58

sys/lapic: Preserve I/O APIC redirection entries when masking

diff --git a/common/sys/lapic.c b/common/sys/lapic.c
index 0efc1213..b95d1a95 100644
--- a/common/sys/lapic.c
+++ b/common/sys/lapic.c
@@ -475,8 +475,7 @@ void io_apic_mask_all(bool mask_nmi_and_extint) {
                     continue;
             }
 
-            io_apic_write(i, ioredtbl, (1 << 16)); // mask
-            io_apic_write(i, ioredtbl + 1, 0);
+            io_apic_write(i, ioredtbl, io_apic_read(i, ioredtbl) | (1 << 16));
         }
     }
 }
tab: 248 wrap: offon