]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg: BaseLib: fix AArch64 DAIF interrupt mask definitions
authorCohen, Eugene <eugene@hp.com>
Mon, 22 Feb 2016 21:59:52 +0000 (21:59 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 23 Feb 2016 11:07:11 +0000 (12:07 +0100)
commit5458faf845a8c0e2ee37499ad410bb8ba1d45b15
treecc276058d35411bfdf8337f5fe63fe541f9495e8
parente3aa7252ba58aefc0c8780dd20f169bcdbc9a3d3
MdePkg: BaseLib: fix AArch64 DAIF interrupt mask definitions

The AArch64 DAIF bits are different for reading (mrs) versus writing (msr).
The bitmask definitions assumed they were the same causing incorrect
results when trying to determine the current interrupt state through
GetInterruptState.

The logic for interpreting the DAIF read data using the csel instruction
was also incorrect and is fixed.

Replaced the magic numbers in DisableInterrupts.S and EnableInterrupts.S
with definitions for the DAIF write (daifset/daifclr) IRQ field.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
MdePkg/Library/BaseLib/AArch64/DisableInterrupts.S
MdePkg/Library/BaseLib/AArch64/EnableInterrupts.S
MdePkg/Library/BaseLib/AArch64/GetInterruptsState.S