From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mx.groups.io with SMTP id smtpd.web08.9717.1665766192302318265 for ; Fri, 14 Oct 2022 09:49:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=jVI9g3tP; spf=pass (domain: ventanamicro.com, ip: 209.85.216.54, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pj1-f54.google.com with SMTP id l1-20020a17090a72c100b0020a6949a66aso5254931pjk.1 for ; Fri, 14 Oct 2022 09:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4xMqUWzFhMybMT43nbVuGLiWPWJPmE4gxQpLdO6Zj+E=; b=jVI9g3tPriwnldp61NELdaKpYyqPK+StrBF4t3qy8OQYC9DGs39pXumzjrV0Ts8Y6X LJyCEEoUWimp0gdCEfaO0SpHXy+qRwJUO+6b7E8EoidtvjyTFmhs5bG32sMuCsWJo7RV GxqZZ9rpkx4LC26Bmt6DIYhYIeKPn9X8n4o5MK9a6GsWR1004is6S80JOvpbg+sn6Vgi Wx6CyxeUFYz2X5YP9PD5c5Z5RBeEsAC1pKNcci0MAhFWanMcSFIAhzuejD6iFoh17EE5 S8gH27nxkOZvw/OST4i5oDoyR8fzyMtvnP/wcVb7M2yPM43mRnPvTiTcX6dLPeSvPjzg 6afw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4xMqUWzFhMybMT43nbVuGLiWPWJPmE4gxQpLdO6Zj+E=; b=zrXSi9hHeydJpVlcJ+mF5xZgAIlCEcpWuYyx+9FdsGodcQvnWoeWH1kgOMzBcvNzwD LPgVFz3ldB+TZ6QW/TO+b/hlpHsGWcVbY5aCeNa2cL95bxIg/ZPGhCb25F4B8gVOcoPk oSN56VsQu2kjOT6sLIrxxOjbeHz08fDV+x4rYb34Ic0Ed/zenVXN/5sIzqU+7E5ycYPS dU+bYwKkPkoqwEFODjM1egKCDVqXNpAK3paV5fZtsJthyRpBaQYr601UcXsZUHbTWGfO qsTJ5hVzgtLlVt62mZcjKWl1Z4Crh6ZghsIbi5z7AuaUkgjjoXAV0p/BUBNhbuwaiWUZ Xwjw== X-Gm-Message-State: ACrzQf3SdtOQKyW8G1H32rvTnX6/CcdQMY/oKCLunAuIoQdJugIaBPH2 SY5UzhLVQgL+Oh6gjiYrSP22/3rCTxm7kg== X-Google-Smtp-Source: AMsMyM5OXEeaOfp4BFTdaXmMGT5gpe6vddTbgg+TET7V6KviTymdBSeUqCcTI5/CYE//G9MrzbJoyw== X-Received: by 2002:a17:90b:1d8b:b0:20d:30a5:499e with SMTP id pf11-20020a17090b1d8b00b0020d30a5499emr18477905pjb.84.1665766191384; Fri, 14 Oct 2022 09:49:51 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([49.206.13.138]) by smtp.gmail.com with ESMTPSA id f3-20020a62db03000000b0056265011136sm1963368pfg.112.2022.10.14.09.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 09:49:50 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Michael D Kinney , Liming Gao , Zhiguang Liu , Andrew Fish Subject: [edk2-staging/RiscV64QemuVirt PATCH V4 25/34] ArmPlatformPkg/NorFlashPlatformLib.h:Move to MdePkg Date: Fri, 14 Oct 2022 22:18:27 +0530 Message-Id: <20221014164836.1513036-26-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221014164836.1513036-1-sunilvl@ventanamicro.com> References: <20221014164836.1513036-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Migrate NorFlashPlatformLib.h to MdePkg and add a Null instance of the NorFlashPlatformLib library in MdePkg. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Andrew Fish Signed-off-by: Sunil V L --- ArmPlatformPkg/ArmPlatformPkg.dec | 4 --- MdePkg/MdePkg.dec | 4 +++ MdePkg/MdePkg.dsc | 1 + MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.inf | 22 +++++++++++++++++ {ArmPlatformPkg => MdePkg}/Include/Library/NorFlashPlatformLib.h | 0 MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.c | 26 ++++++++++++++++++++ 6 files changed, 53 insertions(+), 4 deletions(-) diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec index dd6e78f62aa1..86559aa6e57d 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dec +++ b/ArmPlatformPkg/ArmPlatformPkg.dec @@ -38,10 +38,6 @@ [LibraryClasses] # LcdPlatformLib|Include/Library/LcdPlatformLib.h - ## @libraryclass Provides a Nor flash interface. - # - NorFlashPlatformLib|Include/Library/NorFlashPlatformLib.h - ## @libraryclass Provides an interface to the clock of a PL011 device. # PL011UartClockLib|Include/Library/PL011UartClockLib.h diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index df681b2b99a5..7193160cd496 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -279,6 +279,10 @@ [LibraryClasses] ## @libraryclass Provides function for SMM CPU Rendezvous Library. SmmCpuRendezvousLib|Include/Library/SmmCpuRendezvousLib.h + ## @libraryclass Provides a Nor flash interface. + # + NorFlashPlatformLib|Include/Library/NorFlashPlatformLib.h + [LibraryClasses.IA32, LibraryClasses.X64, LibraryClasses.AARCH64] ## @libraryclass Provides services to generate random number. # diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index c7961a9b03f1..1b3cd822e45e 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -134,6 +134,7 @@ [Components] MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.inf MdePkg/Library/CcProbeLibNull/CcProbeLibNull.inf MdePkg/Library/SmmCpuRendezvousLibNull/SmmCpuRendezvousLibNull.inf + MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.inf [Components.IA32, Components.X64, Components.ARM, Components.AARCH64] # diff --git a/MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.inf b/MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.inf new file mode 100644 index 000000000000..e4bd85ba7ace --- /dev/null +++ b/MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.inf @@ -0,0 +1,22 @@ +## @file +# NorFlashPlatformLib null instance +# +# Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = NorFlashPlatformLibNull + FILE_GUID = DE9C2866-5C5C-4BD3-9A09-3C4EB7448069 + MODULE_TYPE = DXE_DRIVER + VERSION_STRING = 1.0 + LIBRARY_CLASS = NorFlashPlatformLib + +[Sources.common] + NorFlashPlatformLibNull.c + +[Packages] + MdePkg/MdePkg.dec diff --git a/ArmPlatformPkg/Include/Library/NorFlashPlatformLib.h b/MdePkg/Include/Library/NorFlashPlatformLib.h similarity index 100% rename from ArmPlatformPkg/Include/Library/NorFlashPlatformLib.h rename to MdePkg/Include/Library/NorFlashPlatformLib.h diff --git a/MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.c b/MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.c new file mode 100644 index 000000000000..cd779f504e40 --- /dev/null +++ b/MdePkg/Library/NorFlashPlatformLibNull/NorFlashPlatformLibNull.c @@ -0,0 +1,26 @@ +/** @file + + Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + **/ + +#include + +EFI_STATUS +NorFlashPlatformInitialization ( + VOID + ) +{ + return EFI_SUCCESS; +} + +EFI_STATUS +NorFlashPlatformGetDevices ( + OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions, + OUT UINT32 *Count + ) +{ + return EFI_SUCCESS; +} -- 2.38.0