summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Drivers/CpuDxe
diff options
context:
space:
mode:
authorCohen, Eugene <eugene@hp.com>2016-02-22 23:08:27 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-02-23 12:07:11 +0100
commite3aa7252ba58aefc0c8780dd20f169bcdbc9a3d3 (patch)
treeb1f7c8ba68634e8a38666b33d29bf030fca34abe /ArmPkg/Drivers/CpuDxe
parent4af3dd80abb759f3c439f8d1369a57745db08d30 (diff)
downloadedk2-e3aa7252ba58aefc0c8780dd20f169bcdbc9a3d3.tar.gz
edk2-e3aa7252ba58aefc0c8780dd20f169bcdbc9a3d3.tar.bz2
edk2-e3aa7252ba58aefc0c8780dd20f169bcdbc9a3d3.zip
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>
Diffstat (limited to 'ArmPkg/Drivers/CpuDxe')
-rw-r--r--ArmPkg/Drivers/CpuDxe/CpuDxe.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c
index 0c49acb510..b1cac31d67 100644
--- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c
+++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c
@@ -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;
}