]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/PL390Gic/PL390GicSec.c
ArmPkg/PL390Gic: Added support for ArmGicDisableInterruptInterface()
[mirror_edk2.git] / ArmPkg / Drivers / PL390Gic / PL390GicSec.c
index c137c95f20587951a850ce280b20ead406ca4b08..25038bd63fcb8dcc2daff7ab71e92c7050c8c85b 100644 (file)
@@ -107,6 +107,19 @@ ArmGicEnableInterruptInterface (
       ARM_GIC_ICCICR_SIGNAL_SECURE_TO_FIQ);\r
 }\r
 \r
+VOID\r
+EFIAPI\r
+ArmGicDisableInterruptInterface (\r
+  IN  INTN          GicInterruptInterfaceBase\r
+  )\r
+{\r
+  UINT32    ControlValue;\r
+\r
+  // Disable CPU interface in Secure world and Non-secure World\r
+  ControlValue = MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCICR);\r
+  MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCICR, ControlValue & ~(ARM_GIC_ICCICR_ENABLE_SECURE | ARM_GIC_ICCICR_ENABLE_NS));\r
+}\r
+\r
 VOID\r
 EFIAPI\r
 ArmGicEnableDistributor (\r