Rework use of ARM GIC drivers on ARM platforms
Suport for ARM GIC v2.0 and v3.0 drivers has been reworked to create three
separate drivers instead of providing a single driver that can work on both
versions of the GIC architecture. These drivers correspond to the following
software use cases:

1. A GICv2 only driver that can run only on ARM GIC v2.0 implementations
   e.g. GIC-400

2. A GICv3 only driver that can run only on ARM GIC v3.0 implementations
   e.g. GIC-500 in a mode where all interrupt regimes use GICv3 features

3. A deprecated GICv3 driver that operates in legacy mode. This driver can
   operate only in the GICv2 mode in the secure world. On a GICv3 system, this
   driver allows normal world to run in either GICv3 mode (asymmetric mode)
   or in the GICv2 mode. Both modes of operation are deprecated on GICv3
   systems.

ARM platforms implement both versions of the GIC architecture. This patch adds a
layer of abstraction to help ARM platform ports chose the right GIC driver and
corresponding platform support. This is as described below:

1. A set of ARM common functions have been introduced to initialise the GIC and
   the driver during cold and warm boot. These functions are prefixed as
   "plat_arm_gic_". Weak definitions of these functions have been provided for
   each type of driver.

2. Each platform includes the sources that implement the right functions
   directly into the its makefile. The FVP can be instantiated with different
   versions of the GIC architecture. It uses the FVP_USE_GIC_DRIVER build option
   to specify which of the three drivers should be included in the build.

3. A list of secure interrupts has to be provided to initialise each of the
  three GIC drivers. For GIC v3.0 the interrupt ids have to be further
  categorised as Group 0 and Group 1 Secure interrupts. For GIC v2.0, the two
  types are merged and treated as Group 0 interrupts.

  The two lists of interrupts are exported from the platform_def.h. The lists
  are constructed by adding a list of board specific interrupt ids to a list of
  ids common to all ARM platforms and Compute sub-systems.

This patch also makes some fields of `arm_config` data structure in FVP redundant
and these unused fields are removed.

Change-Id: Ibc8c087be7a8a6b041b78c2c3bd0c648cd2035d8
1 parent f14d188 commit 27573c59a6bf16c2330b41453f87bdd60afb2144
@Achin Gupta Achin Gupta authored on 3 Nov 2015
Soby Mathew committed on 9 Dec 2015
Showing 24 changed files
View
include/plat/arm/common/arm_config.h
View
include/plat/arm/common/arm_def.h
View
include/plat/arm/common/plat_arm.h
View
include/plat/arm/css/common/aarch64/css_macros.S
View
include/plat/arm/css/common/css_def.h
View
plat/arm/board/fvp/aarch64/fvp_common.c
View
plat/arm/board/fvp/fvp_pm.c
View
plat/arm/board/fvp/include/platform_def.h
View
plat/arm/board/fvp/platform.mk
View
plat/arm/board/fvp/tsp/tsp-fvp.mk
View
plat/arm/board/juno/include/platform_def.h
View
plat/arm/board/juno/platform.mk
View
plat/arm/board/juno/tsp/tsp-juno.mk
View
plat/arm/common/arm_bl31_setup.c
View
plat/arm/common/arm_common.mk
View
plat/arm/common/arm_gicv2.c 0 → 100644
View
plat/arm/common/arm_gicv3.c 0 → 100644
View
plat/arm/common/arm_gicv3_legacy.c 0 → 100644
View
plat/arm/common/arm_pm.c
View
plat/arm/common/tsp/arm_tsp.mk
View
plat/arm/common/tsp/arm_tsp_setup.c
View
plat/arm/css/common/css_common.c 100644 → 0
View
plat/arm/css/common/css_common.mk
View
plat/arm/css/common/css_pm.c