summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/XenPlatformPei
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2019-08-13 12:30:55 +0100
committerLaszlo Ersek <lersek@redhat.com>2019-08-21 18:03:49 +0200
commit594b5002a63113ff867782378e20df343f77ebc0 (patch)
treea8a77d9b14c48321beb312efbf1e26785061a584 /OvmfPkg/XenPlatformPei
parent8651e1ce71ac7e974930016438cdc11bcb113c30 (diff)
downloadedk2-594b5002a63113ff867782378e20df343f77ebc0.tar.gz
edk2-594b5002a63113ff867782378e20df343f77ebc0.tar.bz2
edk2-594b5002a63113ff867782378e20df343f77ebc0.zip
OvmfPkg/XenPlatformPei: Use mXenHvmloaderInfo to get E820
Use the already checked pointer mXenHvmloaderInfo to retrieve the E820 table produced by hvmloader. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190813113119.14804-12-anthony.perard@citrix.com>
Diffstat (limited to 'OvmfPkg/XenPlatformPei')
-rw-r--r--OvmfPkg/XenPlatformPei/Xen.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c
index 9962fe9fc7..5c7d7ddc1c 100644
--- a/OvmfPkg/XenPlatformPei/Xen.c
+++ b/OvmfPkg/XenPlatformPei/Xen.c
@@ -53,18 +53,18 @@ XenGetE820Map (
UINT32 *Count
)
{
- EFI_XEN_OVMF_INFO *Info =
- (EFI_XEN_OVMF_INFO *)(UINTN) OVMF_INFO_PHYSICAL_ADDRESS;
+ //
+ // Get E820 produced by hvmloader
+ //
+ if (mXenHvmloaderInfo != NULL) {
+ ASSERT (mXenHvmloaderInfo->E820 < MAX_ADDRESS);
+ *Entries = (EFI_E820_ENTRY64 *)(UINTN) mXenHvmloaderInfo->E820;
+ *Count = mXenHvmloaderInfo->E820EntriesCount;
- if (AsciiStrCmp ((CHAR8 *) Info->Signature, "XenHVMOVMF")) {
- return EFI_NOT_FOUND;
+ return EFI_SUCCESS;
}
- ASSERT (Info->E820 < MAX_ADDRESS);
- *Entries = (EFI_E820_ENTRY64 *)(UINTN) Info->E820;
- *Count = Info->E820EntriesCount;
-
- return EFI_SUCCESS;
+ return EFI_NOT_FOUND;
}
/**