From patchwork Wed Dec 28 08:24:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1719781 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=TxsCETdV; 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 4Nhl1n5w4xz23dZ for ; Wed, 28 Dec 2022 19:24:44 +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 1pARjp-00062L-GV; Wed, 28 Dec 2022 08:24:37 +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 1pARjm-00061G-MS for fwts-devel@lists.ubuntu.com; Wed, 28 Dec 2022 08:24:34 +0000 Received: from canonical.com (118-163-61-247.hinet-ip.hinet.net [118.163.61.247]) (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 C712D423ED for ; Wed, 28 Dec 2022 08:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1672215874; bh=kVnRW7/YZjOOwUzTFBKKi4o8tfCpQHQlz/atXpKh4Ck=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=TxsCETdVNxQxBv3RYTnPuUF4oDndTaW/kZh6lQzKq/1JESRb9LXLYt0CeBhIs3VQL bqyFR/C0IlGDW2erIltRFBUhUCCOxUsqxhF9RuJDhclmeuVQ7qb5JYQsiLErge7N6r 8TGU4OpbvQ1hJ8qxYF+B7zRiXPz5Qzume31LC3Givez+r8b6uTDDsS2+FQPXKgrjLh Zyhiu8lPL+yh9v1kNRLRrxl5XRC/A1Uhv52Xqede5qiaoeH5cDwf5AGFwAN6wGlDMC YCrYqcSIhihESnN2a7u3qEWdAZynQOYt9fYNb944AXb3Li2/+ANlnlSQvFFleigyxN SJp5d8zI4S7eA== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/2] acpi: aest: add tests for ACPI AEST table Date: Wed, 28 Dec 2022 16:24:29 +0800 Message-Id: <20221228082430.51622-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" BugLink: https://bugs.launchpad.net/fwts/+bug/2000387 Signed-off-by: Ivan Hu --- src/Makefile.am | 1 + src/acpi/aest/aest.c | 248 ++++++++++++++++++++++++++++++++++++ src/lib/include/fwts_acpi.h | 116 +++++++++++++++++ 3 files changed, 365 insertions(+) create mode 100644 src/acpi/aest/aest.c diff --git a/src/Makefile.am b/src/Makefile.am index 60fdd49d..9f348ad1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -58,6 +58,7 @@ fwts_SOURCES = main.c \ acpi/acpiinfo/acpiinfo.c \ acpi/acpitables/acpitables.c \ sbbr/acpitables/acpitables.c \ + acpi/aest/aest.c \ acpi/apicinstance/apicinstance.c \ acpi/asf/asf.c \ acpi/aspt/aspt.c \ diff --git a/src/acpi/aest/aest.c b/src/acpi/aest/aest.c new file mode 100644 index 00000000..cf7b9e58 --- /dev/null +++ b/src/acpi/aest/aest.c @@ -0,0 +1,248 @@ +/* + * 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 + +static fwts_acpi_table_info *table; +acpi_table_init(AEST, &table) + +static void aest_processor_test( + fwts_framework *fw, + fwts_acpi_table_aest_processor *entry, + uint32_t *offset, + bool *passed) +{ + fwts_log_info_verbatim(fw, " Node-specific data (Processor):"); + fwts_log_info_simp_int(fw, " ACPI Processor ID: ", entry->acpi_processor_id); + fwts_log_info_simp_int(fw, " Resource Type: ", entry->resource_type); + fwts_log_info_simp_int(fw, " Reserved: ", entry->reserved); + fwts_log_info_simp_int(fw, " Flags: ", entry->flags); + fwts_log_info_simp_int(fw, " Revision: ", entry->revision); + fwts_log_info_simp_int(fw, " Processor affinity lvl ind: ", entry->processor_affinity_level_indicator); + + fwts_acpi_reserved_zero("AEST", "Reserved", entry->reserved, passed); + fwts_acpi_reserved_bits("AEST", "Flags", entry->flags, 2, 7, passed); + + *offset += sizeof(fwts_acpi_table_aest_processor); + if (entry->resource_type == FWTS_AEST_RESOURCE_CACHE) { + fwts_acpi_table_aest_cache_resource_substructure *cache = + (fwts_acpi_table_aest_cache_resource_substructure *) + ((uint8_t *)entry + sizeof(fwts_acpi_table_aest_processor)); + fwts_log_info_simp_int(fw, " Cache Reference: ", cache->cache_reference); + fwts_log_info_simp_int(fw, " Reserved: ", cache->reserved); + fwts_acpi_reserved_zero("AEST", "Reserved", cache->reserved, passed); + *offset += sizeof(fwts_acpi_table_aest_cache_resource_substructure); + } else if (entry->resource_type == FWTS_AEST_RESOURCE_TLB) { + fwts_acpi_table_aest_tlb_resource_substructure *tlb = + (fwts_acpi_table_aest_tlb_resource_substructure *) + ((uint8_t *)entry + sizeof(fwts_acpi_table_aest_processor)); + fwts_log_info_simp_int(fw, " TLB Reference: ", tlb->tlb_reference); + fwts_log_info_simp_int(fw, " Reserved: ", tlb->reserved); + fwts_acpi_reserved_zero("AEST", "Reserved", tlb->reserved, passed); + *offset += sizeof(fwts_acpi_table_aest_tlb_resource_substructure); + } else if (entry->resource_type == FWTS_AEST_RESOURCE_GENERIC) { + fwts_acpi_table_aest_generic_resource_substructure *generic = + (fwts_acpi_table_aest_generic_resource_substructure *) + ((uint8_t *)entry + sizeof(fwts_acpi_table_aest_processor)); + fwts_log_info_simp_int(fw, " Data: ", generic->data); + *offset += sizeof(fwts_acpi_table_aest_generic_resource_substructure); + } else + fwts_acpi_reserved_type(fw, "AEST", entry->resource_type, 0, FWTS_AEST_RESOURCE_RESERVED, passed); + +} + +static void aest_interface_test( + fwts_framework *fw, + fwts_acpi_table_aest_interface *entry, + bool *passed) +{ + uint32_t reserved = entry->reserved[0] + (entry->reserved[1] << 8) + (entry->reserved[2] << 16); + + fwts_log_info_verbatim(fw, " Interface:"); + fwts_log_info_simp_int(fw, " Interface Type: ", entry->interface_type); + fwts_log_info_simp_int(fw, " Reserved: ", reserved); + fwts_log_info_simp_int(fw, " Flags: ", entry->flags); + fwts_log_info_simp_int(fw, " Base Address: ", entry->base_address); + fwts_log_info_simp_int(fw, " Start Error Record Index: ", entry->start_error_record_index); + fwts_log_info_simp_int(fw, " Number Of Error Records: ", entry->number_of_error_records); + fwts_log_info_simp_int(fw, " Error Record Implemented: ", entry->error_record_implemented); + fwts_log_info_simp_int(fw, " Status Reporting Supported: ", entry->error_record_based_status_reporting_supported); + fwts_log_info_simp_int(fw, " Addressing Mode: ", entry->addressing_mode); + + fwts_acpi_reserved_zero("AEST", "Reserved", reserved, passed); + fwts_acpi_reserved_bits("AEST", "Flags", entry->flags, 2, 31, passed); + fwts_acpi_reserved_type(fw, "AEST", entry->interface_type, 0, 2, passed); +} + +static void aest_interrupt_test( + fwts_framework *fw, + fwts_acpi_table_aest_interrupt *entry, + bool *passed) +{ + uint32_t reserved1 = entry->reserved1[0] + (entry->reserved1[1] << 8)+ (entry->reserved1[2] << 16); + + fwts_log_info_simp_int(fw, " Interrupt Type: ", entry->interrupt_type); + fwts_log_info_simp_int(fw, " Reserved: ", entry->reserved); + fwts_log_info_simp_int(fw, " Interrupt Flags: ", entry->interrupt_flags); + fwts_log_info_simp_int(fw, " Interrupt GSIV: ", entry->interrupt_gsiv); + fwts_log_info_simp_int(fw, " ID: ", entry->id); + fwts_log_info_simp_int(fw, " Reserved1: ", reserved1); + + fwts_acpi_reserved_zero("AEST", "Reserved", entry->reserved, passed); + fwts_acpi_reserved_bits("AEST", "Interrupt Type", entry->interrupt_type, 2, 7, passed); + fwts_acpi_reserved_bits("AEST", "Interrupt Flags", entry->interrupt_flags, 1, 31, passed); + fwts_acpi_reserved_zero("AEST", "Reserved1", reserved1, passed); + fwts_acpi_reserved_type(fw, "AEST", entry->interrupt_type, 0, 2, passed); +} + +static int aest_test1(fwts_framework *fw) +{ + fwts_acpi_table_aest_node *node; + bool passed = true; + uint32_t offset; + + + fwts_log_info_verbatim(fw, "AEST Arm Error Source Table:"); + + node = (fwts_acpi_table_aest_node *)(table->data + sizeof(fwts_acpi_table_aest)); + offset = sizeof(fwts_acpi_table_aest); + while (offset < table->length) { + char buffer[128]; + fwts_acpi_table_aest_processor *processor = NULL; + fwts_acpi_table_aest_memory_controller *mem_controller = NULL; + fwts_acpi_table_aest_smmu *smmu = NULL; + fwts_acpi_table_aest_vendor_defined *vendor_defined = NULL; + fwts_acpi_table_aest_gic *gic = NULL; + + if (fwts_acpi_structure_length_zero(fw, "AEST", node->length, offset)) { + passed = false; + break; + } + + fwts_log_info_verbatim(fw, " AEST node structure:"); + fwts_log_info_simp_int(fw, " Type: ", node->type); + fwts_log_info_simp_int(fw, " Length: ", node->length); + fwts_log_info_simp_int(fw, " Reserved: ", node->reserved); + fwts_log_info_simp_int(fw, " Offset to Node-specific data: ", node->offset_node_specific_data); + fwts_log_info_simp_int(fw, " Offset to Node Interface: ", node->offset_node_interface); + fwts_log_info_simp_int(fw, " Offset to Node Interrupt Array: ", node->offset_node_interrupt_array); + fwts_log_info_simp_int(fw, " Node Interrupt Array Size: ", node->node_interrupt_size); + fwts_log_info_simp_int(fw, " Timestamp Rate: ", node->timestamp_rate); + fwts_log_info_simp_int(fw, " Reserved1: ", node->reserved1); + fwts_log_info_simp_int(fw, " Error Injection Countdown Rate: ", node->error_injection_countdown_rate); + + fwts_acpi_reserved_zero("AEST", "Reserved", node->reserved, &passed); + fwts_acpi_reserved_zero("AEST", "Reserved1", node->reserved1, &passed); + + offset += sizeof(fwts_acpi_table_aest_node); + + switch(node->type) { + case FWTS_AEST_PROCESSOR: + processor = (fwts_acpi_table_aest_processor *)(table->data + offset); + aest_processor_test(fw, processor, &offset, &passed); + break; + case FWTS_AEST_MEMORY: + mem_controller = (fwts_acpi_table_aest_memory_controller *)(table->data + offset); + fwts_log_info_verbatim(fw, " Node-specific data (Memory Controller):"); + fwts_log_info_simp_int(fw, " Proximity Domain: ", + mem_controller->proximity_domain); + offset += sizeof(fwts_acpi_table_aest_memory_controller); + break; + case FWTS_AEST_SMMU: + smmu = (fwts_acpi_table_aest_smmu *)(table->data + offset); + fwts_log_info_verbatim(fw, " Node-specific data (SMMU):"); + fwts_log_info_simp_int(fw, " IORT Node Reference: ", + smmu->iort_node_reference); + fwts_log_info_simp_int(fw, " SMMU-specific Data Subcomponent Reference: ", + smmu->smmu_specific_data_subcomponent_reference); + offset += sizeof(fwts_acpi_table_aest_smmu); + break; + case FWTS_AEST_VENDOR_DEFINED: + vendor_defined = (fwts_acpi_table_aest_vendor_defined *)(table->data + offset); + fwts_log_info_verbatim(fw, " Node-specific data (Vendor-defined):"); + fwts_log_info_simp_int(fw, " Hardware ID: ", + vendor_defined->hardware_id); + fwts_log_info_simp_int(fw, " SMMU-specific Data Subcomponent Reference: ", + vendor_defined->unique_id); + fwts_log_info_verbatim(fw, " Vendor-specific data:"); + fwts_dump_raw_data(buffer, sizeof(buffer), + vendor_defined->vendor_specific_data, + 0, + sizeof(vendor_defined->vendor_specific_data)); + fwts_log_info_verbatim(fw, "%s", buffer); + offset += sizeof(fwts_acpi_table_aest_vendor_defined); + break; + case FWTS_AEST_GIC: + gic = (fwts_acpi_table_aest_gic *)(table->data + offset); + fwts_log_info_verbatim(fw, " Node-specific data (GIC):"); + fwts_log_info_simp_int(fw, " Interface Type: ", + gic->interface_type); + fwts_log_info_simp_int(fw, " Instance Identifier: ", + gic->instance_identifier); + fwts_acpi_reserved_type(fw, "AEST", + gic->interface_type, + 0, + FWTS_AEST_GIC_RESERVED, &passed); + offset += sizeof(fwts_acpi_table_aest_gic); + break; + default: + fwts_acpi_reserved_type(fw, "AEST", node->type, 0, FWTS_AEST_RESERVED, &passed); + break; + } + + if (node->offset_node_interface >= sizeof(fwts_acpi_table_aest_interface)) { + aest_interface_test(fw, (fwts_acpi_table_aest_interface *)(table->data + offset), &passed); + offset += sizeof(fwts_acpi_table_aest_interface); + } + + uint32_t i; + + for (i = 0; i < node->node_interrupt_size; i++) { + fwts_log_info_verbatim(fw, " Interrupt Array"); + aest_interrupt_test(fw, (fwts_acpi_table_aest_interrupt *)(table->data + offset), &passed); + offset += sizeof(fwts_acpi_table_aest_interrupt); + } + + node = (fwts_acpi_table_aest_node *)(table->data + offset); + fwts_log_nl(fw); + } + + if (passed) + fwts_passed(fw, "No issues found in AEST table."); + + return FWTS_OK; +} + +static fwts_framework_minor_test aest_tests[] = { + { aest_test1, "Validate AEST table." }, + { NULL, NULL } +}; + +static fwts_framework_ops aest_ops = { + .description = "AEST Arm Error Source Table test.", + .init = AEST_init, + .minor_tests = aest_tests +}; + +FWTS_REGISTER("aest", &aest_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 ebeb6363..60e6e48a 100644 --- a/src/lib/include/fwts_acpi.h +++ b/src/lib/include/fwts_acpi.h @@ -2359,4 +2359,120 @@ typedef struct { uint64_t base_addr; } __attribute__ ((packed)) fwts_acpi_table_cedt_rdpas; +/* + * ACPI AEST (Arm Error Source Table) + * https://developer.arm.com/documentation/den0085/latest/ + */ +typedef struct { + fwts_acpi_table_header header; +} __attribute__ ((packed)) fwts_acpi_table_aest; + +typedef enum { + FWTS_AEST_PROCESSOR = 0, + FWTS_AEST_MEMORY = 1, + FWTS_AEST_SMMU = 2, + FWTS_AEST_VENDOR_DEFINED = 3, + FWTS_AEST_GIC = 4, + FWTS_AEST_RESERVED +} fwts_acpi_aest_type; + +typedef struct { + uint8_t type; + uint16_t length; + uint8_t reserved; + uint32_t offset_node_specific_data; + uint32_t offset_node_interface; + uint32_t offset_node_interrupt_array; + uint32_t node_interrupt_size; + uint64_t timestamp_rate; + uint64_t reserved1; + uint64_t error_injection_countdown_rate; + /* + * followed by Node-specific data, Node interface + * and Node Interrupt array + */ +} __attribute__ ((packed)) fwts_acpi_table_aest_node; + +typedef enum { + FWTS_AEST_RESOURCE_CACHE = 0, + FWTS_AEST_RESOURCE_TLB = 1, + FWTS_AEST_RESOURCE_GENERIC = 2, + FWTS_AEST_RESOURCE_RESERVED +} fwts_acpi_aest_resource_type; + +typedef struct { + uint32_t acpi_processor_id; + uint8_t resource_type; + uint8_t reserved; + uint8_t flags; + uint8_t revision; + uint64_t processor_affinity_level_indicator; + /* + * followed by Resource substructure + */ +} __attribute__ ((packed)) fwts_acpi_table_aest_processor; + +typedef struct { + uint32_t cache_reference; + uint32_t reserved; +} __attribute__ ((packed)) fwts_acpi_table_aest_cache_resource_substructure; + +typedef struct { + uint32_t tlb_reference; + uint32_t reserved; +} __attribute__ ((packed)) fwts_acpi_table_aest_tlb_resource_substructure; + +typedef struct { + uint32_t data; +} __attribute__ ((packed)) fwts_acpi_table_aest_generic_resource_substructure; + +typedef struct { + uint32_t proximity_domain; +} __attribute__ ((packed)) fwts_acpi_table_aest_memory_controller; + +typedef struct { + uint32_t iort_node_reference; + uint32_t smmu_specific_data_subcomponent_reference; +} __attribute__ ((packed)) fwts_acpi_table_aest_smmu; + +typedef struct { + uint32_t hardware_id; + uint32_t unique_id; + uint8_t vendor_specific_data[16]; +} __attribute__ ((packed)) fwts_acpi_table_aest_vendor_defined; + +typedef enum { + FWTS_AEST_GICC = 0, + FWTS_AEST_GICD = 1, + FWTS_AEST_GICR = 2, + FWTS_AEST_GOCS = 3, + FWTS_AEST_GIC_RESERVED +} fwts_acpi_aest_gic_type; + +typedef struct { + uint32_t interface_type; + uint32_t instance_identifier; +} __attribute__ ((packed)) fwts_acpi_table_aest_gic; + +typedef struct { + uint8_t interface_type; + uint8_t reserved[3]; + uint32_t flags; + uint64_t base_address; + uint32_t start_error_record_index; + uint32_t number_of_error_records; + uint64_t error_record_implemented; + uint64_t error_record_based_status_reporting_supported; + uint64_t addressing_mode; +} __attribute__ ((packed)) fwts_acpi_table_aest_interface; + +typedef struct { + uint8_t interrupt_type; + uint16_t reserved; + uint8_t interrupt_flags; + uint32_t interrupt_gsiv; + uint8_t id; + uint8_t reserved1[3]; +} __attribute__ ((packed)) fwts_acpi_table_aest_interrupt; + #endif From patchwork Wed Dec 28 08:24:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1719782 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=BPvF5JuU; 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 4Nhl1p67w1z23f4 for ; Wed, 28 Dec 2022 19:24:46 +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 1pARju-00063m-Jh; Wed, 28 Dec 2022 08:24: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 1pARjq-00062d-CO for fwts-devel@lists.ubuntu.com; Wed, 28 Dec 2022 08:24:38 +0000 Received: from canonical.com (118-163-61-247.hinet-ip.hinet.net [118.163.61.247]) (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 6BA1C43590 for ; Wed, 28 Dec 2022 08:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1672215878; bh=uj7wJ4TshBMrqVYPj0XFe3P9Z6K3ZlzqR5ub98bw6Ys=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BPvF5JuUFj5PlVzK5LmGIFXQw2bU5RZvTdyrEsaQfUV+Q71q8L5AO5LrhZ1Mozy9s rqJwSqifMW02VitYJymNpbccDwTL45NxeKVW7IwQ8AwGeDMtyjF3yu8Tqiy1I0GRdO HSnV6RkGEG5MhFSMfOmcIUDjAteoeR1Olm1jn1fKP7EQEw78ZdscT2i0hp29dAICpl OedelPmYAo2NCkC6nKHR0guXedcjkaHUNJtKAQiShmStRLw3jDuoyzROg/+Gc+uIxR JdNkp6Mc3b880+oAS6/HZ6/vSTnXgsZLSSnlXDxLxp0uy++meUJGVxw0jcFFMItZui Tb3YfdXHn9/Aw== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/2] fwts-test: add regression tests for AEST Date: Wed, 28 Dec 2022 16:24:30 +0800 Message-Id: <20221228082430.51622-2-ivan.hu@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221228082430.51622-1-ivan.hu@canonical.com> References: <20221228082430.51622-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/aest-0001/acpidump-0001.log | 71 +++++++++ fwts-test/aest-0001/acpidump-0002.log | 71 +++++++++ fwts-test/aest-0001/aest-0001.log | 194 ++++++++++++++++++++++ fwts-test/aest-0001/aest-0002.log | 221 ++++++++++++++++++++++++++ fwts-test/aest-0001/test-0001.sh | 23 +++ fwts-test/aest-0001/test-0002.sh | 23 +++ 7 files changed, 605 insertions(+) create mode 100644 fwts-test/aest-0001/acpidump-0001.log create mode 100644 fwts-test/aest-0001/acpidump-0002.log create mode 100644 fwts-test/aest-0001/aest-0001.log create mode 100644 fwts-test/aest-0001/aest-0002.log create mode 100755 fwts-test/aest-0001/test-0001.sh create mode 100755 fwts-test/aest-0001/test-0002.sh diff --git a/Makefile.am b/Makefile.am index c44303c1..0d8817ab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,6 +50,8 @@ TESTS_ENVIRONMENT += export FAILURE_LOG=/tmp/failure.log; TESTS = fwts-test/acpidump-0001/test-0001.sh \ fwts-test/acpitables-0001/test-0001.sh \ + fwts-test/aest-0001/test-0001.sh \ + fwts-test/aest-0001/test-0002.sh \ fwts-test/apicinstance-0001/test-0001.sh \ fwts-test/apicinstance-0001/test-0002.sh \ fwts-test/arg-help-0001/test-0001.sh \ diff --git a/fwts-test/aest-0001/acpidump-0001.log b/fwts-test/aest-0001/acpidump-0001.log new file mode 100644 index 00000000..1fb49052 --- /dev/null +++ b/fwts-test/aest-0001/acpidump-0001.log @@ -0,0 +1,71 @@ +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 .... + +AEST @ 0x00000000 + 0000: 41 45 53 54 CC 02 00 00 01 2A 49 4E 54 45 4C 20 AEST.....*INTEL + 0010: 54 65 6D 70 6C 61 74 65 01 00 00 00 49 4E 54 4C Template....INTL + 0020: 04 06 21 20 00 80 00 00 2C 00 00 00 44 00 00 00 ..! ....,...D... + 0030: 74 00 00 00 01 00 00 00 EF CD AB 89 67 45 23 01 t...........gE#. + 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0050: CD FE 00 00 00 00 00 00 EF CD AB 89 67 45 23 01 ............gE#. + 0060: 33 33 22 22 00 00 00 00 01 00 00 00 02 00 00 00 33""............ + 0070: EF CD AB 89 67 45 23 01 00 00 00 00 01 00 00 00 ....gE#......... + 0080: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0090: 11 11 11 01 00 00 00 00 01 00 00 00 EF CD AB 78 ...............x + 00a0: 56 00 00 00 00 74 00 00 2C 00 00 00 44 00 00 00 V....t..,...D... + 00b0: 00 00 00 00 00 00 00 00 EF CD AB 89 67 45 23 01 ............gE#. + 00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 00d0: 11 11 00 00 01 00 01 00 EF CD AB 89 67 45 23 01 ............gE#. + 00e0: 67 67 67 67 00 00 00 00 00 00 00 00 03 00 00 00 gggg............ + 00f0: EF CD AB 89 67 45 23 01 00 00 00 00 01 00 00 00 ....gE#......... + 0100: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0110: 11 11 11 01 00 00 00 00 01 60 00 00 2C 00 00 00 .........`..,... + 0120: 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0............... + 0130: 00 00 00 00 00 00 00 00 00 00 00 00 EF CD AB 89 ................ + 0140: 67 45 23 01 AA AA 00 00 01 00 00 00 01 00 00 00 gE#............. + 0150: EF CD AB 89 67 45 23 01 00 00 00 00 01 00 00 00 ....gE#......... + 0160: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0170: 11 11 11 01 00 00 00 00 02 64 00 00 2C 00 00 00 .........d..,... + 0180: 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4............... + 0190: 00 00 00 00 00 00 00 00 00 00 00 00 EF CD AB 89 ................ + 01a0: 67 45 23 01 55 55 55 55 66 66 66 66 01 00 00 00 gE#.UUUUffff.... + 01b0: 03 00 00 00 EF CD AB 89 67 45 23 01 00 00 00 00 ........gE#..... + 01c0: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ + 01d0: 00 00 00 00 11 11 11 01 00 00 00 00 03 74 00 00 .............t.. + 01e0: 2C 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 ,...D........... + 01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0200: EF CD AB 89 67 45 23 01 33 33 33 33 44 44 44 44 ....gE#.3333DDDD + 0210: 12 23 34 45 56 67 78 89 9A AB BC CD DE EF FF 55 .#4EVgx........U + 0220: 01 00 00 00 02 00 00 00 EF CD AB 89 67 45 23 01 ............gE#. + 0230: 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 ................ + 0240: 00 00 00 00 00 00 00 00 11 11 11 01 00 00 00 00 ................ + 0250: 04 7C 00 00 2C 00 00 00 34 00 00 00 64 00 00 00 .|..,...4...d... + 0260: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0270: 00 00 00 00 EF CD AB 89 67 45 23 01 03 00 00 00 ........gE#..... + 0280: 88 88 77 77 00 00 00 00 03 00 00 00 EF CD AB 89 ..ww............ + 0290: 67 45 23 01 00 00 00 00 01 00 00 00 01 00 00 00 gE#............. + 02a0: 00 00 00 00 00 00 00 00 00 00 00 00 11 11 11 01 ................ + 02b0: 00 00 00 00 00 00 00 00 BB BB AA AA CC 00 00 00 ................ + 02c0: 01 00 00 01 EF CD AB 78 56 00 00 00 .......xV... diff --git a/fwts-test/aest-0001/acpidump-0002.log b/fwts-test/aest-0001/acpidump-0002.log new file mode 100644 index 00000000..e1fffe1e --- /dev/null +++ b/fwts-test/aest-0001/acpidump-0002.log @@ -0,0 +1,71 @@ +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 .... + +AEST @ 0x00000000 + 0000: 41 45 53 54 CC 02 00 00 01 2A 49 4E 54 45 4C 20 AEST.....*INTEL + 0010: 54 65 6D 70 6C 61 74 65 01 00 00 00 49 4E 54 4C Template....INTL + 0020: 04 06 21 20 00 80 00 02 2C 00 00 00 44 00 00 00 ..! ....,...D... + 0030: 74 00 00 00 01 00 00 00 EF CD AB 89 67 45 23 01 t...........gE#. + 0040: 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0050: CD FE 00 00 00 01 10 00 EF CD AB 89 67 45 23 01 ............gE#. + 0060: 33 33 22 22 00 01 00 00 01 00 00 00 02 00 00 00 33""............ + 0070: EF CD AB 89 67 45 23 01 00 00 00 00 01 00 00 00 ....gE#......... + 0080: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0090: 11 11 11 01 00 00 00 00 05 01 00 03 EF CD AB 78 ...............x + 00a0: 56 00 00 00 00 74 00 00 2C 00 00 00 44 00 00 00 V....t..,...D... + 00b0: 00 00 00 00 00 00 00 00 EF CD AB 89 67 45 23 01 ............gE#. + 00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 00d0: 11 11 00 00 01 00 01 00 EF CD AB 89 67 45 23 01 ............gE#. + 00e0: 67 67 67 67 00 00 02 00 00 01 00 00 05 00 00 00 gggg............ + 00f0: EF CD AB 89 67 45 23 01 00 00 00 00 01 00 00 00 ....gE#......... + 0100: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0110: 11 11 11 01 00 00 00 00 01 60 00 00 2C 00 00 00 .........`..,... + 0120: 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0............... + 0130: 00 00 00 00 00 00 00 00 00 00 00 00 EF CD AB 89 ................ + 0140: 67 45 23 01 AA AA 00 00 04 00 00 00 01 00 00 00 gE#............. + 0150: EF CD AB 89 67 45 23 01 00 00 00 00 01 00 00 00 ....gE#......... + 0160: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0170: 11 11 11 01 00 00 00 00 02 64 00 00 2C 00 00 00 .........d..,... + 0180: 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4............... + 0190: 00 00 00 00 00 00 00 00 00 00 00 00 EF CD AB 89 ................ + 01a0: 67 45 23 01 55 55 55 55 66 66 66 66 01 00 00 00 gE#.UUUUffff.... + 01b0: 03 00 00 00 EF CD AB 89 67 45 23 01 00 00 00 00 ........gE#..... + 01c0: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ + 01d0: 00 00 00 00 11 11 11 01 00 00 00 00 03 74 00 00 .............t.. + 01e0: 2C 00 00 00 44 00 00 00 00 00 00 00 00 00 00 00 ,...D........... + 01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0200: EF CD AB 89 67 45 23 01 33 33 33 33 44 44 44 44 ....gE#.3333DDDD + 0210: 12 23 34 45 56 67 78 89 9A AB BC CD DE EF FF 55 .#4EVgx........U + 0220: 01 00 00 00 02 00 00 00 EF CD AB 89 67 45 23 01 ............gE#. + 0230: 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 ................ + 0240: 00 00 00 00 00 00 00 00 11 11 11 01 00 00 00 00 ................ + 0250: 04 7C 00 00 2C 00 00 00 34 00 00 00 64 00 00 00 .|..,...4...d... + 0260: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + 0270: 00 00 00 00 EF CD AB 89 67 45 23 01 03 00 00 00 ........gE#..... + 0280: 88 88 77 77 00 00 00 00 03 00 00 00 EF CD AB 89 ..ww............ + 0290: 67 45 23 01 00 00 00 00 01 00 00 00 01 00 00 00 gE#............. + 02a0: 00 00 00 00 00 00 00 00 00 00 00 00 11 11 11 01 ................ + 02b0: 00 00 00 00 00 00 00 00 BB BB AA AA CC 00 00 00 ................ + 02c0: 01 00 00 01 EF CD AB 78 56 00 00 00 .......xV... diff --git a/fwts-test/aest-0001/aest-0001.log b/fwts-test/aest-0001/aest-0001.log new file mode 100644 index 00000000..38f0eafb --- /dev/null +++ b/fwts-test/aest-0001/aest-0001.log @@ -0,0 +1,194 @@ +aest aest: AEST Arm Error Source Table test. +aest ---------------------------------------------------------- +aest Test 1 of 1: Validate AEST table. +aest AEST Arm Error Source Table: +aest AEST node structure: +aest Type: 0x00 +aest Length: 0x0080 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000044 +aest Offset to Node Interrupt Array: 0x00000074 +aest Node Interrupt Array Size: 0x00000001 +aest Timestamp Rate: 0x0123456789abcdef +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0000000000000000 +aest Node-specific data (Processor): +aest ACPI Processor ID: 0x0000fecd +aest Resource Type: 0x00 +aest Reserved: 0x00 +aest Flags: 0x00 +aest Revision: 0x00 +aest Processor affinity lvl ind: 0x0123456789abcdef +aest Cache Reference: 0x22223333 +aest Reserved: 0x00000000 +aest Interface: +aest Interface Type: 0x01 +aest Reserved: 0x00000000 +aest Flags: 0x00000002 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest Interrupt Array +aest Interrupt Type: 0x01 +aest Reserved: 0x0000 +aest Interrupt Flags: 0x00 +aest Interrupt GSIV: 0x78abcdef +aest ID: 0x56 +aest Reserved1: 0x00000000 +aest +aest AEST node structure: +aest Type: 0x00 +aest Length: 0x0074 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000044 +aest Offset to Node Interrupt Array: 0x00000000 +aest Node Interrupt Array Size: 0x00000000 +aest Timestamp Rate: 0x0123456789abcdef +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0000000000000000 +aest Node-specific data (Processor): +aest ACPI Processor ID: 0x00001111 +aest Resource Type: 0x01 +aest Reserved: 0x00 +aest Flags: 0x01 +aest Revision: 0x00 +aest Processor affinity lvl ind: 0x0123456789abcdef +aest TLB Reference: 0x67676767 +aest Reserved: 0x00000000 +aest Interface: +aest Interface Type: 0x00 +aest Reserved: 0x00000000 +aest Flags: 0x00000003 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest +aest AEST node structure: +aest Type: 0x01 +aest Length: 0x0060 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000030 +aest Offset to Node Interrupt Array: 0x00000000 +aest Node Interrupt Array Size: 0x00000000 +aest Timestamp Rate: 0x0000000000000000 +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0123456789abcdef +aest Node-specific data (Memory Controller): +aest Proximity Domain: 0x0000aaaa +aest Interface: +aest Interface Type: 0x01 +aest Reserved: 0x00000000 +aest Flags: 0x00000001 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest +aest AEST node structure: +aest Type: 0x02 +aest Length: 0x0064 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000034 +aest Offset to Node Interrupt Array: 0x00000000 +aest Node Interrupt Array Size: 0x00000000 +aest Timestamp Rate: 0x0000000000000000 +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0123456789abcdef +aest Node-specific data (SMMU): +aest IORT Node Reference: 0x55555555 +aest SMMU-specific Data Subcomponent Reference: 0x66666666 +aest Interface: +aest Interface Type: 0x01 +aest Reserved: 0x00000000 +aest Flags: 0x00000003 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest +aest AEST node structure: +aest Type: 0x03 +aest Length: 0x0074 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000044 +aest Offset to Node Interrupt Array: 0x00000000 +aest Node Interrupt Array Size: 0x00000000 +aest Timestamp Rate: 0x0000000000000000 +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0123456789abcdef +aest Node-specific data (Vendor-defined): +aest Hardware ID: 0x33333333 +aest SMMU-specific Data Subcomponent Reference: 0x44444444 +aest Vendor-specific data: +aest 0000: 12 23 34 45 56 67 78 89 9A AB BC CD DE EF FF 55 .#4EVgx........U +aest Interface: +aest Interface Type: 0x01 +aest Reserved: 0x00000000 +aest Flags: 0x00000002 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest +aest AEST node structure: +aest Type: 0x04 +aest Length: 0x007c +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000034 +aest Offset to Node Interrupt Array: 0x00000064 +aest Node Interrupt Array Size: 0x00000002 +aest Timestamp Rate: 0x0000000000000000 +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0123456789abcdef +aest Node-specific data (GIC): +aest Interface Type: 0x00000003 +aest Instance Identifier: 0x77778888 +aest Interface: +aest Interface Type: 0x00 +aest Reserved: 0x00000000 +aest Flags: 0x00000003 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest Interrupt Array +aest Interrupt Type: 0x00 +aest Reserved: 0x0000 +aest Interrupt Flags: 0x00 +aest Interrupt GSIV: 0xaaaabbbb +aest ID: 0xcc +aest Reserved1: 0x00000000 +aest Interrupt Array +aest Interrupt Type: 0x01 +aest Reserved: 0x0000 +aest Interrupt Flags: 0x01 +aest Interrupt GSIV: 0x78abcdef +aest ID: 0x56 +aest Reserved1: 0x00000000 +aest +aest PASSED: Test 1, No issues found in AEST table. +aest +aest ========================================================== +aest 1 passed, 0 failed, 0 warning, 0 aborted, 0 skipped, 0 +aest info only. +aest ========================================================== diff --git a/fwts-test/aest-0001/aest-0002.log b/fwts-test/aest-0001/aest-0002.log new file mode 100644 index 00000000..3f604cd3 --- /dev/null +++ b/fwts-test/aest-0001/aest-0002.log @@ -0,0 +1,221 @@ +aest aest: AEST Arm Error Source Table test. +aest ---------------------------------------------------------- +aest Test 1 of 1: Validate AEST table. +aest AEST Arm Error Source Table: +aest AEST node structure: +aest Type: 0x00 +aest Length: 0x0080 +aest Reserved: 0x02 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000044 +aest Offset to Node Interrupt Array: 0x00000074 +aest Node Interrupt Array Size: 0x00000001 +aest Timestamp Rate: 0x0123456789abcdef +aest Reserved1: 0x0000000001000000 +aest Error Injection Countdown Rate: 0x0000000000000000 +aest FAILED [MEDIUM] AESTReservedNonZero: Test 1, AEST Reserved +aest field must be zero, got 0x02 instead +aest FAILED [MEDIUM] AESTReservedNonZero: Test 1, AEST +aest Reserved1 field must be zero, got 0x0000000001000000 +aest instead +aest Node-specific data (Processor): +aest ACPI Processor ID: 0x0000fecd +aest Resource Type: 0x00 +aest Reserved: 0x01 +aest Flags: 0x10 +aest Revision: 0x00 +aest Processor affinity lvl ind: 0x0123456789abcdef +aest FAILED [MEDIUM] AESTReservedNonZero: Test 1, AEST Reserved +aest field must be zero, got 0x01 instead +aest FAILED [HIGH] AESTReservedBitsNonZero: Test 1, AEST Flags +aest Bits [7..2] must be zero, got 0x10 instead +aest Cache Reference: 0x22223333 +aest Reserved: 0x00000100 +aest FAILED [MEDIUM] AESTReservedNonZero: Test 1, AEST Reserved +aest field must be zero, got 0x00000100 instead +aest Interface: +aest Interface Type: 0x01 +aest Reserved: 0x00000000 +aest Flags: 0x00000002 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest Interrupt Array +aest Interrupt Type: 0x05 +aest Reserved: 0x0001 +aest Interrupt Flags: 0x03 +aest Interrupt GSIV: 0x78abcdef +aest ID: 0x56 +aest Reserved1: 0x00000000 +aest FAILED [MEDIUM] AESTReservedNonZero: Test 1, AEST Reserved +aest field must be zero, got 0x0001 instead +aest FAILED [HIGH] AESTReservedBitsNonZero: Test 1, AEST +aest Interrupt Type Bits [7..2] must be zero, got 0x05 instead +aest FAILED [HIGH] AESTReservedBitsNonZero: Test 1, AEST +aest Interrupt Flags Bits [31..1] must be zero, got 0x03 +aest instead +aest FAILED [HIGH] AESTBadSubTableType: Test 1, AEST must have +aest subtable with Type 0..2, got 5 instead +aest +aest AEST node structure: +aest Type: 0x00 +aest Length: 0x0074 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000044 +aest Offset to Node Interrupt Array: 0x00000000 +aest Node Interrupt Array Size: 0x00000000 +aest Timestamp Rate: 0x0123456789abcdef +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0000000000000000 +aest Node-specific data (Processor): +aest ACPI Processor ID: 0x00001111 +aest Resource Type: 0x01 +aest Reserved: 0x00 +aest Flags: 0x01 +aest Revision: 0x00 +aest Processor affinity lvl ind: 0x0123456789abcdef +aest TLB Reference: 0x67676767 +aest Reserved: 0x00020000 +aest FAILED [MEDIUM] AESTReservedNonZero: Test 1, AEST Reserved +aest field must be zero, got 0x00020000 instead +aest Interface: +aest Interface Type: 0x00 +aest Reserved: 0x00000001 +aest Flags: 0x00000005 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest FAILED [MEDIUM] AESTReservedNonZero: Test 1, AEST Reserved +aest field must be zero, got 0x00000001 instead +aest FAILED [HIGH] AESTReservedBitsNonZero: Test 1, AEST Flags +aest Bits [31..2] must be zero, got 0x00000005 instead +aest +aest AEST node structure: +aest Type: 0x01 +aest Length: 0x0060 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000030 +aest Offset to Node Interrupt Array: 0x00000000 +aest Node Interrupt Array Size: 0x00000000 +aest Timestamp Rate: 0x0000000000000000 +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0123456789abcdef +aest Node-specific data (Memory Controller): +aest Proximity Domain: 0x0000aaaa +aest Interface: +aest Interface Type: 0x04 +aest Reserved: 0x00000000 +aest Flags: 0x00000001 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest FAILED [HIGH] AESTBadSubTableType: Test 1, AEST must have +aest subtable with Type 0..2, got 4 instead +aest +aest AEST node structure: +aest Type: 0x02 +aest Length: 0x0064 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000034 +aest Offset to Node Interrupt Array: 0x00000000 +aest Node Interrupt Array Size: 0x00000000 +aest Timestamp Rate: 0x0000000000000000 +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0123456789abcdef +aest Node-specific data (SMMU): +aest IORT Node Reference: 0x55555555 +aest SMMU-specific Data Subcomponent Reference: 0x66666666 +aest Interface: +aest Interface Type: 0x01 +aest Reserved: 0x00000000 +aest Flags: 0x00000003 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest +aest AEST node structure: +aest Type: 0x03 +aest Length: 0x0074 +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000044 +aest Offset to Node Interrupt Array: 0x00000000 +aest Node Interrupt Array Size: 0x00000000 +aest Timestamp Rate: 0x0000000000000000 +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0123456789abcdef +aest Node-specific data (Vendor-defined): +aest Hardware ID: 0x33333333 +aest SMMU-specific Data Subcomponent Reference: 0x44444444 +aest Vendor-specific data: +aest 0000: 12 23 34 45 56 67 78 89 9A AB BC CD DE EF FF 55 .#4EVgx........U +aest Interface: +aest Interface Type: 0x01 +aest Reserved: 0x00000000 +aest Flags: 0x00000002 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest +aest AEST node structure: +aest Type: 0x04 +aest Length: 0x007c +aest Reserved: 0x00 +aest Offset to Node-specific data: 0x0000002c +aest Offset to Node Interface: 0x00000034 +aest Offset to Node Interrupt Array: 0x00000064 +aest Node Interrupt Array Size: 0x00000002 +aest Timestamp Rate: 0x0000000000000000 +aest Reserved1: 0x0000000000000000 +aest Error Injection Countdown Rate: 0x0123456789abcdef +aest Node-specific data (GIC): +aest Interface Type: 0x00000003 +aest Instance Identifier: 0x77778888 +aest Interface: +aest Interface Type: 0x00 +aest Reserved: 0x00000000 +aest Flags: 0x00000003 +aest Base Address: 0x0123456789abcdef +aest Start Error Record Index: 0x00000000 +aest Number Of Error Records: 0x00000001 +aest Error Record Implemented: 0x0000000000000001 +aest Status Reporting Supported: 0x0000000000000000 +aest Addressing Mode: 0x0000000001111111 +aest Interrupt Array +aest Interrupt Type: 0x00 +aest Reserved: 0x0000 +aest Interrupt Flags: 0x00 +aest Interrupt GSIV: 0xaaaabbbb +aest ID: 0xcc +aest Reserved1: 0x00000000 +aest Interrupt Array +aest Interrupt Type: 0x01 +aest Reserved: 0x0000 +aest Interrupt Flags: 0x01 +aest Interrupt GSIV: 0x78abcdef +aest ID: 0x56 +aest Reserved1: 0x00000000 +aest +aest +aest ========================================================== +aest 0 passed, 13 failed, 0 warning, 0 aborted, 0 skipped, 0 +aest info only. +aest ========================================================== diff --git a/fwts-test/aest-0001/test-0001.sh b/fwts-test/aest-0001/test-0001.sh new file mode 100755 index 00000000..fbb2a245 --- /dev/null +++ b/fwts-test/aest-0001/test-0001.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +TEST="Test acpitables against AEST" +NAME=test-0001.sh +TMPLOG=$TMP/aest.log.$$ + +$FWTS --show-tests | grep aest > /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/aest-0001/acpidump-0001.log aest - | cut -c7- | grep "^aest" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/aest-0001/aest-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/aest-0001/test-0002.sh b/fwts-test/aest-0001/test-0002.sh new file mode 100755 index 00000000..9a0ba90f --- /dev/null +++ b/fwts-test/aest-0001/test-0002.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +TEST="Test acpitables against AEST" +NAME=test-0001.sh +TMPLOG=$TMP/aest.log.$$ + +$FWTS --show-tests | grep aest > /dev/null +if [ $? -eq 1 ]; then + echo SKIP: $TEST, $NAME + exit 77 +fi + +$FWTS --log-format="%line %owner " -w 80 --dumpfile=$FWTSTESTDIR/aest-0001/acpidump-0002.log aest - | cut -c7- | grep "^aest" > $TMPLOG +diff $TMPLOG $FWTSTESTDIR/aest-0001/aest-0002.log >> $FAILURE_LOG +ret=$? +if [ $ret -eq 0 ]; then + echo PASSED: $TEST, $NAME +else + echo FAILED: $TEST, $NAME +fi + +rm $TMPLOG +exit $ret