From patchwork Wed Dec 27 08:26:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ivanhu X-Patchwork-Id: 1880470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T0Pr41M51z1ydb for ; Wed, 27 Dec 2023 19:26:43 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rIPFG-0002dA-78; Wed, 27 Dec 2023 08:26:30 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rIPFC-0002d3-Vh for fwts-devel@lists.ubuntu.com; Wed, 27 Dec 2023 08:26:27 +0000 Received: from canonical.com (118-163-61-247.hinet-ip.hinet.net [118.163.61.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 2A2D83FAF3 for ; Wed, 27 Dec 2023 08:26:25 +0000 (UTC) From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpi: madt: add GICC new flag and length change (mantis 2285, 2303) Date: Wed, 27 Dec 2023 16:26:23 +0800 Message-Id: <20231227082623.11307-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" BugLink:https://bugs.launchpad.net/fwts/+bug/2047212 Add MADT GICC new flags and length change in ACPI 6.5 Signed-off-by: Ivan Hu --- src/acpi/madt/madt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/acpi/madt/madt.c b/src/acpi/madt/madt.c index 318ac668..1d50e55a 100644 --- a/src/acpi/madt/madt.c +++ b/src/acpi/madt/madt.c @@ -1091,6 +1091,10 @@ static int madt_gicc(fwts_framework *fw, mask = 0xfffffff8; start = 3; } + if (hdr->length == 82) { /* ACPI 6.5 */ + mask = 0xfffffff0; + start = 4; + } if (gic->flags & mask) fwts_failed(fw, LOG_LEVEL_MEDIUM, "MADTGICFLags", @@ -1103,6 +1107,15 @@ static int madt_gicc(fwts_framework *fw, "properly set to zero.", madt_sub_names[hdr->type], start); + if (hdr->length == 82) { /* ACPI 6.5 */ + /* If the Enabled bit is set, Online Capable bit is reserved and must be zero. */ + if ((gic->flags & 1) && (gic->flags & (1 << 3))) + fwts_failed(fw, LOG_LEVEL_MEDIUM, + "MADTGICBadFLag", + "MADT %s, flags, if Enable bit is set, the Online Capable bit " + "is reserved and must be zero.",madt_sub_names[hdr->type]); + } + if (gic->parking_protocol_version != 0 && gic->parking_protocol_version != 1) fwts_failed(fw, LOG_LEVEL_MEDIUM,