]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Omap35xxPkg/InterruptDxe/HardwareInterrupt.c
Make sure FIQ debugger stuff can work.
[mirror_edk2.git] / Omap35xxPkg / InterruptDxe / HardwareInterrupt.c
index 72135c24520ba25f56ba6b67c29f24ebf14b9a8a..8ffdc0bec1e1a9e522f81906ced0c9bf9fe365e4 100644 (file)
@@ -87,6 +87,14 @@ RegisterInterruptSource (
     return EFI_UNSUPPORTED;\r
   } \r
   \r
+  if ((MmioRead32 (INTCPS_ILR(Source)) & INTCPS_ILR_FIQ) == INTCPS_ILR_FIQ) {\r
+    // This vector has been programmed as FIQ so we can't use it for IRQ\r
+    // EFI does not use FIQ, but the debugger can use it to check for \r
+    // ctrl-c. So this ASSERT means you have a conflict with the debug agent\r
+    ASSERT (FALSE);\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+  \r
   if ((Handler == NULL) && (gRegisteredInterruptHandlers[Source] == NULL)) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -203,7 +211,7 @@ GetInterruptSourceState (
   Bank = Source / 32;\r
   Bit  = 1UL << (Source % 32);\r
     \r
-  if ((MmioRead32 (INTCPS_MIR(Bank)) & Bit) == Bit) {\r
+  if ((MmioRead32(INTCPS_MIR(Bank)) & Bit) == Bit) {\r
     *InterruptState = FALSE;\r
   } else {\r
     *InterruptState = TRUE;\r