From nobody Fri May 17 06:07:29 2024 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+100077+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+100077+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1676286831; cv=none; d=zohomail.com; s=zohoarc; b=YKuAvK9uuOcXzuqoN2X91uTZVLhW+lma0cEk5JAZsMlE6G4eVuPVEZaZCPzkfsxmLktIrfQtar5VXjUiD58C7956Bk2lrnVvu3MNjZ6FWgsbn6dfXdiboZmnafmFEINdqC6c6U1QlgDZsB1j+P6YcCiaMQ3/ayxt8mErKb7wOkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676286831; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=i8CFLui1n2jBPhVdoU0FKHjAgW0GrlkzshdckVbhAG4=; b=QFTF8Dtczm9Ir/YA9/l873UIOtAchGl9c5xFzKnB3vF5Chnm05Q7Zx9AJfuMofHlfoQOZMrQxhkMwIgEpueQ/ryTG+67iv/DnUp+cjKtopqAteUh+Q+g+GJBZtmz8LT7629oiottj/fgIgGQe1Q8djVyevMns09O+jgtGAUCvJU= 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+100077+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1676286831161477.42014899144897; Mon, 13 Feb 2023 03:13:51 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7nVGYY1788612xiTW9zQ88Ge; Mon, 13 Feb 2023 03:13:50 -0800 X-Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.11932.1676286829513594013 for ; Mon, 13 Feb 2023 03:13:49 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BE7CBB81115; Mon, 13 Feb 2023 11:13:47 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CAE2C433EF; Mon, 13 Feb 2023 11:13:45 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Rebecca Cran Subject: [edk2-devel] [PATCH edk2-platforms 1/2] Platform/BeagleBoard: Drop PeCoff protocol Date: Mon, 13 Feb 2023 12:13:38 +0100 Message-Id: <20230213111339.2239876-2-ardb@kernel.org> In-Reply-To: <20230213111339.2239876-1-ardb@kernel.org> References: <20230213111339.2239876-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,ardb@kernel.org X-Gm-Message-State: 0NrbWo5KFyXHC4EaAhKH69nUx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1676286830; bh=7zeqnkgve76yJWPBE8CxIKm/5CngFWN+s3hCiTx+6Tk=; h=Cc:Date:From:Reply-To:Subject:To; b=S5ncMMC3Q70YfuaCn6Qbqct8S7FGDvAU0Ef3l8NuhmBrnvCYklkghLVQpHqjJf7SPev Fx6xUNvowqhBBxg5uqTX21GMh8Dx/wy8MQJaj9yykhAaiAhkXpTZX0HPKGYzYgeyd8p+E yZOWOsn/SbeyubPOsZzTF2R1a0iDoK/yk2k= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1676286833101100007 Content-Type: text/plain; charset="utf-8" BeagleBoard is the only user of the so-called 'PE/COFF protocol', which just exposes the PE/COFF loader library API via a protocol, presumably to avoid duplicating this code in the PrePi SEC component as well as the DXE core. This is a rather questionable practice, and it would be better to drop this code so we can remove it from the EDK2 main repo as well. Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc = | 6 +-- Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLi= b.inf | 39 -------------------- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc b/Platf= orm/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc index d44f4771c622..0834770a6292 100644 --- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc +++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc @@ -167,8 +167,7 @@ [LibraryClasses.common.DXE_CORE] DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExt= ractGuidedSectionLib.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf -# PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf - PeCoffLib|Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/Dx= eHobPeCoffLib.inf + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf =20 [LibraryClasses.common.DXE_DRIVER] DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf @@ -190,8 +189,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf -# PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf - PeCoffLib|Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/Dx= eHobPeCoffLib.inf + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ibRuntimeDxe.inf =20 =20 diff --git a/Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/Dx= eHobPeCoffLib.inf b/Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCof= fLib/DxeHobPeCoffLib.inf deleted file mode 100644 index 654bd8c874f3..000000000000 --- a/Platform/BeagleBoard/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeC= offLib.inf +++ /dev/null @@ -1,39 +0,0 @@ -#/** @file -# PE/COFF Loader Library implementation that wraps a protocol passed up f= rom -# SEC/PEI via a HOB. This is done to save space. -# -# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
-# Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
-# SPDX-License-Identifier: BSD-2-Clause-Patent -# -# -#**/ - -[Defines] - INF_VERSION =3D 0x00010005 - BASE_NAME =3D DxeHobPeCoffLib - FILE_GUID =3D 671C6FD7-99FB-4EE3-B640-4B1D463BC3B5 - MODULE_TYPE =3D DXE_DRIVER - VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D PeCoffLib - CONSTRUCTOR =3D DxeHobPeCoffLibConstructor - - -# -# VALID_ARCHITECTURES =3D IA32 X64 EBC ARM -# - -[Sources.common] - DxeHobPeCoff.c - - -[Packages] - MdePkg/MdePkg.dec - EmbeddedPkg/EmbeddedPkg.dec - -[LibraryClasses] - DebugLib - HobLib - -[Protocols] - gPeCoffLoaderProtocolGuid --=20 2.39.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 (#100077): https://edk2.groups.io/g/devel/message/100077 Mute This Topic: https://groups.io/mt/96933404/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- From nobody Fri May 17 06:07:29 2024 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+100078+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+100078+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1676286831; cv=none; d=zohomail.com; s=zohoarc; b=V+MZwEHa4aN6Gq9LDK8S1ytxXarkIcwUDfGlGPo413iBA64ncPDxws4Vl4OaK5fn5Kof4vednOKCOYb9yxTt2jimGVH/WT1AP6yKlIxtGDVjOaITD+BSFoYB8VS0uZTBOcRgZASnjy9X6k9P1Yj+zOoSZvJ+9DQTayLyOF5LqG4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676286831; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=1QJm0f5hcH9sq4TWrNNm7jDzJ1CR4WTHY/wMnCp7eas=; b=RJSiA2n/tWffw88ZVfPBDVDBhqdCsYcmKBLweel/05GdTPOjz1ihjCRhrz3yshuPBLDNk2lCPNFObJMt9EEs1iR4DVakLjQ6kjhki++OWrd0De8YpraZB+3YxZeGjP10f4l5p12x7xI16b6fmY9OCxegIfzyF0/CZKjziyiivwI= 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+100078+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1676286831831468.7433910869836; Mon, 13 Feb 2023 03:13:51 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id WTpZYY1788612xsGSkuVyCP1; Mon, 13 Feb 2023 03:13:51 -0800 X-Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.11933.1676286830691938632 for ; Mon, 13 Feb 2023 03:13:50 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3E9DCB80D26; Mon, 13 Feb 2023 11:13:49 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3F47C4339C; Mon, 13 Feb 2023 11:13:46 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Sami Mujawar , Rebecca Cran Subject: [edk2-devel] [PATCH edk2-platforms 2/2] Silicon/Marvell: Drop use of NONSECURE ARM memory region type Date: Mon, 13 Feb 2023 12:13:39 +0100 Message-Id: <20230213111339.2239876-3-ardb@kernel.org> In-Reply-To: <20230213111339.2239876-1-ardb@kernel.org> References: <20230213111339.2239876-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,ardb@kernel.org X-Gm-Message-State: RPqrVTMCIcucVJVqu1DiRdQVx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1676286831; bh=EkblMr/SpqyK2qiMaV81DOPhvs1o3ZXTQlSa7qB+QxA=; h=Cc:Date:From:Reply-To:Subject:To; b=NSdKN561uzJo5DlqlDIdhMIzzi+bUkVlGCo7kNBydiYpRxnPPmvGCvwB+NFJq0YJLc+ v6jexdXQwt5wGNQV89M3Uy4Vs9WAAWUxtIE+/U8ysRZ/Bj1bTMxnBDuCdlrLJB3t7cx01 FvzC2ZN3tyL5SkhFMoNnDNR8tbniBYmbNZM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1676286833092100006 Content-Type: text/plain; charset="utf-8" The ARM memory region types with the NONSECURE qualification should only be used in places where this makes a difference, i.e., in the secure world. The Marvell firmware generally runs at EL2, which is non-secure only (in ARM v8.0) so the NONSECURE marking is unnecessary here, and should be dropped. Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLib= Mem.c b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c index 43aacb7a1133..026947c1077e 100644 --- a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c +++ b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kLib/Armada7k8kLibMem.c @@ -25,7 +25,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 16 =20 // DDR attributes -#define DDR_ATTRIBUTES_CACHED ARM_MEMORY_REGION_ATTRIBUTE_NONSEC= URE_WRITE_BACK +#define DDR_ATTRIBUTES_CACHED ARM_MEMORY_REGION_ATTRIBUTE_WRITE_= BACK #define DDR_ATTRIBUTES_UNCACHED ARM_MEMORY_REGION_ATTRIBUTE_UNCACH= ED_UNBUFFERED =20 STATIC ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[MAX_VIRTUAL_MEMORY= _MAP_DESCRIPTORS]; --=20 2.39.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 (#100078): https://edk2.groups.io/g/devel/message/100078 Mute This Topic: https://groups.io/mt/96933405/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-