From nobody Tue Apr 30 03:19:23 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+95618+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+95618+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1666806143; cv=none; d=zohomail.com; s=zohoarc; b=Xs/1jnGi2uqPM31a5rJQSGdTjTmaNHOMBFP1JGtPE1wCLnBZtehOZ29y7yrvTOtDYb4l9qDkczcnincbcl42mUSHQ8WOgicx1UTdCfriB1hFz+A3YI/weuGtAe2n7v4F2ycDlXXxozlC6ZmPY7DmVPAdn10R/TpvLsN6NXO/iY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666806143; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=GEyBsesYZjuEEtEaovqxo9SGs1hP52+Aq9gnzUAsZqM=; b=X2JYBd/QbaosUsc+lnx/LGC7iqDiDfFGfm5UQVzw6iy/q7nOjVl3WrVs2HGEt7SVcuznjsTHSR3ZX9GZEoMlzvFZS0LuGUbr6zECppyhjdtF6DDSHn9rKvYqtumnYP9DHzjujiXEaxLMNcM4627mdiCWnnUNhVl1/FLbBik5D0c= 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+95618+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 1666806143414867.5447148583961; Wed, 26 Oct 2022 10:42:23 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id eQqrYY1788612xjk7jAUzPzN; Wed, 26 Oct 2022 10:42:22 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web12.10478.1666806141385860311 for ; Wed, 26 Oct 2022 10:42:21 -0700 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 dfw.source.kernel.org (Postfix) with ESMTPS id 76D7762002; Wed, 26 Oct 2022 17:42:20 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4FB2C433D6; Wed, 26 Oct 2022 17:42:18 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Graeme Gregory Subject: [edk2-devel] [PATCH edk2-platforms] Platform/SbsaQemu: Switch to VirtNorFlashDxe Date: Wed, 26 Oct 2022 19:42:10 +0200 Message-Id: <20221026174210.1255165-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: XakDJewHQewXlcdsPeZnY2eRx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1666806142; bh=WhcAjzEXnjo8m/RdP5DkVEqlEPImQCzxFBRVa5j0vqc=; h=Cc:Date:From:Reply-To:Subject:To; b=vJqkwE/JGO3TriOSQr782HXjZg0T2/erYHu921NNAGgED58yfr2ZV1rlKXJ/ZIyjwgI jRAmAEQNyjQC17xj29e8OR06lbEbZKVgD5y2FOsqw+/xciXGq//4JNcLvz4pcubrbhsGB VW22mYWRphIer6fTKV+a1OC9XfDtZ6xDBLc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1666806145198100003 Content-Type: text/plain; charset="utf-8" Switch to the OVMF version of the NOR flash DXE driver, which supports QEMU's NOR flash emulation specifically, and carries some optimizations that are therefore permitted. Cc: Leif Lindholm Cc: Graeme Gregory Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/Qemu/SbsaQemu/SbsaQemu.dsc = | 4 ++-- Platform/Qemu/SbsaQemu/SbsaQemu.fdf = | 2 +- Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf = | 4 ++-- Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c = | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/S= bsaQemu.dsc index ff280709a509..79dd200ca7fc 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -178,7 +178,7 @@ [LibraryClasses.common] ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibN= ull.inf =20 TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf - NorFlashPlatformLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/Sb= saQemuNorFlashLib.inf + VirtNorFlashPlatformLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLi= b/SbsaQemuNorFlashLib.inf =20 CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf @@ -663,7 +663,7 @@ [Components.common] =20 ArmPkg/Drivers/ArmGic/ArmGicDxe.inf ArmPkg/Drivers/TimerDxe/TimerDxe.inf - ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf + OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf =20 # diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf b/Platform/Qemu/SbsaQemu/S= bsaQemu.fdf index 9f031c3e6649..781215707c3d 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf @@ -189,7 +189,7 @@ [FV.FvMain] =20 INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf - INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf + INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf =20 # diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorF= lashLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNor= FlashLib.inf index f2ba41e1df99..f7e3f8e05eec 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib= .inf +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib= .inf @@ -14,16 +14,16 @@ [Defines] FILE_GUID =3D c53d904d-de50-40f1-a148-a2ece48303d8 MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 - LIBRARY_CLASS =3D NorFlashPlatformLib + LIBRARY_CLASS =3D VirtNorFlashPlatformLib =20 [Sources.common] SbsaQemuNorFlashLib.c =20 [Packages] - ArmPlatformPkg/ArmPlatformPkg.dec ArmPkg/ArmPkg.dec MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec + OvmfPkg/OvmfPkg.dec =20 [FixedPcd] gArmTokenSpaceGuid.PcdFdBaseAddress diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorF= lashLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFl= ashLib.c index 0946327cb529..56c26019a140 100644 --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib= .c +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib= .c @@ -8,19 +8,19 @@ =20 #include #include -#include +#include =20 #define QEMU_NOR_BLOCK_SIZE SIZE_256KB =20 EFI_STATUS -NorFlashPlatformInitialization ( +VirtNorFlashPlatformInitialization ( VOID ) { return EFI_SUCCESS; } =20 -NOR_FLASH_DESCRIPTION mNorFlashDevice =3D +STATIC VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevice =3D { FixedPcdGet64(PcdFdBaseAddress), FixedPcdGet64(PcdFlashNvStorageVariableBase), @@ -29,9 +29,9 @@ NOR_FLASH_DESCRIPTION mNorFlashDevice =3D }; =20 EFI_STATUS -NorFlashPlatformGetDevices ( - OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions, - OUT UINT32 *Count +VirtNorFlashPlatformGetDevices ( + OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions, + OUT UINT32 *Count ) { *NorFlashDescriptions =3D &mNorFlashDevice; --=20 2.35.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 (#95618): https://edk2.groups.io/g/devel/message/95618 Mute This Topic: https://groups.io/mt/94587261/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-