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: 61466 Delivered-To: patches@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1766807lbl; Mon, 8 Feb 2016 17:34:06 -0800 (PST) X-Received: by 10.182.73.225 with SMTP id o1mr29268420obv.80.1454981635761; Mon, 08 Feb 2016 17:33:55 -0800 (PST) Return-Path: Received: from mail-oi0-x22b.google.com (mail-oi0-x22b.google.com. [2607:f8b0:4003:c06::22b]) by mx.google.com with ESMTPS id u4si8745620obt.84.2016.02.08.17.33.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Feb 2016 17:33:55 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c06::22b as permitted sender) client-ip=2607:f8b0:4003:c06::22b; Authentication-Results: mx.google.com; spf=pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c06::22b as permitted sender) smtp.mailfrom=al.stone@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-oi0-x22b.google.com with SMTP id s4so7121203oif.3 for ; Mon, 08 Feb 2016 17:33:55 -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=YPaKIK6IvTJjgNcH3Y8YwTmCg53Y2axQfhlRZUhv8ZlKCEEH4J/RTiYVUQHYEV/yhr 3PY5VIquMjPwtP7DuQsO2aF67hm8TMBxDEz+qj+hweI8FlM65w84z3UGObGY0glZP/fP vJTiH1e3KPMkZxUGP1vd55wg2h4OXolJvKfzfY/BarQQPAzSKOOZtNVyD69PwlmH/Vvj 7TY8e3Xmp9yMIAV0kt92yNlWoayamU/JOb5g8czXmNfi2TgvJZ3zTyHl3Bo26kvSyByj Y4zQ5rY1CfC1pHRyhBQaMDj+RsTbUfdBiNNzlOdv6vBad2bnOs5/OTB+B9DluZHuO41f xcBg== X-Gm-Message-State: AG10YOSZDWGrYGuizl7ejTkFHLQW8Q9FzPhDKlHXtguLl1CuhgqBJgymfCnmt3vBSpXadAk66MI= X-Received: by 10.202.179.70 with SMTP id c67mr1644153oif.68.1454981635471; Mon, 08 Feb 2016 17:33:55 -0800 (PST) Return-Path: 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 Cc: linaro-acpi@lists.linaro.org, patches@linaro.org, Al Stone 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> 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 --- src/acpi/fadt/fadt.c | 68 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) -- 2.5.0 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);