summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_memory.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-11-06 07:51:44 -0500
committerTom Rini <trini@konsulko.com>2022-11-06 07:51:44 -0500
commitd332cd59f7f1666e492eccdfdb0263c9cd85fc93 (patch)
tree5267d25ac960f4a0831a0730b90b4653f5878580 /lib/efi_loader/efi_memory.c
parent898bd53e6a930080cee7cd7b1a09120c4dfd9467 (diff)
parent53def68df5ec10c9aaa46d3422c58fc85d0c93e6 (diff)
Merge tag 'efi-2023-01-rc1-4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-01-rc1-4 Documentation: * Provide a document about security issue handling. UEFI: * Let networking support depend on NETDEVICES. * Discover if no efi_system_partition is set. Other: * MAINTAINERS: add arch/arm/lib/*_efi.* to EFI_PAYLOAD.
Diffstat (limited to 'lib/efi_loader/efi_memory.c')
-rw-r--r--lib/efi_loader/efi_memory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index e048a545e41..a17b426d11f 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -483,6 +483,8 @@ efi_status_t efi_allocate_pages(enum efi_allocate_type type,
return EFI_OUT_OF_RESOURCES;
break;
case EFI_ALLOCATE_ADDRESS:
+ if (*memory & EFI_PAGE_MASK)
+ return EFI_NOT_FOUND;
/* Exact address, reserve it. The addr is already in *memory. */
ret = efi_check_allocated(*memory, false);
if (ret != EFI_SUCCESS)