]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Include/Library/ArmGicLib.h
ArmPkg/ArmGic: Introduced helper functions to access the GIC controller
[mirror_edk2.git] / ArmPkg / Include / Library / ArmGicLib.h
index af8941905b321731d88fe0c57cbe08e5f1da101c..24f1966b56c181fded87c77aabe282a43964cca5 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
@@ -57,7 +57,7 @@
 #define ARM_GIC_ICCRPR          0x14  // Running Priority Register\r
 #define ARM_GIC_ICCPIR          0x18  // Highest Pending Interrupt Register\r
 #define ARM_GIC_ICCABPR         0x1C  // Aliased Binary Point Register\r
-#define ARM_GIC_ICCIDR          0xFC  // Identification Register\r
+#define ARM_GIC_ICCIIDR         0xFC  // Identification Register\r
 \r
 #define ARM_GIC_ICDSGIR_FILTER_TARGETLIST       0x0\r
 #define ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE     0x1\r
 #define ARM_GIC_ICCICR_USE_SBPR                 0x10\r
 \r
 // Bit Mask for GICC_IIDR\r
-#define ARM_GIC_ICCIDR_GET_PRODUCT_ID(IccIdr)   (((IccIdr) >> 20) & 0xFFF)\r
-#define ARM_GIC_ICCIDR_GET_ARCH_VERSION(IccIdr) (((IccIdr) >> 16) & 0xF)\r
-#define ARM_GIC_ICCIDR_GET_REVISION(IccIdr)     (((IccIdr) >> 12) & 0xF)\r
-#define ARM_GIC_ICCIDR_GET_IMPLEMENTER(IccIdr)  ((IccIdr) & 0xFFF)\r
+#define ARM_GIC_ICCIIDR_GET_PRODUCT_ID(IccIidr)   (((IccIidr) >> 20) & 0xFFF)\r
+#define ARM_GIC_ICCIIDR_GET_ARCH_VERSION(IccIidr) (((IccIidr) >> 16) & 0xF)\r
+#define ARM_GIC_ICCIIDR_GET_REVISION(IccIidr)     (((IccIidr) >> 12) & 0xF)\r
+#define ARM_GIC_ICCIIDR_GET_IMPLEMENTER(IccIidr)  ((IccIidr) & 0xFFF)\r
 \r
 // Bit Mask for\r
 #define ARM_GIC_ICCIAR_ACKINTID                 0x3FF\r
 \r
+UINTN\r
+EFIAPI\r
+ArmGicGetInterfaceIdentification (\r
+  IN  INTN          GicInterruptInterfaceBase\r
+  );\r
+\r
 //\r
 // GIC Secure interfaces\r
 //\r
@@ -116,6 +122,12 @@ ArmGicEnableDistributor (
   IN  INTN          GicDistributorBase\r
   );\r
 \r
+VOID\r
+EFIAPI\r
+ArmGicDisableDistributor (\r
+  IN  INTN          GicDistributorBase\r
+  );\r
+\r
 UINTN\r
 EFIAPI\r
 ArmGicGetMaxNumInterrupts (\r
@@ -151,4 +163,25 @@ ArmGicSetPriorityMask (
   IN  INTN          PriorityMask\r
   );\r
 \r
+VOID\r
+EFIAPI\r
+ArmGicEnableInterrupt (\r
+  IN UINTN                  GicDistributorBase,\r
+  IN UINTN                  Source\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicDisableInterrupt (\r
+  IN UINTN                  GicDistributorBase,\r
+  IN UINTN                  Source\r
+  );\r
+\r
+BOOLEAN\r
+EFIAPI\r
+ArmGicIsInterruptEnabled (\r
+  IN UINTN                  GicDistributorBase,\r
+  IN UINTN                  Source\r
+  );\r
+\r
 #endif\r