diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-03-17 00:28:30 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-03-17 00:28:30 +0000 |
commit | 7891e799f720d9191f7b4b562895fb46ca272b2b (patch) | |
tree | 77904051ea4103dfd23bba7c1d9969bf655495ea /sys/arch | |
parent | b07339a0bf111136c4ceeb4a3f9d70bc8bc7854b (diff) |
Fix previous commit; the FDT header is big-endian so we need to do the
appropriate byte swapping.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/arm64/stand/efiboot/efiboot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm64/stand/efiboot/efiboot.c b/sys/arch/arm64/stand/efiboot/efiboot.c index a38021f5a82..2767a0c0a37 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.39 2022/03/16 22:32:50 kettenis Exp $ */ +/* $OpenBSD: efiboot.c,v 1.40 2022/03/17 00:28:29 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -554,7 +554,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 = len; + ((struct fdt_head *)addr)->fh_size = htobe32(len); fdt = (void *)addr; } |