[ipxe-devel] [PATCH 1/1] [arm] add -mno-unaligned-access compiler flag
mcb30 at ipxe.org
Thu Mar 29 13:39:48 UTC 2018
On 29/03/18 10:20, Mark Rutland wrote:
> I think this may be a bug in the UEFI implementation (which I guess is
> U-Boot?). In the 2.7 UEFI spec, section 2.3.5 states that for AArch32:
> Unaligned access should be enabled if supported; Alignment faults are
> enabled otherwise.
> All ARMv6 and ARMv7 CPUs (including the COrtex-A7s in the A20 SoC)
> support unaligned accesses to normal memory, as would be the case for
> memory accessed by efi_devpath_end().
> Unless GCC is generating misaligned LDM/STM instructions, I believe this
> is a FW bug that would be worth reporting, regardless of whether this
> patch is taken on the IPXE side.
Thanks for that information. I'll leave the patch unapplied for now.
Heinrich: it sounds as though you should be able to switch on unaligned
accesses on the Allwinner A20 SOC, and this will solve the problem. If
this turns out for some reason not to be possible, then we could
potentially consider defining a bin-arm32-uboot platform which makes
allowances for the areas where U-Boot deviates from the UEFI
specification. I'd prefer not to do this, if we can avoid it.
More information about the ipxe-devel