From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by mx.groups.io with SMTP id smtpd.web11.5634.1687332715754294044 for ; Wed, 21 Jun 2023 00:31:55 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@freebsd.org header.s=dkim header.b=XzR1bT1O; spf=pass (domain: freebsd.org, ip: 96.47.72.81, mailfrom: corvink@freebsd.org) Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4QmFZ30yFBz3d2j; Wed, 21 Jun 2023 07:31:55 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QmFZ30Cgvz3snk; Wed, 21 Jun 2023 07:31:55 +0000 (UTC) (envelope-from corvink@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687332715; 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=IYfrYU6rCR84EF1bqizCNQPu1Y9IyY5DRjIKme045PU=; b=XzR1bT1Ovw2u0ZNIy3KoP2rolQUOtlEvxkwt3B9UmH38B/i4QE2ZlXTIh6FwZMJFRcqO3l 02xtDMizEpP/V9bPbYmtsmMcyV4zkKeUEwadfhqteooS9sZjQIm+sco3KWw41UMserI72F YJG8YpwytI0JjXs6SZX7PdcZj2kOLUByTYhCd24PsqNwkrc03t/QwghfGFJbR9t6DN++/O upNfEu10xEsHS/Efd+Wl8bwam5Rao+gzt+60VLxsoRfKcvciCngCVCziHvIhq1NjrtTwS1 1U2ozMR1nvEFZxoJ9QUYL59Ll880xva5z+ZxbBB6IahuvoTJuAwTEscWGVGIGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687332715; 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=IYfrYU6rCR84EF1bqizCNQPu1Y9IyY5DRjIKme045PU=; b=TRzL+0fORpP0oe+rog+B6V+Q+UMJI0d4zTMJz+nmDRfiHJQW8wi4gKVJkbbHtTxUxdb5Da ZIo9HQljXbvoaFS/o/fqKFwi1IiFQlWS6zaZc5BEnVrEa1AMEoqtt6SnCeHXwlVLS0yykS rueOVNEAQwhBrC4ftaKQYApfmOk6ICExmYA2qHrtRbeo5hpmBUwjsptZ9jk5dXe34rpv7U GXHqWxmW5SEQFfpXm991TApxX2sjZW66eDO66q+CU8YFtbc1zkVQcp+AZuBWQCh1hbwU8c yUTlUXdAphH40/lB0qA13FsPWo4xbfeE8npoW61Wqnx8079VX5N3jYZsih0Yzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687332715; a=rsa-sha256; cv=none; b=ZhdwG7zWJL8L/vd9OwlIkt+nmaCMY8XIVm4ySAgNZhYsgPC8ENDLRtFpeQM2TRndzzB+Mv R3297Q/Qnu95q1XWXUa8LJJ42LRzt/6l95c0aWeMUCY02QMz4DEyodcoTiUqTruJRpC70r XKQoyoguAHU7DM2BFJgFD7T2p07HmXHRAFbg+eTEa8UtoAbDo68GsfvhptuT032D4TPvo6 NmgXtXZKKhSBXzv2zm9LkUTsRJPr9vpS2EqsmexasEv5ic9slH+aLN9V+2fhUlAmpmqy5Z iSR8F09fH48U6Kx4KouGR8CwusNQomqQu3JvpnXeGT3iXxSRt6GdEvDWFYtMLQ== Received: from corvink-nb.beckhoff.com (unknown [IPv6:2001:9e8:da6d:2500:f78a:5460:c2c3:5780]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: corvink) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QmFZ16VdvzN8j; Wed, 21 Jun 2023 07:31:53 +0000 (UTC) (envelope-from corvink@FreeBSD.org) From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: devel@edk2.groups.io Cc: Peter Grehan , Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Rebecca Cran , Sami Mujawar Subject: [PATCH v4 5/6] OvmfPkg: move QemuFwCfgAcpi into AcpiPlatformLib Date: Wed, 21 Jun 2023 09:31:15 +0200 Message-ID: <20230621073141.149094-6-corvink@FreeBSD.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230621073141.149094-1-corvink@FreeBSD.org> References: <20230621073141.149094-1-corvink@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This makes the InstallQemuFwcfgTables function reusable by bhyve. Signed-off-by: Corvin K=C3=B6hne Acked-by: Peter Grehan Cc: Ard Biesheuvel Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Jordan Justen Cc: Leif Lindholm Cc: Rebecca Cran Cc: Sami Mujawar --- OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 3 --- OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf | 5 +++++ OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h | 6 ------ OvmfPkg/Include/Library/AcpiPlatformLib.h | 6 ++++++ OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c | 3 +++ .../AcpiPlatformLib}/QemuFwCfgAcpi.c | 2 -- 6 files changed, 14 insertions(+), 11 deletions(-) rename OvmfPkg/{AcpiPlatformDxe =3D> Library/AcpiPlatformLib}/QemuFwCfgA= cpi.c (96%) diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf b/OvmfPkg/AcpiPl= atformDxe/AcpiPlatformDxe.inf index 6001b9626970..622589e607e9 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -25,7 +25,6 @@ [Sources] AcpiPlatform.h CloudHvAcpi.c EntryPoint.c - QemuFwCfgAcpi.c =20 [Packages] MdeModulePkg/MdeModulePkg.dec @@ -41,12 +40,10 @@ [LibraryClasses] QemuFwCfgLib UefiDriverEntryPoint HobLib - TpmMeasurementLib =20 [Protocols] gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUM= ED gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CON= SUMED - gQemuAcpiTableNotifyProtocolGuid # PROTOCOL PRODUCES =20 [Guids] gRootBridgesConnectedEventGroupGuid diff --git a/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf b/Ovm= fPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf index b6e55b618cbb..59fcb957d059 100644 --- a/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf +++ b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf @@ -18,6 +18,7 @@ [Sources] BootScript.c DxeAcpiPlatformLib.c PciDecoding.c + QemuFwCfgAcpi.c =20 [Packages] MdeModulePkg/MdeModulePkg.dec @@ -30,6 +31,10 @@ [LibraryClasses] PcdLib QemuFwCfgS3Lib UefiBootServicesTableLib + TpmMeasurementLib + +[Protocols] + gQemuAcpiTableNotifyProtocolGuid # PROTOCOL PRODUCES =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/AcpiPlatfor= mDxe/AcpiPlatform.h index c9f2755014a1..f4ae84b5a194 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h @@ -23,12 +23,6 @@ InstallCloudHvTables ( IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol ); =20 -EFI_STATUS -EFIAPI -InstallQemuFwCfgTables ( - IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol - ); - EFI_STATUS EFIAPI InstallAcpiTables ( diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h b/OvmfPkg/Include/= Library/AcpiPlatformLib.h index 70c974dce05e..277be93a50bc 100644 --- a/OvmfPkg/Include/Library/AcpiPlatformLib.h +++ b/OvmfPkg/Include/Library/AcpiPlatformLib.h @@ -59,6 +59,12 @@ InstallAcpiTablesFromRsdp ( IN EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp ); =20 +EFI_STATUS +EFIAPI +InstallQemuFwCfgTables ( + IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol + ); + VOID EnablePciDecoding ( OUT ORIGINAL_ATTRIBUTES **OriginalAttributes, diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/AcpiPlatfor= mDxe/AcpiPlatform.c index b446bb487234..20c98bb67fa3 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c @@ -9,6 +9,9 @@ =20 #include // CLOUDHV_DEVICE_ID #include + +#include + #include "AcpiPlatform.h" =20 /** diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/Library/Ac= piPlatformLib/QemuFwCfgAcpi.c similarity index 96% rename from OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c rename to OvmfPkg/Library/AcpiPlatformLib/QemuFwCfgAcpi.c index 3de039d57414..d9d0163ffd9f 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/Library/AcpiPlatformLib/QemuFwCfgAcpi.c @@ -22,8 +22,6 @@ #include // gBS #include =20 -#include "AcpiPlatform.h" - // // The user structure for the ordered collection that will track the fw_= cfg // blobs under processing. --=20 2.41.0