summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm64/stand/efiboot/efiboot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c
index 609b9218201..a9e7ea38d0b 100644
--- a/sys/arch/arm64/stand/efiboot/efiboot.c
+++ b/sys/arch/arm64/stand/efiboot/efiboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efiboot.c,v 1.2 2017/01/22 04:18:52 kettenis Exp $ */
+/* $OpenBSD: efiboot.c,v 1.3 2017/02/03 08:48:40 patrick Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -515,7 +515,11 @@ efi_memprobe_find(UINTN pages, UINTN align, EFI_PHYSICAL_ADDRESS *addr)
break;
paddr = mm->PhysicalStart + (j * EFI_PAGE_SIZE);
- if (!(paddr & (align - 1))) {
+ if (paddr & (align - 1))
+ continue;
+
+ if (EFI_CALL(BS->AllocatePages, AllocateAddress,
+ EfiLoaderData, pages, &paddr) == EFI_SUCCESS) {
*addr = paddr;
free(mm0, siz);
return EFI_SUCCESS;