diff options
author | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-08 23:07:33 +0000 |
---|---|---|
committer | AJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-08 23:07:33 +0000 |
commit | d213712d4f858efd5cb43faa39c6d940829c9363 (patch) | |
tree | add97ca4ae57a89c17119f9b3c9a9b1c9dd899fa /BeagleBoardPkg | |
parent | 2127579be198425ffd94e2b0be68f66d0dba1a5a (diff) | |
download | edk2-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 'BeagleBoardPkg')
-rw-r--r-- | BeagleBoardPkg/InterruptDxe/HardwareInterrupt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/BeagleBoardPkg/InterruptDxe/HardwareInterrupt.c b/BeagleBoardPkg/InterruptDxe/HardwareInterrupt.c index 3e69515dfe..c87d564063 100644 --- a/BeagleBoardPkg/InterruptDxe/HardwareInterrupt.c +++ b/BeagleBoardPkg/InterruptDxe/HardwareInterrupt.c @@ -234,12 +234,16 @@ IrqInterruptHandler ( Vector = MmioRead32(INTCPS_SIR_IRQ) & INTCPS_SIR_IRQ_MASK;
+ // Needed to prevent infinite nesting if Time Driver lowers TPL
+ MmioWrite32(INTCPS_CONTROL, INTCPS_CONTROL_NEWIRQAGR);
+
InterruptHandler = gRegisteredInterruptHandlers[Vector];
if (InterruptHandler != NULL) {
// Call the registered interrupt handler.
InterruptHandler(Vector, SystemContext);
}
+ // Needed to clear after running the handler
MmioWrite32(INTCPS_CONTROL, INTCPS_CONTROL_NEWIRQAGR);
}
|