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>
This commit is contained in:
Corvin Köhne 2023-06-21 09:31:15 +02:00 committed by mergify[bot]
parent 0f612c1443
commit 5a118a61d1
6 changed files with 14 additions and 11 deletions

View File

@ -9,6 +9,9 @@
#include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID #include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
#include <ConfidentialComputingGuestAttr.h> #include <ConfidentialComputingGuestAttr.h>
#include <Library/AcpiPlatformLib.h>
#include "AcpiPlatform.h" #include "AcpiPlatform.h"
/** /**

View File

@ -23,12 +23,6 @@ InstallCloudHvTables (
IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
); );
EFI_STATUS
EFIAPI
InstallQemuFwCfgTables (
IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
);
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
InstallAcpiTables ( InstallAcpiTables (

View File

@ -25,7 +25,6 @@
AcpiPlatform.h AcpiPlatform.h
CloudHvAcpi.c CloudHvAcpi.c
EntryPoint.c EntryPoint.c
QemuFwCfgAcpi.c
[Packages] [Packages]
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec
@ -41,12 +40,10 @@
QemuFwCfgLib QemuFwCfgLib
UefiDriverEntryPoint UefiDriverEntryPoint
HobLib HobLib
TpmMeasurementLib
[Protocols] [Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gQemuAcpiTableNotifyProtocolGuid # PROTOCOL PRODUCES
[Guids] [Guids]
gRootBridgesConnectedEventGroupGuid gRootBridgesConnectedEventGroupGuid

View File

@ -59,6 +59,12 @@ InstallAcpiTablesFromRsdp (
IN EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp IN EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp
); );
EFI_STATUS
EFIAPI
InstallQemuFwCfgTables (
IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
);
VOID VOID
EnablePciDecoding ( EnablePciDecoding (
OUT ORIGINAL_ATTRIBUTES **OriginalAttributes, OUT ORIGINAL_ATTRIBUTES **OriginalAttributes,

View File

@ -18,6 +18,7 @@
BootScript.c BootScript.c
DxeAcpiPlatformLib.c DxeAcpiPlatformLib.c
PciDecoding.c PciDecoding.c
QemuFwCfgAcpi.c
[Packages] [Packages]
MdeModulePkg/MdeModulePkg.dec MdeModulePkg/MdeModulePkg.dec
@ -30,6 +31,10 @@
PcdLib PcdLib
QemuFwCfgS3Lib QemuFwCfgS3Lib
UefiBootServicesTableLib UefiBootServicesTableLib
TpmMeasurementLib
[Protocols]
gQemuAcpiTableNotifyProtocolGuid # PROTOCOL PRODUCES
[Pcd] [Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration

View File

@ -22,8 +22,6 @@
#include <Library/UefiBootServicesTableLib.h> // gBS #include <Library/UefiBootServicesTableLib.h> // gBS
#include <Library/TpmMeasurementLib.h> #include <Library/TpmMeasurementLib.h>
#include "AcpiPlatform.h"
// //
// The user structure for the ordered collection that will track the fw_cfg // The user structure for the ordered collection that will track the fw_cfg
// blobs under processing. // blobs under processing.