X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FPlatformPei%2FXen.c;h=89dc4143b23b6fa060ca216ca8211b2b73d65a2c;hb=b0663641c977f97bef785c86978603c3a31a3d1c;hp=1886326f20c66ed30f5c4263e435b2ce05dea3bd;hpb=c191a58fac8901952b44c31856c9f25e390b09b5;p=mirror_edk2.git
diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c
index 1886326f20..89dc4143b2 100644
--- a/OvmfPkg/PlatformPei/Xen.c
+++ b/OvmfPkg/PlatformPei/Xen.c
@@ -1,16 +1,10 @@
/**@file
Xen Platform PEI support
- Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
Copyright (c) 2011, Andrei Warkentin
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -171,6 +165,7 @@ XenPublishRamRegions (
//
// Parse RAM in E820 map
//
+ E820EntriesCount = 0;
Status = XenGetE820Map (&E820Map, &E820EntriesCount);
ASSERT_EFI_ERROR (Status);
@@ -189,11 +184,7 @@ XenPublishRamRegions (
continue;
}
- if (Entry->BaseAddr >= BASE_4GB) {
- AddUntestedMemoryBaseSizeHob (Entry->BaseAddr, Entry->Length);
- } else {
- AddMemoryBaseSizeHob (Entry->BaseAddr, Entry->Length);
- }
+ AddMemoryBaseSizeHob (Entry->BaseAddr, Entry->Length);
MtrrSetMemoryAttribute (Entry->BaseAddr, Entry->Length, CacheWriteBack);
}
@@ -213,6 +204,8 @@ InitializeXen (
VOID
)
{
+ RETURN_STATUS PcdStatus;
+
if (mXenLeaf == 0) {
return EFI_NOT_FOUND;
}
@@ -223,9 +216,10 @@ InitializeXen (
// Reserve away HVMLOADER reserved memory [0xFC000000,0xFD000000).
// This needs to match HVMLOADER RESERVED_MEMBASE/RESERVED_MEMSIZE.
//
- AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000);
+ AddReservedMemoryBaseSizeHob (0xFC000000, 0x1000000, FALSE);
- PcdSetBool (PcdPciDisableBusEnumeration, TRUE);
+ PcdStatus = PcdSetBoolS (PcdPciDisableBusEnumeration, TRUE);
+ ASSERT_RETURN_ERROR (PcdStatus);
return EFI_SUCCESS;
}