ARM GICv3 specification introduces some new components and registers.
This patch adds their definitions.
The most important GICv3 component is the GIC Redistributor. It supports
LPIs (Locality-specific peripheral Interrupt), 8+ CPU configuration.
Some GIC distributor registers have moved to the GIC redistributor.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Tested-by: Ard Biesheuvel <ard@linaro.org>
Reviewed-by: Ard Biesheuvel <ard@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16872
6f19259b-4bc3-4df7-8a09-
765794883524
# ARM processor package.\r
#\r
# Copyright (c) 2009 - 2010, Apple Inc. All rights reserved.<BR>\r
-# Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011 - 2015, 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
# ARM Generic Interrupt Controller\r
#\r
gArmTokenSpaceGuid.PcdGicDistributorBase|0|UINT32|0x0000000C\r
+ # Base address for the GIC Redistributor region that contains the boot CPU\r
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase|0|UINT32|0x0000000E\r
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0|UINT32|0x0000000D\r
gArmTokenSpaceGuid.PcdGicSgiIntId|0|UINT32|0x00000025\r
\r
[Pcd.common]\r
gArmTokenSpaceGuid.PcdGicDistributorBase\r
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase\r
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase\r
\r
[Depex]\r
/** @file\r
*\r
-* Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+* Copyright (c) 2011-2015, 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
extern EFI_HARDWARE_INTERRUPT_PROTOCOL gHardwareInterruptV3Protocol;\r
\r
STATIC UINTN mGicDistributorBase;\r
+STATIC UINTN mGicRedistributorsBase;\r
\r
/**\r
Enable interrupt source Source.\r
// Make sure the Interrupt Controller Protocol is not already installed in the system.\r
ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gHardwareInterruptProtocolGuid);\r
\r
- mGicDistributorBase = PcdGet32 (PcdGicDistributorBase);\r
- mGicNumInterrupts = ArmGicGetMaxNumInterrupts (mGicDistributorBase);\r
+ mGicDistributorBase = PcdGet32 (PcdGicDistributorBase);\r
+ mGicRedistributorsBase = PcdGet32 (PcdGicRedistributorsBase);\r
+ mGicNumInterrupts = ArmGicGetMaxNumInterrupts (mGicDistributorBase);\r
\r
for (Index = 0; Index < mGicNumInterrupts; Index++) {\r
GicV3DisableInterruptSource (&gHardwareInterruptV3Protocol, Index);\r
/** @file\r
*\r
-* Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+* Copyright (c) 2011-2015, 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
#define ARM_GIC_ICDICTR 0x004 // Interrupt Controller Type Register\r
#define ARM_GIC_ICDIIDR 0x008 // Implementer Identification Register\r
\r
-// Each reg base below repeats for VE_NUM_ARM_GIC_REG_PER_INT_BITS (see GIC spec)\r
+// Each reg base below repeats for Number of interrupts / 4 (see GIC spec)\r
#define ARM_GIC_ICDISR 0x080 // Interrupt Security Registers\r
#define ARM_GIC_ICDISER 0x100 // Interrupt Set-Enable Registers\r
#define ARM_GIC_ICDICER 0x180 // Interrupt Clear-Enable Registers\r
#define ARM_GIC_ICDICPR 0x280 // Interrupt Clear-Pending Registers\r
#define ARM_GIC_ICDABR 0x300 // Active Bit Registers\r
\r
-// Each reg base below repeats for VE_NUM_ARM_GIC_REG_PER_INT_BYTES\r
+// Each reg base below repeats for Number of interrupts / 4\r
#define ARM_GIC_ICDIPR 0x400 // Interrupt Priority Registers\r
\r
-// Each reg base below repeats for VE_NUM_ARM_GIC_INTERRUPTS\r
+// Each reg base below repeats for Number of interrupts\r
#define ARM_GIC_ICDIPTR 0x800 // Interrupt Processor Target Registers\r
#define ARM_GIC_ICDICFR 0xC00 // Interrupt Configuration Registers\r
\r
// just one of these\r
#define ARM_GIC_ICDSGIR 0xF00 // Software Generated Interrupt Register\r
\r
+// GICv3 specific registers\r
+#define ARM_GICD_IROUTER 0x6100 // Interrupt Routing Registers\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
+\r
+// GIC Redistributor Control frame\r
+#define ARM_GICR_TYPER 0x0008 // Redistributor Type Register\r
+\r
+// GIC SGI & PPI Redistributor frame\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
#\r
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
+# Copyright (c) 2011-2015, 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
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x2C002000\r
!else\r
gArmTokenSpaceGuid.PcdGicDistributorBase|0x2f000000\r
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x2f100000\r
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x2C000000\r
!endif\r
\r