summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHarsimran Singh Tungal <[email protected]>2026-04-27 16:05:30 +0100
committerHeinrich Schuchardt <[email protected]>2026-05-18 08:32:58 +0200
commitd0d1c4a4f5d13c8dd792d5cc5379eb4c1e0f0c46 (patch)
treef1c232a556f1a14e04afa9db9704b0bb8e7ec0af /cmd
parent215496fec59b3fa09256b4fb62f92af46e2ec7f9 (diff)
efi_loader: fix AllocatePages overlap status
Return EFI_NOT_FOUND for EFI_ALLOCATE_ADDRESS overlap When efi_allocate_pages() is called with EFI_ALLOCATE_ADDRESS, UEFI expects EFI_NOT_FOUND if the requested address range is already allocated or unavailable. U-Boot currently returns EFI_OUT_OF_RESOURCES when efi_update_memory_map() detects an overlap after a successful lmb_alloc_mem(), which does not match EFI_ALLOCATE_ADDRESS semantics. Return EFI_NOT_FOUND for EFI_ALLOCATE_ADDRESS requests that fail due to an overlapping EFI memory descriptor, while keeping EFI_OUT_OF_RESOURCES for other allocation types. The UEFI specification [1] specifies that EFI_BOOT_SERVICES.AllocatePages must return EFI_NOT_FOUND when the requested address range is unavailable or already allocated; EFI_OUT_OF_RESOURCES applies to non‑address‑specific allocation failures. [1] https://uefi.org/specs/UEFI/2.10_A/07_Services_Boot_Services.html Signed-off-by: Harsimran Singh Tungal <[email protected]> The UEFI specification does not clearly specify the behavior. But let's follow the EDK II precedent here. Reviewed-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions