From patchwork Tue Jun 29 00:50:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1498145 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=) 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 4GDQqq2bFQz9sWl for ; Tue, 29 Jun 2021 10:50:14 +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 1ly1x5-00027V-5S; Tue, 29 Jun 2021 00:50:11 +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 1ly1x3-00027P-O6 for fwts-devel@lists.ubuntu.com; Tue, 29 Jun 2021 00:50:09 +0000 Received: from d75-158-101-9.abhsia.telus.net ([75.158.101.9] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1ly1x3-00088s-6g; Tue, 29 Jun 2021 00:50:09 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH] fwts_acpi_tables: skip FACS warning for reduced hardware Date: Mon, 28 Jun 2021 18:50:06 -0600 Message-Id: <20210629005006.1571482-1-alex.hung@canonical.com> X-Mailer: git-send-email 2.32.0 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" "This structure is optional if and only if the HARDWARE_REDUCED_ACPI flag in the FADT is set." Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- src/lib/src/fwts_acpi_tables.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c index b8b710bc..b08cbdfd 100644 --- a/src/lib/src/fwts_acpi_tables.c +++ b/src/lib/src/fwts_acpi_tables.c @@ -1028,8 +1028,11 @@ static int fwts_acpi_load_tables_fixup(fwts_framework *fw) uint64_t facs_addr; fwts_acpi_table_facs *facs = NULL; - /* This is most unexpected, so warn about it */ - fwts_log_warning(fw, "No FACS found, fwts has faked one instead."); + if (fwts_acpi_is_reduced_hardware(fw)) /* FACS is optional on reduced hardware */ + fwts_log_info(fw, "No FACS found, fwts has faked one instead."); + else /* This is most unexpected, so warn about it */ + fwts_log_warning(fw, "No FACS found, fwts has faked one instead."); + if ((facs = fwts_low_calloc(1, size)) == NULL) { fwts_log_error(fw, "Cannot allocate fake FACS."); return FWTS_ERROR;