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.web10.6152.1686729570120554121 for ; Wed, 14 Jun 2023 00:59:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@freebsd.org header.s=dkim header.b=BsK8Y+sM; spf=pass (domain: freebsd.org, ip: 96.47.72.81, mailfrom: corvink@freebsd.org) Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (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 4QgyW52P47z44fT; Wed, 14 Jun 2023 07:59:29 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4QgyW474hgz3Jkp; Wed, 14 Jun 2023 07:59:28 +0000 (UTC) (envelope-from corvink@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686729569; 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=BsK8Y+sMoaALJsrPutyhT1DPbzD4gP5Jm1tMrgGuU2peZNCzVbmit4tS4tZ82jKEvrt/FY 6y89jnBZNQ3UuwvyDPXB/O3Y8ViCsbz3yWDwq4700sBG/4j2Ac70dbyyW/8r1tfpJ3tLLL feAdC2k4FG0Z3snjZuF4K1vSIrKTf6AuQUNRCnWo/490pUBzF5gcVnX3cje3NbQysiww+S PEuYesdFPRMIojo/sYz/nhitnpnA4RKQ3JN7z+8jqznZnpL6yPF3mqqNFZ8EX7kcpqb+6A Ug0iQp3XoD2M5hmWntTXV1KJahX+jgkniO5TAGKO7UyC2tB6bMX+DuqTLUVpWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686729569; 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=P8OucPLvIGaBolShoEadsvrgPCySL4DcEyS6ZhiAFgUo2ylapFPn/t6uEDsa0rK3G0+rKZ pU1uVmXy4ArHlXJw1ozBKFkzvpweks6J2baoHsr4UAE3WpaQwn6rcGEYSC4E8Z9EwFmTNF 9nvSq26kGIw6g/WG3cyhQju4GIprNMgqsm47H7IxJMpPQfulsEl6lbg8NOvjHQmKrCRbLk 9LiOGMByfZfSNdOaLUoC9Ou6TPRMeOwdGKQlDxvF2Pz9fY+efGkFYPkhXYE/zQ467e1Jbr JaHZBka8GVpwb9L19GpXdiTxnp9lbcRieRjTTyp5Z/oSpO/ljQtIgHLN8OjCZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686729569; a=rsa-sha256; cv=none; b=gzT2VjeZZLEwC6pYFVPcL+nABjkbFiXbmBHh43+WdXanS7rHHSJyKSkh81AZ2rIkXO92bB vyUO9M0AyYUefrrD3HddOgxhe7v3D7GyuYIYNUhoGiBi8wTDfdL2/kKeyEBcYBQhpaRGWY rmXvB9SqboEUIBVAtVd2sTbBAJL18EHULnuHUuYgvftU9UMJrXi7rcWuOuDTkg7669tsA+ e2fbU9XBxqlFrL82cNDpfM1FofVAYqrglQhAZ5478JJK1zO8Fbvy32PEXByNS/Ynpb7dYM UrMFHKFTW3SjFbUweQUSFNMRFWz1ef9HJQ1oKwF8H6RvnFzS9Tkh11LQRyd+5Q== Received: from corvink-nb.beckhoff.com (unknown [195.226.174.194]) (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 4QgyW35R1jzG9t; Wed, 14 Jun 2023 07:59:27 +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 4/5] OvmfPkg: move QemuFwCfgAcpi into AcpiPlatformLib Date: Wed, 14 Jun 2023 09:55:46 +0200 Message-ID: <20230614075915.141380-5-corvink@FreeBSD.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230614075915.141380-1-corvink@FreeBSD.org> References: <20230614075915.141380-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