From patchwork Wed Oct 31 09:45:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 991314 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42lNjr1vs8z9s3l; Wed, 31 Oct 2018 20:45:20 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1gHn3t-0002lY-17; Wed, 31 Oct 2018 09:45:17 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1gHn3s-0002lS-64 for fwts-devel@lists.ubuntu.com; Wed, 31 Oct 2018 09:45:16 +0000 Received: from [175.181.155.235] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gHn3r-0007QK-FT; Wed, 31 Oct 2018 09:45:15 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] madt: fix the Local APIC NMI processor UID checking Date: Wed, 31 Oct 2018 17:45:10 +0800 Message-Id: <1540979110-29263-1-git-send-email-ivan.hu@canonical.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" ACPI specification define 0xFF value for ACPI processor UID on Local APIC NMI Structure as "A value of 0xFF signifies that this applies to all processors in the machine", we shouldn't match it as invalid UID. Medium failures: 1 madt: LAPICNMI has no matching processor UID 255 Signed-off-by: Ivan Hu Acked-by: Alex Hung Acked-by: Colin Ian King --- src/acpi/madt/madt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c index 19a6e14..8814166 100644 --- a/src/acpi/madt/madt.c +++ b/src/acpi/madt/madt.c @@ -312,6 +312,14 @@ static ACPI_OBJECT_TYPE madt_find_processor_uid(fwts_framework *fw, "UID %" PRIu64 ".", table_name, uid); return listint->type; } + + if ((uid == 0xFF) && (strcmp(table_name, "LAPICNMI") == 0)) { + fwts_passed(fw, "MADT %s has processor " + "UID 0x%" PRIx64 " which signifies " + "that this applies to all processors " + "in the machine.", table_name, uid); + return listint->type; + } } sprintf(table_label, "MADT%sUidMismatch", table_name);