summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_memory.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-10-01 08:48:38 -0400
committerTom Rini <trini@konsulko.com>2017-10-01 08:48:38 -0400
commit958046fc78f95a3d28b06980a7eb3ed80123c533 (patch)
treeebae5f10fae8263315d42b6513734e9ceb32bd41 /lib/efi_loader/efi_memory.c
parent6ca43a58db61aea8ca2ebec4003bb6cfacf81d46 (diff)
parent7dd5d44753969167a6059405635bdb8b9d961fa1 (diff)
Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Patch queue for efi - 2017-10-01 Lots of new things this time. High level highlights are: - Shim support (to boot Fedora) - Initial set of unit tests - Preparations to support UEFI Shell
Diffstat (limited to 'lib/efi_loader/efi_memory.c')
-rw-r--r--lib/efi_loader/efi_memory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 9e079f1fa3..d47759e08e 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -43,7 +43,7 @@ void *efi_bounce_buffer;
*/
struct efi_pool_allocation {
u64 num_pages;
- char data[];
+ char data[] __aligned(ARCH_DMA_MINALIGN);
};
/*
@@ -356,7 +356,8 @@ efi_status_t efi_allocate_pool(int pool_type, unsigned long size,
{
efi_status_t r;
efi_physical_addr_t t;
- u64 num_pages = (size + sizeof(u64) + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT;
+ u64 num_pages = (size + sizeof(struct efi_pool_allocation) +
+ EFI_PAGE_MASK) >> EFI_PAGE_SHIFT;
if (size == 0) {
*buffer = NULL;