NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-evbarm/54554 (Booting via U-Boot fails due to buffer misalignment)
The following reply was made to PR port-evbarm/54554; it has been noted by GNATS.
From: Simon South <simon%simonsouth.net@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-evbarm/54554 (Booting via U-Boot fails due to buffer
misalignment)
Date: Wed, 18 Sep 2019 10:00:52 -0400
On 2019-09-18 9:48 a.m., Jared McNeill wrote:
> According to UEFI IoAlign may be 0 or 1 ("no alignment required"). Can
> you update the patch to take this into consideration?
Certainly, but that doesn't seem to match U-Boot's interpretation of the
IoAlign field. Where are you reading this description? (And how would we
know what to align the buffer to when IoAlign is 1?)
The relevant code[1] in U-Boot is
/* media->io_align is a power of 2 */
if ((uintptr_t)buffer & (this->media->io_align - 1))
return EFI_INVALID_PARAMETER;
which clearly uses IoAlign directly to check for alignment.
[1]
https://gitlab.denx.de/u-boot/u-boot/blob/a9fa70b7b7167487affc5d919e541872c99e814b/lib/efi_loader/efi_disk.c#L124
--
Simon South
simon%simonsouth.net@localhost
Home |
Main Index |
Thread Index |
Old Index