summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-04 20:02:49 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-04 20:02:49 +0000
commit9736c2972157e9c1c4f3cd4bac83f2256a2c9688 (patch)
treec03cd56ccd1ecc4d7593404c8303854771a5ef0f /ArmPkg
parentd69503998ab5732f7ce142038a939f474fd4af70 (diff)
ArmPkg/PL390Gic: Added support for ArmGicDisableInterruptInterface()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13489 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/PL390Gic/PL390GicSec.c13
-rw-r--r--ArmPkg/Include/Library/ArmGicLib.h6
2 files changed, 19 insertions, 0 deletions
diff --git a/ArmPkg/Drivers/PL390Gic/PL390GicSec.c b/ArmPkg/Drivers/PL390Gic/PL390GicSec.c
index c137c95f20..25038bd63f 100644
--- a/ArmPkg/Drivers/PL390Gic/PL390GicSec.c
+++ b/ArmPkg/Drivers/PL390Gic/PL390GicSec.c
@@ -109,6 +109,19 @@ ArmGicEnableInterruptInterface (
VOID
EFIAPI
+ArmGicDisableInterruptInterface (
+ IN INTN GicInterruptInterfaceBase
+ )
+{
+ UINT32 ControlValue;
+
+ // Disable CPU interface in Secure world and Non-secure World
+ ControlValue = MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCICR);
+ MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCICR, ControlValue & ~(ARM_GIC_ICCICR_ENABLE_SECURE | ARM_GIC_ICCICR_ENABLE_NS));
+}
+
+VOID
+EFIAPI
ArmGicEnableDistributor (
IN INTN GicDistributorBase
)
diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/ArmGicLib.h
index c115767bbf..6da072807b 100644
--- a/ArmPkg/Include/Library/ArmGicLib.h
+++ b/ArmPkg/Include/Library/ArmGicLib.h
@@ -98,6 +98,12 @@ ArmGicEnableInterruptInterface (
VOID
EFIAPI
+ArmGicDisableInterruptInterface (
+ IN INTN GicInterruptInterfaceBase
+ );
+
+VOID
+EFIAPI
ArmGicEnableDistributor (
IN INTN GicDistributorBase
);