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.9460.1687265664291889328 for ; Tue, 20 Jun 2023 05:54:24 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@freebsd.org header.s=dkim header.b=DeWlkotl; 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 4Qlmmb4h3hz3Zf3; Tue, 20 Jun 2023 12:54:23 +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 4Qlmmb3vKzz4T36; Tue, 20 Jun 2023 12:54:23 +0000 (UTC) (envelope-from corvink@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687265663; 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=DoJtGLtZGy0jQOGKrgvDoz0SwhcJsMopHomtdMhlmJw=; b=DeWlkotltekOHuZjnNCaB5exfXL4JzyOTwJhufizj1f65YWEUPVJeBzRUwz5i7rB3F62Iu vCRzM3DBUAWG1fG4ysf3Ui1UyP9vIPrjUzWROpowRVvexQEETza6H/ltWwT7JrpTGwpwSf IZZxysYmo8yPPo641MMH0mvHkAyKZlbQI9LzYeNxBjLYCoAO8ABGMxNxZsAXeFzur3/1tM PpdZ1sC5+CoDekZfhuX2btSBbsyq/HzVmdsUmH5Hn8M2yrmciB3qy4yM1is3GqpRdhlMyw AI/U2jmi+pWe0ulgxC51xLPQEcQxnfldxwQ9VUmwS+jtJANgRtWsT9JFlUUXvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687265663; 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=DoJtGLtZGy0jQOGKrgvDoz0SwhcJsMopHomtdMhlmJw=; b=U9/sbpTC35pCKfXiKg5M8VXhqrNfySYJMxR32OZGbSqpbGRZB4Tg3LjdE5jDpuhhzf0CET UWV3NB06rqqg6gFbG9zoX/1RJrba7woVgNb3r5azi0enYGj14XsTHfiTDKoAlwvOxccZ60 FFYrDSCC5vUkbQFtj8nF0EezVGtSwMaMxPOcpPBjTgVwAfGIg3Udiw04C5ZRLQy0tgV8+R nMVEuPqfmBEi1rxFusZFyavdwOd4KwNh6ufhbYp/QqpBObx+QlPLrU6/gr0p2Q8HvBAHed CltPhg2cnLdZ7qIgfpTrs9LWsscz4UtQDHHhqri/v9KXmK4u0LeZ9DnZq9Kb7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687265663; a=rsa-sha256; cv=none; b=N1JZ8/qkjMz+rgK4VgVV7x8pKqhBYD5WLpNa03F00LIlfalGIYB7wf7Mm1fA/chSYgcFxl KKCN/2Ttuhx0cyepY8uNPnk4D6yXzeJeyHgPnGSW1cQqlt0gm3iDoOhMXUQsqonfyH4WBB xKcI2dcbigBgj6Vwla9XPYkwILihLoZTZxrpp47yrIXZ/UVd1OHIY1W1yRb+gQkP7e0y83 FsCuB5gRQwe6L3FjLaxF9n5eLXplneFi6Ju5AAaDn5y1j7+t+CQBv+KdYaRfR0h5lgUYWX b1qX90KoLAGhUwNe0k9lPdA6pBUfdZFjqVLdLbM2xn8oKWgkNJitBAZP3dF6dQ== Received: from corvink-nb.beckhoff.com (unknown [IPv6:2001:9e8:da45:9200:c724:a25a:dc54:e67e]) (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 4QlmmZ3DxZz10rh; Tue, 20 Jun 2023 12:54:22 +0000 (UTC) (envelope-from corvink@FreeBSD.org) From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao , Jordan Justen , Leif Lindholm , Peter Grehan , Rebecca Cran , Sami Mujawar Subject: [PATCH v3 5/6] OvmfPkg: move QemuFwCfgAcpi into AcpiPlatformLib Date: Tue, 20 Jun 2023 14:53:39 +0200 Message-ID: <20230620125407.516697-6-corvink@FreeBSD.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230620125407.516697-1-corvink@FreeBSD.org> References: <20230620125407.516697-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 Cc: Ard Biesheuvel Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Jordan Justen Cc: Leif Lindholm Cc: Peter Grehan 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