From 672b877ef61e5453734084b2dd2051e08e6baea6 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Tue, 25 Mar 2014 12:48:53 +0000 Subject: [PATCH 08/14] 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. Change-Id: Icfad60cf47876b04bbb26bebb094b942307d878d --- ArmPkg/Drivers/ArmGic/ArmGicLib.c | 17 +++++++++++++---- ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c | 26 ++++++++------------------ 2 files changed, 21 insertions(+), 22 deletions(-) mode change 100644 => 100755 ArmPkg/Drivers/ArmGic/ArmGicLib.c mode change 100644 => 100755 ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c old mode 100644 new mode 100755 index 4da2ed7..75286ba --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c @@ -1,6 +1,6 @@ /** @file * -* Copyright (c) 2011-2013, 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 @@ -12,10 +12,9 @@ * **/ -#include -#include +#include #include -#include +#include UINTN EFIAPI @@ -129,3 +128,13 @@ ArmGicIsInterruptEnabled ( return TRUE; } } + +VOID +EFIAPI +ArmGicDisableDistributor ( + IN INTN GicDistributorBase + ) +{ + // Disable Gic Distributor + MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x0); +} diff --git a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c old mode 100644 new mode 100755 index ad9e40d..3ff9b48 --- a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c @@ -1,14 +1,14 @@ /** @file * -* Copyright (c) 2011, 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 -* which accompanies this distribution. The full text of the license may be found at -* http://opensource.org/licenses/bsd-license.php +* Copyright (c) 2011-2014, ARM Limited. All rights reserved. * -* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +* 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. * **/ @@ -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); -} -- 1.8.5