mirror of https://github.com/acidanthera/audk.git
OvmfPkg/AcpiPlatformDxe: Use XenPlatformLib
This patch replace the XenDetected() function by the one in XenPlatformLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190813113119.14804-15-anthony.perard@citrix.com>
This commit is contained in:
parent
f496443eb3
commit
3afa2ed53f
|
@ -19,6 +19,7 @@
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
|
#include <Library/XenPlatformLib.h>
|
||||||
|
|
||||||
#include <IndustryStandard/Acpi.h>
|
#include <IndustryStandard/Acpi.h>
|
||||||
|
|
||||||
|
@ -52,11 +53,6 @@ QemuInstallAcpiTable (
|
||||||
OUT UINTN *TableKey
|
OUT UINTN *TableKey
|
||||||
);
|
);
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
XenDetected (
|
|
||||||
VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
InstallXenTables (
|
InstallXenTables (
|
||||||
|
|
|
@ -44,13 +44,13 @@
|
||||||
DebugLib
|
DebugLib
|
||||||
UefiBootServicesTableLib
|
UefiBootServicesTableLib
|
||||||
UefiDriverEntryPoint
|
UefiDriverEntryPoint
|
||||||
HobLib
|
|
||||||
QemuFwCfgLib
|
QemuFwCfgLib
|
||||||
QemuFwCfgS3Lib
|
QemuFwCfgS3Lib
|
||||||
MemoryAllocationLib
|
MemoryAllocationLib
|
||||||
BaseLib
|
BaseLib
|
||||||
DxeServicesTableLib
|
DxeServicesTableLib
|
||||||
OrderedCollectionLib
|
OrderedCollectionLib
|
||||||
|
XenPlatformLib
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
|
||||||
|
@ -58,7 +58,6 @@
|
||||||
gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
|
gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEfiXenInfoGuid
|
|
||||||
gRootBridgesConnectedEventGroupGuid
|
gRootBridgesConnectedEventGroupGuid
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#include "AcpiPlatform.h"
|
||||||
#include <Library/HobLib.h>
|
|
||||||
#include <Guid/XenInfo.h>
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
|
|
||||||
#define XEN_ACPI_PHYSICAL_ADDRESS 0x000EA020
|
#define XEN_ACPI_PHYSICAL_ADDRESS 0x000EA020
|
||||||
|
@ -18,28 +16,6 @@
|
||||||
|
|
||||||
EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *XenAcpiRsdpStructurePtr = NULL;
|
EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *XenAcpiRsdpStructurePtr = NULL;
|
||||||
|
|
||||||
/**
|
|
||||||
This function detects if OVMF is running on Xen.
|
|
||||||
|
|
||||||
**/
|
|
||||||
BOOLEAN
|
|
||||||
XenDetected (
|
|
||||||
VOID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EFI_HOB_GUID_TYPE *GuidHob;
|
|
||||||
|
|
||||||
//
|
|
||||||
// See if a XenInfo HOB is available
|
|
||||||
//
|
|
||||||
GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid);
|
|
||||||
if (GuidHob == NULL) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get the address of Xen ACPI Root System Description Pointer (RSDP)
|
Get the address of Xen ACPI Root System Description Pointer (RSDP)
|
||||||
structure.
|
structure.
|
||||||
|
|
|
@ -200,6 +200,7 @@
|
||||||
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
|
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
|
||||||
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
|
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
|
||||||
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
|
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
|
||||||
|
XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
|
||||||
|
|
||||||
!if $(TPM2_ENABLE) == TRUE
|
!if $(TPM2_ENABLE) == TRUE
|
||||||
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
|
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
|
||||||
|
|
|
@ -205,6 +205,7 @@
|
||||||
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
|
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
|
||||||
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
|
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
|
||||||
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
|
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
|
||||||
|
XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
|
||||||
|
|
||||||
!if $(TPM2_ENABLE) == TRUE
|
!if $(TPM2_ENABLE) == TRUE
|
||||||
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
|
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
|
||||||
|
|
|
@ -205,6 +205,7 @@
|
||||||
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
|
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
|
||||||
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
|
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
|
||||||
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
|
XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
|
||||||
|
XenPlatformLib|OvmfPkg/Library/XenPlatformLib/XenPlatformLib.inf
|
||||||
|
|
||||||
!if $(TPM2_ENABLE) == TRUE
|
!if $(TPM2_ENABLE) == TRUE
|
||||||
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
|
Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf
|
||||||
|
|
Loading…
Reference in New Issue