\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
Copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR>\r
+ Copyright (c) 2020, NUVIA Inc. All rights reserved.<BR>\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
VOID\r
);\r
\r
+\r
+///\r
+/// ID Register Helper functions\r
+///\r
+\r
+/**\r
+ Check whether the CPU supports the GIC system register interface (any version)\r
+\r
+ @return Whether GIC System Register Interface is supported\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+ArmHasGicSystemRegisters (\r
+ VOID\r
+ );\r
+\r
#endif // __ARM_LIB__\r
\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>\r
+ Copyright (c) 2020, NUVIA Inc. All rights reserved.<BR>\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
ArmDataSynchronizationBarrier ();\r
AArch64DataCacheOperation (ArmCleanDataCacheEntryBySetWay);\r
}\r
+\r
+/**\r
+ Check whether the CPU supports the GIC system register interface (any version)\r
+\r
+ @return Whether GIC System Register Interface is supported\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+ArmHasGicSystemRegisters (\r
+ VOID\r
+ )\r
+{\r
+ return ((ArmReadIdPfr0 () & AARCH64_PFR0_GIC) != 0);\r
+}\r
\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
Copyright (c) 2011 - 2014, ARM Limited. All rights reserved.\r
+ Copyright (c) 2020, NUVIA Inc. All rights reserved.<BR>\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
ArmDataSynchronizationBarrier ();\r
ArmV7DataCacheOperation (ArmCleanDataCacheEntryBySetWay);\r
}\r
+\r
+/**\r
+ Check whether the CPU supports the GIC system register interface (any version)\r
+\r
+ @return Whether GIC System Register Interface is supported\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+ArmHasGicSystemRegisters (\r
+ VOID\r
+ )\r
+{\r
+ return ((ArmReadIdPfr1 () & ARM_PFR1_GIC) != 0);\r
+}\r