From nobody Fri May 17 10:44:24 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=1632750459; cv=none; d=zohomail.com; s=zohoarc; b=VG0RX+EALBKN7LRYhRNpwy8rWSiY2cAeBTLaxK7m3sF9gItHYo5UqnPHXWBo5+Ytb6NrJAMKMHO1Ns9X8sR/sQkyWWdEK+9Yi1PVekjWUK2wjb2U9Uz9pJHSDeGkyPkKOiZhWaXMdEWyVznbOYICbJ7iQG5yScg40lr29UXuTds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632750459; 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=2UF3tXFX/C0ARKDZ6oAL6a/PJdnT7KdiG/33xvqq9Vs=; b=LFYzGWm9B0XCBA505DhT5gmb6nJWjC84xG3t+DG9JANt4PJ+M/e8KwJ+wsbVczhTBwD+8WlWmDJAWi3RMy9Y+lE93Cinzcblq4CGS0r3YcunyZSdjmBulw9JL8BxCz+kLN/m1JizS87Ebj8HmfornF7Pnff+YVYItIK8DAnkfn8= 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 1632750459972170.55376563928382; Mon, 27 Sep 2021 06:47:39 -0700 (PDT) Received: from localhost ([::1]:47022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUqyo-0003PZ-Ro for importer@patchew.org; Mon, 27 Sep 2021 09:47:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUqWI-0005AW-LB for qemu-devel@nongnu.org; Mon, 27 Sep 2021 09:18:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39955) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUqWG-0002bK-Vf for qemu-devel@nongnu.org; Mon, 27 Sep 2021 09:18:10 -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-382-fxQeIfPiNJauYHrZ2FXY1A-1; Mon, 27 Sep 2021 09:18:07 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E6D0B10C9C60; Mon, 27 Sep 2021 13:18:05 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.194.179]) by smtp.corp.redhat.com (Postfix) with ESMTP id 422A919D9D; Mon, 27 Sep 2021 13:17:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632748688; 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=2UF3tXFX/C0ARKDZ6oAL6a/PJdnT7KdiG/33xvqq9Vs=; b=HTsX+H/DuSA2mlraC9JaNHp4vGz44G37oawwDrYQEpI6jh+PwtGUorEqcufbI+irwXIAL6 JE156z6Y2MkQf1DH6PaOmKw5wBIxH39+WBqdjXrG42e4zfwZuefZB0ElkiLI/0a8BU+p88 E5vpuCchEBuPiQDKGr8hpr4bkcvn0o8= X-MC-Unique: fxQeIfPiNJauYHrZ2FXY1A-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 v3 1/3] tests/acpi: Add void table for virt/DBG2 bios-tables-test Date: Mon, 27 Sep 2021 15:17:30 +0200 Message-Id: <20210927131732.63801-2-eric.auger@redhat.com> In-Reply-To: <20210927131732.63801-1-eric.auger@redhat.com> References: <20210927131732.63801-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: -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.001, 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=unavailable 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: 1632750461823100003 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 --- 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 Fri May 17 10:44:24 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=1632750679; cv=none; d=zohomail.com; s=zohoarc; b=h3a+6S/RseWG2ShNMKDwNYC2joDOEQCUHHHtf+IX7WYpQEKGh7JMhMFub1uuuogTLDyTHzqYbG7RmM99ueeiCINyKV/goTi4uYTxKaKRpaqYgjJyW94j1NAREvttjblPBWBEdVVSm0grNWRfILzkVzj4ppJmqBkhOSrpn5KyFvo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632750679; 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=PtEEJxhUKE9iyvBPM1pUE6AiR8kLESvhZixEtvcf0ug=; b=mq8onh4RnHMZAncKlqySJS5Ewm0hArbF9KW70VMfxBZjgwnmEbBjFv66DW4xoHT6oBgBvPZk5eVin/Mh1APQMgWggZmvt2oJDpi1f8drW97wckDyx2fuVOAeGkWa9wOCBocHJWSp8A/l5355aamxPvCKR5PN4aFrbbyDQnDbFaA= 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 1632750679031141.76652792233938; Mon, 27 Sep 2021 06:51:19 -0700 (PDT) Received: from localhost ([::1]:53226 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUr2M-0007hj-0U for importer@patchew.org; Mon, 27 Sep 2021 09:51:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUqWQ-0005NS-Pm for qemu-devel@nongnu.org; Mon, 27 Sep 2021 09:18:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:39776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUqWP-0002fO-2G for qemu-devel@nongnu.org; Mon, 27 Sep 2021 09:18:18 -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-31-tDLEGtboOKO4aB1xp7KiNg-1; Mon, 27 Sep 2021 09:18:15 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DB42919251A0; Mon, 27 Sep 2021 13:18:13 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.194.179]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A5D019729; Mon, 27 Sep 2021 13:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632748696; 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=PtEEJxhUKE9iyvBPM1pUE6AiR8kLESvhZixEtvcf0ug=; b=L/emXk5EASTLjSjdfFZNFrRBkhDFQyh0zmq+7bvd9ZmS61CrJYVNeJBaNKQ+xyvX2Dl6Id ou3Cv/HuGn/UXZIs5NyE8iLH37fXMMyykJh67eIPF4llmAFx4wdizSMinjJukgPF2T6BDz YX9abEbhQfyUXvp7XvWIMD3MDgdTLwE= X-MC-Unique: tDLEGtboOKO4aB1xp7KiNg-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 v3 2/3] hw/arm/virt_acpi_build: Generate DBG2 table Date: Mon, 27 Sep 2021 15:17:31 +0200 Message-Id: <20210927131732.63801-3-eric.auger@redhat.com> In-Reply-To: <20210927131732.63801-1-eric.auger@redhat.com> References: <20210927131732.63801-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: 1632750679772100001 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 --- 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 | 62 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 6cec97352b..257d0fee17 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -616,6 +616,63 @@ 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 3, .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, 0x1000 /* Register Space */, 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 +932,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 +955,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 Fri May 17 10:44:24 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=1632750823; cv=none; d=zohomail.com; s=zohoarc; b=Zp+UgRhWDkoXB8Iz7r41aMZOD0UgSuLYGRn5cybyTum2Zl8DtNJ/pRwKDLU31djavnCJUr5ZngZdYpwOM4eZj6OpfTrKJ+PpNqft8BPCFqinzuuM8SvQn5JhuJ6wFxrd1qYQUl08877/+3kSUJwtB1fziLxBJ+81kXna1lnAPrM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632750823; 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=0Fp7e0Pupmf9rRYDGH5MDdhZvQYuVVV9DiU/mxoz2zk=; b=bcOOFLSmtwVzzukGUb5WDEKAlPTnDMu2wMn9bEJd0VfJGLNjC22tIWRC/iap8CB7RcQcmMshqLS2rYBmu+pKXwdcsaNMvaNRO9udd1v7EpHF9y8XSuoXapjQDlKvyIXhWIYKD50cmJTJ5cqhFHP60coir65euWxuwjBex8AWzTs= 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 1632750823656867.4877027879552; Mon, 27 Sep 2021 06:53:43 -0700 (PDT) Received: from localhost ([::1]:59098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUr4g-00039q-NN for importer@patchew.org; Mon, 27 Sep 2021 09:53:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUqWW-0005bc-B0 for qemu-devel@nongnu.org; Mon, 27 Sep 2021 09:18:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:20918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUqWU-0002jJ-Hh for qemu-devel@nongnu.org; Mon, 27 Sep 2021 09:18:24 -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-205-f_iATHPfOZmgKWUQqG1I0w-1; Mon, 27 Sep 2021 09:18:20 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 76EE019251A4; Mon, 27 Sep 2021 13:18:19 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.194.179]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C2611A7E9; Mon, 27 Sep 2021 13:18:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632748701; 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=0Fp7e0Pupmf9rRYDGH5MDdhZvQYuVVV9DiU/mxoz2zk=; b=bEe0JpcGd0kzHHcbr6F9vb+nqNU/RSH6RUEfg2xfwKxIFX8w+1GbGAjg7YQSKxihmxLDDO XtzzeQwmACw/pyeppOV1T2h5MUj+/KTeV/JvPBRIj3uxeS+4f/EHZByw7Rq0XF7LonPHcX AT+kXkIZjYt2SWLq21dXwCZiaOyPuSk= X-MC-Unique: f_iATHPfOZmgKWUQqG1I0w-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 v3 3/3] bios-tables-test: Generate reference table for virt/DBG2 Date: Mon, 27 Sep 2021 15:17:32 +0200 Message-Id: <20210927131732.63801-4-eric.auger@redhat.com> In-Reply-To: <20210927131732.63801-1-eric.auger@redhat.com> References: <20210927131732.63801-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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: -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.001, 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: 1632750825784100001 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 --- 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 : 03 [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..23cd281683752a3ff628d042d29= 06169319013ac 100644 GIT binary patch literal 87 zcmZ>9ayJTRU|?WA}2A literal 0 HcmV?d00001 --=20 2.26.3