[U-Boot] [PATCH v2 0/3] efi_loader: armv7: enable unaligned access

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Apr 3 19:59:31 UTC 2018


We use the command bootefi to run UEFI executables like GRUB and iPXE.
The UEFI spec requires that unaligned access is enabled if the CPU
supports it. This is true for armv7.

So we should not set bit 1 of the system control register, the alignment
bit.

Without this patch iPXE snp.efi cannot be executed on armv7,
e.g. Allwinner A20.

As suggested by Siarhei unaligned access is only enabled in the EFI
subsystem. This allows unintended unaligned access in the rest of U-Boot
to become evident in testing.

---
v2
	Enable unaligned access only in EFI subsystem.
---

Heinrich Schuchardt (3):
  efi_loader: allow unaligned memory access
  arm: armv7: allow unaligned memory access
  efi_selftest: test unaligned memory access

 arch/arm/cpu/armv7/Makefile               |  4 ++
 arch/arm/cpu/armv7/sctlr.S                | 23 +++++++++++
 cmd/bootefi.c                             | 13 ++++++
 include/asm-generic/unaligned.h           |  3 ++
 lib/efi_selftest/Makefile                 |  4 ++
 lib/efi_selftest/efi_selftest_unaligned.c | 66 +++++++++++++++++++++++++++++++
 6 files changed, 113 insertions(+)
 create mode 100644 arch/arm/cpu/armv7/sctlr.S
 create mode 100644 lib/efi_selftest/efi_selftest_unaligned.c

-- 
2.16.3



More information about the U-Boot mailing list