:: commit 65a4eaed9d6e44b40b0055c8b2f2f277ad1bcb1f

Mintsuki <mintsuki@protonmail.com> — 2026-04-19 01:07

parents: ff63204fc9

sys/lapic: Skip MADT type 4 NMI entries for x2APIC UIDs above 0xfe

diff --git a/common/sys/lapic.c b/common/sys/lapic.c
index 8f6d055a..c5d91c9e 100644
--- a/common/sys/lapic.c
+++ b/common/sys/lapic.c
@@ -64,8 +64,9 @@ void lapic_prep_lint(struct madt *madt, uint32_t acpi_uid, bool x2apic) {
 
                 struct madt_lapic_nmi *nmi = (void *)madt_ptr;
 
-                // Match all processors (0xff) or specific UID
-                if (nmi->acpi_processor_uid != 0xff && nmi->acpi_processor_uid != (uint8_t)acpi_uid) {
+                // Match all processors (0xff) or specific UID.
+                if (nmi->acpi_processor_uid != 0xff
+                 && (acpi_uid > 0xfe || nmi->acpi_processor_uid != acpi_uid)) {
                     continue;
                 }
 
tab: 248 wrap: offon