From patchwork Fri Feb 19 23:39:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 62429 Delivered-To: patches@linaro.org Received: by 10.112.43.199 with SMTP id y7csp78638lbl; Fri, 19 Feb 2016 15:41:00 -0800 (PST) X-Received: by 10.60.117.137 with SMTP id ke9mr14312908oeb.16.1455925260812; Fri, 19 Feb 2016 15:41:00 -0800 (PST) Return-Path: Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com. [2607:f8b0:4003:c01::22f]) by mx.google.com with ESMTPS id h82si18925645oif.44.2016.02.19.15.41.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2016 15:41:00 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c01::22f as permitted sender) client-ip=2607:f8b0:4003:c01::22f; Authentication-Results: mx.google.com; spf=pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c01::22f as permitted sender) smtp.mailfrom=al.stone@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-ob0-x22f.google.com with SMTP id xk3so124287731obc.2 for ; Fri, 19 Feb 2016 15:41:00 -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=Vy5hUafa3/hb/8KtAnQzEai0aMBvDYLqsN/xgRtQ9uw=; b=dy8mdo94/8NhgSd/UX1Wu7hrldWG3RmTaWRMCG9/r05sCHt0ScR0qJmgcvgLKR6YqX m8gIsMUuc48tdpo79gg1r2K1yAUvKXHVRzxhjv1Up1Ti7/iE9xHK7zcLTf7zfWG7WxQH JczhXaWqv4bqMq2dnd8PIJnjBkRTooHdnVC5w= 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=Vy5hUafa3/hb/8KtAnQzEai0aMBvDYLqsN/xgRtQ9uw=; b=maiy1YxzjTvQTGvqCcFpcZ2THFeGAeg+33HNTObGWQDt5pkRl4wQXiebU1r5SVVKqt TPWC+cT2pkXx2cgfpr3jRg84qu++Tu0YcZxONk4fI3FvexgDXAvwGz6GY9q6FgewMZYN 4FT+dmMo5dNd4q/+Fh98QUnQefsqilzBTFI7hjpRp8yNpq15nmPb7h9wYkYaDOHCCBz0 R9sMEJmET2m1CnJpunBeDIHQGo4vYf1noiMuRi4pfmNuDqU3xqHrlOZPwYgSRURTNe4y FP5pYDCdm6pdPjJCbSNk5Epzl4yLtVR0Tp1nO8Dn7Xp4IAd3HErwsyrGeR4sB+I/5Ct3 bj4A== X-Gm-Message-State: AG10YORffVEgOYbwVb8F89OL42MLgeTgKWz5+BRcbTG7iEBLmEO0kpsF5n1EyaxaxgirkjszU6o= X-Received: by 10.60.138.67 with SMTP id qo3mr13719890oeb.80.1455925260512; Fri, 19 Feb 2016 15:41:00 -0800 (PST) Return-Path: Received: from fidelio.ahs3.com (c-50-134-239-249.hsd1.co.comcast.net. [50.134.239.249]) by smtp.googlemail.com with ESMTPSA id kg7sm8655217obb.27.2016.02.19.15.40.58 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Feb 2016 15:40:59 -0800 (PST) From: Al Stone To: fwts-devel@lists.ubuntu.com Cc: linaro-acpi@lists.linaro.org, patches@linaro.org, Al Stone Subject: [PATCH v2 13/23] FADT: expand compliance tests for the SMI_CMD field Date: Fri, 19 Feb 2016 16:39:49 -0700 Message-Id: <1455925199-8587-14-git-send-email-al.stone@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455925199-8587-1-git-send-email-al.stone@linaro.org> References: <1455925199-8587-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 Acked-by: Colin Ian King Acked-by: Alex Hung --- 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 ad3531c..32b3b77 100644 --- a/src/acpi/fadt/fadt.c +++ b/src/acpi/fadt/fadt.c @@ -684,19 +684,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 @@ -704,38 +693,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."); } } } @@ -882,7 +882,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);