From patchwork Fri Feb 19 23:39:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 62434 Delivered-To: patches@linaro.org Received: by 10.112.43.199 with SMTP id y7csp78719lbl; Fri, 19 Feb 2016 15:41:15 -0800 (PST) X-Received: by 10.60.227.74 with SMTP id ry10mr13884584oec.48.1455925275600; Fri, 19 Feb 2016 15:41:15 -0800 (PST) Return-Path: Received: from mail-ob0-x233.google.com (mail-ob0-x233.google.com. [2607:f8b0:4003:c01::233]) by mx.google.com with ESMTPS id o3si9223720obm.21.2016.02.19.15.41.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2016 15:41:15 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c01::233 as permitted sender) client-ip=2607:f8b0:4003:c01::233; Authentication-Results: mx.google.com; spf=pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c01::233 as permitted sender) smtp.mailfrom=al.stone@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-ob0-x233.google.com with SMTP id jq7so122510718obb.0 for ; Fri, 19 Feb 2016 15:41:15 -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=cDLTnZ20rP9MoyZ+0m+Mjc6KRFUVQBkVB/cI8mJ8sMo=; b=IzbV/XBw+evvGxXjLxPA/yMzw2i2b4QfJ6d5JUu2GllMqvWJlRsPMHLuDoVxHHy9s2 z8chAcw7WBUr2gw/FeEY1bnMftc9KYxktqmaoMDqWOZWvIzxOUxoNMoTBalG4atKcM8O wHEyDr2pfg39oboutZY67DMjPkIZO2vL4ad5U= 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=cDLTnZ20rP9MoyZ+0m+Mjc6KRFUVQBkVB/cI8mJ8sMo=; b=CyzKdREQf5pnWfv04bbpKfXfVfQ2Y+/viThgfeJdEluwyLd1vx7QhNHQ6g5TI28afE hKJPNxw2/0wKiGJBKDeI+Ncl37GOzmUFY+UnP/v2rZ0klZNMvWHxiE/y0FX3K7hBgEAV H4aoofoPmHQ0qSjtCf2woIyuLfQehbYZNt65pHzD3tL7l+GQXC7moruM7z/MJOX3yOJC iIw2RWWvZaUvax17+xuXi6rdoBjYYsNpOiKFMwPPZ/uS4eW7NBu9DJyTQmLmeicJvK8T BdlG2SFhwBIuKJk9owN1CSWPktOqcVthf8RB7Dt1NMzbdkC7qXw15+2rR32RnVGRC0MS 2w9g== X-Gm-Message-State: AG10YOT4Am5bldOjcePrRu6RNU6RNtRq5FcR6LByGcPowVtXoEWGG0nPYzSo+8bpzbMg0+yfqJI= X-Received: by 10.182.58.5 with SMTP id m5mr14556265obq.26.1455925275298; Fri, 19 Feb 2016 15:41:15 -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.41.13 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Feb 2016 15:41:13 -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 18/23] FADT: add compliance test for the CST_CNT field Date: Fri, 19 Feb 2016 16:39:54 -0700 Message-Id: <1455925199-8587-19-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> Add in a new compliance test to check the C-State control (CST_CNT) field for the proper values. Signed-off-by: Al Stone Acked-by: Colin Ian King Acked-by: Alex Hung --- src/acpi/fadt/fadt.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) -- 2.5.0 diff --git a/src/acpi/fadt/fadt.c b/src/acpi/fadt/fadt.c index 4254df0..6954e49 100644 --- a/src/acpi/fadt/fadt.c +++ b/src/acpi/fadt/fadt.c @@ -1320,6 +1320,28 @@ static void acpi_table_check_fadt_gpe1_blk_len(fwts_framework *fw) } } +static void acpi_table_check_fadt_cst_cnt(fwts_framework *fw) +{ + if (fadt->cst_cnt == 0) { + if (fadt->smi_cmd == 0) + fwts_passed(fw, + "FADT SMI CST_CNT command is zero, " + "which is allowed since SMM is not " + "supported."); + } else { + if (fadt->smi_cmd == 0) + fwts_failed(fw, LOG_LEVEL_MEDIUM, + "SMMHasExtraCSTCntCmd", + "FADT SMI CST_CNT command is " + "non-zero, but SMM is not supported."); + else + fwts_passed(fw, "FADT SMI CST_CNT command is " + "non-zero, and SMM is supported."); + } + + return; +} + static int fadt_test1(fwts_framework *fw) { bool passed = true; @@ -1357,6 +1379,7 @@ static int fadt_test1(fwts_framework *fw) acpi_table_check_fadt_gpe0_blk_len(fw); acpi_table_check_fadt_gpe1_blk_len(fw); fwts_log_info(fw, "FADT GPE1_BASE is %" PRIu8, fadt->gpe1_base); + acpi_table_check_fadt_cst_cnt(fw); fwts_log_info(fw, "FADT FLUSH_SIZE is %" PRIu16, fadt->flush_size);