ArmPkg/ArmGic: Moved ArmGicDisableDistributor() to ArmGicLib.c

The implementation is the same when we run in Secure or Non-Secure world.
This change makes this function available for ArmGicSec.inf and ArmGicNonSec.inf.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15625 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Olivier Martin 2014-07-04 11:27:28 +00:00 committed by oliviermartin
parent 0458b423b6
commit 60775c51a5
2 changed files with 13 additions and 14 deletions

View File

@ -12,10 +12,9 @@
*
**/
#include <Uefi.h>
#include <Library/IoLib.h>
#include <Base.h>
#include <Library/ArmGicLib.h>
#include <Library/PcdLib.h>
#include <Library/IoLib.h>
UINTN
EFIAPI
@ -120,3 +119,13 @@ ArmGicIsInterruptEnabled (
return ((MmioRead32 (GicDistributorBase + ARM_GIC_ICDISER + (4 * RegOffset)) & (1 << RegShift)) != 0);
}
VOID
EFIAPI
ArmGicDisableDistributor (
IN INTN GicDistributorBase
)
{
// Disable Gic Distributor
MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x0);
}

View File

@ -1,6 +1,6 @@
/** @file
*
* Copyright (c) 2014, ARM Limited. All rights reserved.
* Copyright (c) 2011-2014, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@ -53,13 +53,3 @@ ArmGicEnableDistributor (
*/
MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1);
}
VOID
EFIAPI
ArmGicDisableDistributor (
IN INTN GicDistributorBase
)
{
// Disable Gic Distributor
MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x0);
}