From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web12.651.1666630898292628049 for ; Mon, 24 Oct 2022 10:01:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ShGnQDeb; spf=pass (domain: kernel.org, ip: 145.40.68.75, 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 ams.source.kernel.org (Postfix) with ESMTPS id A1E64B8149C; Mon, 24 Oct 2022 17:01:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05C91C433C1; Mon, 24 Oct 2022 17:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666630895; bh=Ce6szcQtPxl9N0R+dxkMK6YA43ZIRKrt81O8UPHnMfU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ShGnQDebsa1JO8xHW+EqzVYU30v8mrNy8iShfR1INDgC1s1QvG78GtyQaGWisA+KN 2x1wfx2mHCcLx4/GibN+rPAR/ehsYqLZ/J9gj1ax+pedZQStJlOa6K9TkNREYWuwI6 qnOyWEvtvBbIinVM+mc79PxX3HIt8ekS3UCmKOv5KPGL1wqnyI+oFwALvlx0/Ekdhh 0LYntO6Fjq8um0QQnrSeBqQOIy3c4+Biuq/llwKrI2pDuHSB1dI5dVhYkjnUGzbERI GBex8d3sE4RAHQYbognJxJnNU3NluFt818lMtcIgjRIyBqRPHub+quTTnyWfx3OaNK acA7XZWdPw1pA== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Sunil V L , Sami Mujawar , Leif Lindholm Subject: [PATCH 01/11] OvmfPkg: clone NorFlashPlatformLib into VirtNorFlashPlatformLib Date: Mon, 24 Oct 2022 19:01:12 +0200 Message-Id: <20221024170122.594577-2-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221024170122.594577-1-ardb@kernel.org> References: <20221024170122.594577-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Create a new library class in Ovmf that duplicates the existing NorFlashPlatformLib, but which will be tied to the VirtNorFlashDxe driver that will be introduced in a subsequent patch. This allows us to retire the original from ArmPlatformPkg. Signed-off-by: Ard Biesheuvel --- OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h | 30 ++++++++++++++++++++ OvmfPkg/OvmfPkg.dec | 4 +++ 2 files changed, 34 insertions(+) diff --git a/OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h b/OvmfPkg/In= clude/Library/VirtNorFlashPlatformLib.h new file mode 100644 index 000000000000..d2128a032714 --- /dev/null +++ b/OvmfPkg/Include/Library/VirtNorFlashPlatformLib.h @@ -0,0 +1,30 @@ +/** @file=0D +=0D + Copyright (c) 2011-2012, ARM Ltd. All rights reserved.
=0D +=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D + **/=0D +=0D +#ifndef _VIRTNORFLASHPLATFORMLIB_H_=0D +#define _VIRTNORFLASHPLATFORMLIB_H_=0D +=0D +typedef struct {=0D + UINTN DeviceBaseAddress; // Start address of the Device Base Ad= dress (DBA)=0D + UINTN RegionBaseAddress; // Start address of one single region= =0D + UINTN Size;=0D + UINTN BlockSize;=0D +} VIRT_NOR_FLASH_DESCRIPTION;=0D +=0D +EFI_STATUS=0D +VirtNorFlashPlatformInitialization (=0D + VOID=0D + );=0D +=0D +EFI_STATUS=0D +VirtNorFlashPlatformGetDevices (=0D + OUT VIRT_NOR_FLASH_DESCRIPTION **NorFlashDescriptions,=0D + OUT UINT32 *Count=0D + );=0D +=0D +#endif /* _VIRTNORFLASHPLATFORMLIB_H_ */=0D diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index f13dd4a61f01..5f5556c67c6c 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -101,6 +101,10 @@ [LibraryClasses] # transports.=0D VirtioMmioDeviceLib|Include/Library/VirtioMmioDeviceLib.h=0D =0D + ## @libraryclass Provides a Nor flash interface.=0D + #=0D + VirtNorFlashPlatformLib|Include/Library/VirtNorFlashPlatformLib.h=0D +=0D ## @libraryclass Invoke Xen hypercalls=0D #=0D XenHypercallLib|Include/Library/XenHypercallLib.h=0D --=20 2.35.1