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.web09.6303.1666175771193990628 for ; Wed, 19 Oct 2022 03:36:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gTkVw+gS; 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 9733461800; Wed, 19 Oct 2022 10:36:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBAD6C43470; Wed, 19 Oct 2022 10:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666175770; bh=bncsgc4rhK1Pc539NBYhqXBjeE39P2CQkGG1e+3B6Mg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gTkVw+gSOUcGvPQy0zLSqZw99k1USvVa3hBmOil0Le8v6DLyha8Em9GKN1VRM4uTE 2Ulznq4LnmZKBpx69H7KUjXs9KT+0eTTftxVSZ02mdAClAkk7fYYUYLCIxQzg2ccWB 3G4b9b9j3rWyw9nRlplQcCta8Viazd5066gdWvYahD/HR8tR+QIdV4hl6xKUt/RYmo iSt5qU3GuRfJ9D8slhcDRe5GaaaFQKfyTmcaz8UZkpPnxTsyIz2jxi/j/+7juuad4p yyt7s8hSzQ7/l1o4ZC2yt22O9LXX0PD6zKlZNrdlwWWX9ViXwtvtEIyxJwQD4JwhCM 1+1JR2YCrL3rA== From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , Thomas Abraham , Sami Mujawar Subject: [PATCH edk2-platforms 2/4] Platform/ARM: create local definition of NorFlashPlatformLib Date: Wed, 19 Oct 2022 12:35:53 +0200 Message-Id: <20221019103555.493477-3-ardb@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221019103555.493477-1-ardb@kernel.org> References: <20221019103555.493477-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The version of NorFlashPlatformLib defined in ArmPlatformPkg will go away once we retire its version of NorFlashDxe, so switch to a local Platform/ARM version instead. Signed-off-by: Ard Biesheuvel --- Platform/ARM/ARM.dec | 1 + Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf | 2 +- Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf | 2 +- Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf | 2 +- Platform/ARM/Include/Library/NorFlashPlatformLib.h | 30 += +++++++++++++++++++ 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/Platform/ARM/ARM.dec b/Platform/ARM/ARM.dec index 5175b313f95a..cf1c8ef04742 100644 --- a/Platform/ARM/ARM.dec +++ b/Platform/ARM/ARM.dec @@ -17,6 +17,7 @@ [Includes] =0D [LibraryClasses]=0D BdsLib|Include/Library/BdsLib.h=0D + NorFlashPlatformLib|Include/Library/NorFlashPlatformLib.h=0D =0D [Guids]=0D gArmBootMonFsFileInfoGuid =3D { 0x41e26b9c, 0xada6, 0x45b3, { 0x80, 0x= 8e, 0x23, 0x57, 0xa3, 0x5b, 0x60, 0xd6 } }=0D diff --git a/Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.i= nf b/Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf index e5e5628de387..1a38bf81b349 100644 --- a/Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf +++ b/Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlashJunoLib.inf @@ -17,8 +17,8 @@ [Sources.common] NorFlashJuno.c=0D =0D [Packages]=0D - ArmPlatformPkg/ArmPlatformPkg.dec=0D MdePkg/MdePkg.dec=0D + Platform/ARM/ARM.dec=0D Platform/ARM/JunoPkg/ArmJuno.dec=0D =0D [LibraryClasses]=0D diff --git a/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf b/Plat= form/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf index 74486eacd009..06068db0e4f3 100644 --- a/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf +++ b/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf @@ -18,8 +18,8 @@ [Sources.common] NorFlashLib.c=0D =0D [Packages]=0D - ArmPlatformPkg/ArmPlatformPkg.dec=0D MdePkg/MdePkg.dec=0D + Platform/ARM/ARM.dec=0D Platform/ARM/SgiPkg/SgiPlatform.dec=0D =0D [LibraryClasses]=0D diff --git a/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLi= b.inf b/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf index 96bbf1e42313..54b3cb041645 100644 --- a/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf +++ b/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf @@ -19,8 +19,8 @@ [Sources.common] StandaloneMmNorFlashLib.c=0D =0D [Packages]=0D - ArmPlatformPkg/ArmPlatformPkg.dec=0D MdePkg/MdePkg.dec=0D + Platform/ARM/ARM.dec=0D Platform/ARM/SgiPkg/SgiPlatform.dec=0D =0D [LibraryClasses]=0D diff --git a/Platform/ARM/Include/Library/NorFlashPlatformLib.h b/Platform/= ARM/Include/Library/NorFlashPlatformLib.h new file mode 100644 index 000000000000..6ef5b70e9948 --- /dev/null +++ b/Platform/ARM/Include/Library/NorFlashPlatformLib.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 _NORFLASHPLATFORMLIB_H_=0D +#define _NORFLASHPLATFORMLIB_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 +} NOR_FLASH_DESCRIPTION;=0D +=0D +EFI_STATUS=0D +NorFlashPlatformInitialization (=0D + VOID=0D + );=0D +=0D +EFI_STATUS=0D +NorFlashPlatformGetDevices (=0D + OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions,=0D + OUT UINT32 *Count=0D + );=0D +=0D +#endif /* _NORFLASHPLATFORMLIB_H_ */=0D --=20 2.35.1