From patchwork Tue Feb 9 01:32:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 580594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id A6C7D1402A0; Tue, 9 Feb 2016 12:34:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=XE1blxvl; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1aSxC1-0007Wk-Dk; Tue, 09 Feb 2016 01:34:13 +0000 Received: from mail-oi0-f53.google.com ([209.85.218.53]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.76) (envelope-from ) id 1aSxBk-0007Ru-Ig for fwts-devel@lists.ubuntu.com; Tue, 09 Feb 2016 01:33:56 +0000 Received: by mail-oi0-f53.google.com with SMTP id j125so7153428oih.1 for ; Mon, 08 Feb 2016 17:33:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=afmaCIJw+Da4xxw1DKs4ktQh99spHBaR4FoV9pbMlUs=; b=XE1blxvlp6Ef1hV9P88occQLQgleNjt4Y/ZfyxJdx30GstNvZdrXjI8UrB8ZwDG7r8 Vz61BA9umC0lLBWc0gNy7Fc/IJG9gTG63wpBifA4Jq7JolIe4DoeehefEZONgqDHRNF+ J1XpL1Dr1hHF7TqjEoto0WGULvXyZoVBP6+54= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=afmaCIJw+Da4xxw1DKs4ktQh99spHBaR4FoV9pbMlUs=; b=QPslG92omEB9AG81ki8cXw0BjtoxfKbFLnQ6hpwvCtrTjBAytWghfv32NIjLjdkKHz jIUGpJhnIoXbCmNmpCVmjJedXTuwK1EvLTdDcBBlO1kmRAcUMzm/k5tw1ysZdBpB52+L dLsY67nkojP7FJyot2nbzBdlEMrWALNRmreQWNCsVR4e6+3UewogXKHEiqKxM74FJfxH QVsm/uJ8u3WyD4kkz5gb54C+2XF8JSY0txcZCWOw0NJYikBYDT3qXAwHg7h6seXtHNs1 R33sKsZQ/7UZbO4CRzDhsiXbd1YXsbrmbqZXaTNSi7iuaqvOLAh2YhOQzs8DxAZzoYX+ jC7g== X-Gm-Message-State: AG10YOTvHxs0wYJ19NSR9FV9GaZlZbCU98ELT/SBPlONtf0VX5GA0s/BqTLCBfKi7xU33CH0 X-Received: by 10.202.179.70 with SMTP id c67mr1644153oif.68.1454981635471; Mon, 08 Feb 2016 17:33:55 -0800 (PST) Received: from fidelio.ahs3 (c-50-134-239-249.hsd1.co.comcast.net. [50.134.239.249]) by smtp.googlemail.com with ESMTPSA id qp4sm19097135obc.9.2016.02.08.17.33.53 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Feb 2016 17:33:54 -0800 (PST) From: Al Stone To: fwts-devel@lists.ubuntu.com Subject: [PATCH 13/21] FADT: expand compliance tests for the SMI_CMD field Date: Mon, 8 Feb 2016 18:32:55 -0700 Message-Id: <1454981583-31872-14-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454981583-31872-1-git-send-email-al.stone@linaro.org> References: <1454981583-31872-1-git-send-email-al.stone@linaro.org> Cc: patches@linaro.org, linaro-acpi@lists.linaro.org X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.14 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-bounces@lists.ubuntu.com Minor tweaks to the tests of the SMI_CMD to make them only slightly more extensive, but also to fit within the resequencing of tests for reduced hardware mode.. Signed-off-by: Al Stone Acked-by: Colin Ian King Acked-by: Alex Hung --- src/acpi/fadt/fadt.c | 68 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c index 430bfd4..3da297e 100644 --- a/src/acpi/fadt/fadt.c +++ b/src/acpi/fadt/fadt.c @@ -660,19 +660,8 @@ static void acpi_table_check_fadt_reduced_hardware(fwts_framework *fw) "hardware mode."); } -static void acpi_table_check_fadt_smi( - fwts_framework *fw, - const fwts_acpi_table_fadt *fadt, - bool *passed) +static void acpi_table_check_fadt_smi_cmd(fwts_framework *fw) { - if (fwts_acpi_is_reduced_hardware(fadt)) { - if (fadt->smi_cmd != 0) { - fwts_warning(fw, "FADT SMI_CMD is not zero " - "but should be in reduced hardware mode."); - } - return; - } - /* * Section 5.2.9 (Fixed ACPI Description Table) of the ACPI 5.0 * specification states that if SMI_CMD is zero then it is @@ -680,38 +669,49 @@ static void acpi_table_check_fadt_smi( * in that case, don't check SCI_INT being valid. */ if (fadt->smi_cmd != 0) { - if (fadt->sci_int == 0) { - *passed = false; + if (fadt->sci_int == 0) fwts_failed(fw, LOG_LEVEL_MEDIUM, - "FADTSCIIRQZero", - "FADT SCI Interrupt is 0x00, should be defined."); - } + "FADTSCIIRQZero", + "FADT SCI Interrupt is 0x00, but must " + "be defined since SMI command indicates " + "System Management Mode is supported."); + else + fwts_passed(fw, + "FADT SMI_CMD indicates System Management " + "Mode is supported, and the SCI Interrupt " + "is non-zero."); } else { if ((fadt->acpi_enable == 0) && (fadt->acpi_disable == 0) && (fadt->s4bios_req == 0) && (fadt->pstate_cnt == 0) && (fadt->cst_cnt == 0)) { - /* Not an error, but intentional, but feedback this finding anyhow */ - fwts_log_info(fw, "The FADT SMI_CMD is zero, system " - "does not support System Management Mode."); + /* + * Not an error, but intentional, so feedback + * this finding. + */ + fwts_passed(fw, "The FADT SMI_CMD is zero, system " + "does not support System Management Mode."); } else { - *passed = false; fwts_failed(fw, LOG_LEVEL_MEDIUM, - "FADTSMICMDZero", - "FADT SMI_CMD is 0x00, however, one or more of " - "ACPI_ENABLE, ACPI_DISABLE, S4BIOS_REQ, PSTATE_CNT " - "and CST_CNT are defined which means SMI_CMD should " - "be defined otherwise SMI commands cannot be sent."); + "FADTSMICMDZero", + "FADT SMI_CMD is 0x00, however, one or " + "more of ACPI_ENABLE, ACPI_DISABLE, " + "S4BIOS_REQ, PSTATE_CNT and CST_CNT are " + "defined which means SMI_CMD should be " + "defined, otherwise SMI commands cannot " + "be sent."); fwts_advice(fw, - "The configuration seems to suggest that SMI command " - "should be defined to allow the kernel to trigger " - "system management interrupts via the SMD_CMD port. " - "The fact that SMD_CMD is zero which is invalid means " - "that SMIs are not possible through the normal ACPI " - "mechanisms. This means some firmware based machine " - "specific functions will not work."); + "The configuration seems to suggest that " + "SMI command should be defined to allow " + "the kernel to trigger system management " + "interrupts via the SMD_CMD port. The " + "fact that SMD_CMD is zero which is " + "invalid means that SMIs are not possible " + "through the normal ACPI mechanisms. This " + "means some firmware based machine " + "specific functions will not work."); } } } @@ -858,7 +858,7 @@ static int fadt_test1(fwts_framework *fw) */ if (!fwts_acpi_is_reduced_hardware(fadt)) { fwts_log_info(fw, "FADT SCI_INT is %" PRIu8, fadt->sci_int); - acpi_table_check_fadt_smi(fw, fadt, &passed); + acpi_table_check_fadt_smi_cmd(fw); acpi_table_check_fadt_pm_tmr(fw, fadt, &passed); acpi_table_check_fadt_gpe(fw, fadt, &passed); acpi_table_check_fadt_pm_addr(fw, fadt, &passed);