From patchwork Wed Sep 14 08:40:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ivanhu X-Patchwork-Id: 1677716 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) 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: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=G72US3Vr; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MSDLf2FJ7z1ynm for ; Wed, 14 Sep 2022 18:40:41 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oYNwi-0002MJ-VE; Wed, 14 Sep 2022 08:40:36 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oYNwg-0002M7-TG for fwts-devel@lists.ubuntu.com; Wed, 14 Sep 2022 08:40:34 +0000 Received: from canonical.com (123-204-5-118.dynamic.seed.net.tw [123.204.5.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id B83F63F59B for ; Wed, 14 Sep 2022 08:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1663144833; bh=uxwgg3+rDu8RfqqoFA27IE9mw62Ts32cI7H6cw6k29o=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=G72US3VrdJA8Mnfrw7ImnL5VRHFRRq1Cvaj+3p2xeZ2KN2i0KBqLV/b7C/PIlJ+6/ Lag4evuClRmS3Lnxn19+2ydFzmm8Y+amqaE1GulGyM2uMXl5VSPMy0J4NeWNYPQF1s tRumqchticb1shxWFTe+9IJxBPxogi04MdXkYeMILXRGG8vlUodbFso2YxQokQO87S Nscw6wHT+tXje15CZlF51tkb4LAYPLrHElQKj6iLT7vkm0o/GKQnlsMsncozbUZFpb JzHjf9tJ4Z3kd6CHeCilR3QnT2vJr3Dzm+HR0WMB0wYdVYjECVokp9a8myGQ1zgYn/ H1fg0mN3P7ICQ== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/2] acpi: svkl: add test for SVKL table (mantis 2162) Date: Wed, 14 Sep 2022 16:40:25 +0800 Message-Id: <20220914084026.69362-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Signed-off-by: Ivan Hu --- src/Makefile.am | 1 + src/acpi/svkl/svkl.c | 122 ++++++++++++++++++++++++++++++++++++ src/lib/include/fwts_acpi.h | 17 +++++ 3 files changed, 140 insertions(+) create mode 100644 src/acpi/svkl/svkl.c diff --git a/src/Makefile.am b/src/Makefile.am index a8c60b79..e1a6f094 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -140,6 +140,7 @@ fwts_SOURCES = main.c \ acpi/spmi/spmi.c \ acpi/srat/srat.c \ acpi/stao/stao.c \ + acpi/svkl/svkl.c \ acpi/syntaxcheck/syntaxcheck.c \ acpi/tcpa/tcpa.c \ acpi/tpm2/tpm2.c \ diff --git a/src/acpi/svkl/svkl.c b/src/acpi/svkl/svkl.c new file mode 100644 index 00000000..4149c541 --- /dev/null +++ b/src/acpi/svkl/svkl.c @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2022 Canonical + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ +#include "fwts.h" + +#if defined(FWTS_HAS_ACPI) + +#include +#include +#include +#include +#include +#include + +static fwts_acpi_table_info *table; +acpi_table_init(SVKL, &table) + +static int svkl_test1(fwts_framework *fw) +{ + fwts_acpi_table_svkl *svkl = (fwts_acpi_table_svkl *) table->data; + fwts_acpi_table_svkl_key_structure *key_structure; + uint32_t offset, count, i; + bool passed = true; + + if (table->length < (size_t)svkl->header.length) { + fwts_failed(fw, LOG_LEVEL_HIGH, + "SVKLTooShort", + "SVKL table incorrectly sized, SVKL " + "header reports it is %" PRIu32 " bytes, " + "instead got %zu bytes", + svkl->header.length, table->length); + return FWTS_OK; + } + + if (table->length < sizeof(fwts_acpi_table_svkl)) { + fwts_failed(fw, LOG_LEVEL_HIGH, + "SVKLTooShort", + "SVKL table too short, expecting %zu bytes, " + "instead got %zu bytes", + sizeof(fwts_acpi_table_svkl), table->length); + return FWTS_OK; + } + + fwts_log_info_verbatim(fw, "SVKL Storage Volume Key Data Table:"); + fwts_log_info_simp_int(fw, " Key Count: ", svkl->key_count); + + offset = sizeof(fwts_acpi_table_svkl); + key_structure = (fwts_acpi_table_svkl_key_structure *) (table->data + offset); + + count = (svkl->header.length - offset) / sizeof(fwts_acpi_table_svkl_key_structure); + if (count != svkl->key_count) { + passed = false; + fwts_failed(fw, LOG_LEVEL_CRITICAL, + "SVKLBadStructureCount", + "SVKL should have %" PRId32 " key structures, got %" PRId32, + svkl->key_count, count); + return FWTS_OK; + } + + for (i = 0; i < svkl->key_count; i++) { + fwts_log_info_verbatim(fw, " Storage Volume Key Structure %" PRIu8, (i + 1)); + fwts_log_info_simp_int(fw, " Key Type: ", key_structure->key_type); + if (key_structure->key_type != 0) { + passed = false; + fwts_failed(fw, LOG_LEVEL_HIGH, + "SVKLBadKeyType", + "SVKL key type not zero, 1~0xFFFF reserved."); + } + fwts_log_info_simp_int(fw, " Key Format: ", key_structure->key_format); + if (key_structure->key_format != 0) { + passed = false; + fwts_failed(fw, LOG_LEVEL_HIGH, + "SVKLBadKeyFormat", + "SVKL key format not zero, 1~0xFFFF reserved."); + } + fwts_log_info_simp_int(fw, " Key Size: ", key_structure->key_size); + fwts_log_info_simp_int(fw, " Key Address: ", key_structure->key_addr); + + if ((offset += sizeof(fwts_acpi_table_svkl_key_structure)) > table->length) { + passed = false; + fwts_failed(fw, LOG_LEVEL_CRITICAL, + "SVKLBadTableLength", + "SVKL has more key structures than its size can handle"); + break; + } + + key_structure = (fwts_acpi_table_svkl_key_structure *) (table->data + offset); + } + + fwts_log_nl(fw); + + if (passed) + fwts_passed(fw, "No issues found in SVKL table."); + + return FWTS_OK; +} + +static fwts_framework_minor_test svkl_tests[] = { + { svkl_test1, "Validate SVKL table." }, + { NULL, NULL } +}; + +static fwts_framework_ops svkl_ops = { + .description = "SVKL Storage Volume Key Data table test.", + .init = SVKL_init, + .minor_tests = svkl_tests +}; + +FWTS_REGISTER("svkl", &svkl_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_ACPI) + +#endif diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h index 8381c351..d87224a5 100644 --- a/src/lib/include/fwts_acpi.h +++ b/src/lib/include/fwts_acpi.h @@ -2219,4 +2219,21 @@ typedef struct { uint32_t amrt_addr_end; } __attribute__ ((packed)) fwts_acpi_table_aspt; +/* + * ACPI SVKL (Storage Volume Key Data) + * https://cdrdv2.intel.com/v1/dl/getContent/726790 + */ +typedef struct { + uint16_t key_type; + uint16_t key_format; + uint32_t key_size; + uint64_t key_addr; +} __attribute__ ((packed)) fwts_acpi_table_svkl_key_structure; + +typedef struct { + fwts_acpi_table_header header; + uint32_t key_count; + fwts_acpi_table_svkl_key_structure key_struct[0]; +} __attribute__ ((packed)) fwts_acpi_table_svkl; + #endif From patchwork Wed Sep 14 08:40:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ivanhu X-Patchwork-Id: 1677717 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) 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: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Qxs3N/vl; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MSDLj0Hrzz1ynm for ; Wed, 14 Sep 2022 18:40:45 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oYNwo-0002NG-1j; Wed, 14 Sep 2022 08:40:42 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oYNwl-0002Mo-Uo for fwts-devel@lists.ubuntu.com; Wed, 14 Sep 2022 08:40:39 +0000 Received: from canonical.com (123-204-5-118.dynamic.seed.net.tw [123.204.5.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id A44E23F32A for ; Wed, 14 Sep 2022 08:40:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1663144839; bh=GLGCMENcWWv3wxA1BFLHKhWcCGlPhtLN6WMy6OGWflA=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qxs3N/vluCkFuvQM8k7HUUeZnKEKGoDl24jzRctyjbEwYurvgSCH57baJetE/pyjE 0iY18nO8FOlgFyYldzoYtpjrtRvuxtqPGgthXKdwqc118ltvfm9wiaX//LDa45iNil Fwt7JLPy3PdLb/GoY9wInoce/tMIL3oyohQDn1Nz5Qj8V/9ZLiUF800A1Xoj3bm6m2 F3nl8VBVDSoj30tHxEpGHZWwZLqZgOCvnEMgPBZ8GeU5+XbAvH0ZRgCbfO93tPT6rt dqjDgDmUTf5PfnGEnRc9pLvK2+KZc7bs6kTfRLY6e3OVOflbUmnb/sZ65onZSCqRrE 3Up3J+WXMGHKQ== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] fwts-test: add regression test for SVKL Date: Wed, 14 Sep 2022 16:40:26 +0800 Message-Id: <20220914084026.69362-2-ivan.hu@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220914084026.69362-1-ivan.hu@canonical.com> References: <20220914084026.69362-1-ivan.hu@canonical.com> MIME-Version: 1.0 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: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Signed-off-by: Ivan Hu --- Makefile.am | 2 ++ fwts-test/svkl-0001/acpidump-0001.log | 31 +++++++++++++++++++++++++++ fwts-test/svkl-0001/acpidump-0002.log | 31 +++++++++++++++++++++++++++ fwts-test/svkl-0001/svkl-0001.log | 22 +++++++++++++++++++ fwts-test/svkl-0001/svkl-0002.log | 25 +++++++++++++++++++++ fwts-test/svkl-0001/test-0001.sh | 23 ++++++++++++++++++++ fwts-test/svkl-0001/test-0002.sh | 23 ++++++++++++++++++++ 7 files changed, 157 insertions(+) create mode 100644 fwts-test/svkl-0001/acpidump-0001.log create mode 100644 fwts-test/svkl-0001/acpidump-0002.log create mode 100644 fwts-test/svkl-0001/svkl-0001.log create mode 100644 fwts-test/svkl-0001/svkl-0002.log create mode 100755 fwts-test/svkl-0001/test-0001.sh create mode 100755 fwts-test/svkl-0001/test-0002.sh diff --git a/Makefile.am b/Makefile.am index 190eaf91..7f121ed5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -179,6 +179,8 @@ TESTS = fwts-test/acpidump-0001/test-0001.sh \ fwts-test/srat-0001/test-0002.sh \ fwts-test/stao-0001/test-0001.sh \ fwts-test/stao-0001/test-0002.sh \ + fwts-test/svkl-0001/test-0001.sh \ + fwts-test/svkl-0001/test-0002.sh \ fwts-test/syntaxcheck-0001/test-0001.sh \ fwts-test/tcpa-0001/test-0001.sh \ fwts-test/tcpa-0001/test-0002.sh \ diff --git a/fwts-test/svkl-0001/acpidump-0001.log b/fwts-test/svkl-0001/acpidump-0001.log new file mode 100644 index 00000000..c3dddb5f --- /dev/null +++ b/fwts-test/svkl-0001/acpidump-0001.log @@ -0,0 +1,31 @@ +FACS @ 0x00000000 + 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS@........... + 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +FACP @ 0x00000000 + 0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20 FACP......AMD + 0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20 GUAM ....AMD + 0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00 @B.../...G...... + 0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00 ................ + 0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00 ................ + 0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00 ............... + 0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00 e...........2... + 0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af ...../.......G.. + 0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00 ..... .......... + 00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00 ................ + 00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00 ................ + 00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00 . ...........@.. + 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + 00f0: 00 00 00 00 .... + +SVKL @ 0x0000000000000000 + 0000: 53 56 4B 4C 48 00 00 00 01 DB 49 4E 54 45 4C 20 SVKLH.....INTEL + 0010: 54 65 6D 70 6C 61 74 65 01 00 00 00 49 4E 54 4C Template....INTL + 0020: 31 03 21 20 02 00 00 00 00 00 00 00 21 43 AA AA 1.! ........!C.. + 0030: EF CD AB 89 67 45 23 01 00 00 00 00 21 43 BB BB ....gE#.....!C.. + 0040: EF CD AB 89 67 45 23 01 ....gE#. diff --git a/fwts-test/svkl-0001/acpidump-0002.log b/fwts-test/svkl-0001/acpidump-0002.log new file mode 100644 index 00000000..32b7d8da --- /dev/null +++ b/fwts-test/svkl-0001/acpidump-0002.log @@ -0,0 +1,31 @@ +FACS @ 0x00000000 + 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS@........... + 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + +FACP @ 0x00000000 + 0000: 46 41 43 50 f4 00 00 00 03 f9 41 4d 44 20 20 20 FACP......AMD + 0010: 47 55 41 4d 20 20 20 20 00 00 04 06 41 4d 44 20 GUAM ....AMD + 0020: 40 42 0f 00 c0 2f e9 af 92 47 e8 af 00 02 09 00 @B.../...G...... + 0030: b0 00 00 00 f0 f1 00 00 00 80 00 00 00 00 00 00 ................ + 0040: 04 80 00 00 00 00 00 00 00 82 00 00 08 80 00 00 ................ + 0050: 20 80 00 00 00 00 00 00 04 02 01 04 08 00 00 00 ............... + 0060: 65 00 e9 03 00 00 00 00 01 00 0d 00 32 00 00 00 e...........2... + 0070: a5 c1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0080: 00 00 00 00 c0 2f e9 af 00 00 00 00 92 47 e8 af ...../.......G.. + 0090: 00 00 00 00 01 20 00 00 00 80 00 00 00 00 00 00 ..... .......... + 00a0: 00 00 00 00 00 00 00 00 00 00 00 00 01 10 00 00 ................ + 00b0: 04 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 00c0: 00 00 00 00 01 08 00 00 00 82 00 00 00 00 00 00 ................ + 00d0: 01 20 00 00 08 80 00 00 00 00 00 00 01 40 00 00 . ...........@.. + 00e0: 20 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ............... + 00f0: 00 00 00 00 .... + +SVKL @ 0x0000000000000000 + 0000: 53 56 4B 4C 48 00 00 00 01 DB 49 4E 54 45 4C 20 SVKLH.....INTEL + 0010: 54 65 6D 70 6C 61 74 65 01 00 00 00 49 4E 54 4C Template....INTL + 0020: 31 03 21 20 02 00 00 00 01 00 00 00 21 43 AA AA 1.! ........!C.. + 0030: EF CD AB 89 67 45 23 01 00 00 02 00 21 43 BB BB ....gE#.....!C.. + 0040: EF CD AB 89 67 45 23 01 ....gE#. diff --git a/fwts-test/svkl-0001/svkl-0001.log b/fwts-test/svkl-0001/svkl-0001.log new file mode 100644 index 00000000..bd5b555d --- /dev/null +++ b/fwts-test/svkl-0001/svkl-0001.log @@ -0,0 +1,22 @@ +svkl svkl: SVKL Storage Volume Key Data table test. +svkl ---------------------------------------------------------- +svkl Test 1 of 1: Validate SVKL table. +svkl SVKL Storage Volume Key Data Table: +svkl Key Count: 0x00000002 +svkl Storage Volume Key Structure 1 +svkl Key Type: 0x0000 +svkl Key Format: 0x0000 +svkl Key Size: 0xaaaa4321 +svkl Key Address: 0x0123456789abcdef +svkl Storage Volume Key Structure 2 +svkl Key Type: 0x0000 +svkl Key Format: 0x0000 +svkl Key Size: 0xbbbb4321 +svkl Key Address: 0x0123456789abcdef +svkl +svkl PASSED: Test 1, No issues found in SVKL table. +svkl +svkl ========================================================== +svkl 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +svkl info only. +svkl ========================================================== diff --git a/fwts-test/svkl-0001/svkl-0002.log b/fwts-test/svkl-0001/svkl-0002.log new file mode 100644 index 00000000..9b2042e2 --- /dev/null +++ b/fwts-test/svkl-0001/svkl-0002.log @@ -0,0 +1,25 @@ +svkl svkl: SVKL Storage Volume Key Data table test. +svkl ---------------------------------------------------------- +svkl Test 1 of 1: Validate SVKL table. +svkl SVKL Storage Volume Key Data Table: +svkl Key Count: 0x00000002 +svkl Storage Volume Key Structure 1 +svkl Key Type: 0x0001 +svkl FAILED [HIGH] SVKLBadKeyType: Test 1, SVKL key type not +svkl zero, 1~0xFFFF reserved. +svkl Key Format: 0x0000 +svkl Key Size: 0xaaaa4321 +svkl Key Address: 0x0123456789abcdef +svkl Storage Volume Key Structure 2 +svkl Key Type: 0x0000 +svkl Key Format: 0x0002 +svkl FAILED [HIGH] SVKLBadKeyFormat: Test 1, SVKL key format +svkl not zero, 1~0xFFFF reserved. +svkl Key Size: 0xbbbb4321 +svkl Key Address: 0x0123456789abcdef +svkl +svkl +svkl ========================================================== +svkl 0 passed, 2 failed, 0 warning, 0 aborted, 0 skipped, 0 +svkl info only. +svkl ========================================================== diff --git a/fwts-test/svkl-0001/test-0001.sh b/fwts-test/svkl-0001/test-0001.sh new file mode 100755 index 00000000..d4f22dae --- /dev/null +++ b/fwts-test/svkl-0001/test-0001.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +TEST="Test acpitables against SVKL" +NAME=test-0001.sh +TMPLOG=$TMP/svkl.log.$$ + +$FWTS --show-tests | grep svkl > /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/svkl-0001/acpidump-0001.log svkl - | cut -c7- | grep "^svkl" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/svkl-0001/svkl-0001.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret diff --git a/fwts-test/svkl-0001/test-0002.sh b/fwts-test/svkl-0001/test-0002.sh new file mode 100755 index 00000000..ee579e1b --- /dev/null +++ b/fwts-test/svkl-0001/test-0002.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +TEST="Test acpitables against SVKL" +NAME=test-0001.sh +TMPLOG=$TMP/svkl.log.$$ + +$FWTS --show-tests | grep svkl > /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/svkl-0001/acpidump-0002.log svkl - | cut -c7- | grep "^svkl" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/svkl-0001/svkl-0002.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret