diff options
author | Corvin Köhne <corvink@freebsd.org> | 2023-06-21 09:31:15 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-06-23 17:26:37 +0000 |
commit | 5a118a61d12215dc1a984c4bec76fb59c6efa2bb (patch) | |
tree | e31b54140d43df03acf6881a772e31d2311ae564 | |
parent | 0f612c1443975904ff9ef1b9e3b980f8ea009ab6 (diff) | |
download | edk2-5a118a61d12215dc1a984c4bec76fb59c6efa2bb.tar.gz |
OvmfPkg: move QemuFwCfgAcpi into AcpiPlatformLib
This makes the InstallQemuFwcfgTables function reusable by bhyve.
Signed-off-by: Corvin Köhne <corvink@FreeBSD.org>
Acked-by: Peter Grehan <grehan@freebsd.org>
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c | 3 | ||||
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h | 6 | ||||
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 3 | ||||
-rw-r--r-- | OvmfPkg/Include/Library/AcpiPlatformLib.h | 6 | ||||
-rw-r--r-- | OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf | 5 | ||||
-rw-r--r-- | OvmfPkg/Library/AcpiPlatformLib/QemuFwCfgAcpi.c (renamed from OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c) | 2 |
6 files changed, 14 insertions, 11 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c index b446bb4872..20c98bb67f 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c @@ -9,6 +9,9 @@ #include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
#include <ConfidentialComputingGuestAttr.h>
+
+#include <Library/AcpiPlatformLib.h>
+
#include "AcpiPlatform.h"
/**
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h index c9f2755014..f4ae84b5a1 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h @@ -25,12 +25,6 @@ InstallCloudHvTables ( EFI_STATUS
EFIAPI
-InstallQemuFwCfgTables (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
- );
-
-EFI_STATUS
-EFIAPI
InstallAcpiTables (
IN EFI_ACPI_TABLE_PROTOCOL *AcpiTable
);
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf index 6001b96269..622589e607 100644 --- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -25,7 +25,6 @@ AcpiPlatform.h
CloudHvAcpi.c
EntryPoint.c
- QemuFwCfgAcpi.c
[Packages]
MdeModulePkg/MdeModulePkg.dec
@@ -41,12 +40,10 @@ QemuFwCfgLib
UefiDriverEntryPoint
HobLib
- TpmMeasurementLib
[Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
- gQemuAcpiTableNotifyProtocolGuid # PROTOCOL PRODUCES
[Guids]
gRootBridgesConnectedEventGroupGuid
diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h b/OvmfPkg/Include/Library/AcpiPlatformLib.h index 70c974dce0..277be93a50 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
);
+EFI_STATUS
+EFIAPI
+InstallQemuFwCfgTables (
+ IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
+ );
+
VOID
EnablePciDecoding (
OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,
diff --git a/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf index b6e55b618c..59fcb957d0 100644 --- a/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf +++ b/OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf @@ -18,6 +18,7 @@ BootScript.c
DxeAcpiPlatformLib.c
PciDecoding.c
+ QemuFwCfgAcpi.c
[Packages]
MdeModulePkg/MdeModulePkg.dec
@@ -30,6 +31,10 @@ PcdLib
QemuFwCfgS3Lib
UefiBootServicesTableLib
+ TpmMeasurementLib
+
+[Protocols]
+ gQemuAcpiTableNotifyProtocolGuid # PROTOCOL PRODUCES
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/Library/AcpiPlatformLib/QemuFwCfgAcpi.c index 3de039d574..d9d0163ffd 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/Library/AcpiPlatformLib/QemuFwCfgAcpi.c @@ -22,8 +22,6 @@ #include <Library/UefiBootServicesTableLib.h> // gBS
#include <Library/TpmMeasurementLib.h>
-#include "AcpiPlatform.h"
-
//
// The user structure for the ordered collection that will track the fw_cfg
// blobs under processing.
|