]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Library/BaseIoLibIntrinsic/Arm/ArmVirtMmio.asm
MdePkg/BaseIoLibIntrinsicArmVirt ARM: avoid double word loads and stores
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 7 Nov 2018 13:13:01 +0000 (14:13 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 15 Nov 2018 12:31:42 +0000 (04:31 -0800)
commit9cabe9d45755fa4e7412e4eba7825d0c46982001
treedd26aedfd9607365bcef2f5ac6e95a79df8e2fb3
parent85588389222a3636baf0f9ed8227f2434af4c3f9
MdePkg/BaseIoLibIntrinsicArmVirt ARM: avoid double word loads and stores

BaseIoLibIntrinsicArmVirt was created to prevent LTO from merging
accesses to MMIO regions, resulting in instructions with multiple
output registers that KVM on ARM cannot emulate (since the exception
syndrome information that KVM relies on can only describe a single
output register)

However, using double word loads on ARM amounts to the same thing,
and so code that relies on doing 64-bit MMIO to regions that are
emulated under KVM (such as the GICv3 TYPER register) will still
suffer from the original issue.

So replace ldrd and strd with equivalent two instruction sequences.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
MdePkg/Library/BaseIoLibIntrinsic/Arm/ArmVirtMmio.S
MdePkg/Library/BaseIoLibIntrinsic/Arm/ArmVirtMmio.asm