From patchwork Tue Jul 25 06:10:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakar Arora X-Patchwork-Id: 793212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3xGntx5LHvz9s1h; Tue, 25 Jul 2017 16:11:37 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1dZt4C-0005Jh-If; Tue, 25 Jul 2017 06:11:36 +0000 Received: from foss.arm.com ([217.140.101.70]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1dZt40-0005Fg-W0 for fwts-devel@lists.ubuntu.com; Tue, 25 Jul 2017 06:11:25 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E7CD1596; Mon, 24 Jul 2017 23:11:24 -0700 (PDT) Received: from u201365.usa.Arm.com (a75592.asiapac.arm.com [10.162.2.158]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 84DF93F577; Mon, 24 Jul 2017 23:11:22 -0700 (PDT) From: Sakar Arora To: fwts-devel@lists.ubuntu.com Subject: [PATCH 10/10] acpi: xsdt: add SBBR compliance tests Date: Tue, 25 Jul 2017 11:40:57 +0530 Message-Id: <1500963057-4225-11-git-send-email-Sakar.Arora@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500963057-4225-1-git-send-email-Sakar.Arora@arm.com> References: <1500963057-4225-1-git-send-email-Sakar.Arora@arm.com> Cc: Prasanth.Pulla@arm.com, Mahesh.ReddyBireddy@arm.com, Rajat.Goyal@arm.com, Charles.Garcia-Tobin@arm.com 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 From: Mahesh Bireddy Server Base Boot Requirements (SBBR) specification is intended for SBSA- compliant 64-bit ARMv8 servers. It defines the base firmware requirements for out-of-box support of any ARM SBSA-compatible Operating System or hypervisor. The requirements in this specification are expected to be minimal yet complete for booting a multi-core ARMv8 server platform, while leaving plenty of room for OEM or ODM innovations and design details. For more information, download the SBBR specification here: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044b/index.html This change introduces test cases as per SBBR specification to xsdt acpi table. Signed-off-by: Supreeth Venkatesh Signed-off-by: Mahesh Bireddy Acked-by: Alex Hung Acked-by: Colin Ian King --- src/acpi/xsdt/xsdt.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/src/acpi/xsdt/xsdt.c b/src/acpi/xsdt/xsdt.c index 37a45c8..2c515fd 100644 --- a/src/acpi/xsdt/xsdt.c +++ b/src/acpi/xsdt/xsdt.c @@ -37,8 +37,13 @@ static int xsdt_init(fwts_framework *fw) return FWTS_ERROR; } if (table == NULL || (table && table->length == 0)) { - fwts_log_error(fw, "ACPI XSDT table does not exist, skipping test"); - return FWTS_SKIP; + if (fw->flags & FWTS_FLAG_TEST_SBBR) { + fwts_log_error(fw, "ACPI XSDT table does not exist"); + return FWTS_ERROR; + } else { + fwts_log_error(fw, "ACPI XSDT table does not exist, skipping test"); + return FWTS_SKIP; + } } return FWTS_OK; } @@ -56,9 +61,16 @@ static int xsdt_test1(fwts_framework *fw) for (i = 0; i < n; i++) { if (xsdt->entries[i] == 0) { passed = false; - fwts_failed(fw, LOG_LEVEL_MEDIUM, - "XSDTEntryNull", - "XSDT Entry %zd is null, should not be non-zero.", i); + if (fw->flags & FWTS_FLAG_TEST_SBBR) { + fwts_failed(fw, LOG_LEVEL_CRITICAL, + "XSDTEntryNull", + "XSDT Entry %zd is null, should not be non-zero.", i); + } + else { + fwts_failed(fw, LOG_LEVEL_MEDIUM, + "XSDTEntryNull", + "XSDT Entry %zd is null, should not be non-zero.", i); + } fwts_advice(fw, "A XSDT pointer is null and therefore erroneously " "points to an invalid 64 bit ACPI table header. " @@ -67,8 +79,15 @@ static int xsdt_test1(fwts_framework *fw) "should be fixed where possible."); } } - if (passed) - fwts_passed(fw, "No issues found in XSDT table."); + if (passed) { + if (fw->flags & FWTS_FLAG_TEST_SBBR) { + fwts_passed(fw, "XSDT is present, pointed at by XsdrAddress=0x%lx" + " and contain valid pointers to %d other ACPI tables mandated by SBBR", + xsdt->entries[0], (int)n); + } + else + fwts_passed(fw, "No issues found in XSDT table."); + } return FWTS_OK; } @@ -84,6 +103,6 @@ static fwts_framework_ops xsdt_ops = { .minor_tests = xsdt_tests }; -FWTS_REGISTER("xsdt", &xsdt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI) +FWTS_REGISTER("xsdt", &xsdt_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_TEST_ACPI | FWTS_FLAG_TEST_SBBR) #endif