Skip to content
Snippets Groups Projects
Commit aee4f06d authored by xypron.glpk@gmx.de's avatar xypron.glpk@gmx.de Committed by Alexander Graf
Browse files

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: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 3d988078
No related branches found
No related tags found
No related merge requests found
...@@ -325,7 +325,7 @@ void efi_add_runtime_mmio(void *mmio_ptr, u64 len) ...@@ -325,7 +325,7 @@ void efi_add_runtime_mmio(void *mmio_ptr, u64 len)
{ {
struct efi_runtime_mmio_list *newmmio; 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); efi_add_memory_map(*(uintptr_t *)mmio_ptr, pages, EFI_MMAP_IO, false);
newmmio = calloc(1, sizeof(*newmmio)); newmmio = calloc(1, sizeof(*newmmio));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment