diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-05-02 19:48:00 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-05-02 19:48:00 +0000 |
commit | e9f7c58f25749c9a58e6d225e4103eaced867f9d (patch) | |
tree | f2f26720d245c48a69e686f2415cf5ad527fa58d /ArmPkg/Drivers/PL390Gic/PL390Gic.c | |
parent | 82325f95c55c67b56f8badcd4f60101e5fc19683 (diff) | |
download | edk2-platforms-e9f7c58f25749c9a58e6d225e4103eaced867f9d.tar.xz |
ArmPkg: Replaced gArmTokenSpaceGuid.PcdGicNumInterrupts by ArmGicGetMaxNumInterrupts()
The maximum number of interrupts can be retrieve through the GIC distributor.
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13244 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Drivers/PL390Gic/PL390Gic.c')
-rw-r--r-- | ArmPkg/Drivers/PL390Gic/PL390Gic.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ArmPkg/Drivers/PL390Gic/PL390Gic.c b/ArmPkg/Drivers/PL390Gic/PL390Gic.c index 25daabeb1d..c559e64a78 100644 --- a/ArmPkg/Drivers/PL390Gic/PL390Gic.c +++ b/ArmPkg/Drivers/PL390Gic/PL390Gic.c @@ -1,6 +1,6 @@ /** @file
*
-* Copyright (c) 2011, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -17,6 +17,15 @@ #include <Library/ArmGicLib.h>
#include <Library/PcdLib.h>
+UINTN
+EFIAPI
+ArmGicGetMaxNumInterrupts (
+ IN INTN GicDistributorBase
+ )
+{
+ return 32 * ((MmioRead32 (GicDistributorBase + ARM_GIC_ICDICTR) & 0x1F) + 1);
+}
+
VOID
EFIAPI
ArmGicSendSgiTo (
|