From patchwork Wed Aug 23 08:04:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 804875 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 3xcg1n1x59z9sCZ; Wed, 23 Aug 2017 18:04:29 +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 1dkQeJ-000282-Lx; Wed, 23 Aug 2017 08:04:27 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1dkQeE-00027x-PP for fwts-devel@lists.ubuntu.com; Wed, 23 Aug 2017 08:04:22 +0000 Received: from 1.general.alexhung.us.vpn ([10.172.65.254] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1dkQeD-0002RD-Vf; Wed, 23 Aug 2017 08:04:22 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH][V2] acpi: method: add _LSI test according to ACPI 6.2 (mantis 1721) Date: Wed, 23 Aug 2017 01:04:14 -0700 Message-Id: <1503475454-10004-1-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 2.7.4 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 Signed-off-by: Alex Hung --- src/acpi/method/method.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index 75aac0a..738730b 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -129,6 +129,9 @@ * _LCK Y * _LID Y * _LPI Y + * _LSI Y + * _LSR N + * _LSW N * _MAT N * _MBM Y * _MLS Y @@ -2648,6 +2651,30 @@ static int method_test_FIT(fwts_framework *fw) "_FIT", NULL, 0, method_test_buffer_return, NULL); } +static void method_test_LSI_return( + fwts_framework *fw, + char *name, + ACPI_BUFFER *buf, + ACPI_OBJECT *obj, + void *private) +{ + FWTS_UNUSED(private); + + if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK) + return; + + if (method_package_elements_all_type(fw, name, "_LSI", obj, ACPI_TYPE_INTEGER) != FWTS_OK) + return; + + method_passed_sane(fw, name, "package"); +} + +static int method_test_LSI(fwts_framework *fw) +{ + return method_evaluate_method(fw, METHOD_OPTIONAL, + "_LSI", NULL, 0, method_test_LSI_return, NULL); +} + static int method_test_DCK(fwts_framework *fw) { int i; @@ -6984,6 +7011,9 @@ static fwts_framework_minor_test method_tests[] = { /* { method_test_REG, "Test _REG (Region)." }, */ { method_test_SEG, "Test _SEG (Segment)." }, + /* Section 6.5.10 NVDIMM Label Methods */ + { method_test_LSI, "Test _LSI (Label Storage Informatio)." }, + /* Section 7.1 Declaring a Power Resource Object */ { method_test_OFF, "Test _OFF (Set resource off)." },