From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gx2qKa7/; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) 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) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4FB2C433D6; Wed, 26 Oct 2022 17:42:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666806139; bh=v2AGgYLvkO1oaJ24rb5MWmLZjYzpr7zap8tDmfSOepc=; h=From:To:Cc:Subject:Date:From; b=Gx2qKa7/g3FneVeeckdQea96rTJaTtqS28iaL7VsWfRLM2jkkYXXi83/ijbDoNc/v ZMHgEqJHNlGlUff+Mv9NcK4+TsqmFnvEz6wHklP1rgMO/ON1o7WeePN2ZyGgY5VYzT K76jWY2aTDa4VdpmAt3WLYRQqstWUuV1Tez0xujy1RtgiQaIM5uRn+iY5vhdBn4OYg 3d0qTzznsbWXi8v82375dVZIZWel7DJTm3XJ9g9un1GvkUEVw6jLNHyZZ3nVLff5OF PAJmCUfSQm5YuDp8RSINLTH1IyTRUmD7np/ZHmsI+xNdCp0RxuJ1ptBKq2sKxRyf8w DYRsT4/jTDwSQ== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Graeme Gregory Subject: [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> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Switch to the OVMF version of the NOR flash DXE driver, which supports=0D QEMU's NOR flash emulation specifically, and carries some optimizations=0D that are therefore permitted.=0D =0D Cc: Leif Lindholm =0D Cc: Graeme Gregory =0D Signed-off-by: Ard Biesheuvel =0D ---=0D Platform/Qemu/SbsaQemu/SbsaQemu.dsc = | 4 ++--=0D Platform/Qemu/SbsaQemu/SbsaQemu.fdf = | 2 +-=0D Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.inf = | 4 ++--=0D Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib.c = | 12 ++++++------=0D 4 files changed, 11 insertions(+), 11 deletions(-)=0D =0D diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/S= bsaQemu.dsc=0D index ff280709a509..79dd200ca7fc 100644=0D --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc=0D +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc=0D @@ -178,7 +178,7 @@ [LibraryClasses.common]=0D ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibN= ull.inf=0D=0D =0D=0D TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf=0D=0D - NorFlashPlatformLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/Sb= saQemuNorFlashLib.inf=0D=0D + VirtNorFlashPlatformLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLi= b/SbsaQemuNorFlashLib.inf=0D=0D =0D=0D CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf= =0D=0D BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf=0D=0D @@ -663,7 +663,7 @@ [Components.common]=0D =0D=0D ArmPkg/Drivers/ArmGic/ArmGicDxe.inf=0D=0D ArmPkg/Drivers/TimerDxe/TimerDxe.inf=0D=0D - ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf=0D=0D + OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf=0D=0D MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf=0D=0D =0D=0D #=0D=0D diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf b/Platform/Qemu/SbsaQemu/S= bsaQemu.fdf=0D index 9f031c3e6649..781215707c3d 100644=0D --- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf=0D +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf=0D @@ -189,7 +189,7 @@ [FV.FvMain]=0D =0D=0D INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf=0D=0D INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf=0D=0D - INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf=0D=0D + INF OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf=0D=0D INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf=0D=0D =0D=0D #=0D=0D diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorF= lashLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNor= FlashLib.inf=0D index f2ba41e1df99..f7e3f8e05eec 100644=0D --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib= .inf=0D +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib= .inf=0D @@ -14,16 +14,16 @@ [Defines]=0D FILE_GUID =3D c53d904d-de50-40f1-a148-a2ece48303d8= =0D=0D MODULE_TYPE =3D BASE=0D=0D VERSION_STRING =3D 1.0=0D=0D - LIBRARY_CLASS =3D NorFlashPlatformLib=0D=0D + LIBRARY_CLASS =3D VirtNorFlashPlatformLib=0D=0D =0D=0D [Sources.common]=0D=0D SbsaQemuNorFlashLib.c=0D=0D =0D=0D [Packages]=0D=0D - ArmPlatformPkg/ArmPlatformPkg.dec=0D=0D ArmPkg/ArmPkg.dec=0D=0D MdePkg/MdePkg.dec=0D=0D MdeModulePkg/MdeModulePkg.dec=0D=0D + OvmfPkg/OvmfPkg.dec=0D=0D =0D=0D [FixedPcd]=0D=0D gArmTokenSpaceGuid.PcdFdBaseAddress=0D=0D diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorF= lashLib.c b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFl= ashLib.c=0D index 0946327cb529..56c26019a140 100644=0D --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib= .c=0D +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuNorFlashLib/SbsaQemuNorFlashLib= .c=0D @@ -8,19 +8,19 @@=0D =0D=0D #include =0D=0D #include =0D=0D -#include =0D=0D +#include =0D=0D =0D=0D #define QEMU_NOR_BLOCK_SIZE SIZE_256KB=0D=0D =0D=0D EFI_STATUS=0D=0D -NorFlashPlatformInitialization (=0D=0D +VirtNorFlashPlatformInitialization (=0D=0D VOID=0D=0D )=0D=0D {=0D=0D return EFI_SUCCESS;=0D=0D }=0D=0D =0D=0D -NOR_FLASH_DESCRIPTION mNorFlashDevice =3D=0D=0D +STATIC VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevice =3D=0D=0D {=0D=0D FixedPcdGet64(PcdFdBaseAddress),=0D=0D FixedPcdGet64(PcdFlashNvStorageVariableBase),=0D=0D @@ -29,9 +29,9 @@ NOR_FLASH_DESCRIPTION mNorFlashDevice =3D=0D };=0D=0D =0D=0D EFI_STATUS=0D=0D -NorFlashPlatformGetDevices (=0D=0D - OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions,=0D=0D - OUT UINT32 *Count=0D=0D +VirtNorFlashPlatformGetDevices (=0D=0D + OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions,=0D=0D + OUT UINT32 *Count=0D=0D )=0D=0D {=0D=0D *NorFlashDescriptions =3D &mNorFlashDevice;=0D=0D -- =0D 2.35.1=0D =0D