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
#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
#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
#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
#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
\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
+++ /dev/null
-/** @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
*\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
+++ /dev/null
-/** @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
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