diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-11-14 10:13:03 +0000 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-11-16 09:38:12 +0000 |
commit | 44d71c217ccbd87e8c42768b4e84b1c899d779e2 (patch) | |
tree | 9ae6f7ace205589304a44b30fdec93cdc159113c /ArmPkg | |
parent | 0d07a8addb78076a1417149786cb430396a59add (diff) | |
download | edk2-44d71c217ccbd87e8c42768b4e84b1c899d779e2.zip edk2-44d71c217ccbd87e8c42768b4e84b1c899d779e2.tar.gz edk2-44d71c217ccbd87e8c42768b4e84b1c899d779e2.tar.bz2 |
ArmVirtPkg/ArmVirtQemu: use non-accelerated CopyMem for VariableRuntimeDxe
The VariableRuntimeDxe driver may use CopyMem () on NOR flash regions,
assuming such regions always have full memory semantics. Given that
those regions cannot be mapped as ordinary memory on ARM (due to the
fact that the NOR flash requires device semantics while in write mode)
this prevents us from using BaseMemoryLibOptDxe in VariableRuntimeDxe,
since it may use unaligned accesses and/or DC ZVA instructions, both
of which are incompatible with mappings using device semantics.
Note that there is no way we can work around this by changing the
mapping type between 'memory' and 'device' when switching from read to
write mode and back, because the runtime mapping is created by the OS,
and cannot be changed at will.
So let's just switch to the unaccelerated version of BaseMemoryLib which
does not have the same problem.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Shannon Zhao <zhaoshenglong@huawei.com>
Diffstat (limited to 'ArmPkg')
0 files changed, 0 insertions, 0 deletions