From patchwork Wed Sep 30 01:52:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1374025 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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 4C1K5L4mhFz9sSG for ; Wed, 30 Sep 2020 11:52:38 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kNRIH-0004ns-Tv; Wed, 30 Sep 2020 01:52:33 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kNRIF-0004ne-O5 for fwts-devel@lists.ubuntu.com; Wed, 30 Sep 2020 01:52:31 +0000 Received: from 2.general.alexhung.us.vpn ([10.172.65.255] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kNRIF-0007kV-49; Wed, 30 Sep 2020 01:52:31 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] acpi/ec: check _GPE is not used for hardware-reduced Date: Tue, 29 Sep 2020 19:52:25 -0600 Message-Id: <20200930015225.281805-2-alex.hung@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200930015225.281805-1-alex.hung@canonical.com> References: <20200930015225.281805-1-alex.hung@canonical.com> 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" ACPI spec states "This method is not required on Hardware-reduced ACPI platforms". In addition, Linux also ignores _GPE for hardware-reduced. See kernel's drivers/acpi/ec.c for details. Signed-off-by: Alex Hung Acked-by: Ivan Hu Acked-by: Colin Ian King --- src/acpi/devices/ec/ec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/acpi/devices/ec/ec.c b/src/acpi/devices/ec/ec.c index 856b091f..59d099eb 100644 --- a/src/acpi/devices/ec/ec.c +++ b/src/acpi/devices/ec/ec.c @@ -93,6 +93,14 @@ static void method_test_GPE_return( FWTS_UNUSED(buf); bool failed = false; + if (fwts_acpi_is_reduced_hardware(fw)) { + fwts_failed(fw, LOG_LEVEL_HIGH, + "MethodGPEExist", + "%s is not required for Hardware-reduced ACPI platforms", + name); + return; + } + switch (obj->Type) { case ACPI_TYPE_INTEGER: if (obj->Integer.Value <= 255)