From c33ef13f4896d74f2ba2c96309b50f3a3517edf0 Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 22 Mar 2022 10:32:10 +0000 Subject: [PATCH] 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@ --- sys/arch/armv7/stand/efiboot/efiboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 @@ -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; } -- 2.20.1