]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/PL390Gic/PL390Gic.c
ArmPkg: Replaced gArmTokenSpaceGuid.PcdGicNumInterrupts by ArmGicGetMaxNumInterrupts()
[mirror_edk2.git] / ArmPkg / Drivers / PL390Gic / PL390Gic.c
index 25daabeb1d0bd722835b4c212664b389b827b806..c559e64a78f4c3bbf9d378c5699c26ebdbb860f9 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2012, 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
 #include <Library/ArmGicLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
+UINTN\r
+EFIAPI\r
+ArmGicGetMaxNumInterrupts (\r
+  IN  INTN          GicDistributorBase\r
+  )\r
+{\r
+  return 32 * ((MmioRead32 (GicDistributorBase + ARM_GIC_ICDICTR) & 0x1F) + 1);\r
+}\r
+\r
 VOID\r
 EFIAPI\r
 ArmGicSendSgiTo (\r