diff options
| author | Ard Biesheuvel <ardb@kernel.org> | 2026-09-02 14:21:20 +0200 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-09-03 21:25:17 +0000 |
| commit | a2d406fb14d8c2f25c20f666827d22c72fe65c83 (patch) | |
| tree | 5bbb36d08183248ec717db795745f2c2a193f1e8 | |
| parent | 0f7bb55b20af7493abb566be531ecc2cdedcb6cc (diff) | |
| download | edk2-a2d406fb14d8c2f25c20f666827d22c72fe65c83.tar.gz edk2-a2d406fb14d8c2f25c20f666827d22c72fe65c83.zip | |
ArmPkg: Retire the unified GIC driver
Now that all platforms that do require GIC v2 support to be retained
have implemented their own logic to dispatch either the v2 version or
the v3+ version, depending on what the platform implements, the unified
version that supports both in a single driver is no longer used.
Delete the driver, and repurpose the ArmGicDxe.inf name by turning it
into an alias of ArmGicV3Dxe.inf. That way, existing platforms that
incorporate ArmGicDxe.inf will lose GICv2 support rather than break
entirely (which is unlikely to make a difference in most cases), and
going forward, the confusing V3 naming (considering the fact that the V3
driver supports v4 and v5 as well) can be phased out as well.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
| -rw-r--r-- | ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.c | 84 | ||||
| -rw-r--r-- | ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.inf | 27 | ||||
| -rw-r--r-- | ArmPkg/Drivers/ArmGicDxe/ArmGicV2Dxe.inf | 1 | ||||
| -rw-r--r-- | ArmPkg/Drivers/ArmGicDxe/ArmGicV3Dxe.inf | 1 |
4 files changed, 10 insertions, 103 deletions
diff --git a/ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.c b/ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.c deleted file mode 100644 index ecee83fdc5..0000000000 --- a/ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.c +++ /dev/null @@ -1,84 +0,0 @@ -/*++
-
-Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
-
-SPDX-License-Identifier: BSD-2-Clause-Patent
-
-Module Name:
-
- ArmGicDxe.c
-
-Abstract:
-
- Driver implementing the GIC interrupt controller protocol
-
---*/
-
-#include <PiDxe.h>
-
-#include "ArmGicDxe.h"
-
-STATIC
-BOOLEAN
-GicV3Supported (
- 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 TRUE;
- }
- }
-
- return FALSE;
-}
-
-/**
- Initialize the state information for the CPU Architectural Protocol
-
- @param ImageHandle of the loaded driver
- @param SystemTable Pointer to the System Table
-
- @retval EFI_SUCCESS Protocol registered
- @retval EFI_OUT_OF_RESOURCES Cannot allocate protocol data structure
- @retval EFI_DEVICE_ERROR Hardware problems
- @retval EFI_UNSUPPORTED GIC version not supported
-
-**/
-EFI_STATUS
-InterruptDxeInitialize (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
-
- if (!GicV3Supported () && !ArmHasGicV5SystemRegisters ()) {
- Status = GicV2DxeInitialize (ImageHandle, SystemTable);
- } else {
- Status = GicV3DxeInitialize (ImageHandle, SystemTable);
- }
-
- return Status;
-}
diff --git a/ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.inf b/ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.inf index b013063cad..f8c75b81af 100644 --- a/ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.inf +++ b/ArmPkg/Drivers/ArmGicDxe/ArmGicDxe.inf @@ -2,32 +2,27 @@ #
# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
# Copyright (c) 2012 - 2017, ARM Ltd. All rights reserved.<BR>
+# Copyright (c) 2025, Google LLC. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
#**/
[Defines]
- INF_VERSION = 0x00010005
+ INF_VERSION = 1.30
BASE_NAME = ArmGicDxe
FILE_GUID = DE371F7C-DEC4-4D21-ADF1-593ABCC15882
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
-
- ENTRY_POINT = InterruptDxeInitialize
+ ENTRY_POINT = GicV3DxeInitialize
[Sources.common]
- ArmGicDxe.h
- ArmGicDxe.c
ArmGicCommonDxe.c
-
- GicV2/ArmGicV2Dxe.c
+ ArmGicDxe.h
GicV3/ArmGicV3Dxe.c
-
-[Sources.AARCH64]
GicV3/AArch64/ArmGicV3.S
- GicV5/AArch64/ArmGicV5.S
GicV5/ArmGicV5Dxe.c
+ GicV5/AArch64/ArmGicV5.S
[Packages]
MdePkg/MdePkg.dec
@@ -37,15 +32,14 @@ [LibraryClasses]
ArmLib
BaseLib
- UefiLib
- UefiBootServicesTableLib
DebugLib
- PrintLib
- MemoryAllocationLib
- UefiDriverEntryPoint
IoLib
PcdLib
+ PrintLib
TimerLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+ UefiLib
[Protocols]
gHardwareInterruptProtocolGuid ## PRODUCES
@@ -54,9 +48,8 @@ [Pcd.common]
gArmTokenSpaceGuid.PcdGicDistributorBase
- gArmTokenSpaceGuid.PcdGicRedistributorsBase
- gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdGicIrsConfigFrameBase
+ gArmTokenSpaceGuid.PcdGicRedistributorsBase
[Depex]
gEfiCpuArchProtocolGuid
diff --git a/ArmPkg/Drivers/ArmGicDxe/ArmGicV2Dxe.inf b/ArmPkg/Drivers/ArmGicDxe/ArmGicV2Dxe.inf index 37407f30e9..d4f74d9ba7 100644 --- a/ArmPkg/Drivers/ArmGicDxe/ArmGicV2Dxe.inf +++ b/ArmPkg/Drivers/ArmGicDxe/ArmGicV2Dxe.inf @@ -18,7 +18,6 @@ [Sources.common]
ArmGicCommonDxe.c
- ArmGicDxe.c
ArmGicDxe.h
GicV2/ArmGicV2Dxe.c
diff --git a/ArmPkg/Drivers/ArmGicDxe/ArmGicV3Dxe.inf b/ArmPkg/Drivers/ArmGicDxe/ArmGicV3Dxe.inf index 05a5498977..ac7dcb9b40 100644 --- a/ArmPkg/Drivers/ArmGicDxe/ArmGicV3Dxe.inf +++ b/ArmPkg/Drivers/ArmGicDxe/ArmGicV3Dxe.inf @@ -18,7 +18,6 @@ [Sources.common]
ArmGicCommonDxe.c
- ArmGicDxe.c
ArmGicDxe.h
GicV3/ArmGicV3Dxe.c
GicV3/AArch64/ArmGicV3.S
|
