From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5E28D1A1E34 for ; Mon, 5 Sep 2016 04:06:25 -0700 (PDT) Received: by mail-wm0-x235.google.com with SMTP id 1so132794186wmz.1 for ; Mon, 05 Sep 2016 04:06:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GZdbohSRJkF197KVXb4XrxfArjwMa6YaS/jsXmeDDDU=; b=e07eZOFfr0UE5JJzEU/bv7RM5MyaoHIMHC9kndbsC7NX7MhyAygKLLuSF5+B9Mw6UM CiEHnCSG+EZ7KgvzV2ATsntyZUjoR9VwrL7WJj8vrRagUWRyEb7pio+Pb6pdN2dbahwp IyATZ4nXDMfe2zOAz0r6I8q+4M3GEG4pKO5ns= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GZdbohSRJkF197KVXb4XrxfArjwMa6YaS/jsXmeDDDU=; b=aEQJ37sqtjCLZQqDNovjVrCcQ3Kz74xRzv9jgrf46HFBE876Kuu9BSqb2IlRqkuTnq O5Kk5HyeypR+o83IqU/fcrAasAiPwMcFPXWz/MUac0Gaq4vZJ6J3LJuS+pM3aUVnnbwm fZC+YPvxf1+ADTWH49iTidb/VSwI86crqFEuzzH/KSsAd2jzicEHXB+T4Oi2ioHWRLG1 KCMO5xt/7WC0RtyZSkJHrcIepES0PRdttf/PAwATRJDRSdE8vidZWW4aFFlgxjNVmzdt X6r7XVcBMojuN7nGiF0hbcwBHEotprcRtc4NR+yTmID/7k+2U0fQllmoRjGO5F9GC9ty q6AA== X-Gm-Message-State: AE9vXwOSmiKB+TB6ntcw4O6BRdhRkYhY01BjGFmjFQGCEBpP29tktvAeq7GIz/SAey5ceL5a X-Received: by 10.194.175.106 with SMTP id bz10mr34985677wjc.42.1473073583832; Mon, 05 Sep 2016 04:06:23 -0700 (PDT) Received: from localhost.localdomain ([197.130.133.164]) by smtp.gmail.com with ESMTPSA id cf1sm22442395wjc.29.2016.09.05.04.06.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Sep 2016 04:06:23 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, lersek@redhat.com Cc: Ard Biesheuvel Date: Mon, 5 Sep 2016 12:06:06 +0100 Message-Id: <1473073566-1504-6-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473073566-1504-1-git-send-email-ard.biesheuvel@linaro.org> References: <1473073566-1504-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH 5/5] ArmPkg/ArmLib: remove all ArmLib flavors except ArmBaseLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2016 11:06:26 -0000 This removes the following ArmLib implementation, which were, apart from the fact that they targeted either ARM or AARCH64, fully identical: ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf ArmPkg/Library/ArmLib/AArch64/AArch64LibPrePi.inf ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf Only ArmBaseLib remains, which can fulfil the dependencies upon each of the listed flavors. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPkg/ArmPkg.dsc | 12 ---- ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf | 43 ----------- ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf | 43 ----------- ArmPkg/Library/ArmLib/AArch64/AArch64LibPrePi.inf | 44 ------------ ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf | 40 ----------- ArmPkg/Library/ArmLib/AArch64/AArch64PeiLibConstructor.c | 75 -------------------- ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf | 52 -------------- ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf | 52 -------------- ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf | 44 ------------ 9 files changed, 405 deletions(-) diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 012c5c835f4e..6a8ff7e621d7 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -89,12 +89,6 @@ [LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf -[LibraryClasses.ARM] - ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf - -[LibraryClasses.AARCH64] - ArmLib|ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf - [LibraryClasses.common.PEIM] HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf @@ -154,12 +148,6 @@ [Components.ARM] ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf ArmPkg/Drivers/ArmCpuLib/ArmCortexA15Lib/ArmCortexA15Lib.inf - ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf - ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf - [Components.AARCH64] ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf ArmPkg/Drivers/ArmCpuLib/ArmCortexA5xLib/ArmCortexA5xLib.inf - - ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf - ArmPkg/Library/ArmLib/AArch64/AArch64LibPrePi.inf diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf b/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf deleted file mode 100644 index f0de4aa7dfb4..000000000000 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64Lib.inf +++ /dev/null @@ -1,43 +0,0 @@ -#/** @file -# -# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
-# Portions 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 -# 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 = AArch64Lib - FILE_GUID = ef20ddf5-b334-47b3-94cf-52ff44c29138 - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmLib - -[Sources.AARCH64] - AArch64Lib.c - AArch64ArchTimer.c - ArmLibSupportV8.S - AArch64Support.S - AArch64ArchTimerSupport.S - - ../Common/AArch64/ArmLibSupport.S - ../Common/ArmLib.c - -[Packages] - ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec - -[LibraryClasses] - MemoryAllocationLib - CacheMaintenanceLib - -[Protocols] - gEfiCpuArchProtocolGuid diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf b/ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf deleted file mode 100644 index c8f0b97750d4..000000000000 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64LibPei.inf +++ /dev/null @@ -1,43 +0,0 @@ -#/** @file -# -# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
-# Portions 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 -# 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 = AArch64Lib - FILE_GUID = ef20ddf5-b334-47b3-94cf-52ff44c29138 - MODULE_TYPE = PEIM - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmLib|PEIM PEI_CORE - CONSTRUCTOR = AArch64LibConstructor - -[Sources.AARCH64] - AArch64Lib.c - AArch64Mmu.c - AArch64ArchTimer.c - ArmLibSupportV8.S - AArch64Support.S - AArch64ArchTimerSupport.S - - ../Common/AArch64/ArmLibSupport.S - ../Common/ArmLib.c - AArch64PeiLibConstructor.c - -[Packages] - ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec - -[LibraryClasses] - MemoryAllocationLib - CacheMaintenanceLib diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64LibPrePi.inf b/ArmPkg/Library/ArmLib/AArch64/AArch64LibPrePi.inf deleted file mode 100644 index e41ef0815581..000000000000 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64LibPrePi.inf +++ /dev/null @@ -1,44 +0,0 @@ -#/** @file -# -# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
-# Portions copyright (c) 2011-2013, ARM Ltd. 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 = AArch64LibPrePi - FILE_GUID = fd72688d-dbd8-4cf2-91a3-15171dea7816 - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmLib - -[Sources.common] - ArmLibSupportV8.S - AArch64Support.S - - ../Common/AArch64/ArmLibSupport.S - ../Common/ArmLib.c - - AArch64Lib.c - - AArch64ArchTimer.c - AArch64ArchTimerSupport.S - -[Packages] - ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec - -[LibraryClasses] - PrePiLib - -[Protocols] - gEfiCpuArchProtocolGuid diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf b/ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf deleted file mode 100644 index 302c09af49dd..000000000000 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64LibSec.inf +++ /dev/null @@ -1,40 +0,0 @@ -#/* @file -# -# 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 -# 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 = AArch64Lib - FILE_GUID = eb7441e4-3ddf-48b8-a009-14f428b19e49 - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmLib - -[Sources.common] - ArmLibSupportV8.S - AArch64Support.S - - ../Common/AArch64/ArmLibSupport.S - ../Common/ArmLib.c - - AArch64Lib.c - - AArch64ArchTimer.c - AArch64ArchTimerSupport.S - -[Packages] - ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec - -[Protocols] - gEfiCpuArchProtocolGuid diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64PeiLibConstructor.c b/ArmPkg/Library/ArmLib/AArch64/AArch64PeiLibConstructor.c deleted file mode 100644 index 2de9c7c54ed9..000000000000 --- a/ArmPkg/Library/ArmLib/AArch64/AArch64PeiLibConstructor.c +++ /dev/null @@ -1,75 +0,0 @@ -#/* @file -# -# Copyright (c) 2016, Linaro 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 - -#include -#include -#include - -// -// This is a hack. We define a weak symbol with external linkage, which may or -// may not be overridden by a non-weak alternative that is defined with a non -// zero value in the object that contains the MMU routines. Since static -// libraries are pulled in on a per-object basis, and since the MMU object will -// only be pulled in if any of its other symbols are referenced by the client -// module, we can use the value below to figure out whether the MMU routines are -// in use by this module, and decide whether cache maintenance of the function -// ArmReplaceLiveTranslationEntry () is required. -// -INT32 __attribute__((weak)) HaveMmuRoutines; - -EFI_STATUS -EFIAPI -AArch64LibConstructor ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices - ) -{ - extern UINT32 ArmReplaceLiveTranslationEntrySize; - - EFI_FV_FILE_INFO FileInfo; - EFI_STATUS Status; - - if (HaveMmuRoutines == 0) { - return RETURN_SUCCESS; - } - - ASSERT (FileHandle != NULL); - - Status = (*PeiServices)->FfsGetFileInfo (FileHandle, &FileInfo); - ASSERT_EFI_ERROR (Status); - - // - // Some platforms do not cope very well with cache maintenance being - // performed on regions backed by NOR flash. Since the cache maintenance - // is unnecessary to begin with in that case, perform it only when not - // executing in place. - // - if ((UINTN)FileInfo.Buffer <= (UINTN)ArmReplaceLiveTranslationEntry && - ((UINTN)FileInfo.Buffer + FileInfo.BufferSize >= - (UINTN)ArmReplaceLiveTranslationEntry + ArmReplaceLiveTranslationEntrySize)) { - DEBUG ((EFI_D_INFO, "ArmLib: skipping cache maintence on XIP PEIM\n")); - } else { - DEBUG ((EFI_D_INFO, "ArmLib: performing cache maintence on shadowed PEIM\n")); - // - // The ArmReplaceLiveTranslationEntry () helper function may be invoked - // with the MMU off so we have to ensure that it gets cleaned to the PoC - // - WriteBackDataCacheRange (ArmReplaceLiveTranslationEntry, - ArmReplaceLiveTranslationEntrySize); - } - - return RETURN_SUCCESS; -} diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf deleted file mode 100644 index 024784d19e75..000000000000 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf +++ /dev/null @@ -1,52 +0,0 @@ -#/** @file -# -# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
-# 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 -# 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 = ArmV7Lib - FILE_GUID = 411cdfd8-f964-4b9d-a3e3-1719a9c15559 - MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmLib - -[Sources.common] - ArmLibSupportV7.S | GCC - ArmLibSupportV7.asm | RVCT - - ../Common/Arm/ArmLibSupport.S | GCC - ../Common/Arm/ArmLibSupport.asm | RVCT - ../Common/ArmLib.c - - ArmV7Support.S | GCC - ArmV7Support.asm | RVCT - - ArmV7Lib.c - - ArmV7ArchTimer.c - ArmV7ArchTimerSupport.S | GCC - ArmV7ArchTimerSupport.asm | RVCT - -[Packages] - ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec - -[LibraryClasses] - MemoryAllocationLib - -[Protocols] - gEfiCpuArchProtocolGuid - -[FeaturePcd.ARM] - gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf b/ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf deleted file mode 100644 index 5710f5044c8c..000000000000 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf +++ /dev/null @@ -1,52 +0,0 @@ -#/** @file -# Semihosting serail port lib -# -# Copyright (c) 2008 - 2010, Apple Inc. 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 = ArmV7LibPrePi - FILE_GUID = A150FA0C-F4E8-4207-9BEB-CD6DFB430D73 - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmLib - -[Sources.common] - ArmLibSupportV7.S | GCC - ArmLibSupportV7.asm | RVCT - - ../Common/Arm/ArmLibSupport.S | GCC - ../Common/Arm/ArmLibSupport.asm | RVCT - ../Common/ArmLib.c - - ArmV7Support.S | GCC - ArmV7Support.asm | RVCT - - ArmV7Lib.c - - ArmV7ArchTimer.c - ArmV7ArchTimerSupport.S | GCC - ArmV7ArchTimerSupport.asm | RVCT - -[Packages] - ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec - -[LibraryClasses] - PrePiLib - -[Protocols] - gEfiCpuArchProtocolGuid - -[FeaturePcd.ARM] - gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf b/ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf deleted file mode 100644 index 5ed325d4ad69..000000000000 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf +++ /dev/null @@ -1,44 +0,0 @@ -#/* @file -# Copyright (c) 2011-2015, 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 = ArmV7LibSec - FILE_GUID = addd46ad-156a-4309-b134-46a1b14a61bf - MODULE_TYPE = BASE - VERSION_STRING = 1.0 - LIBRARY_CLASS = ArmLib - -[Sources.common] - ArmLibSupportV7.S | GCC - ArmLibSupportV7.asm | RVCT - - ../Common/Arm/ArmLibSupport.S | GCC - ../Common/Arm/ArmLibSupport.asm | RVCT - ../Common/ArmLib.c - - ArmV7Support.S | GCC - ArmV7Support.asm | RVCT - - ArmV7Lib.c - - ArmV7ArchTimer.c - ArmV7ArchTimerSupport.S | GCC - ArmV7ArchTimerSupport.asm | RVCT - -[Packages] - ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec - -[Protocols] - gEfiCpuArchProtocolGuid -- 2.7.4