projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d98807
)
efi_loader: use EFI_PAGE_MASK instead of EFI_PAGE_SIZE - 1
author
xypron.glpk@gmx.de
<xypron.glpk@gmx.de>
Fri, 11 Aug 2017 19:19:37 +0000
(21:19 +0200)
committer
Alexander Graf
<agraf@suse.de>
Sat, 12 Aug 2017 12:05:45 +0000
(14:05 +0200)
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>
lib/efi_loader/efi_runtime.c
patch
|
blob
|
history
diff --git
a/lib/efi_loader/efi_runtime.c
b/lib/efi_loader/efi_runtime.c
index dd52755d1d707706211e2d5101503590efa009c2..ad7f3754bd0970b5209f756d5f1d7ce4883e4587 100644
(file)
--- a/
lib/efi_loader/efi_runtime.c
+++ b/
lib/efi_loader/efi_runtime.c
@@
-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));