From nobody Sat May 18 06:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57941+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1587635645; cv=none; d=zohomail.com; s=zohoarc; b=lg8OBixwA9gITHvXhDxhpAr5JF/Pn52BOdnopBKDTwTKyU1NcK+7fbz0RxwwYuPtDMGxlbQE0PvvOGmCkXO7/FOiOZGZZpV+EIAoouyrieyDQYWousF7U+D4yyBkWBhBP752F2H4tJiuJVDondNHxSBBOdukVlhUY/dq7M44qBQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587635645; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=uwpzs4teMIz/tcVGN3jo+t3lyN0sudO/VYDRIthAu3o=; b=g747c12rsnaTJ6/QthYdMajvF8XzbS+OKg2vIx2Reae9fsvJNJGUWFLogT0ebBlHTHwXCAmXSaiFsbDFvHWMob6N7qj+xSLoObTvqDh58Hx3Co3D3hmnSd61MZNG0Ikbjy92Gv2G/IY/u7XuPuIRzovfdspVvn/54rzheUV0i+4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57941+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1587635645438299.5403638397893; Thu, 23 Apr 2020 02:54:05 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id s0hsYY1788612xAEM5ZaCsIR; Thu, 23 Apr 2020 02:54:05 -0700 X-Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com []) by mx.groups.io with SMTP id smtpd.web10.3302.1587635644218621119 for ; Thu, 23 Apr 2020 02:54:04 -0700 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57941+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: SucGQ+lE48TUz+CcvPJMROQ9R48Jh7QfVpJ2fgxfeRIXkGCAPVO30ecp+H/CWIMX+oFAHgR6II 7jjVgRjpI9z504+Wg9nKJeQ3UEpUWFvjkE1Z06HJUpHHLgMYB9WSmWY6yr5nZATPJFaUTf/x+e eP0o0qwTVa/uwKLXqrd5PQO7O5fXK8zWD/oXqw0wMchqk9+FQoAwDROMqVA68/KzTnZztLguih lrqUNIkJObO5PHnqX8Vv7rWYdeIeetXScE0G9vl4GdYFAw2IoZeP5KmA1tNUcad53Ttje2PkIR RFc= X-SBRS: 2.7 X-MesageID: 16133479 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,306,1583211600"; d="scan'208";a="16133479" From: "Anthony PERARD" To: CC: Laszlo Ersek , Ard Biesheuvel , Jordan Justen , Julien Grall , Anthony Perard Subject: [edk2-devel] [PATCH v2 1/5] OvmfPkg/OvmfXen: Remove DEBUG_ON_SERIAL_PORT Date: Thu, 23 Apr 2020 10:53:54 +0100 Message-ID: <20200423095358.2518197-2-anthony.perard@citrix.com> In-Reply-To: <20200423095358.2518197-1-anthony.perard@citrix.com> References: <20200423095358.2518197-1-anthony.perard@citrix.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,anthony.perard@citrix.com X-Gm-Message-State: mjav6HKXhqdlFAoFPdTdcMF1x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1587635645; bh=uwpzs4teMIz/tcVGN3jo+t3lyN0sudO/VYDRIthAu3o=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=cUdT+xsg9RdOkfqzPkPVej6AmR4bXDgsLbmP66VkXCpZV5VaqDS9D1jkSmunKHXfFmu fmCMoIPwLlO5RUKzqOxQ+29NEWDffcETWa/qrfc+dZVcnu4dg32RFP77YNMYlRSiIpt/q bTTTG+iUijF741s6Aevljciw1Et8NTkKWoQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Remove support for DEBUG_ON_SERIAL_PORT because OvmfXen can't be build with it due to a circular dependency: DebugLib : BaseDebugLibSerialPort -> SerialPortLib : XenConsoleSerialPortLib -> XenHypercallLib : XenHypercallLib -> DebugLib Also, if that dependency is fixed, I think it would be harder to find which console the debug is sent to when running an HVM guest. The xen console isn't the serial console used by default. Furthermore, XenHypercallLib isn't initialised early enough, so we would loose debug output from the SEC phase and early PEI phase. Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek Reviewed-by: Philippe Mathieu-Daude --- OvmfPkg/OvmfXen.dsc | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 47ee8db8b884..4859faf1bff7 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -205,17 +205,14 @@ [LibraryClasses] Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeT= cg2PhysicalPresenceLib.inf TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf RealTimeClockLib|OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib= .inf + DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf =20 [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf =20 [LibraryClasses.common.SEC] QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf -!ifdef $(DEBUG_ON_SERIAL_PORT) - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!else DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPor= t.inf -!endif ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseE= xtractGuidedSectionLib.inf !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE @@ -236,11 +233,6 @@ [LibraryClasses.common.PEI_CORE] ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHo= okStatusCodeLibNull.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf -!ifdef $(DEBUG_ON_SERIAL_PORT) - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!else - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf -!endif PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf =20 [LibraryClasses.common.PEIM] @@ -252,11 +244,6 @@ [LibraryClasses.common.PEIM] ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHo= okStatusCodeLibNull.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= offGetEntryPointLib.inf -!ifdef $(DEBUG_ON_SERIAL_PORT) - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!else - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf -!endif PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf ResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResou= rcePublicationLib.inf ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExt= ractGuidedSectionLib.inf @@ -274,11 +261,6 @@ [LibraryClasses.common.DXE_CORE] DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeC= oreMemoryAllocationLib.inf ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf -!ifdef $(DEBUG_ON_SERIAL_PORT) - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!else - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf -!endif ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExt= ractGuidedSectionLib.inf !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf @@ -292,11 +274,6 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/R= untimeDxeReportStatusCodeLib.inf -!ifdef $(DEBUG_ON_SERIAL_PORT) - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!else - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf -!endif UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf @@ -308,11 +285,6 @@ [LibraryClasses.common.UEFI_DRIVER] DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf -!ifdef $(DEBUG_ON_SERIAL_PORT) - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!else - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf -!endif UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf =20 @@ -322,11 +294,6 @@ [LibraryClasses.common.DXE_DRIVER] MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf -!ifdef $(DEBUG_ON_SERIAL_PORT) - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!else - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf -!endif PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBo= otManagerLib.inf PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrin= tScLib.inf QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf @@ -344,11 +311,6 @@ [LibraryClasses.common.UEFI_APPLICATION] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeRepor= tStatusCodeLib.inf -!ifdef $(DEBUG_ON_SERIAL_PORT) - DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf -!else - DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf -!endif PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf =20 ##########################################################################= ###### --=20 Anthony PERARD -=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 (#57941): https://edk2.groups.io/g/devel/message/57941 Mute This Topic: https://groups.io/mt/73215159/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 May 18 06:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57942+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1587635648; cv=none; d=zohomail.com; s=zohoarc; b=OlWpsEJDJr5PyLvUfWuhT+F9I0fjRUn1b/Bzma9Yh842cGHiX3KRfEoFY7bH12vHemIKIYJmDmuxnoYYMNVH3txs5tG+NLQMBOx5fztjshbgYuEN8D95c2e8Q/gBlYe/mK7l0VHe0wLjWtGkr4FOYB/az0xESYE712lRr4NR8/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587635648; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=9GJoAGnD8IBf3VudsnA5Pc83PjnaOYQSENQArEMD29s=; b=oH01bS2D+7+rVQj6wHeRY8fNnMuT9wGogEVvT8RnsNXEVjHryIiNlFQ85m2fwDOUpyE4VLA2ilTgnq40aJhdI9T/5jTZ5HSiPD9RmexdjTkKxPadutjfIOJVgf9yBonwLZp7l78gk9hk+FV+h8tOInCrzQur82ALb2iSPvBD/Mc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57942+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1587635648264489.8100043696604; Thu, 23 Apr 2020 02:54:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id zOt7YY1788612xB8gRAehi0V; Thu, 23 Apr 2020 02:54:07 -0700 X-Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by mx.groups.io with SMTP id smtpd.web10.3306.1587635647439198848 for ; Thu, 23 Apr 2020 02:54:07 -0700 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57942+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: z7Wk4rjoO+dwroWdEHPg93ByJE5Uy7sTZ2qhFjlYa/19AasGu1fzbDxc+YOESdcW0AfMW8i8kK uk8s5h2/pOQcfIglnJ/wi2SKXuxykzUn+N1JFRGWqp0Ly3e8ZbtOgNNYHTwvPgyaHQxknrAiUl ahhZMVS2KXJAnJ80iaDGsXI1OZTrfOpTb5+5fDGAqHOyl6wik+ozBNyE/ggbHduCfQhZeptT2Z Z8JLfKgj/7W741ChFGJQGJNuPvIMEol2skdsG39mHWaiYmlTCymr9gNda7TyY9xjenxu0SjxcR AfY= X-SBRS: 2.7 X-MesageID: 16799324 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,306,1583211600"; d="scan'208";a="16799324" From: "Anthony PERARD" To: CC: Laszlo Ersek , Ard Biesheuvel , Jordan Justen , Julien Grall , Anthony Perard Subject: [edk2-devel] [PATCH v2 2/5] OvmfPkg/PlatformDebugLibIoPort: Reword QEMU to hypervisor Date: Thu, 23 Apr 2020 10:53:55 +0100 Message-ID: <20200423095358.2518197-3-anthony.perard@citrix.com> In-Reply-To: <20200423095358.2518197-1-anthony.perard@citrix.com> References: <20200423095358.2518197-1-anthony.perard@citrix.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,anthony.perard@citrix.com X-Gm-Message-State: E4thuvqDPoukazJuvmhJFFIrx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1587635647; bh=9GJoAGnD8IBf3VudsnA5Pc83PjnaOYQSENQArEMD29s=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=UbkxnqX7pUHq7QhE8giP/bZbL8Hocpy3e+uYegXVGdtqr+BPnuzD7lLJwqUFksXGKp/ YnGrfMv+iLGHtwaypeUYnTSzWIshbYZCladBx7pe08fKAONOkRS4DrNNLuRjzaoU7Cp7R ggxo/VOJETuPpqTeuybsh9C/ksdJdgJk8BM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" We are going to reuse PlatformDebugLibIoPort to use debug IO port from hypervisors that aren't QEMU, so reword "QEMU" to "hypervisor" in the descriptions. Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h | 2 +- OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c | 2 +- OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.c | 2 +- OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetectRom.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h b/Ovmf= Pkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h index 71a7f33aaf17..4677c85ac3c4 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h @@ -1,5 +1,5 @@ /** @file - Base Debug library instance for QEMU debug port. + Base Debug library instance for hypervisor debug port. It uses PrintLib to send debug messages to a fixed I/O port. =20 Copyright (c) 2017, Red Hat, Inc.
diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c b/OvmfPkg/Li= brary/PlatformDebugLibIoPort/DebugLib.c index 3dfa3126c3d0..ec2e677afd8d 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c @@ -1,5 +1,5 @@ /** @file - Base Debug library instance for QEMU debug port. + Base Debug library instance for hypervisor debug port. It uses PrintLib to send debug messages to a fixed I/O port. =20 Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.c b/Ovmf= Pkg/Library/PlatformDebugLibIoPort/DebugLibDetect.c index 2c659e7aea0a..8c466e64e0a6 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.c +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.c @@ -1,5 +1,5 @@ /** @file - Detection code for QEMU debug port. + Detection code for hypervisor debug port. Non-SEC instance, caches the result of detection. =20 Copyright (c) 2017, Red Hat, Inc.
diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetectRom.c b/O= vmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetectRom.c index 03ba4a0a7b08..8cbdbd94fc0e 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetectRom.c +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetectRom.c @@ -1,5 +1,5 @@ /** @file - Detection code for QEMU debug port. + Detection code for hypervisor debug port. SEC instance, cannot cache the result of detection. =20 Copyright (c) 2017, Red Hat, Inc.
--=20 Anthony PERARD -=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 (#57942): https://edk2.groups.io/g/devel/message/57942 Mute This Topic: https://groups.io/mt/73215160/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 May 18 06:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57945+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1587635656; cv=none; d=zohomail.com; s=zohoarc; b=OllQ/yKJbAuZOK3rNbIoGnCj4BR3mGIyoLvA7HQ7euEfrnp5VxAa1ZhW5CPjGXjdGlSgFUUUf8xq3b1zVb+bhTc1/VQ16Xdx0L3vt0QPNZkTy6fgzkMOoQW2jcOGpwCxhSpDMlgjGIDoZHIhFB/9UwxInYcfbFnr+IqGFP8/InM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587635656; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=9w7kFFjxAyHCo4gdS3XGllZF+dTm1CWKoooadQAqc8g=; b=PlnArrUQ7PhQa1b8BzdwJFAVPlw/k4VkO+tlsi1wFUka8XbEkXigKdJtfGtGSRNI6w1ui2cosNh2ROFgnHFPuyASU2Unlnvj4wjOfE5dTTo8Dgt0NTndpMw3zbYy3qNwBLL3uNGVpxzLgSYpt66ou0OkU0KuEshg42uw11qwaj0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57945+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1587635656338619.33736893416; Thu, 23 Apr 2020 02:54:16 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 1rLBYY1788612xMre3FBjIJG; Thu, 23 Apr 2020 02:54:16 -0700 X-Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by mx.groups.io with SMTP id smtpd.web11.3280.1587635655505438317 for ; Thu, 23 Apr 2020 02:54:15 -0700 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57945+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: DJplUP6AUC1SUNzfptI0nFOcVVlzGNJijTlOp53RZDOl78jB/XSLD1/+pDAD4xrF4L5oYZZOz6 VHXc0FC2fAhQa6KeJ6rPPlD17gpTRBvwzjiSiLIwc98gUYKyqnHmm1CxbX5ekiBtrx8K9e/FF+ NoiNyz4gtHQqiSbud7UrJeH6Ahr02gIsaTX8XvpAMR1CUmk2f1UDNuJ7vE5fNiCUMEXs+eflA+ 0g68EB2weD9l9OvaGWj2MC4pLrsgS2nuqPP4a1gD2f7oXtzgl6Q7A0U97CD9DY4DDBVC1v60hN 7nY= X-SBRS: 2.7 X-MesageID: 16368776 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,306,1583211600"; d="scan'208";a="16368776" From: "Anthony PERARD" To: CC: Laszlo Ersek , Ard Biesheuvel , Jordan Justen , Julien Grall , Anthony Perard Subject: [edk2-devel] [PATCH v2 3/5] OvmfPkg/PlatformDebugLibIoPort: factor out debug port detection Date: Thu, 23 Apr 2020 10:53:56 +0100 Message-ID: <20200423095358.2518197-4-anthony.perard@citrix.com> In-Reply-To: <20200423095358.2518197-1-anthony.perard@citrix.com> References: <20200423095358.2518197-1-anthony.perard@citrix.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,anthony.perard@citrix.com X-Gm-Message-State: DlrMEjtfjPY9Z02pTt5ldvTcx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1587635656; bh=9w7kFFjxAyHCo4gdS3XGllZF+dTm1CWKoooadQAqc8g=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=I5KTNoWeIpAXEWl0TQvrR2HYhvrn0uMew6gUiEPg1bCtzOPrAAUDe9EkrpDhLzrN8AY evPLDysOU8u0yigcYDuv8CJApddwDpPDti2Octon2oHPOXhFzQbxRrMpoq5xWDM2GoDyg fEy/oJTGqZtjRRdGTQ3sBhEFdcnUln55dNo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Factor out debug port detection in PlatformDebugLibIoPort. Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek Reviewed-by: Philippe Mathieu-Daude --- .../PlatformDebugLibIoPort.inf | 1 + .../PlatformRomDebugLibIoPort.inf | 1 + .../PlatformDebugLibIoPort/DebugLibDetect.h | 6 ---- .../PlatformDebugLibIoPort/DebugIoPortQemu.c | 34 +++++++++++++++++++ .../Library/PlatformDebugLibIoPort/DebugLib.c | 16 --------- 5 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortQemu.c diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.= inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf index c09f312ffb1d..94ab9105077a 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf @@ -24,6 +24,7 @@ [Defines] # =20 [Sources] + DebugIoPortQemu.c DebugLib.c DebugLibDetect.c DebugLibDetect.h diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPo= rt.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.i= nf index ab27f6327a38..8f721d249dd5 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf @@ -24,6 +24,7 @@ [Defines] # =20 [Sources] + DebugIoPortQemu.c DebugLib.c DebugLibDetect.h DebugLibDetectRom.c diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h b/Ovmf= Pkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h index 4677c85ac3c4..6d08909dbc58 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h @@ -12,12 +12,6 @@ =20 #include =20 -// -// The constant value that is read from the debug I/O port -// -#define BOCHS_DEBUG_PORT_MAGIC 0xE9 - - /** Helper function to return whether the virtual machine has a debug I/O po= rt. PlatformDebugLibIoPortFound can call this function directly or cache the diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortQemu.c b/Ovm= fPkg/Library/PlatformDebugLibIoPort/DebugIoPortQemu.c new file mode 100644 index 000000000000..bf9119807a6c --- /dev/null +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortQemu.c @@ -0,0 +1,34 @@ +/** @file + Detection code for QEMU debug port. + + Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2012, Red Hat, Inc.
+ Copyright (c) 2020, Citrix Systems, Inc. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include "DebugLibDetect.h" + +// +// The constant value that is read from the debug I/O port +// +#define BOCHS_DEBUG_PORT_MAGIC 0xE9 + +/** + Return the result of detecting the debug I/O port device. + + @retval TRUE if the debug I/O port device was detected. + @retval FALSE otherwise + +**/ +BOOLEAN +EFIAPI +PlatformDebugLibIoPortDetect ( + VOID + ) +{ + return IoRead8 (PcdGet16 (PcdDebugIoPort)) =3D=3D BOCHS_DEBUG_PORT_MAGIC; +} diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c b/OvmfPkg/Li= brary/PlatformDebugLibIoPort/DebugLib.c index ec2e677afd8d..dffb20822d18 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugLib.c @@ -359,19 +359,3 @@ DebugPrintLevelEnabled ( { return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) = !=3D 0); } - -/** - Return the result of detecting the debug I/O port device. - - @retval TRUE if the debug I/O port device was detected. - @retval FALSE otherwise - -**/ -BOOLEAN -EFIAPI -PlatformDebugLibIoPortDetect ( - VOID - ) -{ - return IoRead8 (PcdGet16 (PcdDebugIoPort)) =3D=3D BOCHS_DEBUG_PORT_MAGIC; -} --=20 Anthony PERARD -=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 (#57945): https://edk2.groups.io/g/devel/message/57945 Mute This Topic: https://groups.io/mt/73215166/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 May 18 06:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57943+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1587635651; cv=none; d=zohomail.com; s=zohoarc; b=BbIIRT4u/KWVaVTG3tPBIQZ1SyA2/U4fFN3gxfxfk0dtj/X6xtUFc0UqGDZvHLpGTkZhSpaF8zdiPr1PkBOT+jGRw25xuoViyaexrAkXPtKD2aW8VgW6stM3+N2F40Ha4rtyUcYQe4yEAEgsR9LgkB92oNspMErZkrp7Lrn6Ibw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587635651; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=NaxF8jJatCeHR8NE9CzcvtBBwAHrhgzNQKvhCJs5AMM=; b=RjnsxPLWK0Ap0zWWyonqJ1/Km0RHu/K/4+aCR2UEJ5myPa5zOL/dm3ehJ1milWVeZvkJkeyhS/VUD62wIpHkLo02sCPCvMGlncqOzh10cXEUnK5Ka1bvlwgSa3lErqr00pAQm3YhfyOfbLvvXW24QE5Uh6rtk8agFy1V0R7BzTs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57943+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1587635651497343.6865298351181; Thu, 23 Apr 2020 02:54:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id jLztYY1788612xkr4PVZUeU2; Thu, 23 Apr 2020 02:54:11 -0700 X-Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by mx.groups.io with SMTP id smtpd.web11.3277.1587635650466514134 for ; Thu, 23 Apr 2020 02:54:10 -0700 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57943+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa5.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa5.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa5.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 4gW7fvgCGpUZL7Vhp4WxiB9ZUDCukXiS/YVDPXpXhQR0gMxqPs9BlFMeg1DIwtcNTFT91bGOht XxsgvH4NHHNDfc6bfUoupjEKSi8nimQSV7jJ2b/xiF0cuHA5y+pxEXwPwkIqCtjR304yqoecOt xuujict7DTNxul1yOg+Befglrb6VcUDDgqiV6v2hMEeaPiPMiE5vIyat3bc1e+eAJfb8EDQpX4 hlH4/vspxlQvVcA8KLEc5T9fdLv74I2dPoW6bHi4mzQtgmyERbufTadj/0uZ2DIjyTjX4px6Yt kkM= X-SBRS: 2.7 X-MesageID: 16433498 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,306,1583211600"; d="scan'208";a="16433498" From: "Anthony PERARD" To: CC: Laszlo Ersek , Ard Biesheuvel , Jordan Justen , Julien Grall , Anthony Perard Subject: [edk2-devel] [PATCH v2 4/5] OvmfPkg/PlatformDebugLibIoPort: Introduce a Nocheck variant Date: Thu, 23 Apr 2020 10:53:57 +0100 Message-ID: <20200423095358.2518197-5-anthony.perard@citrix.com> In-Reply-To: <20200423095358.2518197-1-anthony.perard@citrix.com> References: <20200423095358.2518197-1-anthony.perard@citrix.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,anthony.perard@citrix.com X-Gm-Message-State: eYy7ejoWarWPLomYM7HgOb9Dx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1587635651; bh=NaxF8jJatCeHR8NE9CzcvtBBwAHrhgzNQKvhCJs5AMM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=CO4KgiXxK7hk7I/0IMnRahpFZUqdgrSnZIYTEnZHFGEhA2pdLADZA1byebGXwfVrkhE ekJ9IWEWxs5zLkQ1AykmumO4Bm84+wtxnqtCWbKjFXBBV6MnkfaSkY2Z6Nb+aCjcvau63 vADXf2q5r6D/7CXliSZ5kmh+XESdMlu4g+w= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Introduce PlatformRomDebugLibIoPortNocheck which doesn't try to detect the debug IO port. Instead, debug logs are always written to the IO port. Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- ...f =3D> PlatformRomDebugLibIoPortNocheck.inf} | 15 ++++++----- .../DebugIoPortNocheck.c | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) copy OvmfPkg/Library/PlatformDebugLibIoPort/{PlatformRomDebugLibIoPort.inf= =3D> PlatformRomDebugLibIoPortNocheck.inf} (65%) create mode 100644 OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNoche= ck.c diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPo= rt.inf b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNo= check.inf similarity index 65% copy from OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.= inf copy to OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNoc= heck.inf index 8f721d249dd5..34034e1eb887 100644 --- a/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPortNoche= ck.inf @@ -1,9 +1,8 @@ ## @file -# Instance of Debug Library for the QEMU debug console port. +# Instance of Debug Library for an hypervisor debug console port. # It uses Print Library to produce formatted output strings. # -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
-# Copyright (c) 2017, Red Hat, Inc.
+# Copyright (c) 2020, Citrix Systems, Inc. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -12,11 +11,11 @@ =20 [Defines] INF_VERSION =3D 0x00010005 - BASE_NAME =3D PlatformRomDebugLibIoPort - FILE_GUID =3D CEB0D9D3-328F-4C24-8C02-28FA1986AE1B + BASE_NAME =3D PlatformRomDebugLibIoPortNocheck + FILE_GUID =3D 92AEB68E-C2CF-466E-9AB2-3F5E713F7DE6 MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D DebugLib|SEC + LIBRARY_CLASS =3D DebugLib|SEC PEI_CORE PEIM DXE_CORE D= XE_DRIVER DXE_RUNTIME_DRIVER SMM_CORE DXE_SMM_DRIVER UEFI_DRIVER UEFI_APPLI= CATION CONSTRUCTOR =3D PlatformRomDebugLibIoPortConstructor =20 # @@ -24,10 +23,10 @@ [Defines] # =20 [Sources] - DebugIoPortQemu.c + DebugIoPortNocheck.c DebugLib.c - DebugLibDetect.h DebugLibDetectRom.c + DebugLibDetect.h =20 [Packages] MdePkg/MdePkg.dec diff --git a/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c b/= OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c new file mode 100644 index 000000000000..0ef7920a8fb8 --- /dev/null +++ b/OvmfPkg/Library/PlatformDebugLibIoPort/DebugIoPortNocheck.c @@ -0,0 +1,25 @@ +/** @file + Dectection code for hypervisor debug port. + + Copyright (c) 2020, Citrix Systems, Inc. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "DebugLibDetect.h" + +/** + Always return TRUE without detection as the debug I/O port is always + present. + + @retval TRUE The debug I/O port is always present. + +**/ +BOOLEAN +EFIAPI +PlatformDebugLibIoPortDetect ( + VOID + ) +{ + return TRUE; +} --=20 Anthony PERARD -=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 (#57943): https://edk2.groups.io/g/devel/message/57943 Mute This Topic: https://groups.io/mt/73215162/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 May 18 06:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57944+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1587635652; cv=none; d=zohomail.com; s=zohoarc; b=AQwK6i+/OIZ1XR0pm9QCMO/LhR4XOE+Kmif3TcIEyvtYMPmGYJU6KnM+Ys9U7Y5kGW/W69dZYFKgGjaBt9Cp7HQNdjvu8Vuvhu4azR7+Ls2fIjkk2bj8eFh4kcT8J6j2JC1rQvNqEpuiKZ1VMhPpUPvV3vR3KwqJzZrz+uC5WsE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587635652; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=QNqwHA0Fg9nU9UqfEY+LgDI5mgZxXEk/kV7S/aSL9B8=; b=mblQn82Vltft+VGaO51aRhygv5W3d+EFs6Kork27UxFwFJt/7qX9xUnc324pTu7C/wmWzc6Au1lyx5B0+6PSSYspRzFV+dej8HKw8Upd3kGYWW35AYL2J62hCB9Cq3dJ7veT5NgADUvO+MLZnU3/995/6BeNs818gTunC/WdeYs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57944+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1587635652407513.2050673997239; Thu, 23 Apr 2020 02:54:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id sAEYYY1788612x8GXZo9MRwz; Thu, 23 Apr 2020 02:54:12 -0700 X-Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by mx.groups.io with SMTP id smtpd.web12.3226.1587635651639876102 for ; Thu, 23 Apr 2020 02:54:11 -0700 Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57944+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 9vlkfb7ZY76Bm751o/Vf+f34N5l8mI/vDeb9WFqbfXN0DrZ+1w/CNuTAZbGvk+Gc6y44pLLWG+ pzRtcEiad05+FgxzAjCY5O1WSr7pXT3TXG83yevqaUCKZS/AKH6jjGSh1w03HbkI7gPKKH8AdT PeBruEQSOUgiE1PtkCmjUMGcVLI4zoGOuAmkmnWH2rt51jBWZfSr8pYPJIwmxItmjRiJ8iKavf hDxy3q2yi7vy9O+Mk3wI6nKIZXcupGYiFqdl3q4iMCvhnjvwU01x+rIJAXZWsyU0HuC2F5YV38 wQg= X-SBRS: 2.7 X-MesageID: 16133489 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.73,306,1583211600"; d="scan'208";a="16133489" From: "Anthony PERARD" To: CC: Laszlo Ersek , Ard Biesheuvel , Jordan Justen , Julien Grall , Anthony Perard Subject: [edk2-devel] [PATCH v2 5/5] OvmfPkg/OvmfXen: Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag Date: Thu, 23 Apr 2020 10:53:58 +0100 Message-ID: <20200423095358.2518197-6-anthony.perard@citrix.com> In-Reply-To: <20200423095358.2518197-1-anthony.perard@citrix.com> References: <20200423095358.2518197-1-anthony.perard@citrix.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,anthony.perard@citrix.com X-Gm-Message-State: XdAUh5yw7d34X0cyTGxa5FEUx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1587635652; bh=QNqwHA0Fg9nU9UqfEY+LgDI5mgZxXEk/kV7S/aSL9B8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=EElPwNFKJMDvULS8fzS+xM7q4PnuaquTXF9x8x0byqLG7LblERgfllZdJd6867UONjH RWTEwRSuWVasiDxdu9bC6tkShaHDGyJu2zAym2KfGyPsRczWnszS26TdmKmDX4Hb5q+ZQ 7pPfJrnfCe7cEE0UiEtedqrmUfqBU48GEtg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Introduce DEBUG_ON_HYPERVISOR_CONSOLE build flag to enable logging debug output to the Xen console. This will work with both Xen HVM guest and Xen PVH guest whereas the default PlatformDebugLibIoPort works only in HVM when QEMU is present. Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- OvmfPkg/OvmfXen.dsc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 4859faf1bff7..0a8fd26990a3 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -205,14 +205,22 @@ [LibraryClasses] Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeT= cg2PhysicalPresenceLib.inf TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf RealTimeClockLib|OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClockLib= .inf +!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE) + DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPor= tNocheck.inf +!else DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.i= nf +!endif =20 [LibraryClasses.common] BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf =20 [LibraryClasses.common.SEC] QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf +!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE) + DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPor= tNocheck.inf +!else DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPor= t.inf +!endif ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiRepor= tStatusCodeLib.inf ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseE= xtractGuidedSectionLib.inf !if $(SOURCE_DEBUG_ENABLE) =3D=3D TRUE @@ -405,6 +413,11 @@ [PcdsFixedAtBuild] # !include NetworkPkg/NetworkPcds.dsc.inc =20 +!ifdef $(DEBUG_ON_HYPERVISOR_CONSOLE) + ## Set Xen's debug IO port for PlatformDebugLibIoPort + gUefiOvmfPkgTokenSpaceGuid.PcdDebugIoPort|0xe9 +!endif + # IRQs 5, 9, 10, 11 are level-triggered gUefiOvmfPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel|0x0E20 =20 --=20 Anthony PERARD -=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 (#57944): https://edk2.groups.io/g/devel/message/57944 Mute This Topic: https://groups.io/mt/73215163/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-