From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org
Cc: leif.lindholm@linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH v2 12/13] ArmPlatformPkg: remove unused ArmTrustZone driver
Date: Mon, 4 Dec 2017 22:22:42 +0000 [thread overview]
Message-ID: <20171204222243.15950-13-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20171204222243.15950-1-ard.biesheuvel@linaro.org>
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-if-no-comments-by-15-Dec: Leif Lindholm <leif.lindholm@linaro.org>
---
ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.c | 113 --------------------
ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.inf | 33 ------
ArmPlatformPkg/Include/Drivers/ArmTrustzone.h | 105 ------------------
3 files changed, 251 deletions(-)
diff --git a/ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.c b/ArmPlatformPkg/Drivers/ArmTrustZone/ArmTrustZone.c
deleted file mode 100644
index 1f002198e552..000000000000
--- 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 6f90589a5b90..000000000000
--- 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
diff --git a/ArmPlatformPkg/Include/Drivers/ArmTrustzone.h b/ArmPlatformPkg/Include/Drivers/ArmTrustzone.h
deleted file mode 100644
index 827b5cd568c1..000000000000
--- a/ArmPlatformPkg/Include/Drivers/ArmTrustzone.h
+++ /dev/null
@@ -1,105 +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.
-*
-**/
-
-#ifndef __ARM_TRUSTZONE_H__
-#define __ARM_TRUSTZONE_H__
-
-#include <Uefi.h>
-
-// Setup TZ Protection Controller
-#define TZPC_DECPROT_0 0
-#define TZPC_DECPROT_1 1
-#define TZPC_DECPROT_2 2
-#define TZPC_DECPROT_MAX 2
-
-/**
- FIXME: Need documentation
-**/
-EFI_STATUS
-TZPCSetDecProtBits (
- IN UINTN TzpcBase,
- IN UINTN TzpcId,
- IN UINTN Bits
- );
-
-/**
- FIXME: Need documentation
-**/
-EFI_STATUS
-TZPCClearDecProtBits (
- IN UINTN TzpcBase,
- IN UINTN TzpcId,
- IN UINTN Bits
- );
-
-// Setup TZ Address Space Controller
-#define TZASC_REGION_ENABLED 1
-#define TZASC_REGION_DISABLED 0
-#define TZASC_REGION_SIZE_32KB 0xE
-#define TZASC_REGION_SIZE_64KB 0xF
-#define TZASC_REGION_SIZE_128KB 0x10
-#define TZASC_REGION_SIZE_256KB 0x11
-#define TZASC_REGION_SIZE_512KB 0x12
-#define TZASC_REGION_SIZE_1MB 0x13
-#define TZASC_REGION_SIZE_2MB 0x14
-#define TZASC_REGION_SIZE_4MB 0x15
-#define TZASC_REGION_SIZE_8MB 0x16
-#define TZASC_REGION_SIZE_16MB 0x17
-#define TZASC_REGION_SIZE_32MB 0x18
-#define TZASC_REGION_SIZE_64MB 0x19
-#define TZASC_REGION_SIZE_128MB 0x1A
-#define TZASC_REGION_SIZE_256MB 0x1B
-#define TZASC_REGION_SIZE_512MB 0x1C
-#define TZASC_REGION_SIZE_1GB 0x1D
-#define TZASC_REGION_SIZE_2GB 0x1E
-#define TZASC_REGION_SIZE_4GB 0x1F
-#define TZASC_REGION_SECURITY_SR (1 << 3)
-#define TZASC_REGION_SECURITY_SW (1 << 2)
-#define TZASC_REGION_SECURITY_SRW (TZASC_REGION_SECURITY_SR|TZASC_REGION_SECURITY_SW)
-#define TZASC_REGION_SECURITY_NSR (1 << 1)
-#define TZASC_REGION_SECURITY_NSW 1
-#define TZASC_REGION_SECURITY_NSRW (TZASC_REGION_SECURITY_NSR|TZASC_REGION_SECURITY_NSW)
-
-/* Some useful masks */
-#define TZASC_REGION_SETUP_LO_ADDR_MASK 0xFFFF8000
-
-#define TZASC_REGION_ATTR_SECURITY_MASK 0xF
-#define TZASC_REGION_ATTR_SUBREG_DIS_MASK 0xFF
-#define TZASC_REGION_ATTR_SIZE_MASK 0x3F
-#define TZASC_REGION_ATTR_EN_MASK 0x1
-
-#define TZASC_REGION_SETUP_LO_ADDR(x) ((x) & TZASC_REGION_SETUP_LO_ADDR_MASK)
-
-#define TZASC_REGION_ATTR_SECURITY(x) (((x) & TZASC_REGION_ATTR_SECURITY_MASK) << 28)
-#define TZASC_REGION_ATTR_SUBREG_DISABLE(x) \
- (((x) & TZASC_REGION_ATTR_SUBREG_DIS_MASK) << 8)
-#define TZASC_REGION_ATTR_SIZE(x) (((x) & TZASC_REGION_ATTR_SIZE_MASK) << 1)
-#define TZASC_REGION_ATTR_ENABLE(x) ((x) & TZASC_REGION_ATTR_EN_MASK)
-
-/**
- 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
- );
-
-#endif
--
2.11.0
next prev parent reply other threads:[~2017-12-04 22:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-04 22:22 [PATCH v2 00/13] ArmPlatformPkg: remove unused or migrated modules Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 01/13] ArmPlatformPkg: remove NorFlashArmVExpressLib Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 02/13] ArmPlatformPkg: remove ArmVExpressPkg Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 03/13] ArmPlatformPkg: remove ArmPlatformSysConfigLib library class Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 04/13] ArmPlatformPkg: remove BootMonFs and ArmShellCmdRunAxf Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 05/13] ArmPlatformPkg: remove old PL011UartLib implementation Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 06/13] ArmPlatformPkg: add missing library class declarations to .dec file Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 07/13] ArmPlatformPkg/LcdGraphicsOutputDxe: move headers into driver directory Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 08/13] ArmPlatformPkg: remove unused PL301Axi driver Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 09/13] ArmPlatformPkg: remove unused PL35x driver Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 10/13] ArmPlatformPkg: remove PL34xDmc driver Ard Biesheuvel
2017-12-04 22:22 ` [PATCH v2 11/13] ArmPlatformPkg: remove unused PL310 driver Ard Biesheuvel
2017-12-04 22:22 ` Ard Biesheuvel [this message]
2017-12-04 22:22 ` [PATCH v2 13/13] ArmPlatformPkg: remove unused SP804 driver and TimerLib implementation Ard Biesheuvel
2017-12-08 15:59 ` [PATCH v2 00/13] ArmPlatformPkg: remove unused or migrated modules Leif Lindholm
2017-12-08 16:35 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171204222243.15950-13-ard.biesheuvel@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox