/** @file\r
*\r
-* Copyright (c) 2011-2015, ARM Limited. All rights reserved.\r
+* Copyright (c) 2011-2017, 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
\r
#include <Library/ArmGicArchLib.h>\r
\r
-//\r
// GIC Distributor\r
-//\r
#define ARM_GIC_ICDDCR 0x000 // Distributor Control Register\r
#define ARM_GIC_ICDICTR 0x004 // Interrupt Controller Type Register\r
#define ARM_GIC_ICDIIDR 0x008 // Implementer Identification Register\r
#define ARM_GIC_ICDDCR_ARE (1 << 4) // Affinity Routing Enable (ARE)\r
#define ARM_GIC_ICDDCR_DS (1 << 6) // Disable Security (DS)\r
\r
-//\r
// GIC Redistributor\r
-//\r
\r
#define ARM_GICR_CTLR_FRAME_SIZE SIZE_64KB\r
#define ARM_GICR_SGI_PPI_FRAME_SIZE SIZE_64KB\r
#define ARM_GICR_ISENABLER 0x0100 // Interrupt Set-Enable Registers\r
#define ARM_GICR_ICENABLER 0x0180 // Interrupt Clear-Enable Registers\r
\r
-//\r
// GIC Cpu interface\r
-//\r
#define ARM_GIC_ICCICR 0x00 // CPU Interface Control Register\r
#define ARM_GIC_ICCPMR 0x04 // Interrupt Priority Mask Register\r
#define ARM_GIC_ICCBPR 0x08 // Binary Point Register\r
IN INTN GicInterruptInterfaceBase\r
);\r
\r
-//\r
// GIC Secure interfaces\r
-//\r
VOID\r
EFIAPI\r
ArmGicSetupNonSecure (\r
* in the GICv3 the register value is only the InterruptId.\r
*\r
* @param GicInterruptInterfaceBase Base Address of the GIC CPU Interface\r
- * @param InterruptId InterruptId read from the Interrupt Acknowledge Register\r
+ * @param InterruptId InterruptId read from the Interrupt\r
+ * Acknowledge Register\r
*\r
* @retval value returned by the Interrupt Acknowledge Register\r
*\r
IN UINTN Source\r
);\r
\r
-//\r
// GIC revision 2 specific declarations\r
-//\r
\r
-// Interrupts from 1020 to 1023 are considered as special interrupts (eg: spurious interrupts)\r
-#define ARM_GIC_IS_SPECIAL_INTERRUPTS(Interrupt) (((Interrupt) >= 1020) && ((Interrupt) <= 1023))\r
+// Interrupts from 1020 to 1023 are considered as special interrupts\r
+// (eg: spurious interrupts)\r
+#define ARM_GIC_IS_SPECIAL_INTERRUPTS(Interrupt) \\r
+ (((Interrupt) >= 1020) && ((Interrupt) <= 1023))\r
\r
VOID\r
EFIAPI\r
IN UINTN Source\r
);\r
\r
-//\r
// GIC revision 3 specific declarations\r
-//\r
\r
#define ICC_SRE_EL2_SRE (1 << 0)\r
\r