From nobody Sat Apr 20 00:41:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+104800+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104800+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1683901392; cv=none; d=zohomail.com; s=zohoarc; b=KzVS3IGIEClCEaFi4KfeHrMkZETjojiVQ/cl8aFriycOB8uF7PcHoCnmo7B9l+uAyfmkONuYAgvg2ePdUBkIIFuC6BdKjJ+x0FdYs7zPcirPQmFpqX04vCzDzC8wRJO0QENW3CcwzbXR5QKkhc+wE/18CjRzoWo+Jqyoh7OCdCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683901392; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=+IJsVpTbleIGcPkZH8+k7ILmd1+7Iw3TezQ4IRYomgg=; b=B8IDfXCGx4i7ovBJUHti2uDCROWjNQruSf6EMq2tc+jedsJMQRQFa/sf6RXhjoM21vtYX1Xa2iTspYKIvNUcs92AU7tLnt3xY2IG7DOO3GCqw+nBXKuhj/ze6kTCC357hjR3sU6VjyQGntLMQS9yZVhiS2QtdJvGCu5TBrUB6T0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104800+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1683901392341868.982752020386; Fri, 12 May 2023 07:23:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id gMM5YY1788612xHErKUbcIGq; Fri, 12 May 2023 07:23:12 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.26215.1683901391111675868 for ; Fri, 12 May 2023 07:23:11 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-217-VQdm2-e0ON-mXlR8xtWVQA-1; Fri, 12 May 2023 10:23:08 -0400 X-MC-Unique: VQdm2-e0ON-mXlR8xtWVQA-1 X-Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 70D89185A7A2; Fri, 12 May 2023 14:23:08 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CBFE1121314; Fri, 12 May 2023 14:23:08 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A51831800624; Fri, 12 May 2023 16:23:06 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Pawel Polawski , Sami Mujawar , Oliver Steffen , Ard Biesheuvel Subject: [edk2-devel] [PATCH 1/5] ArmVirt: add VirtioSerialDxe to ArmVirtQemu builds Date: Fri, 12 May 2023 16:23:02 +0200 Message-Id: <20230512142306.1323983-2-kraxel@redhat.com> In-Reply-To: <20230512142306.1323983-1-kraxel@redhat.com> References: <20230512142306.1323983-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: hkbcaBWx4PgyRu81tp8kClyQx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1683901392; bh=XW1u6R1JprNQi9xivo7yA2TsPT0lacx6y0fZ/FeDNW4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=DBgFjnED/JNI2kqcCiIjc2Lfjq7b0ZCxZ5urcZX+5/ZiFrtlvtV4ZZL0rDENvd7aABC I1QAnavRLZU3mFIdoKjLEO8lo6D1c4kjsZflYYOdogw9tWt+M27k7YGzF12UZHvHmYORO ymuqsYvdTbrqu+T1dTERJYYkdu3KpK/OLQA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1683901394143100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Gerd Hoffmann Acked-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 1 + ArmVirtPkg/ArmVirtQemuKernel.dsc | 1 + ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 1 + 3 files changed, 3 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 449e73b9e132..d998f816b2b3 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -448,6 +448,7 @@ [Components.common] OvmfPkg/VirtioScsiDxe/VirtioScsi.inf OvmfPkg/VirtioNetDxe/VirtioNet.inf OvmfPkg/VirtioRngDxe/VirtioRng.inf + OvmfPkg/VirtioSerialDxe/VirtioSerial.inf =20 # # FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKerne= l.dsc index 3cb9120e4e10..c9d2b18392b9 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -353,6 +353,7 @@ [Components.common] OvmfPkg/VirtioScsiDxe/VirtioScsi.inf OvmfPkg/VirtioNetDxe/VirtioNet.inf OvmfPkg/VirtioRngDxe/VirtioRng.inf + OvmfPkg/VirtioSerialDxe/VirtioSerial.inf =20 # # FAT filesystem + GPT/MBR partitioning + UDF filesystem + virtio-fs diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuF= vMain.fdf.inc index 8a063bac04ac..2894bc853a46 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -98,6 +98,7 @@ [FV.FvMain] INF OvmfPkg/VirtioNetDxe/VirtioNet.inf INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf INF OvmfPkg/VirtioRngDxe/VirtioRng.inf + INF OvmfPkg/VirtioSerialDxe/VirtioSerial.inf =20 INF ShellPkg/Application/Shell/Shell.inf INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf --=20 2.40.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104800): https://edk2.groups.io/g/devel/message/104800 Mute This Topic: https://groups.io/mt/98850077/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat Apr 20 00:41:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+104801+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104801+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1683901394; cv=none; d=zohomail.com; s=zohoarc; b=VM8JLpLnjSX2yqJh16acig8meWC8KiuJ4x84y80HByPqCWtjQWdXZHpxUdeY2RnWSyAKQpnsRxsTjTju6uVw3HVHIe194aXIAYl0dbaZgcGUFqZT/7ik+B/BhRaxt4toif4nVKW8wkgc30fnylveZgm7JEPFP2lG4fGyCF6xaqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683901394; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=twjJMInV2YwaXOfSXanXTNt4UQT+6ezu6m5ryK5VW+k=; b=Hbmy4s7iRy4ek7SGwy+XYVjvPZEigk2kIn/MASJ6wNFkJXWXYuMTNdkf37uTSo3xOIICk2Psw9zp//7weUYbctItL3n6vwm5fk7mTJOOhRUVdSBV3S2wdejvcQQJKJ5TX3SvN65RgSOHNKd75QgdypP7dQO8CaapE21YtPkdrHE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104801+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1683901394964793.1088092106119; Fri, 12 May 2023 07:23:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id nu1oYY1788612x0hWVTKi657; Fri, 12 May 2023 07:23:14 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.26250.1683901393029621354 for ; Fri, 12 May 2023 07:23:13 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-397-RQ9iPL0aP6G_PotkWlGduw-1; Fri, 12 May 2023 10:23:10 -0400 X-MC-Unique: RQ9iPL0aP6G_PotkWlGduw-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73C7585A588; Fri, 12 May 2023 14:23:10 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 260222166B26; Fri, 12 May 2023 14:23:10 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AFFB91800850; Fri, 12 May 2023 16:23:06 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Pawel Polawski , Sami Mujawar , Oliver Steffen , Ard Biesheuvel Subject: [edk2-devel] [PATCH 2/5] ArmVirt/PlatformBootManagerLib: factor out IsVirtio() Date: Fri, 12 May 2023 16:23:03 +0200 Message-Id: <20230512142306.1323983-3-kraxel@redhat.com> In-Reply-To: <20230512142306.1323983-1-kraxel@redhat.com> References: <20230512142306.1323983-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: aqPX9iwBdlTkHOirO4O5HjcCx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1683901394; bh=j3mGhdDai7P3oSsQflrYe7VTZ7yKChwu0pAVvoOAOAc=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=C9j094rBmfFICCqqkvETDba3x9u9e5iLraR3WW4Ss+izBJc8Qe7uHZan3oI5vo1bPOu oDQA/pROiF8iBFNlyVHtXlLFFRqyTkXMRKcH4B3lEUY0ntinR/i82sBSJ8qXNWM1jr9b9 Hz1oKKEyVVJ4qREAqTIWRBIePkR/I4tJR9Y= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1683901465924100003 Content-Type: text/plain; charset="utf-8"; x-default="true" IsVirtioRng() becomes just a thin wrapper for IsVirtio(). This allows to add similar thin wrappers for other virtio devices in the future. Signed-off-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- .../PlatformBootManagerLib/PlatformBm.c | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVi= rtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 10c815378cd5..5eb6f0f9c14a 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -269,15 +269,16 @@ IsPciDisplay ( } =20 /** - This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG devi= ce at - the VIRTIO_DEVICE_PROTOCOL level. + This function checks if a handle corresponds to the Virtio Device ID giv= en + at the VIRTIO_DEVICE_PROTOCOL level. **/ STATIC BOOLEAN EFIAPI -IsVirtioRng ( +IsVirtio ( IN EFI_HANDLE Handle, - IN CONST CHAR16 *ReportText + IN CONST CHAR16 *ReportText, + IN UINT16 VirtIoDeviceId ) { EFI_STATUS Status; @@ -293,7 +294,22 @@ IsVirtioRng ( } =20 return (BOOLEAN)(VirtIo->SubSystemDeviceId =3D=3D - VIRTIO_SUBSYSTEM_ENTROPY_SOURCE); + VirtIoDeviceId); +} + +/** + This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG devi= ce at + the VIRTIO_DEVICE_PROTOCOL level. +**/ +STATIC +BOOLEAN +EFIAPI +IsVirtioRng ( + IN EFI_HANDLE Handle, + IN CONST CHAR16 *ReportText + ) +{ + return IsVirtio (Handle, ReportText, VIRTIO_SUBSYSTEM_ENTROPY_SOURCE); } =20 /** --=20 2.40.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104801): https://edk2.groups.io/g/devel/message/104801 Mute This Topic: https://groups.io/mt/98850080/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat Apr 20 00:41:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+104802+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104802+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1683901398; cv=none; d=zohomail.com; s=zohoarc; b=IGq2wjedSLGZyXvK4t9pDljiRnQNPDmNiCXZ60EvuAD6w/GZV+06O5vTWzKuU/0eakvR2NCPi6QXY89Y9KRnvXtwdKLFRxnqhVXw3MuXVp54yVbkkiJFQopi1yH1yzY1emIaf9SsRuKbp+iZTgDrDXBzqUw5Lvi9wkrJ8Q51tgc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683901398; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=y2lM6Puk2mFh9pQTCu34PAga6ZKOya6Zw+eO7c5O830=; b=Xrt3SIY4D1/YQIGGZy+jLsKzHfNmdlHit3HT5LmU101Y/GcLDFXhJlcxnl1XiyDuZWTCK16UO+ajdj1asRgjYg00fvASmZMA6RIqqByqaFu0VB8C/6b0atHVM3xCoKf/dVjdt7P2Q0GuhKLJRPhj+yP0XaYYJpmmgwLDywWRtms= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104802+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1683901398298260.3976131037074; Fri, 12 May 2023 07:23:18 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id zTb8YY1788612xBsROz9hX5E; Fri, 12 May 2023 07:23:17 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.26218.1683901397233772850 for ; Fri, 12 May 2023 07:23:17 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-634-u4-alTkUNUuKoEtmb24YZw-1; Fri, 12 May 2023 10:23:11 -0400 X-MC-Unique: u4-alTkUNUuKoEtmb24YZw-1 X-Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6C61B101A54F; Fri, 12 May 2023 14:23:11 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E9C1400E89; Fri, 12 May 2023 14:23:10 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B59221800908; Fri, 12 May 2023 16:23:06 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Pawel Polawski , Sami Mujawar , Oliver Steffen , Ard Biesheuvel Subject: [edk2-devel] [PATCH 3/5] ArmVirt/PlatformBootManagerLib: factor out IsVirtioPci() Date: Fri, 12 May 2023 16:23:04 +0200 Message-Id: <20230512142306.1323983-4-kraxel@redhat.com> In-Reply-To: <20230512142306.1323983-1-kraxel@redhat.com> References: <20230512142306.1323983-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: 4QPU8sX26F5aQ7kAiIL1gNUhx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1683901397; bh=09WH1hNpHhwTD0sLj9eBxOeWXy3CnqObcCdwH/7wDrQ=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=jCw2H/UEY6B6wsm8LK/FQ3hMvun06l7P4weqBjy7CdvD7f4dIZzKmrrgdIIFqLnG8V/ tzXEi5sf1IOnjyRrf++2p48IckDGcvDqjv8p7WA/+5cH9U+1Ul8r85hiUKqDmC9EKm0R5 cFMjl074gyLIu6EayaQWjJSzxBQ8olcX5EY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1683901400165100003 Content-Type: text/plain; charset="utf-8"; x-default="true" IsVirtioPciRng() becomes just a thin wrapper for IsVirtioPci(). This allows to add similar thin wrappers for other virtio devices in the future. Signed-off-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- .../PlatformBootManagerLib/PlatformBm.c | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVi= rtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 5eb6f0f9c14a..ed38c42a43ee 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -313,15 +313,16 @@ IsVirtioRng ( } =20 /** - This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG devi= ce at - the EFI_PCI_IO_PROTOCOL level. + This function checks if a handle corresponds to the Virtio Device ID giv= en + at the EFI_PCI_IO_PROTOCOL level. **/ STATIC BOOLEAN EFIAPI -IsVirtioPciRng ( +IsVirtioPci ( IN EFI_HANDLE Handle, - IN CONST CHAR16 *ReportText + IN CONST CHAR16 *ReportText, + IN UINT16 VirtIoDeviceId ) { EFI_STATUS Status; @@ -387,11 +388,11 @@ IsVirtioPciRng ( // // From DeviceId and RevisionId, determine whether the device is a // modern-only Virtio 1.0 device. In case of Virtio 1.0, DeviceId can - // immediately be restricted to VIRTIO_SUBSYSTEM_ENTROPY_SOURCE, and + // immediately be restricted to VirtIoDeviceId, and // SubsystemId will only play a sanity-check role. Otherwise, DeviceId c= an // only be sanity-checked, and SubsystemId will decide. // - if ((DeviceId =3D=3D 0x1040 + VIRTIO_SUBSYSTEM_ENTROPY_SOURCE) && + if ((DeviceId =3D=3D 0x1040 + VirtIoDeviceId) && (RevisionId >=3D 0x01)) { Virtio10 =3D TRUE; @@ -419,7 +420,7 @@ IsVirtioPciRng ( return TRUE; } =20 - if (!Virtio10 && (SubsystemId =3D=3D VIRTIO_SUBSYSTEM_ENTROPY_SOURCE)) { + if (!Virtio10 && (SubsystemId =3D=3D VirtIoDeviceId)) { return TRUE; } =20 @@ -430,6 +431,21 @@ IsVirtioPciRng ( return FALSE; } =20 +/** + This FILTER_FUNCTION checks if a handle corresponds to a Virtio RNG devi= ce at + the EFI_PCI_IO_PROTOCOL level. +**/ +STATIC +BOOLEAN +EFIAPI +IsVirtioPciRng ( + IN EFI_HANDLE Handle, + IN CONST CHAR16 *ReportText + ) +{ + return IsVirtioPci (Handle, ReportText, VIRTIO_SUBSYSTEM_ENTROPY_SOURCE); +} + /** This CALLBACK_FUNCTION attempts to connect a handle non-recursively, ask= ing the matching driver to produce all first-level child handles. --=20 2.40.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104802): https://edk2.groups.io/g/devel/message/104802 Mute This Topic: https://groups.io/mt/98850081/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat Apr 20 00:41:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+104805+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104805+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1683901405; cv=none; d=zohomail.com; s=zohoarc; b=VhiJXGpP8YYwAXiIvp4vMzMKe2lU6jVgdaE0LmuEXZVv/tS1EH2WvMXniJ8rZzkq8urhZy7FcnVD0r1bPo2nqF/aoD+s4/8PJastGza2fpIHxNSqGw9u8OvqGPeeJ4uqu6UbA9tcqqW0T2WgQ83Df6XHOtJ+F5aCH6BbUHq5lHg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683901405; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=qjGO1ddVZ12qIMYCVsmcxN8+eiwxAlxGB8LShYy3DrA=; b=g82xM81oKqVOxuzllE29rtc9eEC9Xmp37rMsYskhhi5lMaHEztfe2tFaL1hFxt7HyyPnUlZpkca+4V533qRXQVUsGk03gqBtN3PbDUvPcnvSG3PAZ+HyAkdeqLPwkKQaDvC7DsxO8TF/0EgfIf6wn5ZOT0vuTysnF+Lt/pcWRo0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104805+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1683901405314287.6584470232716; Fri, 12 May 2023 07:23:25 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Gk1tYY1788612xooqAbXyBSU; Fri, 12 May 2023 07:23:24 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.26257.1683901404155799422 for ; Fri, 12 May 2023 07:23:24 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-635-OXpIlst2PeSdbgTZK737OA-1; Fri, 12 May 2023 10:23:20 -0400 X-MC-Unique: OXpIlst2PeSdbgTZK737OA-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BF55C1857F22; Fri, 12 May 2023 14:23:19 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2ABD140C6EC4; Fri, 12 May 2023 14:23:12 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B980D1800915; Fri, 12 May 2023 16:23:06 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Pawel Polawski , Sami Mujawar , Oliver Steffen , Ard Biesheuvel Subject: [edk2-devel] [PATCH 4/5] ArmVirt/PlatformBootManagerLib: set up virtio serial as console Date: Fri, 12 May 2023 16:23:05 +0200 Message-Id: <20230512142306.1323983-5-kraxel@redhat.com> In-Reply-To: <20230512142306.1323983-1-kraxel@redhat.com> References: <20230512142306.1323983-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: NoLebWwL9uCNCvl6aEDu8yTwx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1683901404; bh=bbTmgT4mNz/8h0MUDOjPd8dNQg3RolWSeIyzmEg0msU=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=bwolDKmmI6A9/KWg2Y1HPwkcPQkErIHAzLrrQwkdWWryMWgMBX8Nzl7kFOPwtP43Oq4 +3HFvH1XFKlJTf/NcOz/1zJqOP2I+qNaiDaxkD7ic5d/LSmB/MjDGE/PbRtkIo/C1aKRO iB6toS5LZsYGPWt5i/KogGeP+HIljOEwfWw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1683901406274100001 Content-Type: text/plain; charset="utf-8"; x-default="true" In case a virtio serial device is found in the system register the first console port as EFI console, by updating ConIn, ConOut and ErrOut. Signed-off-by: Gerd Hoffmann --- .../PlatformBootManagerLib/PlatformBm.c | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVi= rtPkg/Library/PlatformBootManagerLib/PlatformBm.c index ed38c42a43ee..7010d73c1388 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -312,6 +312,21 @@ IsVirtioRng ( return IsVirtio (Handle, ReportText, VIRTIO_SUBSYSTEM_ENTROPY_SOURCE); } =20 +/** + This FILTER_FUNCTION checks if a handle corresponds to a Virtio serial d= evice at + the VIRTIO_DEVICE_PROTOCOL level. +**/ +STATIC +BOOLEAN +EFIAPI +IsVirtioSerial ( + IN EFI_HANDLE Handle, + IN CONST CHAR16 *ReportText + ) +{ + return IsVirtio (Handle, ReportText, VIRTIO_SUBSYSTEM_CONSOLE); +} + /** This function checks if a handle corresponds to the Virtio Device ID giv= en at the EFI_PCI_IO_PROTOCOL level. @@ -446,6 +461,21 @@ IsVirtioPciRng ( return IsVirtioPci (Handle, ReportText, VIRTIO_SUBSYSTEM_ENTROPY_SOURCE); } =20 +/** + This FILTER_FUNCTION checks if a handle corresponds to a Virtio serial d= evice at + the EFI_PCI_IO_PROTOCOL level. +**/ +STATIC +BOOLEAN +EFIAPI +IsVirtioPciSerial ( + IN EFI_HANDLE Handle, + IN CONST CHAR16 *ReportText + ) +{ + return IsVirtioPci (Handle, ReportText, VIRTIO_SUBSYSTEM_CONSOLE); +} + /** This CALLBACK_FUNCTION attempts to connect a handle non-recursively, ask= ing the matching driver to produce all first-level child handles. @@ -534,6 +564,133 @@ AddOutput ( )); } =20 +/** + This CALLBACK_FUNCTION retrieves the EFI_DEVICE_PATH_PROTOCOL from + the handle, appends serial, uart and terminal nodes, finally updates + ConIn, ConOut and ErrOut. +**/ +STATIC +VOID +EFIAPI +SetupVirtioSerial ( + IN EFI_HANDLE Handle, + IN CONST CHAR16 *ReportText + ) +{ + STATIC ACPI_HID_DEVICE_PATH SerialNode =3D { + { + ACPI_DEVICE_PATH, + ACPI_DP, + { + (UINT8)(sizeof (ACPI_HID_DEVICE_PATH)), + (UINT8)((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) + }, + }, + EISA_PNP_ID (0x0501), + 0 + }; + + STATIC UART_DEVICE_PATH UartNode =3D { + { + MESSAGING_DEVICE_PATH, + MSG_UART_DP, + { + (UINT8)(sizeof (UART_DEVICE_PATH)), + (UINT8)((sizeof (UART_DEVICE_PATH)) >> 8) + }, + }, + 0, + 115200, + 8, + 1, + 1 + }; + + STATIC VENDOR_DEVICE_PATH TerminalNode =3D { + { + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + { + (UINT8)(sizeof (VENDOR_DEVICE_PATH)), + (UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8) + }, + }, + DEVICE_PATH_MESSAGING_VT_UTF8 + }; + + EFI_STATUS Status; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + + DevicePath =3D DevicePathFromHandle (Handle); + + if (DevicePath =3D=3D NULL) { + DEBUG (( + DEBUG_ERROR, + "%a: %s: handle %p: device path not found\n", + __func__, + ReportText, + Handle + )); + return; + } + + DevicePath =3D AppendDevicePathNode ( + DevicePath, + (EFI_DEVICE_PATH_PROTOCOL *)&SerialNode + ); + DevicePath =3D AppendDevicePathNode ( + DevicePath, + (EFI_DEVICE_PATH_PROTOCOL *)&UartNode + ); + DevicePath =3D AppendDevicePathNode ( + DevicePath, + (EFI_DEVICE_PATH_PROTOCOL *)&TerminalNode + ); + + Status =3D EfiBootManagerUpdateConsoleVariable (ConIn, DevicePath, NULL); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "%a: %s: adding to ConIn: %r\n", + __func__, + ReportText, + Status + )); + return; + } + + Status =3D EfiBootManagerUpdateConsoleVariable (ConOut, DevicePath, NULL= ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "%a: %s: adding to ConOut: %r\n", + __func__, + ReportText, + Status + )); + return; + } + + Status =3D EfiBootManagerUpdateConsoleVariable (ErrOut, DevicePath, NULL= ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "%a: %s: adding to ErrOut: %r\n", + __func__, + ReportText, + Status + )); + return; + } + + DEBUG (( + DEBUG_VERBOSE, + "%a: %s: added to ConIn, ConOut and ErrOut\n", + __func__, + ReportText + )); +} + STATIC VOID PlatformRegisterFvBootOption ( @@ -932,6 +1089,12 @@ PlatformBootManagerBeforeConsole ( // instances on Virtio PCI RNG devices. // FilterAndProcess (&gEfiPciIoProtocolGuid, IsVirtioPciRng, Connect); + + // + // Register Virtio serial devices as console. + // + FilterAndProcess (&gVirtioDeviceProtocolGuid, IsVirtioSerial, SetupVirti= oSerial); + FilterAndProcess (&gEfiPciIoProtocolGuid, IsVirtioPciSerial, SetupVirtio= Serial); } =20 /** --=20 2.40.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104805): https://edk2.groups.io/g/devel/message/104805 Mute This Topic: https://groups.io/mt/98850085/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sat Apr 20 00:41:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+104803+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104803+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1683901399; cv=none; d=zohomail.com; s=zohoarc; b=EhX3pNC7EFZ0oN8ImWAaSors3D27Hyk7cQNuhHa+LM5hYjvF/Z0wsfOOn+fEx4Zx0idSaN1QLCT8WjNrJ9fnOC1Jx0dLO0Lok5Y9jbI+FUjKnd4x4zdHsFR1GVirUo9xAn0vwbtkwCR4oOLqcNCjZGvTtwdnsEvCZYcpNIUUkII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683901399; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=FcxSgIOh5C1ouQOdjFz9Lr4boD7x8cvpXpqB4li1XMw=; b=JYzNSDNFumWrlgHUiXN76iVwxO24eizdvBnLhuh6W00sL8tupLUZ/RTI9YdyNrGA0dbxOZh4NyensYiwL2doWZ1aV7PajoGBiaBn1L86Sx3VH+w0FheSXMeBeSWQox2eB2r/EPRLD66gu6qzQu5lWBCXSv7zwAuaAbrpgE0lXPc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+104803+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1683901399192919.3031321603727; Fri, 12 May 2023 07:23:19 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id wYi4YY1788612xPmslHVni8r; Fri, 12 May 2023 07:23:18 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.26252.1683901398046317543 for ; Fri, 12 May 2023 07:23:18 -0700 X-Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-117-4xrceypKM4GGB9HUiuF9QQ-1; Fri, 12 May 2023 10:23:14 -0400 X-MC-Unique: 4xrceypKM4GGB9HUiuF9QQ-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6DDE13C0CD56; Fri, 12 May 2023 14:23:13 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1AAF163F8A; Fri, 12 May 2023 14:23:13 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id BD41D1800917; Fri, 12 May 2023 16:23:06 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Pawel Polawski , Sami Mujawar , Oliver Steffen , Ard Biesheuvel Subject: [edk2-devel] [PATCH 5/5] OvmfPkg/VirtioSerialDxe: use TPL_NOTIFY Date: Fri, 12 May 2023 16:23:06 +0200 Message-Id: <20230512142306.1323983-6-kraxel@redhat.com> In-Reply-To: <20230512142306.1323983-1-kraxel@redhat.com> References: <20230512142306.1323983-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com X-Gm-Message-State: 0AqzFBPtzyYLL3z3Y9J2evkBx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1683901398; bh=IBP7rTKiIRLFgtotlzQ9nFEqVUqe++KoQIFdz5VPE4c=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=bOPm4bz89xIGtB5ezjYuMgnNwyaHc8R57xHmO7JAhg25VN0lu6yBcNMEKAIVjznPdQV WYvxeG6vrmr6tUVSvLsrBcYLjK9QLadfhpRuT/zdny0fCllGF8kv10tkbvC4JPQ03Wt2r cHnNm8rW2PBtcvXMCfhHzhKOKOLa2HvxM0k= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1683901400171100004 Content-Type: text/plain; charset="utf-8"; x-default="true" Apparently TPL_CALLBACK is too low, code runs into an ASSERT complaining the new TPL is lower than the old TPL. Signed-off-by: Gerd Hoffmann Acked-by: Ard Biesheuvel --- OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c b/OvmfPkg/VirtioSer= ialDxe/VirtioSerialPort.c index 522b25e9698c..e4a58deff162 100644 --- a/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c +++ b/OvmfPkg/VirtioSerialDxe/VirtioSerialPort.c @@ -158,7 +158,7 @@ VirtioSerialIoWrite ( =20 VirtioSerialRingClearTx (SerialIo->Dev, PortTx (SerialIo->PortId)); =20 - OldTpl =3D gBS->RaiseTPL (TPL_CALLBACK); + OldTpl =3D gBS->RaiseTPL (TPL_NOTIFY); if (SerialIo->WriteOffset && (SerialIo->WriteOffset + *BufferSize > PORT_TX_BUFSIZE)) { @@ -201,7 +201,7 @@ VirtioSerialIoRead ( goto NoData; } =20 - OldTpl =3D gBS->RaiseTPL (TPL_CALLBACK); + OldTpl =3D gBS->RaiseTPL (TPL_NOTIFY); if (SerialIo->WriteOffset) { DEBUG ((DEBUG_VERBOSE, "%a:%d: WriteFlush %d\n", __func__, __LINE__, S= erialIo->WriteOffset)); VirtioSerialRingSendBuffer ( --=20 2.40.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104803): https://edk2.groups.io/g/devel/message/104803 Mute This Topic: https://groups.io/mt/98850082/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-