summaryrefslogtreecommitdiff
path: root/ArmPkg/Drivers/CpuDxe
diff options
context:
space:
mode:
authorAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-08 23:07:33 +0000
committerAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-08 23:07:33 +0000
commitd213712d4f858efd5cb43faa39c6d940829c9363 (patch)
treeadd97ca4ae57a89c17119f9b3c9a9b1c9dd899fa /ArmPkg/Drivers/CpuDxe
parent2127579be198425ffd94e2b0be68f66d0dba1a5a (diff)
downloadedk2-platforms-d213712d4f858efd5cb43faa39c6d940829c9363.tar.xz
Fixed a bug in the HardwareInterrupt handler that would blow the stack if you reenable interrupts in the TimerHandler. It should be noted this happens as the TimerHandler raises and restores TPL for the timer tick used by the DXE Core. There was some work around code in the CPU driver to prevent interrupts from being enabled while handling exceptions. This has been removed.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9701 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Drivers/CpuDxe')
-rw-r--r--ArmPkg/Drivers/CpuDxe/CpuDxe.c9
-rw-r--r--ArmPkg/Drivers/CpuDxe/Exception.c7
2 files changed, 3 insertions, 13 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c
index 2b43d2a9c9..d3f0ff505d 100644
--- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c
+++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c
@@ -14,7 +14,6 @@
#include "CpuDxe.h"
-BOOLEAN gExceptionContext = FALSE;
BOOLEAN mInterruptState = FALSE;
EFI_STATUS
@@ -49,9 +48,7 @@ CpuEnableInterrupt (
IN EFI_CPU_ARCH_PROTOCOL *This
)
{
- if (!gExceptionContext) {
- ArmEnableInterrupts ();
- }
+ ArmEnableInterrupts ();
mInterruptState = TRUE;
return EFI_SUCCESS;
@@ -64,9 +61,7 @@ CpuDisableInterrupt (
IN EFI_CPU_ARCH_PROTOCOL *This
)
{
- if (!gExceptionContext) {
- ArmDisableInterrupts ();
- }
+ ArmDisableInterrupts ();
mInterruptState = FALSE;
return EFI_SUCCESS;
diff --git a/ArmPkg/Drivers/CpuDxe/Exception.c b/ArmPkg/Drivers/CpuDxe/Exception.c
index 8859ca8667..9910bd2b88 100644
--- a/ArmPkg/Drivers/CpuDxe/Exception.c
+++ b/ArmPkg/Drivers/CpuDxe/Exception.c
@@ -15,8 +15,6 @@
#include "CpuDxe.h"
#include <Library/CacheMaintenanceLib.h>
-extern BOOLEAN gExceptionContext;
-
VOID
ExceptionHandlersStart (
VOID
@@ -142,8 +140,7 @@ CommonCExceptionHandler (
{
BOOLEAN Dispatched = FALSE;
- gExceptionContext = TRUE;
-
+
if (ExceptionType <= MAX_ARM_EXCEPTION) {
if (gDebuggerExceptionHandlers[ExceptionType]) {
//
@@ -162,8 +159,6 @@ CommonCExceptionHandler (
ASSERT (FALSE);
}
- gExceptionContext = FALSE;
-
if (Dispatched) {
//
// We did work so this was an expected ExceptionType