diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2025-01-16 18:31:09 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-01-17 18:37:27 +0000 |
commit | eaa60a6b10ecef8499e16da5acbca77f0d8c8e14 (patch) | |
tree | a2f1ec9e8f6a9cb4827f8065f2820d1a4ef87f3e | |
parent | 34ab9197a51f7e158c49875992c2392346f1ac7f (diff) | |
download | edk2-eaa60a6b10ecef8499e16da5acbca77f0d8c8e14.tar.gz |
ArmPkg/ArmGic: Retire ArmGicArchLib
ArmGicArchLib is no longer use so remove all remaining references and
implementations.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
-rw-r--r-- | ArmPkg/ArmPkg.dec | 5 | ||||
-rw-r--r-- | ArmPkg/ArmPkg.dsc | 3 | ||||
-rw-r--r-- | ArmPkg/Drivers/ArmGic/ArmGicLib.inf | 1 | ||||
-rw-r--r-- | ArmPkg/Include/Library/ArmGicArchLib.h | 40 | ||||
-rw-r--r-- | ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.c | 61 | ||||
-rw-r--r-- | ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf | 25 | ||||
-rw-r--r-- | ArmPkg/Library/ArmGicArchSecLib/ArmGicArchLib.c | 46 | ||||
-rw-r--r-- | ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf | 24 | ||||
-rw-r--r-- | ArmPlatformPkg/ArmPlatformPkg.dsc | 1 |
9 files changed, 0 insertions, 206 deletions
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index cdeabd7856..525a72015c 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -36,11 +36,6 @@ #
ArmGenericTimerCounterLib|Include/Library/ArmGenericTimerCounterLib.h
- ## @libraryclass Provides an interface to initialize a
- # Generic Interrupt Controller (GIC).
- #
- ArmGicArchLib|Include/Library/ArmGicArchLib.h
-
## @libraryclass Provides a Generic Interrupt Controller (GIC)
# configuration interface.
#
diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index e602fc9340..72b2060dce 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -68,7 +68,6 @@ CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf
- ArmGicArchLib|ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
@@ -154,8 +153,6 @@ ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
- ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
- ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf
ArmPkg/Library/ArmLib/ArmBaseLib.inf
ArmPkg/Library/ArmMtlNullLib/ArmMtlNullLib.inf
ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.inf b/ArmPkg/Drivers/ArmGic/ArmGicLib.inf index 525f137b18..f1bf5fd97a 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicLib.inf +++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.inf @@ -23,7 +23,6 @@ ArmLib
DebugLib
IoLib
- ArmGicArchLib
[Packages]
ArmPkg/ArmPkg.dec
diff --git a/ArmPkg/Include/Library/ArmGicArchLib.h b/ArmPkg/Include/Library/ArmGicArchLib.h deleted file mode 100644 index ed6fe6fecb..0000000000 --- a/ArmPkg/Include/Library/ArmGicArchLib.h +++ /dev/null @@ -1,40 +0,0 @@ -/** @file
-*
-* Copyright (c) 2015, Linaro Ltd. All rights reserved.
-* Copyright (c) 2024, Arm Limited. All rights reserved.
-*
-* SPDX-License-Identifier: BSD-2-Clause-Patent
-*
-* @par Reference(s):
-* - Arm Generic Interrupt Controller Architecture Specification,
-* Issue H, January 2022.
-* (https://developer.arm.com/documentation/ihi0069/)
-*
-**/
-
-#ifndef ARM_GIC_ARCH_LIB_H_
-#define ARM_GIC_ARCH_LIB_H_
-
-//
-// GIC definitions
-//
-typedef enum {
- ARM_GIC_ARCH_REVISION_2,
- ARM_GIC_ARCH_REVISION_3
-} ARM_GIC_ARCH_REVISION;
-
-ARM_GIC_ARCH_REVISION
-EFIAPI
-ArmGicGetSupportedArchRevision (
- VOID
- );
-
-//
-// GIC SPI and extended SPI ranges
-//
-#define ARM_GIC_ARCH_SPI_MIN 32
-#define ARM_GIC_ARCH_SPI_MAX 1019
-#define ARM_GIC_ARCH_EXT_SPI_MIN 4096
-#define ARM_GIC_ARCH_EXT_SPI_MAX 5119
-
-#endif // ARM_GIC_ARCH_LIB_H_
diff --git a/ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.c b/ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.c deleted file mode 100644 index f017eb5c47..0000000000 --- a/ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.c +++ /dev/null @@ -1,61 +0,0 @@ -/** @file
-*
-* Copyright (c) 2014, ARM Limited. All rights reserved.
-*
-* SPDX-License-Identifier: BSD-2-Clause-Patent
-*
-**/
-
-#include <Library/ArmLib.h>
-#include <Library/ArmGicLib.h>
-
-STATIC ARM_GIC_ARCH_REVISION mGicArchRevision;
-
-RETURN_STATUS
-EFIAPI
-ArmGicArchLibInitialize (
- VOID
- )
-{
- UINT32 IccSre;
-
- // Ideally we would like to use the GICC IIDR Architecture version here, but
- // this does not seem to be very reliable as the implementation could easily
- // get it wrong. It is more reliable to check if the GICv3 System Register
- // feature is implemented on the CPU. This is also convenient as our GICv3
- // driver requires SRE. If only Memory mapped access is available we try to
- // drive the GIC as a v2.
- if (ArmHasGicSystemRegisters ()) {
- // Make sure System Register access is enabled (SRE). This depends on the
- // higher privilege level giving us permission, otherwise we will either
- // cause an exception here, or the write doesn't stick in which case we need
- // to fall back to the GICv2 MMIO interface.
- // Note: We do not need to set ICC_SRE_EL2.Enable because the OS is started
- // at the same exception level.
- // It is the OS responsibility to set this bit.
- IccSre = ArmGicV3GetControlSystemRegisterEnable ();
- if (!(IccSre & ICC_SRE_EL2_SRE)) {
- ArmGicV3SetControlSystemRegisterEnable (IccSre | ICC_SRE_EL2_SRE);
- IccSre = ArmGicV3GetControlSystemRegisterEnable ();
- }
-
- if (IccSre & ICC_SRE_EL2_SRE) {
- mGicArchRevision = ARM_GIC_ARCH_REVISION_3;
- goto Done;
- }
- }
-
- mGicArchRevision = ARM_GIC_ARCH_REVISION_2;
-
-Done:
- return RETURN_SUCCESS;
-}
-
-ARM_GIC_ARCH_REVISION
-EFIAPI
-ArmGicGetSupportedArchRevision (
- VOID
- )
-{
- return mGicArchRevision;
-}
diff --git a/ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf b/ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf deleted file mode 100644 index bedddff939..0000000000 --- a/ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf +++ /dev/null @@ -1,25 +0,0 @@ -#/* @file
-# Copyright (c) 2015, Linaro Ltd. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#*/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = ArmGicArchLib
- FILE_GUID = cd67f41a-26e9-4482-90c9-a9aff803382a
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = ArmGicArchLib|DXE_DRIVER UEFI_DRIVER UEFI_APPLICATION
- CONSTRUCTOR = ArmGicArchLibInitialize
-
-[Sources]
- ArmGicArchLib.c
-
-[Packages]
- MdePkg/MdePkg.dec
- ArmPkg/ArmPkg.dec
-
-[LibraryClasses]
- ArmGicLib
diff --git a/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchLib.c b/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchLib.c deleted file mode 100644 index 3c791a245c..0000000000 --- a/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchLib.c +++ /dev/null @@ -1,46 +0,0 @@ -/** @file
-*
-* Copyright (c) 2014, ARM Limited. All rights reserved.
-*
-* SPDX-License-Identifier: BSD-2-Clause-Patent
-*
-**/
-
-#include <Library/ArmLib.h>
-#include <Library/ArmGicLib.h>
-
-ARM_GIC_ARCH_REVISION
-EFIAPI
-ArmGicGetSupportedArchRevision (
- VOID
- )
-{
- UINT32 IccSre;
-
- // Ideally we would like to use the GICC IIDR Architecture version here, but
- // this does not seem to be very reliable as the implementation could easily
- // get it wrong. It is more reliable to check if the GICv3 System Register
- // feature is implemented on the CPU. This is also convenient as our GICv3
- // driver requires SRE. If only Memory mapped access is available we try to
- // drive the GIC as a v2.
- if (ArmHasGicSystemRegisters ()) {
- // Make sure System Register access is enabled (SRE). This depends on the
- // higher privilege level giving us permission, otherwise we will either
- // cause an exception here, or the write doesn't stick in which case we need
- // to fall back to the GICv2 MMIO interface.
- // Note: We do not need to set ICC_SRE_EL2.Enable because the OS is started
- // at the same exception level.
- // It is the OS responsibility to set this bit.
- IccSre = ArmGicV3GetControlSystemRegisterEnable ();
- if (!(IccSre & ICC_SRE_EL2_SRE)) {
- ArmGicV3SetControlSystemRegisterEnable (IccSre | ICC_SRE_EL2_SRE);
- IccSre = ArmGicV3GetControlSystemRegisterEnable ();
- }
-
- if (IccSre & ICC_SRE_EL2_SRE) {
- return ARM_GIC_ARCH_REVISION_3;
- }
- }
-
- return ARM_GIC_ARCH_REVISION_2;
-}
diff --git a/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf b/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf deleted file mode 100644 index ccebabe451..0000000000 --- a/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf +++ /dev/null @@ -1,24 +0,0 @@ -#/* @file
-# Copyright (c) 2015, Linaro Ltd. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#*/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = ArmGicArchSecLib
- FILE_GUID = c1dd9745-9459-4e9a-9f5b-99cbd233c27d
- MODULE_TYPE = BASE
- VERSION_STRING = 1.0
- LIBRARY_CLASS = ArmGicArchLib|SEC
-
-[Sources]
- ArmGicArchLib.c
-
-[Packages]
- MdePkg/MdePkg.dec
- ArmPkg/ArmPkg.dec
-
-[LibraryClasses]
- ArmGicLib
diff --git a/ArmPlatformPkg/ArmPlatformPkg.dsc b/ArmPlatformPkg/ArmPlatformPkg.dsc index 15d7484b6d..a96c937292 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dsc +++ b/ArmPlatformPkg/ArmPlatformPkg.dsc @@ -36,7 +36,6 @@ !include MdePkg/MdeLibs.dsc.inc
[LibraryClasses.common]
- ArmGicArchLib|ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf
ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf
ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
|