diff options
author | Jeff Fan <jeff.fan@intel.com> | 2017-02-24 13:58:48 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2017-02-27 10:28:37 +0800 |
commit | 29c90f14c91bf134a202c1b4ed600c9766bc1411 (patch) | |
tree | f03aed607d5b0004c28763fb929d83b8d385e22d /UefiCpuPkg/CpuDxe | |
parent | a2ed40c02bf24ec335d68056d92a6c164a61b35f (diff) | |
download | edk2-29c90f14c91bf134a202c1b4ed600c9766bc1411.zip edk2-29c90f14c91bf134a202c1b4ed600c9766bc1411.tar.gz edk2-29c90f14c91bf134a202c1b4ed600c9766bc1411.tar.bz2 |
UefiCpuPkg/CpuDxe: Do not ASSERT on AllocateMemorySpace() error
Platform PEI may add LOCAL APIC memory mapped space into
EFI_HOB_MEMORY_ALLOCATION. Or platform may allocate this range before.
So, we skip AllocateMemorySpace()'s return status checking. Instead, we add one
DEBUG message for possible trace.
https://bugzilla.tianocore.org/show_bug.cgi?id=390
This updating is suggested by Ersek's comments at
https://www.mail-archive.com/edk2-devel@lists.01.org/msg22585.html
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'UefiCpuPkg/CpuDxe')
-rw-r--r-- | UefiCpuPkg/CpuDxe/CpuDxe.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index 2fd2f31..4a5e282 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -1075,6 +1075,11 @@ AddLocalApicMemorySpace ( Status = AddMemoryMappedIoSpace (BaseAddress, SIZE_4KB, EFI_MEMORY_UC);
ASSERT_EFI_ERROR (Status);
+ //
+ // Try to allocate APIC memory mapped space, does not check return
+ // status because it may be allocated by other driver, or DXE Core if
+ // this range is built into Memory Allocation HOB.
+ //
Status = gDS->AllocateMemorySpace (
EfiGcdAllocateAddress,
EfiGcdMemoryTypeMemoryMappedIo,
@@ -1084,7 +1089,10 @@ AddLocalApicMemorySpace ( ImageHandle,
NULL
);
- ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_INFO, "%a: %a: AllocateMemorySpace() Status - %r\n",
+ gEfiCallerBaseName, __FUNCTION__, Status));
+ }
}
/**
|