aboutsummaryrefslogtreecommitdiff
path: root/cmd/bootefi.c
diff options
context:
space:
mode:
authorxypron.glpk@gmx.de <xypron.glpk@gmx.de>2017-08-11 21:19:25 +0200
committerAlexander Graf <agraf@suse.de>2017-08-12 14:06:23 +0200
commita44bffcc9557cf5f761a43bce44a59fa85feab2a (patch)
tree2f444b0b9a50990d31d49d5e129c698b767be4e8 /cmd/bootefi.c
parentaee4f06dff36261433d90c94a5def2c90be8407c (diff)
downloadu-boot-a44bffcc9557cf5f761a43bce44a59fa85feab2a.zip
u-boot-a44bffcc9557cf5f761a43bce44a59fa85feab2a.tar.gz
u-boot-a44bffcc9557cf5f761a43bce44a59fa85feab2a.tar.bz2
efi_loader: use EFI_PAGE_SIZE instead of 4096
We should use constant EFI_PAGE_SIZE instead of 4096 where the coding relies on 4096 being EFI_PAGE_SIZE. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'cmd/bootefi.c')
-rw-r--r--cmd/bootefi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index d20775e..3196d86 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -158,7 +158,7 @@ static void *copy_fdt(void *fdt)
}
/* Give us at least 4kb breathing room */
- fdt_size = ALIGN(fdt_size + 4096, 4096);
+ fdt_size = ALIGN(fdt_size + 4096, EFI_PAGE_SIZE);
fdt_pages = fdt_size >> EFI_PAGE_SHIFT;
/* Safe fdt location is at 128MB */
@@ -166,7 +166,7 @@ static void *copy_fdt(void *fdt)
if (efi_allocate_pages(1, EFI_BOOT_SERVICES_DATA, fdt_pages,
&new_fdt_addr) != EFI_SUCCESS) {
/* If we can't put it there, put it somewhere */
- new_fdt_addr = (ulong)memalign(4096, fdt_size);
+ new_fdt_addr = (ulong)memalign(EFI_PAGE_SIZE, fdt_size);
if (efi_allocate_pages(1, EFI_BOOT_SERVICES_DATA, fdt_pages,
&new_fdt_addr) != EFI_SUCCESS) {
printf("ERROR: Failed to reserve space for FDT\n");