]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuDxe/CpuDxe.c
UefiCpuPkg/CpuDxe: Do not ASSERT on AllocateMemorySpace() error
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / CpuDxe.c
index 2fd2f313a99b1f7645aecef616ea6ba479628fdb..4a5e282741bc6d9ea8336e5e60621ff9099ee47a 100644 (file)
@@ -1075,6 +1075,11 @@ AddLocalApicMemorySpace (
   Status = AddMemoryMappedIoSpace (BaseAddress, SIZE_4KB, EFI_MEMORY_UC);\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  //\r
+  // Try to allocate APIC memory mapped space, does not check return \r
+  // status because it may be allocated by other driver, or DXE Core if\r
+  // this range is built into Memory Allocation HOB.\r
+  //\r
   Status = gDS->AllocateMemorySpace (\r
                   EfiGcdAllocateAddress,\r
                   EfiGcdMemoryTypeMemoryMappedIo,\r
@@ -1084,7 +1089,10 @@ AddLocalApicMemorySpace (
                   ImageHandle,\r
                   NULL\r
                   );\r
-  ASSERT_EFI_ERROR (Status);\r
+  if (EFI_ERROR (Status)) {\r
+    DEBUG ((DEBUG_INFO, "%a: %a: AllocateMemorySpace() Status - %r\n",\r
+                         gEfiCallerBaseName, __FUNCTION__, Status));\r
+  }\r
 }\r
 \r
 /**\r