summaryrefslogtreecommitdiff
path: root/ArmPkg/Drivers/ArmGic/ArmGicDxe.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Drivers/ArmGic/ArmGicDxe.c')
-rw-r--r--ArmPkg/Drivers/ArmGic/ArmGicDxe.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicDxe.c b/ArmPkg/Drivers/ArmGic/ArmGicDxe.c
index 37c32504a5..8be2d6fe5e 100644
--- a/ArmPkg/Drivers/ArmGic/ArmGicDxe.c
+++ b/ArmPkg/Drivers/ArmGic/ArmGicDxe.c
@@ -33,6 +33,7 @@ Abstract:
@retval EFI_SUCCESS Protocol registered
@retval EFI_OUT_OF_RESOURCES Cannot allocate protocol data structure
@retval EFI_DEVICE_ERROR Hardware problems
+ @retval EFI_UNSUPPORTED GIC version not supported
**/
EFI_STATUS
@@ -41,9 +42,16 @@ InterruptDxeInitialize (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_STATUS Status;
+ EFI_STATUS Status;
+ ARM_GIC_ARCH_REVISION Revision;
- Status = GicV2DxeInitialize (ImageHandle, SystemTable);
+ Revision = ArmGicGetSupportedArchRevision ();
+
+ if (Revision == ARM_GIC_ARCH_REVISION_2) {
+ Status = GicV2DxeInitialize (ImageHandle, SystemTable);
+ } else {
+ Status = EFI_UNSUPPORTED;
+ }
return Status;
}