+++ /dev/null
-/** @file\r
-*\r
-* Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
-*\r
-* SPDX-License-Identifier: BSD-2-Clause-Patent\r
-*\r
-**/\r
-\r
-#include <Base.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/IoLib.h>\r
-#include <Library/ArmGicLib.h>\r
-\r
-/*\r
- * This function configures the interrupts set by the mask to be secure.\r
- *\r
- */\r
-VOID\r
-EFIAPI\r
-ArmGicSetSecureInterrupts (\r
- IN UINTN GicDistributorBase,\r
- IN UINTN* GicSecureInterruptMask,\r
- IN UINTN GicSecureInterruptMaskSize\r
- )\r
-{\r
- UINTN Index;\r
- UINT32 InterruptStatus;\r
-\r
- // We must not have more interrupts defined by the mask than the number of available interrupts\r
- ASSERT(GicSecureInterruptMaskSize <= (ArmGicGetMaxNumInterrupts (GicDistributorBase) / 32));\r
-\r
- // Set all the interrupts defined by the mask as Secure\r
- for (Index = 0; Index < GicSecureInterruptMaskSize; Index++) {\r
- InterruptStatus = MmioRead32 (GicDistributorBase + ARM_GIC_ICDISR + (Index * 4));\r
- MmioWrite32 (GicDistributorBase + ARM_GIC_ICDISR + (Index * 4), InterruptStatus & (~GicSecureInterruptMask[Index]));\r
- }\r
-}\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicEnableDistributor (\r
- IN INTN GicDistributorBase\r
- )\r
-{\r
- // Turn on the GIC distributor\r
- MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 1);\r
-}\r
-\r
-VOID\r
-EFIAPI\r
-ArmGicSetupNonSecure (\r
- IN UINTN MpId,\r
- IN INTN GicDistributorBase,\r
- IN INTN GicInterruptInterfaceBase\r
- )\r
-{\r
- ArmGicV2SetupNonSecure (MpId, GicDistributorBase, GicInterruptInterfaceBase);\r
-}\r