summaryrefslogtreecommitdiffstats
path: root/Omap35xxPkg
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-04-13 22:30:42 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2010-04-13 22:30:42 +0000
commite9fc14b6e17de3ecc299d4f7f8a39c2cb0c55292 (patch)
tree309459e8eff0f0a8115d28ae01879c2d2a5da9ff /Omap35xxPkg
parent9d1d7243f049a04397f9a9b808a8232fa13c0882 (diff)
downloadedk2-e9fc14b6e17de3ecc299d4f7f8a39c2cb0c55292.tar.gz
edk2-e9fc14b6e17de3ecc299d4f7f8a39c2cb0c55292.tar.bz2
edk2-e9fc14b6e17de3ecc299d4f7f8a39c2cb0c55292.zip
Make sure FIQ debugger stuff can work.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10369 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Omap35xxPkg')
-rw-r--r--Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h1
-rw-r--r--Omap35xxPkg/InterruptDxe/HardwareInterrupt.c10
2 files changed, 10 insertions, 1 deletions
diff --git a/Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h b/Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h
index 23b99454c1..e4a27fe950 100644
--- a/Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h
+++ b/Omap35xxPkg/Include/Omap3530/Omap3530Interrupt.h
@@ -39,6 +39,7 @@
#define INTCPS_PENDING_FIQ(n) (INTERRUPT_BASE + 0x009C + (0x20 * (n)))
#define INTCPS_ILR(m) (INTERRUPT_BASE + 0x0100 + (0x04 * (m)))
+#define INTCPS_ILR_FIQ BIT0
#define INTCPS_SIR_IRQ_MASK (0x7F)
#define INTCPS_CONTROL_NEWIRQAGR BIT0
#define INTCPS_CONTROL_NEWFIQAGR BIT1
diff --git a/Omap35xxPkg/InterruptDxe/HardwareInterrupt.c b/Omap35xxPkg/InterruptDxe/HardwareInterrupt.c
index 72135c2452..8ffdc0bec1 100644
--- a/Omap35xxPkg/InterruptDxe/HardwareInterrupt.c
+++ b/Omap35xxPkg/InterruptDxe/HardwareInterrupt.c
@@ -87,6 +87,14 @@ RegisterInterruptSource (
return EFI_UNSUPPORTED;
}
+ if ((MmioRead32 (INTCPS_ILR(Source)) & INTCPS_ILR_FIQ) == INTCPS_ILR_FIQ) {
+ // This vector has been programmed as FIQ so we can't use it for IRQ
+ // EFI does not use FIQ, but the debugger can use it to check for
+ // ctrl-c. So this ASSERT means you have a conflict with the debug agent
+ ASSERT (FALSE);
+ return EFI_UNSUPPORTED;
+ }
+
if ((Handler == NULL) && (gRegisteredInterruptHandlers[Source] == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -203,7 +211,7 @@ GetInterruptSourceState (
Bank = Source / 32;
Bit = 1UL << (Source % 32);
- if ((MmioRead32 (INTCPS_MIR(Bank)) & Bit) == Bit) {
+ if ((MmioRead32(INTCPS_MIR(Bank)) & Bit) == Bit) {
*InterruptState = FALSE;
} else {
*InterruptState = TRUE;