From patchwork Tue Feb 9 01:33:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Stone X-Patchwork-Id: 61471 Delivered-To: patches@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1766899lbl; Mon, 8 Feb 2016 17:34:21 -0800 (PST) X-Received: by 10.182.105.197 with SMTP id go5mr29050407obb.12.1454981650118; Mon, 08 Feb 2016 17:34:10 -0800 (PST) Return-Path: Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com. [2607:f8b0:4003:c01::22c]) by mx.google.com with ESMTPS id h9si18723947oev.25.2016.02.08.17.34.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Feb 2016 17:34:10 -0800 (PST) Received-SPF: pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c01::22c as permitted sender) client-ip=2607:f8b0:4003:c01::22c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of al.stone@linaro.org designates 2607:f8b0:4003:c01::22c as permitted sender) smtp.mailfrom=al.stone@linaro.org; dkim=pass header.i=@linaro.org Received: by mail-ob0-x22c.google.com with SMTP id wb13so175744834obb.1 for ; Mon, 08 Feb 2016 17:34:09 -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=EOwv2am6l24zd86QebdKCpuIF7J+gcMeHcMvImqUf1A=; b=E4pvm50KZkATtz7wutD1WBcXgbDtC19gxy4qQ8wgN0KjNNu36R8+KdotwUIZAvhYq/ MFltYeGkjI92KCTeC/yuzy2leq9pUZUvVa14fYavIEWXka3taQUtbltcSOmfxPi204TJ ysj94jMdq4RIoG3LC1qPOurJk03r/zNl4B0Wk= 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=EOwv2am6l24zd86QebdKCpuIF7J+gcMeHcMvImqUf1A=; b=HltITxSGQ6FqSuMFAOBwtEV0pbVmJM39CMojRKbV+e25qv/g0+eHmyNbgMLnhlCuus Hvl+5ptxhy0hyaA2NlqbrF6HmvrkNxT7axUSkQVJpWRnJ4gJqocIYIAtNe9QWPLtPWnN hFGt1vGQg9esZGMFVnf4spudsQbKX53qilNfmKDOcvfzwg6XKZPmNImAHd7e+5tNa/ZG ubBTeR3WKn4iVLRXCOpo+fDlWr471RTF8Zfd6QnY8JUTqRhKKbpMrTZzKDpOE98Yy7qg maUXM5mWO2KHzB0IAp1vdjA6zPW41fCLt0lz1leJWYOK9xQ1GHRCE0alPZ/j4dvAoCPb fbgQ== X-Gm-Message-State: AG10YOQ61kfdM1UDUCyCcwauPQd4aMi2c7Y4p4GfjbYZBJxld5hvi4xW9VYSyakvjs8vP5WZz+4= X-Received: by 10.182.241.3 with SMTP id we3mr27618837obc.82.1454981649835; Mon, 08 Feb 2016 17:34:09 -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.34.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 08 Feb 2016 17:34:08 -0800 (PST) From: Al Stone To: fwts-devel@lists.ubuntu.com Cc: linaro-acpi@lists.linaro.org, patches@linaro.org, Al Stone Subject: [PATCH 18/21] FADT: add compliance test for the CST_CNT field Date: Mon, 8 Feb 2016 18:33:00 -0700 Message-Id: <1454981583-31872-19-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> Add in a new compliance test to check the C-State control (CST_CNT) field for the proper values. Signed-off-by: Al Stone --- 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 b349954..f932dea 100644 --- a/src/acpi/fadt/fadt.c +++ b/src/acpi/fadt/fadt.c @@ -1296,6 +1296,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; @@ -1333,6 +1355,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);