]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
UefiPayloadPkg: Remove assert when reserve MMIO/IO resource for devices
[mirror_edk2.git] / UefiPayloadPkg / BlSupportDxe / BlSupportDxe.c
index ffd3427fb3c1a97c54480c5038504cd5f4d66e63..04e968a232f560cdfc5e93a8406d637a2b4e686c 100644 (file)
@@ -41,13 +41,12 @@ ReserveResourceInGcd (
                     );\r
     if (EFI_ERROR (Status)) {\r
       DEBUG ((\r
-        DEBUG_ERROR,\r
+        DEBUG_WARN,\r
         "Failed to add memory space :0x%lx 0x%lx\n",\r
         BaseAddress,\r
         Length\r
         ));\r
     }\r
-    ASSERT_EFI_ERROR (Status);\r
     Status = gDS->AllocateMemorySpace (\r
                     EfiGcdAllocateAddress,\r
                     GcdType,\r
@@ -57,14 +56,20 @@ ReserveResourceInGcd (
                     ImageHandle,\r
                     NULL\r
                     );\r
-    ASSERT_EFI_ERROR (Status);\r
   } else {\r
     Status = gDS->AddIoSpace (\r
                     GcdType,\r
                     BaseAddress,\r
                     Length\r
                     );\r
-    ASSERT_EFI_ERROR (Status);\r
+    if (EFI_ERROR (Status)) {\r
+      DEBUG ((\r
+        DEBUG_WARN,\r
+        "Failed to add IO space :0x%lx 0x%lx\n",\r
+        BaseAddress,\r
+        Length\r
+        ));\r
+    }\r
     Status = gDS->AllocateIoSpace (\r
                     EfiGcdAllocateAddress,\r
                     GcdType,\r
@@ -74,7 +79,6 @@ ReserveResourceInGcd (
                     ImageHandle,\r
                     NULL\r
                     );\r
-    ASSERT_EFI_ERROR (Status);\r
   }\r
   return Status;\r
 }\r
@@ -106,11 +110,9 @@ BlDxeEntryPoint (
   //\r
   // Report MMIO/IO Resources\r
   //\r
-  Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEC00000, SIZE_4KB, 0, ImageHandle); // IOAPIC\r
-  ASSERT_EFI_ERROR (Status);\r
+  ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEC00000, SIZE_4KB, 0, ImageHandle); // IOAPIC\r
 \r
-  Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFED00000, SIZE_1KB, 0, ImageHandle); // HPET\r
-  ASSERT_EFI_ERROR (Status);\r
+  ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFED00000, SIZE_1KB, 0, ImageHandle); // HPET\r
 \r
   //\r
   // Find the frame buffer information and update PCDs\r