ArmPkg: CpuDxe: don't track interrupt state in a global variable

Update the CpuDxe driver to remove an assumption that it is the only
component modifying interrupt state since this can be done through BaseLib
as well. Instead of using a global variable for last interrupt state we
now check the current PSTATE value directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
Cohen, Eugene 2016-02-22 23:08:27 +00:00 committed by Ard Biesheuvel
parent 4af3dd80ab
commit e3aa7252ba
1 changed files with 1 additions and 5 deletions

View File

@ -17,8 +17,6 @@
#include <Guid/IdleLoopEvent.h>
BOOLEAN mInterruptState = FALSE;
/**
This function flushes the range of addresses from Start to Start+Length
@ -92,7 +90,6 @@ CpuEnableInterrupt (
{
ArmEnableInterrupts ();
mInterruptState = TRUE;
return EFI_SUCCESS;
}
@ -114,7 +111,6 @@ CpuDisableInterrupt (
{
ArmDisableInterrupts ();
mInterruptState = FALSE;
return EFI_SUCCESS;
}
@ -143,7 +139,7 @@ CpuGetInterruptState (
return EFI_INVALID_PARAMETER;
}
*State = mInterruptState;
*State = ArmGetInterruptState();
return EFI_SUCCESS;
}