From patchwork Wed Nov 6 09:47:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1190202 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 477MC53dHVz9sP6; Wed, 6 Nov 2019 20:47:29 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iSHuQ-0002o9-Oi; Wed, 06 Nov 2019 09:47:26 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSHuP-0002o1-FZ for fwts-devel@lists.ubuntu.com; Wed, 06 Nov 2019 09:47:25 +0000 Received: from [106.104.115.126] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSHuO-0001I3-NJ; Wed, 06 Nov 2019 09:47:25 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/2] ebbr: add EBBR option for ARM embedded systems Date: Wed, 6 Nov 2019 17:47:19 +0800 Message-Id: <20191106094720.15923-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 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" The Embedded Base Boot Requirements specification defines requirements for embedded systems to enable inter-operability between SoCs, hardware platforms, firmware implementations, and operating system distributions. https://github.com/ARM-software/ebbr Signed-off-by: Ivan Hu Acked-by: Colin Ian King Acked-by: Alex Hung --- src/lib/include/fwts_framework.h | 3 ++- src/lib/src/fwts_framework.c | 9 +++++++-- src/uefi/uefirtmisc/uefirtmisc.c | 2 +- src/uefi/uefirttime/uefirttime.c | 2 +- src/uefi/uefirtvariable/uefirtvariable.c | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/lib/include/fwts_framework.h b/src/lib/include/fwts_framework.h index 47eba368..74e12657 100644 --- a/src/lib/include/fwts_framework.h +++ b/src/lib/include/fwts_framework.h @@ -61,7 +61,8 @@ typedef enum { FWTS_FLAG_SHOW_TESTS_FULL = 0x00200000, FWTS_FLAG_SHOW_TESTS_CATEGORIES = 0x00400000, FWTS_FLAG_TEST_COMPLIANCE_ACPI = 0x00800000, - FWTS_FLAG_TEST_SBBR = 0x01000000 + FWTS_FLAG_TEST_SBBR = 0x01000000, + FWTS_FLAG_TEST_EBBR = 0x02000000 } fwts_framework_flags; #define FWTS_FLAG_TEST_MASK \ diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c index 698fa49a..f9e76b96 100644 --- a/src/lib/src/fwts_framework.c +++ b/src/lib/src/fwts_framework.c @@ -57,7 +57,8 @@ typedef struct { FWTS_FLAG_TEST_UEFI | \ FWTS_FLAG_TEST_ACPI | \ FWTS_FLAG_TEST_COMPLIANCE_ACPI | \ - FWTS_FLAG_TEST_SBBR) + FWTS_FLAG_TEST_SBBR | \ + FWTS_FLAG_TEST_EBBR) static const fwts_categories categories[] = { { "ACPI", FWTS_FLAG_TEST_ACPI }, @@ -136,6 +137,7 @@ static fwts_option fwts_framework_options[] = { { "sbbr", "", 0, "Run ARM SBBR tests." }, { "ifv", "", 0, "Run tests in firmware-vendor modes." }, { "clog", "", 1, "Specify a coreboot logfile dump" }, + { "ebbr", "", 0, "Run ARM EBBR tests." }, { NULL, NULL, 0, NULL } }; @@ -1338,7 +1340,10 @@ int fwts_framework_options_handler(fwts_framework *fw, int argc, char * const ar break; case 48: /* --coreboot-log */ fwts_framework_strdup(&fw->clog, optarg); - + break; + case 49: /* --ebbr */ + fw->flags |= FWTS_FLAG_TEST_EBBR; + break; } break; case 'a': /* --all */ diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c index 4cda7783..cbe4a4a1 100644 --- a/src/uefi/uefirtmisc/uefirtmisc.c +++ b/src/uefi/uefirtmisc/uefirtmisc.c @@ -324,6 +324,6 @@ static fwts_framework_ops uefirtmisc_ops = { .minor_tests = uefirtmisc_tests }; -FWTS_REGISTER("uefirtmisc", &uefirtmisc_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV) +FWTS_REGISTER("uefirtmisc", &uefirtmisc_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_EBBR) #endif diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c index c6ffb644..08a5507d 100644 --- a/src/uefi/uefirttime/uefirttime.c +++ b/src/uefi/uefirttime/uefirttime.c @@ -1355,6 +1355,6 @@ static fwts_framework_ops uefirttime_ops = { .minor_tests = uefirttime_tests }; -FWTS_REGISTER("uefirttime", &uefirttime_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV) +FWTS_REGISTER("uefirttime", &uefirttime_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_EBBR) #endif diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c index 55a9b1d9..db72abe1 100644 --- a/src/uefi/uefirtvariable/uefirtvariable.c +++ b/src/uefi/uefirtvariable/uefirtvariable.c @@ -2294,6 +2294,6 @@ static fwts_framework_ops uefirtvariable_ops = { .options_check = options_check, }; -FWTS_REGISTER("uefirtvariable", &uefirtvariable_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV) +FWTS_REGISTER("uefirtvariable", &uefirtvariable_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV | FWTS_FLAG_TEST_EBBR) #endif From patchwork Wed Nov 6 09:47:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1190203 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 477MC931BCz9sP6; Wed, 6 Nov 2019 20:47:33 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1iSHuU-0002oj-Qz; Wed, 06 Nov 2019 09:47:30 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSHuT-0002oZ-8d for fwts-devel@lists.ubuntu.com; Wed, 06 Nov 2019 09:47:29 +0000 Received: from [106.104.115.126] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iSHuS-0001ID-GW; Wed, 06 Nov 2019 09:47:29 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] fwts-tests: sync up with --ebbr option Date: Wed, 6 Nov 2019 17:47:20 +0800 Message-Id: <20191106094720.15923-2-ivan.hu@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191106094720.15923-1-ivan.hu@canonical.com> References: <20191106094720.15923-1-ivan.hu@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 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" Signed-off-by: Ivan Hu Acked-by: Colin Ian King Acked-by: Alex Hung --- fwts-test/arg-help-0001/arg-help-0001.log | 1 + fwts-test/arg-help-0001/arg-help-0002.log | 1 + 2 files changed, 2 insertions(+) diff --git a/fwts-test/arg-help-0001/arg-help-0001.log b/fwts-test/arg-help-0001/arg-help-0001.log index ade9b6b6..a294e3d4 100644 --- a/fwts-test/arg-help-0001/arg-help-0001.log +++ b/fwts-test/arg-help-0001/arg-help-0001.log @@ -26,6 +26,7 @@ using file generated by acpidump, e.g. --dumpfile=acpidump.dat +--ebbr Run ARM EBBR tests. --filter-error-discard Discard errors that match any of the specified labels. diff --git a/fwts-test/arg-help-0001/arg-help-0002.log b/fwts-test/arg-help-0001/arg-help-0002.log index ade9b6b6..a294e3d4 100644 --- a/fwts-test/arg-help-0001/arg-help-0002.log +++ b/fwts-test/arg-help-0001/arg-help-0002.log @@ -26,6 +26,7 @@ using file generated by acpidump, e.g. --dumpfile=acpidump.dat +--ebbr Run ARM EBBR tests. --filter-error-discard Discard errors that match any of the specified labels.