From 65a4eaed9d6e44b40b0055c8b2f2f277ad1bcb1f Mon Sep 17 00:00:00 2001 From: Mintsuki Date: Sun, 19 Apr 2026 03:07:59 +0200 Subject: [PATCH] sys/lapic: Skip MADT type 4 NMI entries for x2APIC UIDs above 0xfe --- common/sys/lapic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; }