]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: merge ArmGicV[23]Lib.h into ArmGicLib.h
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 28 Jul 2015 20:44:27 +0000 (20:44 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Tue, 28 Jul 2015 20:44:27 +0000 (20:44 +0000)
Before splitting off ArmGicArchLib and moving it out of
ArmPkg/Drivers/ArmGic into ArmPkg/Library, make sure that the
GIC specific declarations it depends on are not hidden away in
local headers "GicV2/GicV2Lib.h" and "GicV3/GicV3Lib.h".

So merge them with <Library/ArmGicLib.h>. This is entirely
appropriate, since this is not a header that declares a public
interface into ArmGicLib, but defines implementation internals.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-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@18097 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Drivers/ArmGic/AArch64/ArmGicArchLib.c
ArmPkg/Drivers/ArmGic/Arm/ArmGicArchLib.c
ArmPkg/Drivers/ArmGic/ArmGicLib.c
ArmPkg/Drivers/ArmGic/ArmGicSecLib.c
ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c
ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.h [deleted file]
ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c
ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Lib.h [deleted file]
ArmPkg/Include/Library/ArmGicLib.h

index 88fa4621e613164e34c28308af8d8b105541d67f..0e0fa3b9f33e2adccaae7bca03a32189ec76b948 100644 (file)
@@ -15,8 +15,6 @@
 #include <Library/ArmLib.h>\r
 #include <Library/ArmGicLib.h>\r
 \r
-#include "GicV3/ArmGicV3Lib.h"\r
-\r
 ARM_GIC_ARCH_REVISION\r
 EFIAPI\r
 ArmGicGetSupportedArchRevision (\r
index 9ef56efeaa7ba587ab61e9c3101b24f7e6664b94..f256de70463194d05a2718e5511cccc1392bf70d 100644 (file)
@@ -15,8 +15,6 @@
 #include <Library/ArmLib.h>\r
 #include <Library/ArmGicLib.h>\r
 \r
-#include "GicV3/ArmGicV3Lib.h"\r
-\r
 ARM_GIC_ARCH_REVISION\r
 EFIAPI\r
 ArmGicGetSupportedArchRevision (\r
index 48708e3812b4736fcd2399e05a92cab02f532555..248e896c4b94a354f16a578a3fab826cc09b0904 100644 (file)
@@ -19,9 +19,6 @@
 #include <Library/IoLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
-#include "GicV2/ArmGicV2Lib.h"\r
-#include "GicV3/ArmGicV3Lib.h"\r
-\r
 /**\r
  * Return the base address of the GIC redistributor for the current CPU\r
  *\r
index 1fdd4d73bd7d77be46a27846a00143dce9e608ea..d64806d2f16b2f5a186d2476896e4d46c4f36cb1 100644 (file)
@@ -17,8 +17,6 @@
 #include <Library/IoLib.h>\r
 #include <Library/ArmGicLib.h>\r
 \r
-#include "GicV2/ArmGicV2Lib.h"\r
-\r
 /*\r
  * This function configures the interrupts set by the mask to be secure.\r
  *\r
index 743c534e04d9d8bc27002588e4303ceeca7c2494..e649ac1bc6af6c247db35aa33b4558be33bf7779 100644 (file)
@@ -22,8 +22,9 @@ Abstract:
 \r
 --*/\r
 \r
+#include <Library/ArmGicLib.h>\r
+\r
 #include "ArmGicDxe.h"\r
-#include "GicV2/ArmGicV2Lib.h"\r
 \r
 #define ARM_GIC_DEFAULT_PRIORITY  0x80\r
 \r
diff --git a/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.h b/ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.h
deleted file mode 100644 (file)
index 6803467..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2013-2014, ARM Limited. All rights reserved.\r
-*\r
-*  This program and the accompanying materials\r
-*  are licensed and made available under the terms and conditions of the BSD License\r
-*  which accompanies this distribution.  The full text of the license may be found at\r
-*  http://opensource.org/licenses/bsd-license.php\r
-*\r
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-*\r
-**/\r
-\r
-#ifndef _ARM_GIC_V2_H_\r
-#define _ARM_GIC_V2_H_\r
-\r
-// Interrupts from 1020 to 1023 are considered as special interrupts (eg: spurious interrupts)\r
-#define ARM_GIC_IS_SPECIAL_INTERRUPTS(Interrupt) (((Interrupt) >= 1020) && ((Interrupt) <= 1023))\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicV2SetupNonSecure (\r
-  IN  UINTN         MpId,\r
-  IN  INTN          GicDistributorBase,\r
-  IN  INTN          GicInterruptInterfaceBase\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicV2EnableInterruptInterface (\r
-  IN  INTN          GicInterruptInterfaceBase\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicV2DisableInterruptInterface (\r
-  IN  INTN          GicInterruptInterfaceBase\r
-  );\r
-\r
-UINTN\r
-EFIAPI\r
-ArmGicV2AcknowledgeInterrupt (\r
-  IN  UINTN          GicInterruptInterfaceBase\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicV2EndOfInterrupt (\r
-  IN UINTN                  GicInterruptInterfaceBase,\r
-  IN UINTN                  Source\r
-  );\r
-\r
-#endif\r
index 73cac8774056eba23cefb04afb39d24652c66d19..4afa3d5a09c21abbe307474a1b7a0bd3374445c6 100644 (file)
@@ -12,8 +12,9 @@
 *\r
 **/\r
 \r
+#include <Library/ArmGicLib.h>\r
+\r
 #include "ArmGicDxe.h"\r
-#include "GicV3/ArmGicV3Lib.h"\r
 \r
 #define ARM_GIC_DEFAULT_PRIORITY  0x80\r
 \r
diff --git a/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Lib.h b/ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Lib.h
deleted file mode 100644 (file)
index 794e878..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/** @file\r
-*\r
-*  Copyright (c) 2014-2015, ARM Limited. All rights reserved.\r
-*\r
-*  This program and the accompanying materials are licensed and made available\r
-*  under the terms and conditions of the BSD License which accompanies this\r
-*  distribution. The full text of the license may be found at\r
-*  http://opensource.org/licenses/bsd-license.php\r
-*\r
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-*\r
-**/\r
-\r
-#ifndef _ARM_GIC_V3_H_\r
-#define _ARM_GIC_V3_H_\r
-\r
-#define ICC_SRE_EL2_SRE         (1 << 0)\r
-\r
-#define ARM_GICD_IROUTER_IRM BIT31\r
-\r
-UINT32\r
-EFIAPI\r
-ArmGicV3GetControlSystemRegisterEnable (\r
-  VOID\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicV3SetControlSystemRegisterEnable (\r
-  IN UINT32         ControlSystemRegisterEnable\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicV3EnableInterruptInterface (\r
-  VOID\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicV3DisableInterruptInterface (\r
-  VOID\r
-  );\r
-\r
-UINTN\r
-EFIAPI\r
-ArmGicV3AcknowledgeInterrupt (\r
-  VOID\r
-  );\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicV3EndOfInterrupt (\r
-  IN UINTN                  Source\r
-  );\r
-\r
-VOID\r
-ArmGicV3SetBinaryPointer (\r
-  IN UINTN                  BinaryPoint\r
-  );\r
-\r
-VOID\r
-ArmGicV3SetPriorityMask (\r
-  IN UINTN                  Priority\r
-  );\r
-\r
-#endif\r
index e2a4818c4c0c62fd74aff9bba8df91222a21cde4..e3db9c0d250f4b3a348bae630e20cc5e6863c885 100644 (file)
@@ -231,4 +231,98 @@ ArmGicIsInterruptEnabled (
   IN UINTN                  Source\r
   );\r
 \r
+//\r
+// GIC revision 2 specific declarations\r
+//\r
+\r
+// Interrupts from 1020 to 1023 are considered as special interrupts (eg: spurious interrupts)\r
+#define ARM_GIC_IS_SPECIAL_INTERRUPTS(Interrupt) (((Interrupt) >= 1020) && ((Interrupt) <= 1023))\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicV2SetupNonSecure (\r
+  IN  UINTN         MpId,\r
+  IN  INTN          GicDistributorBase,\r
+  IN  INTN          GicInterruptInterfaceBase\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicV2EnableInterruptInterface (\r
+  IN  INTN          GicInterruptInterfaceBase\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicV2DisableInterruptInterface (\r
+  IN  INTN          GicInterruptInterfaceBase\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+ArmGicV2AcknowledgeInterrupt (\r
+  IN  UINTN          GicInterruptInterfaceBase\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicV2EndOfInterrupt (\r
+  IN UINTN                  GicInterruptInterfaceBase,\r
+  IN UINTN                  Source\r
+  );\r
+\r
+//\r
+// GIC revision 3 specific declarations\r
+//\r
+\r
+#define ICC_SRE_EL2_SRE         (1 << 0)\r
+\r
+#define ARM_GICD_IROUTER_IRM BIT31\r
+\r
+UINT32\r
+EFIAPI\r
+ArmGicV3GetControlSystemRegisterEnable (\r
+  VOID\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicV3SetControlSystemRegisterEnable (\r
+  IN UINT32         ControlSystemRegisterEnable\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicV3EnableInterruptInterface (\r
+  VOID\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicV3DisableInterruptInterface (\r
+  VOID\r
+  );\r
+\r
+UINTN\r
+EFIAPI\r
+ArmGicV3AcknowledgeInterrupt (\r
+  VOID\r
+  );\r
+\r
+VOID\r
+EFIAPI\r
+ArmGicV3EndOfInterrupt (\r
+  IN UINTN                  Source\r
+  );\r
+\r
+VOID\r
+ArmGicV3SetBinaryPointer (\r
+  IN UINTN                  BinaryPoint\r
+  );\r
+\r
+VOID\r
+ArmGicV3SetPriorityMask (\r
+  IN UINTN                  Priority\r
+  );\r
+\r
 #endif\r