
On 7/1/23 16:57, Heinrich Schuchardt wrote:
On 7/1/23 15:00, Marek Vasut wrote:
Rename current assembler implementation of allow_unaligned() to v7_arch_cp15_allow_unaligned() and add it into armv7.h header, then add C wrapper of allow_unaligned().
This fixes misbehavior when linking U-Boot on ARMv7a i.MX6Q, where the CPU specific allow_unaligned() implementation was ignored and instead the __weak allow_unaligned() implementation from lib/efi_loader/efi_setup.c was used, which led to "data abort" just before booting Linux via tftp, in efi_dp_from_file() -> path_to_uefi() -> utf16_put() .
Adding the wrapper fixes the problem.
Fixes: c7c0ca37673 ("efi_loader: fix efi_dp_from_file()")
Hello Marek,
Thank you for investigating this issue.
Looking at https://lore.kernel.org/u-boot/20230320171335.1368308-1-ilias.apalodimas@lin... the problem predates c7c0ca37673. So this fixes line seems wrong.
That commit does trigger the error however . Maybe this was broken ever since allow_unaligned() was introduced ?
Your series has a fix for armv7 but misses arm11.
That's exactly what 2/2 in this series does ?
So we would be better of with Ilias patch. Somehow Ilias never followed up on my questions and we lost track.
Could you, please, test Ilias patch.
That patch corrupts r0 register in both cases in the asm volatile(), since it does not push r0 on stack or use %0 temporary or whatever .