summaryrefslogtreecommitdiff
path: root/ArmPkg/Include/Library
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-07-28 20:44:44 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-07-28 20:44:44 +0000
commit8d13298b8008ff62e107deb2a293ea267943a977 (patch)
tree6db916ee95b3878617f5cce0c8fcec2525e9e106 /ArmPkg/Include/Library
parentbce29e305979859de6ac61658a828f2e50316a34 (diff)
downloadedk2-8d13298b8008ff62e107deb2a293ea267943a977.tar.gz
ArmPkg: split off ArmGicArchLib from ArmGicLib
The current implementation of ArmGicGetSupportedArchRevision () that is used by all ARM platforms is entirely stateless (in order to support being executed from flash) so it needs to interrogate the hardware for the supported GIC revision upon each invocation. However, this statelessness is only needed for SEC type modules; in all other cases, we could easily determine the GIC revision once, and store the result in a global variable. In preparation of having separate early and normal versions, this patch introduces the ArmGicArchLib library class and default implementation, and moves the existing ArmGicGetSupportedArchRevision () into it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18098 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Include/Library')
-rw-r--r--ArmPkg/Include/Library/ArmGicArchLib.h33
-rw-r--r--ArmPkg/Include/Library/ArmGicLib.h14
2 files changed, 34 insertions, 13 deletions
diff --git a/ArmPkg/Include/Library/ArmGicArchLib.h b/ArmPkg/Include/Library/ArmGicArchLib.h
new file mode 100644
index 000000000..e6964a2d5
--- /dev/null
+++ b/ArmPkg/Include/Library/ArmGicArchLib.h
@@ -0,0 +1,33 @@
+/** @file
+*
+* Copyright (c) 2015, Linaro Ltd. All rights reserved.
+*
+* This program and the accompanying materials are licensed and made available
+* under the terms and conditions of the BSD License which accompanies this
+* distribution. The full text of the license may be found at
+* http://opensource.org/licenses/bsd-license.php
+*
+* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+
+#ifndef __ARM_GIC_ARCH_LIB_H__
+#define __ARM_GIC_ARCH_LIB_H__
+
+//
+// GIC definitions
+//
+typedef enum {
+ ARM_GIC_ARCH_REVISION_2,
+ ARM_GIC_ARCH_REVISION_3
+} ARM_GIC_ARCH_REVISION;
+
+
+ARM_GIC_ARCH_REVISION
+EFIAPI
+ArmGicGetSupportedArchRevision (
+ VOID
+ );
+
+#endif
diff --git a/ArmPkg/Include/Library/ArmGicLib.h b/ArmPkg/Include/Library/ArmGicLib.h
index e3db9c0d2..10c4a9d72 100644
--- a/ArmPkg/Include/Library/ArmGicLib.h
+++ b/ArmPkg/Include/Library/ArmGicLib.h
@@ -15,13 +15,7 @@
#ifndef __ARMGIC_H
#define __ARMGIC_H
-//
-// GIC definitions
-//
-typedef enum {
- ARM_GIC_ARCH_REVISION_2,
- ARM_GIC_ARCH_REVISION_3
-} ARM_GIC_ARCH_REVISION;
+#include <Library/ArmGicArchLib.h>
//
// GIC Distributor
@@ -103,12 +97,6 @@ typedef enum {
// Bit Mask for
#define ARM_GIC_ICCIAR_ACKINTID 0x3FF
-ARM_GIC_ARCH_REVISION
-EFIAPI
-ArmGicGetSupportedArchRevision (
- VOID
- );
-
UINTN
EFIAPI
ArmGicGetInterfaceIdentification (