From nobody Mon May 6 18:48:50 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=1630931799; cv=none; d=zohomail.com; s=zohoarc; b=jrRh5WL4RdxJvjRHEjP0UTLV11zRoeG7igTH6VBTRbMKqMuwMOxmIMdNVF0wGIv0o2hNEWO2Xp+M5OXaqGfjkzsp3jqV6HtHqBNAsecG+uGFvKMSDZrezAFftO529eBcA0y5N+J40wh70K4cpRjyDhMBUZvO2IyM4pnvw+3DX+0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630931799; 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=LK6aUScJjJPwZ8zofjWt0AwCUuJ5xKj9bLlJfK1d/s4=; b=XjQKIZNDPiqPbnONzLw+1QOESnb3FCR8ZMlnqhHW2Z6a3DJm6nVJ1JXRZoPzLUdcJV4IsHRdqi2WOPMHFNtvpnoRj1Fvl4Z8I8nFGUebE5/6HuTJry9EA6/DdpcEhY/j0PNUQUkdMQg1c9FV8bQw87C7mUpO1E2GjqJBjM8lkxY= 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 1630931799953240.76729265467577; Mon, 6 Sep 2021 05:36:39 -0700 (PDT) Received: from localhost ([::1]:35206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNDra-0008J6-FA for importer@patchew.org; Mon, 06 Sep 2021 08:36:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNDp5-0006JM-R7 for qemu-devel@nongnu.org; Mon, 06 Sep 2021 08:34:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNDn8-00020K-Rx for qemu-devel@nongnu.org; Mon, 06 Sep 2021 08:34:03 -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-379-k999USvkMp-GucyJo4X4OA-1; Mon, 06 Sep 2021 08:32:00 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CEC7188352B; Mon, 6 Sep 2021 12:31:59 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.194.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 128AD1B42C; Mon, 6 Sep 2021 12:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630931521; 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=LK6aUScJjJPwZ8zofjWt0AwCUuJ5xKj9bLlJfK1d/s4=; b=VgooU4+whK5paTblLmbt7TZKu2CLbP3L50ZIL/MKq+M6FAY9O5pF23czEeqOUJWqcMsMo2 p8Sw34Yrko8QuUO839seCOk0ej6T5fD+zAJgDcXigySWNIPzSQvtOE2gmK9hZkR/6azegj 9ZkoSK2EAaPuPo55TP9wAqSxDC6sqZ0= X-MC-Unique: k999USvkMp-GucyJo4X4OA-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 v2 1/3] tests/acpi: Add void table for virt/DBG2 bios-tables-test Date: Mon, 6 Sep 2021 14:31:37 +0200 Message-Id: <20210906123139.93593-2-eric.auger@redhat.com> In-Reply-To: <20210906123139.93593-1-eric.auger@redhat.com> References: <20210906123139.93593-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-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: 1630931802513100001 Content-Type: text/plain; charset="utf-8" Add placeholders for DBG2 reference table for virt tests and ignore this later for the time being. Signed-off-by: Eric Auger Acked-by: Igor Mammedov --- tests/data/acpi/virt/DBG2 | 0 tests/qtest/bios-tables-test-allowed-diff.h | 1 + 2 files changed, 1 insertion(+) create mode 100644 tests/data/acpi/virt/DBG2 diff --git a/tests/data/acpi/virt/DBG2 b/tests/data/acpi/virt/DBG2 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index dfb8523c8bf..1910d154c27 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", --=20 2.26.3 From nobody Mon May 6 18:48:50 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=1630931970; cv=none; d=zohomail.com; s=zohoarc; b=KGwei1gTeLzr+wy3ROCEsQp3cgqVUUjSMG+vN0k/rlNv/j14HXpRoda4LSDA5seDIi5u9YjIuKz/DE0KW9I33u3a4gcg+XCJkE0V02/znYKentBqf6tgy0Rc3iKMFedEaGk6RGtqjz8bJ54d5QszALeLwA2GIC5ZMHQseDBijpI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630931970; 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=/xGWfUE5JQ/6EyPpmz2NMgwV9wg2v3SSamm12NpONbQ=; b=dM7sm2YLV0elPgE7gIoAKbpXqWq2XbEX5E2s3XIZnkNaLEXnHp2l1QuKJEIQDUyxrzANK5R64o76/kIVwx3zz/iOXhvuXviLvnvr7gUo2pRkc2LbaEnVHM2P/RzM1pu1J4+d6dPnK0KYjBa8JZJBdManRNOVfKaxLeHkddoEJcI= 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 1630931970602650.2215567626174; Mon, 6 Sep 2021 05:39:30 -0700 (PDT) Received: from localhost ([::1]:39860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNDuL-00030k-1w for importer@patchew.org; Mon, 06 Sep 2021 08:39:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNDp9-0006Jt-Gl for qemu-devel@nongnu.org; Mon, 06 Sep 2021 08:34:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNDnC-000210-LI for qemu-devel@nongnu.org; Mon, 06 Sep 2021 08:34:06 -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-494-fJnPjUgMMxCfnR9D5s0vyw-1; Mon, 06 Sep 2021 08:32:04 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 27D0F107ACCA; Mon, 6 Sep 2021 12:32:03 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.194.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71BD71B42C; Mon, 6 Sep 2021 12:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630931525; 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=/xGWfUE5JQ/6EyPpmz2NMgwV9wg2v3SSamm12NpONbQ=; b=ZGci9Jtl/zAJPw1IKMC3sTQYubDt5ZyiWjs5jN8gObPsVy4yljQwSucu6b3vNeK09VCMNd GRJzIfx0w8xIBk8wHLYa6JJSSRKINJS296HWvvmM3zbXC6fDx1e6E70qOhOwvR34KCfkwc oJSSwDyJkkWlgzWFYTblfFJmLAY7EkA= X-MC-Unique: fJnPjUgMMxCfnR9D5s0vyw-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 v2 2/3] bios-tables-test: Generate reference table for virt/DBG2 Date: Mon, 6 Sep 2021 14:31:38 +0200 Message-Id: <20210906123139.93593-3-eric.auger@redhat.com> In-Reply-To: <20210906123139.93593-1-eric.auger@redhat.com> References: <20210906123139.93593-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-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: 1630931971196100001 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 --- 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 : 002F [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/data/acpi/virt/DBG2 | Bin 0 -> 87 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/virt/DBG2 b/tests/data/acpi/virt/DBG2 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..895679cec0732f4109322b59b53= 2e904885e1cca 100644 GIT binary patch literal 87 zcmZ>9ayJTRU|?WA;pFe^5v<@85#X!<1dKp25F14605OPW&}U#|Wl#gL7#JFufrJ=3D? V5(5JVSdtSgD!{}2A literal 0 HcmV?d00001 diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios= -tables-test-allowed-diff.h index 1910d154c27..dfb8523c8bf 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", --=20 2.26.3 From nobody Mon May 6 18:48:50 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=1630931976; cv=none; d=zohomail.com; s=zohoarc; b=CdyuspZN6ftiYurRNX+wecJTv2XTYDgRSwFg7D6nkOs/KH9BPH+lsCiVJaAx4Ljxpdje/Be4TwUmtVMhRJdG3QT9qWHM8boi2H3N7TYYQPKCTHXMl5RzmTZsDVUuNHZ69C2KT6Cyknpc5kQe6w9NAsTkYW2W5IoM6AbDr2XnJeE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630931976; 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=LveBQff8aq/vpMgg77GLqQotmwHLCIyfEeYr0nw6Rhw=; b=IG9oN+6Ef5BHTBEi3K/BmLcMEZbyHtcgciwBie4lLGQkWHf8v6oFyE4A2Jzqf+ptOxTCdtUQhdCW6Z+JUNOyHGpopFJ5myJGxKa3o9o4XUc3k8pBN8TLoTuZUaBDgiYzh838PdMsHSzWMEmMGsuViSzzRgK1N1axk3/AfxTHnag= 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 1630931976145411.3071086302816; Mon, 6 Sep 2021 05:39:36 -0700 (PDT) Received: from localhost ([::1]:40066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNDuQ-00039u-Uu for importer@patchew.org; Mon, 06 Sep 2021 08:39:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNDpB-0006KC-EA for qemu-devel@nongnu.org; Mon, 06 Sep 2021 08:34:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26487) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNDnE-00021T-To for qemu-devel@nongnu.org; Mon, 06 Sep 2021 08:34:09 -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-554-wu_zm4JgPKiETqnVTi4hSw-1; Mon, 06 Sep 2021 08:32:07 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 483956D253; Mon, 6 Sep 2021 12:32:06 +0000 (UTC) Received: from laptop.redhat.com (unknown [10.39.194.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7CC8A77F2C; Mon, 6 Sep 2021 12:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630931528; 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=LveBQff8aq/vpMgg77GLqQotmwHLCIyfEeYr0nw6Rhw=; b=FlqFG2VYalmH/rrSk48GsetifvavV/jhqDfhJquHUaqLA/fDeAmmFfIaDqiq4ctYgvB3Xk AGhU/HllAfZg1HRLlZygWVle+n3Qo+WBIAUM4oDHifLSrEJbGWlUfEOlhkAfNWAvnqg5Mv IvQhk7QIm/fxGAMPaXufltpfBbH1CT4= X-MC-Unique: wu_zm4JgPKiETqnVTi4hSw-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 v2 3/3] hw/arm/virt_acpi_build: Generate DBG2 table Date: Mon, 6 Sep 2021 14:31:39 +0200 Message-Id: <20210906123139.93593-4-eric.auger@redhat.com> In-Reply-To: <20210906123139.93593-1-eric.auger@redhat.com> References: <20210906123139.93593-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-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: 1630931977694100001 Content-Type: text/plain; charset="utf-8" ARM SBBR specification mandates DBG2 table (Debug Port Table 2). this latter 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: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debu= g-port-table?redirectedfrom=3DMSDN Signed-off-by: Eric Auger --- v1 -> v2: - rebased on Igor's refactoring --- hw/arm/virt-acpi-build.c | 64 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 488ea04eed7..de604e79779 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -512,6 +512,65 @@ build_gtdt(GArray *table_data, BIOSLinker *linker, Vir= tMachineState *vms) acpi_table_composed(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, baseaddroffset =3D 22, namespace_length; + char name[] =3D "COM0"; + + acpi_init_table(&table, table_data); + + namespace_length =3D sizeof name; + dbg2devicelength =3D baseaddroffset + + sizeof(struct AcpiGenericAddress) + 4 + namespace_l= ength; + + /* offset to the first debug struct */ + build_append_int_noprefix(table_data, 44, 4); + /* number of debug device info struct entries */ + build_append_int_noprefix(table_data, 1, 4); + + /* debug device info structure */ + /* revision */ + build_append_int_noprefix(table_data, 0, 1); + /* length */ + build_append_int_noprefix(table_data, dbg2devicelength, 2); + /* register count */ + build_append_int_noprefix(table_data, 1, 1); + /* name path length */ + build_append_int_noprefix(table_data, namespace_length, 2); + /* name path offset */ + build_append_int_noprefix(table_data, 38, 2); + /* oem data length */ + build_append_int_noprefix(table_data, 0, 2); + /* oem data offset (0 means no OEM data) */ + build_append_int_noprefix(table_data, 0, 2); + /* port type (serial port) */ + build_append_int_noprefix(table_data, 0x8000, 2); + /* port subtype (ARM PL011)*/ + build_append_int_noprefix(table_data, 0x3, 2); + /* reserved */ + build_append_int_noprefix(table_data, 0, 2); + /* base address offset */ + build_append_int_noprefix(table_data, 22, 2); + /* address size offset */ + 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 (PL011 UART length) */ + build_append_int_noprefix(table_data, 0x1000, 4); + + /* NamespaceString */ + g_array_append_vals(table_data, name, namespace_length); + + acpi_table_composed(linker, &table); +}; + /* * ACPI spec, Revision 5.1 Errata A * 5.2.12 Multiple APIC Description Table (MADT) @@ -770,7 +829,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 @@ -793,6 +852,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