From nobody Thu May 9 08:37:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1633591895; cv=none; d=zohomail.com; s=zohoarc; b=cUAFiPCyEWqBoDfAUeM1iySjMIcntiK0JbnVIZIEJNvZi/eeU8uIDTX7zF5Ya+sxz6J5+iCXOPoNQS+ZHLNo9fWHy7joRLWQu1PtgXBTUDxuQh6A4f8ZZAzAhmvg3u5w71kFpKEPrLQ/VOB4brh5tY/mvNIH+TOPfuxaQXs29DQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633591895; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bM3cMotIMIofTfKKE5PUDnBdYsTdWkm6JiJ3Kx4oT0s=; b=DkhBXdY2v+TBJU3j4NDvcnoHW8kufK3kxUGHCoyRh1jFeX9bbkuCW/pz390ezCo0dGsg8bLpNicc5kSHfI765STGS1q+br6S6+4IbNKzn6b6MgpYW3wibx13lvpkTosRZOZzBQgqD49QtpgTt0adGec4JaoKQX5Rr2vGVMOmF14= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633591895776453.17901527888307; Thu, 7 Oct 2021 00:31:35 -0700 (PDT) Received: from localhost ([::1]:41208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYNsM-000191-0p for importer@patchew.org; Thu, 07 Oct 2021 03:31:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYNqc-0007B5-7x for qemu-devel@nongnu.org; Thu, 07 Oct 2021 03:29:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:60456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYNqY-00020a-PS for qemu-devel@nongnu.org; Thu, 07 Oct 2021 03:29:45 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-53-AbbksK9NPMmU1W7ygOXa6A-1; Thu, 07 Oct 2021 03:29:40 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 27FA719253C0; Thu, 7 Oct 2021 07:29:39 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6243610013C1; Thu, 7 Oct 2021 07:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633591781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bM3cMotIMIofTfKKE5PUDnBdYsTdWkm6JiJ3Kx4oT0s=; b=YUGr+Qs/2sVW3QsBzMr+Nq5sNQXtiXLnJTL9AqffBn3J9l+iOtLbC/ouQFItODs6LqY9VI 1lZl1TPx2Dn8rzxPq/uyEiZ8Ho/r0vY7ZpFWY3qxVAlFiw+6a0444nRwSREK35pUYBhszy 0qx0S0KwBBgzrKsLu3LNBN21xCj+gQ0= X-MC-Unique: AbbksK9NPMmU1W7ygOXa6A-1 From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, mst@redhat.com, imammedo@redhat.com, philmd@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, ardb@kernel.org, drjones@redhat.com Subject: [PATCH v4 1/3] tests/acpi: Add void table for virt/DBG2 bios-tables-test Date: Thu, 7 Oct 2021 09:29:20 +0200 Message-Id: <20211007072922.655330-2-eric.auger@redhat.com> In-Reply-To: <20211007072922.655330-1-eric.auger@redhat.com> References: <20211007072922.655330-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eric.auger@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=eric.auger@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.05, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gshan@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633591898296100001 Content-Type: text/plain; charset="utf-8" Add placeholders for DBG2 reference table for virt tests and ignore till reference blob is added. Signed-off-by: Eric Auger Acked-by: Igor Mammedov Acked-by: Michael S. Tsirkin --- v3 -> v4: - added Michael's A-b v2 -> v3: - commit msg rewording according to Igor's suggestion and added Igor's A-b. --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/data/acpi/virt/DBG2 | 0 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/virt/DBG2 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8b..1910d154c2 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/virt/DBG2", diff --git a/tests/data/acpi/virt/DBG2 b/tests/data/acpi/virt/DBG2 new file mode 100644 index 0000000000..e69de29bb2 --=20 2.26.3 From nobody Thu May 9 08:37:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1633592040; cv=none; d=zohomail.com; s=zohoarc; b=nbP24/N3EW+dclAB5jOFtSpluL2En9N7SlRtT+TUOuuThlKxSYTqW/eN6/DZtvoY/WULJYd5D3QpBB43Lw9l75aaI9EB6f9/RzwUEygYeodSkCW7rsF5JvtXLidZX5dqleBkjD6WdAYaNPMKx/K3PTG45Knv6updpLCG78GvitI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633592040; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OtsQrBTSZxnze/3PFKDuMZdI/yapTOY94mDoz2wrV3U=; b=j3KjqjXfZIZx8heEuL0kOJV3xpgxqk15cI9syUZjBjxRzoR58ZxFDyEv0tY1tqeYdLlORHvqgZjIHwzMAPFPohD9YsFZrB7toPkig9jKyEbWJ8yT/lhkh/bCsHFiLRgtmohy/3iAHKvU7G30nQfxy8XmjEk/JmNf2dwbtqOzROw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633592040609564.1406765922688; Thu, 7 Oct 2021 00:34:00 -0700 (PDT) Received: from localhost ([::1]:47300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYNuh-0005Fn-HK for importer@patchew.org; Thu, 07 Oct 2021 03:33:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYNqe-0007EZ-3O for qemu-devel@nongnu.org; Thu, 07 Oct 2021 03:29:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYNqb-00022l-H3 for qemu-devel@nongnu.org; Thu, 07 Oct 2021 03:29:47 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-350-fQuwCeVQOaejh9FDPgKk0w-1; Thu, 07 Oct 2021 03:29:43 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 350875074B; Thu, 7 Oct 2021 07:29:42 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E2D410013C1; Thu, 7 Oct 2021 07:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633591784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OtsQrBTSZxnze/3PFKDuMZdI/yapTOY94mDoz2wrV3U=; b=G0wli1iSE9w13mbe2YYllmYkzGkSgIAHtSwL4ehLBpodd4g9SoFzJKf4f0WqA3BSbtlfI9 9bHjqszOjNnrkvRmCnLIFW0ag/VYUZ3i9JbnFvmW4xAbXTjMWsSAR6Rmo55h8qRN33uSfh QgOyDkFWH6ybB/RKgk5yz5zotE9UQxg= X-MC-Unique: fQuwCeVQOaejh9FDPgKk0w-1 From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, mst@redhat.com, imammedo@redhat.com, philmd@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, ardb@kernel.org, drjones@redhat.com Subject: [PATCH v4 2/3] hw/arm/virt_acpi_build: Generate DBG2 table Date: Thu, 7 Oct 2021 09:29:21 +0200 Message-Id: <20211007072922.655330-3-eric.auger@redhat.com> In-Reply-To: <20211007072922.655330-1-eric.auger@redhat.com> References: <20211007072922.655330-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eric.auger@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=eric.auger@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.05, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gshan@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633592041717100001 Content-Type: text/plain; charset="utf-8" ARM SBBR specification mandates DBG2 table (Debug Port Table 2) since v1.0 (ARM DEN0044F 8.3.1.7 DBG2). The DBG2 table allows to describe one or more debug ports. Generate an DBG2 table featuring a single debug port, the PL011. The DBG2 specification can be found at "Microsoft Debug Port Table 2 (DBG2)" https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debu= g-port-table?redirectedfrom=3DMSDN Signed-off-by: Eric Auger Acked-by: Michael S. Tsirkin Reviewed-by: Andrew Jones Reviewed-by: Igor Mammedov --- v3 -> v4: - Change the revision in the header (0), + vs comments, s/0x1000/vms->memmap[VIRT_UART].size - Added Michael's A-b v2 -> v3: Took into account all comments from Igor on v2: mostly style adjustment, revision references v1 -> v2: - rebased on Igor's refactoring --- hw/arm/virt-acpi-build.c | 63 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 6cec97352b..dd17a48c00 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -616,6 +616,64 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Vir= tMachineState *vms) acpi_table_end(linker, &table); } =20 +/* Debug Port Table 2 (DBG2) */ +static void +build_dbg2(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) +{ + AcpiTable table =3D { .sig =3D "DBG2", .rev =3D 0, .oem_id =3D vms->oe= m_id, + .oem_table_id =3D vms->oem_table_id }; + int dbg2devicelength; + const char name[] =3D "COM0"; + const int namespace_length =3D sizeof(name); + + acpi_table_begin(&table, table_data); + + dbg2devicelength =3D 22 + /* BaseAddressRegister[] offset */ + 12 + /* BaseAddressRegister[] */ + 4 + /* AddressSize[] */ + namespace_length /* NamespaceString[] */; + + /* OffsetDbgDeviceInfo */ + build_append_int_noprefix(table_data, 44, 4); + /* NumberDbgDeviceInfo */ + build_append_int_noprefix(table_data, 1, 4); + + /* Table 2. Debug Device Information structure format */ + build_append_int_noprefix(table_data, 0, 1); /* Revision */ + build_append_int_noprefix(table_data, dbg2devicelength, 2); /* Length = */ + /* NumberofGenericAddressRegisters */ + build_append_int_noprefix(table_data, 1, 1); + /* NameSpaceStringLength */ + build_append_int_noprefix(table_data, namespace_length, 2); + build_append_int_noprefix(table_data, 38, 2); /* NameSpaceStringOffset= */ + build_append_int_noprefix(table_data, 0, 2); /* OemDataLength */ + /* OemDataOffset (0 means no OEM data) */ + build_append_int_noprefix(table_data, 0, 2); + + /* Port Type */ + build_append_int_noprefix(table_data, 0x8000 /* Serial */, 2); + /* Port Subtype */ + build_append_int_noprefix(table_data, 0x3 /* ARM PL011 UART */, 2); + build_append_int_noprefix(table_data, 0, 2); /* Reserved */ + /* BaseAddressRegisterOffset */ + build_append_int_noprefix(table_data, 22, 2); + /* AddressSizeOffset */ + build_append_int_noprefix(table_data, 34, 2); + + /* BaseAddressRegister[] */ + build_append_gas(table_data, AML_AS_SYSTEM_MEMORY, 8, 0, 1, + vms->memmap[VIRT_UART].base); + + /* AddressSize[] */ + build_append_int_noprefix(table_data, + vms->memmap[VIRT_UART].size, 4); + + /* NamespaceString[] */ + g_array_append_vals(table_data, name, namespace_length); + + acpi_table_end(linker, &table); +}; + /* * ACPI spec, Revision 5.1 Errata A * 5.2.12 Multiple APIC Description Table (MADT) @@ -875,7 +933,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTa= bles *tables) dsdt =3D tables_blob->len; build_dsdt(tables_blob, tables->linker, vms); =20 - /* FADT MADT GTDT MCFG SPCR pointed to by RSDT */ + /* FADT MADT GTDT MCFG SPCR DBG2 pointed to by RSDT */ acpi_add_table(table_offsets, tables_blob); build_fadt_rev5(tables_blob, tables->linker, vms, dsdt); =20 @@ -898,6 +956,9 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTa= bles *tables) acpi_add_table(table_offsets, tables_blob); build_spcr(tables_blob, tables->linker, vms); =20 + acpi_add_table(table_offsets, tables_blob); + build_dbg2(tables_blob, tables->linker, vms); + if (vms->ras) { build_ghes_error_table(tables->hardware_errors, tables->linker); acpi_add_table(table_offsets, tables_blob); --=20 2.26.3 From nobody Thu May 9 08:37:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1633592195; cv=none; d=zohomail.com; s=zohoarc; b=lxNYQAQPFwDaazx0hSOlKS3pbdSXrTdk0krk3TUlsdbWFRONR2fWSA6NInfKKcjpJxhj0CcDtkGnvb2zvZ//YiPzCKPKfSzby7guC+XJCZIVqHQuMSIwG3TzFfFHW560lsoRh/8bI5A9FiqSELWPepQvbRbLuIzwqlhtpVTnQvQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633592195; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=l85TH9vALhSu3lra4HPn6GHLOeLPCI6Zp3E2VbDT0Sc=; b=SA9CWZXqaPfS7iu2utD9uMkSp0G63rn0hKt/+97TGpYZrfMQzxmR5+tyBTzvx1xCAQipZMhYP2L5IWtQ3X+K21pKHczu+Pdk22AJ+8vNsdHZwWmbzH8vUBy4oJ/xSA0VcBMWGn1rOlnnlFQtL7L0+TYAvBogyhR4W5pa/JdsPZM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1633592195159182.3047777194928; Thu, 7 Oct 2021 00:36:35 -0700 (PDT) Received: from localhost ([::1]:54554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYNxC-0001lp-4t for importer@patchew.org; Thu, 07 Oct 2021 03:36:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYNqf-0007Ll-Th for qemu-devel@nongnu.org; Thu, 07 Oct 2021 03:29:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYNqe-000264-9B for qemu-devel@nongnu.org; Thu, 07 Oct 2021 03:29:49 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-5M-7KDlCMmO3K3JR201Ifw-1; Thu, 07 Oct 2021 03:29:46 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4DA90101F003; Thu, 7 Oct 2021 07:29:45 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.192.236]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8B15E10013C1; Thu, 7 Oct 2021 07:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633591787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=l85TH9vALhSu3lra4HPn6GHLOeLPCI6Zp3E2VbDT0Sc=; b=ZXQ7IfgXdA3nafsw1QcBaGY2HJiOIDijCHx/I1dNxy1IN/UWopB0V1XSRg6evU9zPnIb8l Ngf4FqZiH3iPbbzz1Bb8fEHqANQYxSS2VGZulcPOts6/xf/CPR2qALowps0TqLv+uysrqT Hge6BtHb4WabouYt7Yv+BOm4qaHI8vw= X-MC-Unique: 5M-7KDlCMmO3K3JR201Ifw-1 From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, mst@redhat.com, imammedo@redhat.com, philmd@redhat.com, peter.maydell@linaro.org, shannon.zhaosl@gmail.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org, ardb@kernel.org, drjones@redhat.com Subject: [PATCH v4 3/3] bios-tables-test: Generate reference table for virt/DBG2 Date: Thu, 7 Oct 2021 09:29:22 +0200 Message-Id: <20211007072922.655330-4-eric.auger@redhat.com> In-Reply-To: <20211007072922.655330-1-eric.auger@redhat.com> References: <20211007072922.655330-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eric.auger@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=eric.auger@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.05, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gshan@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633592196589100001 Content-Type: text/plain; charset="utf-8" Add the DBG2 table generated with tests/data/acpi/rebuild-expected-aml.sh Signed-off-by: Eric Auger Acked-by: Michael S. Tsirkin --- v3 -> v4 - adapted after the change in header revision - added Michael's A-b Tested by comparing the content with the table generated by EDK2 along with the SBSA-REF machine (code generated by DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c). I reused the Generic Address Structure filled by QEMU in the SPCR, ie. bit_width =3D 8 and byte access. While EDK2 sets bit_width =3D 32 and dword access. Also the name exposed by acpica tools is different: 'COM0' in my case where '\_SB.COM0' in SBSA-REF case? Here is the human readable content: [000h 0000 4] Signature : "DBG2" [Debug Port table = type 2] [004h 0004 4] Table Length : 00000057 [008h 0008 1] Revision : 00 [009h 0009 1] Checksum : C8 [00Ah 0010 6] Oem ID : "BOCHS " [010h 0016 8] Oem Table ID : "BXPC " [018h 0024 4] Oem Revision : 00000001 [01Ch 0028 4] Asl Compiler ID : "BXPC" [020h 0032 4] Asl Compiler Revision : 00000001 [024h 0036 4] Info Offset : 0000002C [028h 0040 4] Info Count : 00000001 [02Ch 0044 1] Revision : 00 [02Dh 0045 2] Length : 002B [02Fh 0047 1] Register Count : 01 [030h 0048 2] Namepath Length : 0005 [032h 0050 2] Namepath Offset : 0026 [034h 0052 2] OEM Data Length : 0000 [Optional field not pre= sent] [036h 0054 2] OEM Data Offset : 0000 [Optional field not pre= sent] [038h 0056 2] Port Type : 8000 [03Ah 0058 2] Port Subtype : 0003 [03Ch 0060 2] Reserved : 0000 [03Eh 0062 2] Base Address Offset : 0016 [040h 0064 2] Address Size Offset : 0022 [042h 0066 12] Base Address Register : [Generic Address Structure] [042h 0066 1] Space ID : 00 [SystemMemory] [043h 0067 1] Bit Width : 08 [044h 0068 1] Bit Offset : 00 [045h 0069 1] Encoded Access Width : 01 [Byte Access:8] [046h 0070 8] Address : 0000000009000000 [04Eh 0078 4] Address Size : 00001000 [052h 0082 5] Namepath : "COM0" --- tests/qtest/bios-tables-test-allowed-diff.h | 1 - tests/data/acpi/virt/DBG2 | Bin 0 -> 87 bytes 2 files changed, 1 deletion(-) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 1910d154c2..dfb8523c8b 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1,2 +1 @@ /* List of comma-separated changed AML files to ignore */ -"tests/data/acpi/virt/DBG2", diff --git a/tests/data/acpi/virt/DBG2 b/tests/data/acpi/virt/DBG2 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..86e6314f7b0235ef8ed3e0221e0= 9f996c41f5e98 100644 GIT binary patch literal 87 zcmZ>9ayJTR0D|*Q{>~o33QiFL&I&-l2owUbL9`AKgJ=3DeA21Zr}H4uw|p@A7lh%qQJ TFmQk+Il-a=3D3=3DGcxz6J~c3~mVl literal 0 HcmV?d00001 --=20 2.26.3