summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c')
-rw-r--r--ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
index 3fbd591192..5b10eb33c9 100644
--- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
+++ b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.c
@@ -2,6 +2,7 @@
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2020, NUVIA Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -71,3 +72,18 @@ ArmCleanDataCache (
ArmDataSynchronizationBarrier ();
AArch64DataCacheOperation (ArmCleanDataCacheEntryBySetWay);
}
+
+/**
+ Check whether the CPU supports the GIC system register interface (any version)
+
+ @return Whether GIC System Register Interface is supported
+
+**/
+BOOLEAN
+EFIAPI
+ArmHasGicSystemRegisters (
+ VOID
+ )
+{
+ return ((ArmReadIdPfr0 () & AARCH64_PFR0_GIC) != 0);
+}