summaryrefslogtreecommitdiffstats
path: root/UefiPayloadPkg
diff options
context:
space:
mode:
authorZhiguang Liu <zhiguang.liu@intel.com>2021-06-17 09:20:57 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-24 09:16:22 +0000
commit86e6948cfbbe802aced7b7f3c6190ac0726c8725 (patch)
tree6b5a789124f40e527ff7e45498ab11af2fe4c97b /UefiPayloadPkg
parent6b69f73b5924530ffe0d1e3dc11e5f7284c66851 (diff)
downloadedk2-86e6948cfbbe802aced7b7f3c6190ac0726c8725.tar.gz
edk2-86e6948cfbbe802aced7b7f3c6190ac0726c8725.tar.bz2
edk2-86e6948cfbbe802aced7b7f3c6190ac0726c8725.zip
UefiPayloadPkg: Remove assert when reserve MMIO/IO resource for devices
Some boot loader may already reserve MMIO/IO resource for IOAPIC and HPET, so remove the assert when reserve MMIO/IO resource for IOAPIC and HPET Cc: Maurice Ma <maurice.ma@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
Diffstat (limited to 'UefiPayloadPkg')
-rw-r--r--UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
index ffd3427fb3..04e968a232 100644
--- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
+++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
@@ -41,13 +41,12 @@ ReserveResourceInGcd (
);
if (EFI_ERROR (Status)) {
DEBUG ((
- DEBUG_ERROR,
+ DEBUG_WARN,
"Failed to add memory space :0x%lx 0x%lx\n",
BaseAddress,
Length
));
}
- ASSERT_EFI_ERROR (Status);
Status = gDS->AllocateMemorySpace (
EfiGcdAllocateAddress,
GcdType,
@@ -57,14 +56,20 @@ ReserveResourceInGcd (
ImageHandle,
NULL
);
- ASSERT_EFI_ERROR (Status);
} else {
Status = gDS->AddIoSpace (
GcdType,
BaseAddress,
Length
);
- ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((
+ DEBUG_WARN,
+ "Failed to add IO space :0x%lx 0x%lx\n",
+ BaseAddress,
+ Length
+ ));
+ }
Status = gDS->AllocateIoSpace (
EfiGcdAllocateAddress,
GcdType,
@@ -74,7 +79,6 @@ ReserveResourceInGcd (
ImageHandle,
NULL
);
- ASSERT_EFI_ERROR (Status);
}
return Status;
}
@@ -106,11 +110,9 @@ BlDxeEntryPoint (
//
// Report MMIO/IO Resources
//
- Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEC00000, SIZE_4KB, 0, ImageHandle); // IOAPIC
- ASSERT_EFI_ERROR (Status);
+ ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFEC00000, SIZE_4KB, 0, ImageHandle); // IOAPIC
- Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFED00000, SIZE_1KB, 0, ImageHandle); // HPET
- ASSERT_EFI_ERROR (Status);
+ ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 0xFED00000, SIZE_1KB, 0, ImageHandle); // HPET
//
// Find the frame buffer information and update PCDs