Currently NuttX on Arm64 supports Generic Interrupt Controller (GIC) Versions 3 and 4: arm64_gicv3.c, arm64_gic.h. This PR adds support for GIC Version 2, which is needed by Pine64 PinePhone based on Allwinner A64 SoC.
This 64-bit implementation of GIC v2 is mostly identical to the existing GIC v2 for 32-bit Armv7-A (armv7-a/arm_gicv2.c, armv7-a/gic.h), with minor modifications to support 64-bit Registers (Interrupt Context).
arch/arm64/Kconfig: Under "ARM64 Options", we added an integer optionARM_GIC_VERSION("GIC version") that selects the GIC Version. Valid values are 2, 3 and 4