summaryrefslogtreecommitdiff
path: root/sys/arch/armv7/stand
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2022-03-22 10:32:11 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2022-03-22 10:32:11 +0000
commitb524db141fb3791bd00df99a84edc59340e469e1 (patch)
treed835a64e6acbde64379371cfd6932a41347a0895 /sys/arch/armv7/stand
parentf2489cedc7f323b439908ee68dbdc5f5a457ac6e (diff)
After copying the FDT into a new larger buffer, adjust the FDT size to
reflect the size of the new buffer like we do on arm64. ok patrick@
Diffstat (limited to 'sys/arch/armv7/stand')
-rw-r--r--sys/arch/armv7/stand/efiboot/efiboot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/armv7/stand/efiboot/efiboot.c b/sys/arch/armv7/stand/efiboot/efiboot.c
index 5d7b12124e9..134c021169c 100644
--- a/sys/arch/armv7/stand/efiboot/efiboot.c
+++ b/sys/arch/armv7/stand/efiboot/efiboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: efiboot.c,v 1.38 2021/12/12 22:54:35 jsg Exp $ */
+/* $OpenBSD: efiboot.c,v 1.39 2022/03/22 10:32:10 kettenis Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -507,6 +507,7 @@ efi_makebootargs(char *bootargs, int howto)
if (BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
EFI_SIZE_TO_PAGES(len), &addr) == EFI_SUCCESS) {
memcpy((void *)addr, fdt, fdt_get_size(fdt));
+ ((struct fdt_head *)addr)->fh_size = htobe32(len);
fdt = (void *)addr;
}