]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg/CpuDxe: Disable interrupt before restoring context
authorHeyi Guo <heyi.guo@linaro.org>
Thu, 24 Sep 2015 17:05:39 +0000 (17:05 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Thu, 24 Sep 2015 17:05:39 +0000 (17:05 +0000)
commit36c64c664ba18026aad5375dbb80118bd3141266
tree5903939dcfd0294fa2b2d31aa31428e35b320405
parentbe73a0c4839f93de43b4db64f874cfe61a55acc0
ArmPkg/CpuDxe: Disable interrupt before restoring context

Interrupt must be disabled before we storing ELR and other system
registers, or else ELR will be overridden by interrupt reentrance.

This bug is critical as we may get occasional exception or dead loop
when interrupt reentrance occurs:

  After increasing SP ... Before popping out registers
Or
  After restoring ELR

The 1st circumstance could also be resolved by optimizing SP operation
(Pop out registers before adding SP back), but the 2nd could not be
resolved by disabling interrupt.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18538 6f19259b-4bc3-4df7-8a09-765794883524
ArmPkg/Drivers/CpuDxe/AArch64/ExceptionSupport.S