From nobody Mon Feb 9 17:37:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+69200+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69200+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1608300986; cv=none; d=zohomail.com; s=zohoarc; b=an8NSkG8RjxGkQ3dyIpNmPsKQ0dUntfXydiddLw+mL6GwDe/BDKsOH9VrXMOmw43MhL6JWDoSBevuTriCfXaiQWXxG7ckM7mMD0nJgANt22zMC59b7ztIsykNYe639/McrOuzZrMz6EHkGRAXvy9wdnMrLrf/HSSUSiZnB1/Q9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608300986; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=5KX4JSK8+iy1/4HHD3PopO/ez07S8aDjIVDJxDOfsqo=; b=dMfhZOgGDoSh0hifBCFSfFVpCHObn/x8urjs7Vg8bRBKjigOA3NE2XZnqV2UHphycpjVmUOyPSJmv+EVei3XNXKnOdxLxCvcUlzdNnfL+COI/NkVfestauzu1bboGs5li60LtJbWKpgzzGKoRkYIQ+Ee4qxoRWCVuQrqjt9QVAw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69200+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608300986406937.0241557537353; Fri, 18 Dec 2020 06:16:26 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id QQoVYY1788612xCioFfRnxea; Fri, 18 Dec 2020 06:16:24 -0800 X-Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.web11.10542.1608300983726341717 for ; Fri, 18 Dec 2020 06:16:24 -0800 X-Received: by mail-wm1-f48.google.com with SMTP id x22so2471217wmc.5 for ; Fri, 18 Dec 2020 06:16:23 -0800 (PST) X-Gm-Message-State: zyrRM19dlf0TVFNILxP9qSaDx1787277AA= X-Google-Smtp-Source: ABdhPJwjmPRgpmUEWgIW6Aju9VWXXPg9Pcb2kVfRsCaYyL+H+GPTRkhUyrWayzf3hEktD3C5pw/ggg== X-Received: by 2002:a05:600c:214a:: with SMTP id v10mr4447227wml.138.1608300982041; Fri, 18 Dec 2020 06:16:22 -0800 (PST) X-Received: from vanye.hemma.eciton.net (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id b12sm18558569wmj.2.2020.12.18.06.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Dec 2020 06:16:21 -0800 (PST) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Ard Biesheuvel Subject: [edk2-devel] [PATCH 4/9] ArmPkg: remove duplicated ARM/AArch64 ArmGicArchSecLib sources Date: Fri, 18 Dec 2020 14:16:12 +0000 Message-Id: <20201218141617.26947-5-leif@nuviainc.com> In-Reply-To: <20201218141617.26947-1-leif@nuviainc.com> References: <20201218141617.26947-1-leif@nuviainc.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,leif@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608300984; bh=xWWhj+DmP65pXMHhBhOuWsKxI0CSQJNgpUh0JYldHt4=; h=Cc:Date:From:Reply-To:Subject:To; b=lib5z8MtjtrXTf4WJuAZ8pRA8JDFpG4wpaT3YfGoeAW/tUCTY+/MzjzgLYIOZU+C7Fa l/h5y3FHuoO9If3znF/wg9x3ah6vJTLxRvD9ZWvfi30tb6gB4FEd7sgURYDy46IeZLnM0 /Z2nIrpgOO8jPBvdMIVBhmmB07ZwNZ694OE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The ID register access was the only difference between them, so after switching to the ArmHasGicSystemRegisters () helper, there is no longer any need to have separate ARM/AArch64 source files for ArmGicArchSecLib, so unify them and drop the subdirectories. Cc: Ard Biesheuvel Signed-off-by: Leif Lindholm --- ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf | 7 +-- ArmPkg/Library/ArmGicArchSecLib/Arm/ArmGicArchLib.c | 45 -------= ------------- ArmPkg/Library/ArmGicArchSecLib/{AArch64 =3D> }/ArmGicArchLib.c | 0 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf b/ArmPkg/= Library/ArmGicArchSecLib/ArmGicArchSecLib.inf index 1a1179a98012..ccebabe451cc 100644 --- a/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf +++ b/ArmPkg/Library/ArmGicArchSecLib/ArmGicArchSecLib.inf @@ -13,11 +13,8 @@ [Defines] VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D ArmGicArchLib|SEC =20 -[Sources.ARM] - Arm/ArmGicArchLib.c - -[Sources.AARCH64] - AArch64/ArmGicArchLib.c +[Sources] + ArmGicArchLib.c =20 [Packages] MdePkg/MdePkg.dec diff --git a/ArmPkg/Library/ArmGicArchSecLib/Arm/ArmGicArchLib.c b/ArmPkg/L= ibrary/ArmGicArchSecLib/Arm/ArmGicArchLib.c deleted file mode 100644 index 2373ca409a17..000000000000 --- a/ArmPkg/Library/ArmGicArchSecLib/Arm/ArmGicArchLib.c +++ /dev/null @@ -1,45 +0,0 @@ -/** @file -* -* Copyright (c) 2014, ARM Limited. All rights reserved. -* -* SPDX-License-Identifier: BSD-2-Clause-Patent -* -**/ - -#include -#include - -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 ea= sily - // get it wrong. It is more reliable to check if the GICv3 System Regist= er - // feature is implemented on the CPU. This is also convenient as our GIC= v3 - // 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 eith= er - // cause an exception here, or the write doesn't stick in which case w= e need - // to fall back to the GICv2 MMIO interface. - // Note: We do not need to set ICC_SRE_EL2.Enable because the OS is st= arted - // at the same exception level. - // It is the OS responsibility to set this bit. - IccSre =3D ArmGicV3GetControlSystemRegisterEnable (); - if (!(IccSre & ICC_SRE_EL2_SRE)) { - ArmGicV3SetControlSystemRegisterEnable (IccSre| ICC_SRE_EL2_SRE); - IccSre =3D 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/AArch64/ArmGicArchLib.c b/ArmP= kg/Library/ArmGicArchSecLib/ArmGicArchLib.c similarity index 100% rename from ArmPkg/Library/ArmGicArchSecLib/AArch64/ArmGicArchLib.c rename to ArmPkg/Library/ArmGicArchSecLib/ArmGicArchLib.c --=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#69200): https://edk2.groups.io/g/devel/message/69200 Mute This Topic: https://groups.io/mt/79061636/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-