mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
efi_loader: use EFI_PAGE_MASK instead of EFI_PAGE_SIZE - 1
We should be consistent in the way we calculate page sizes. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
3d9880784e
commit
aee4f06dff
1 changed files with 1 additions and 1 deletions
|
@ -325,7 +325,7 @@ void efi_add_runtime_mmio(void *mmio_ptr, u64 len)
|
|||
{
|
||||
struct efi_runtime_mmio_list *newmmio;
|
||||
|
||||
u64 pages = (len + EFI_PAGE_SIZE - 1) >> EFI_PAGE_SHIFT;
|
||||
u64 pages = (len + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT;
|
||||
efi_add_memory_map(*(uintptr_t *)mmio_ptr, pages, EFI_MMAP_IO, false);
|
||||
|
||||
newmmio = calloc(1, sizeof(*newmmio));
|
||||
|
|
Loading…
Add table
Reference in a new issue