1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00
Files
u-boot-megous/lib/efi_loader
Alexander Graf c2e1ad70a7 efi_loader: Ensure memory allocations are page aligned
When the max_addr parameter of efi_find_free_memory() is within bounds
of an existing map and fits the reservation, we just return that address
as allocation value.

That breaks however if max_addr is not page aligned. So ensure that it
always comes to us page aligned, simplifying the allocation logic.

Without this, I've seen breakage where we were allocating pages at -1U
(32bit) which fits into a region that spans beyond 0x100000000. In that
case, we would return 0xffffffff as a valid memory allocation, although
we usually do guarantee they are all page aligned.

Fix this by aligning the max address argument always.

Signed-off-by: Alexander Graf <agraf@suse.de>
2018-12-02 21:59:37 +01:00
..
2018-12-02 21:59:37 +01:00
2018-12-02 21:59:37 +01:00
2018-12-02 21:59:36 +01:00
2018-12-02 21:59:37 +01:00
2018-12-02 21:59:37 +01:00
2018-09-23 21:55:31 +02:00
2018-09-23 21:55:31 +02:00