Hi,
I'm getting Alignment Fault when running UEFI image on Juno R0 board which is caused by VariableRuntimeDxe driver's Reclaim() function calling
in edk2\MdeModulePkg\Universal\Variable\RuntimeDxe\Variable.c.
The code above copies 28 bytes of data from NOR flash memory region @0xBFC0048 using __memcpy() from
edk2\MdePkg\Library\BaseMemoryLibOptDxe\AArch64\CopyMem.S using unaligned memory accesses, causing Alignment fault for flash region which is mapped as device memory.
The fix involves switching to generic baseMemoryLib and for ArmJuno.dsc is listed below:
and is similar to the following commits for Hisilicon/D02/D03/D05:
Hisilicon/D02: flash related drivers switch to use generic BaseMemoryLib:
Hisilicon/D03: flash related drivers switch to use generic BaseMemoryLib:
Hisilicon/D05: flash related drivers switch to use generic BaseMemoryLib:
Alexei.