summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Drivers
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-11-15 14:41:26 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-12-08 16:30:55 +0000
commit134f669b2a1e32add33971c37888c761d4aa2ed7 (patch)
tree991fef0c060498f88d7709fa68f07dd9fe558d89 /ArmPlatformPkg/Drivers
parentcbfe0ee4921fab5094c657fa118ccb14ad5d4638 (diff)
downloadedk2-134f669b2a1e32add33971c37888c761d4aa2ed7.tar.gz
edk2-134f669b2a1e32add33971c37888c761d4aa2ed7.tar.bz2
edk2-134f669b2a1e32add33971c37888c761d4aa2ed7.zip
ArmPlatformPkg: remove unused ArmTrustZone driver
This driver is no longer used anywhere so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPlatformPkg/Drivers')
-rw-r--r--ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.c113
-rw-r--r--ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.inf33
2 files changed, 0 insertions, 146 deletions
diff --git a/ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.c b/ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.c
deleted file mode 100644
index 1f002198e5..0000000000
--- a/ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/** @file
-*
-* Copyright (c) 2011-2012, 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
-*
-* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-*
-**/
-
-#include <Library/BaseLib.h>
-#include <Library/IoLib.h>
-
-#include <Drivers/ArmTrustzone.h>
-
-#define TZPC_DECPROT0_STATUS_REG 0x800
-#define TZPC_DECPROT0_SET_REG 0x804
-#define TZPC_DECPROT0_CLEAR_REG 0x808
-
-#define TZASC_CONFIGURATION_REG 0x000
-#define TZASC_REGIONS_REG 0x100
-#define TZASC_REGION0_LOW_ADDRESS_REG 0x100
-#define TZASC_REGION0_HIGH_ADDRESS_REG 0x104
-#define TZASC_REGION0_ATTRIBUTES 0x108
-
-/**
- FIXME: Need documentation
-**/
-EFI_STATUS
-TZPCSetDecProtBits (
- IN UINTN TzpcBase,
- IN UINTN TzpcId,
- IN UINTN Bits
- )
-{
- if (TzpcId > TZPC_DECPROT_MAX) {
- return EFI_INVALID_PARAMETER;
- }
-
- MmioWrite32 ((UINTN)TzpcBase + TZPC_DECPROT0_SET_REG + (TzpcId * 0x0C), Bits);
-
- return EFI_SUCCESS;
-}
-
-/**
- FIXME: Need documentation
-**/
-EFI_STATUS
-TZPCClearDecProtBits (
- IN UINTN TzpcBase,
- IN UINTN TzpcId,
- IN UINTN Bits
- )
-{
- if (TzpcId> TZPC_DECPROT_MAX) {
- return EFI_INVALID_PARAMETER;
- }
-
- MmioWrite32 ((UINTN)TzpcBase + TZPC_DECPROT0_CLEAR_REG + (TzpcId * 0x0C), Bits);
-
- return EFI_SUCCESS;
-}
-
-/**
- FIXME: Need documentation
-**/
-UINT32
-TZASCGetNumRegions (
- IN UINTN TzascBase
- )
-{
- return (MmioRead32 ((UINTN)TzascBase + TZASC_CONFIGURATION_REG) & 0xF);
-}
-
-/**
- FIXME: Need documentation
-**/
-EFI_STATUS
-TZASCSetRegion (
- IN INTN TzascBase,
- IN UINTN RegionId,
- IN UINTN Enabled,
- IN UINTN LowAddress,
- IN UINTN HighAddress,
- IN UINTN Size,
- IN UINTN Security,
- IN UINTN SubregionDisableMask
- )
-{
- UINT32* Region;
- UINT32 RegionAttributes;
-
- if (RegionId > TZASCGetNumRegions(TzascBase)) {
- return EFI_INVALID_PARAMETER;
- }
-
- RegionAttributes = TZASC_REGION_ATTR_SECURITY(Security) |
- TZASC_REGION_ATTR_SUBREG_DISABLE(SubregionDisableMask) |
- TZASC_REGION_ATTR_SIZE(Size) |
- TZASC_REGION_ATTR_ENABLE(Enabled);
-
- Region = (UINT32*)((UINTN)TzascBase + TZASC_REGIONS_REG + (RegionId * 0x10));
-
- MmioWrite32((UINTN)(Region), TZASC_REGION_SETUP_LO_ADDR(LowAddress));
- MmioWrite32((UINTN)(Region+1), HighAddress);
- MmioWrite32((UINTN)(Region+2), RegionAttributes);
-
- return EFI_SUCCESS;
-}
diff --git a/ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.inf b/ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.inf
deleted file mode 100644
index 6f90589a5b..0000000000
--- a/ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.inf
+++ /dev/null
@@ -1,33 +0,0 @@
-#/* @file
-# Copyright (c) 2011-2012, 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
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#*/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = ArmTrustZoneLib
- FILE_GUID = 5962d040-8b8a-11df-9a71-0002a5d5c51b
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = ArmTrustZoneLib
-
-
-[Sources.common]
- ArmTrustZone.c
-
-[Packages]
- MdePkg/MdePkg.dec
- ArmPkg/ArmPkg.dec
- ArmPlatformPkg/ArmPlatformPkg.dec
-
-[LibraryClasses]
- BaseLib
- IoLib