From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F10302217CE55 for ; Fri, 8 Dec 2017 08:02:33 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id z34so11248680wrz.10 for ; Fri, 08 Dec 2017 08:07:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Wnklg01Xn1xwXg4jjHNTEx7ftLDnBmF9LSW2qyDH6Ew=; b=TX4zDC0fwifgpxB5GshjmcTY1TvCz+fYfo8pp4eRMFymMfesueqXuLBReggKXZ/B4e hHrvWRdfQ155hR9EtnGw0WHRrUmf1QM0QDyZYWX3XzF3HtWnmhC1TThp57/kN3hratq4 btF/9OAomRaFLJJZ91ajmRzkA/sixAxtNn4yQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Wnklg01Xn1xwXg4jjHNTEx7ftLDnBmF9LSW2qyDH6Ew=; b=ZZav5IQpiBFed91OvmeUT0rvjzrzs6h+1LzVhGRKqYGYau2uBbj/cLeLtJWy5ClMQN 2v20/mQEQQcmkaSzhCIMz//mGCR2KLwfbB7obLXYQr1e+mQlqRpx7YgQ7+xowXQFG0uY NcBZEUub149IV8XOKFLGrIzrEy4Ssqhr31TXvuD79omc8k9/BfyVuWnSV1U0jTec9s7R nE50bNW1ombtJV34SANboAA7QfNmI7oITscCVw8cyGli73Gn026v6ydF+jiaa1IXk7Ha 7fL9R/vxfD/yHHhrxnKKF+fLhmfrLaUD8kK4Do1qxjtEdFibpvdc9g11FGb8ImdFtTU/ da5g== X-Gm-Message-State: AJaThX64WEzUSte01tPBbBHJ7xf+R7YS+ZdY20B0tdsw4V6kicNTtvlI fAgJcbJn/oxp8C5lI+U5ziesYQ== X-Google-Smtp-Source: AGs4zMbKs/s2/PvRLXAuPa7UQY6eK/G+rjfyQzHI0rRhocCFThf7UOEMI88YJ3cjA3Ds4M512qjzSQ== X-Received: by 10.223.154.182 with SMTP id a51mr25816215wrc.48.1512749226650; Fri, 08 Dec 2017 08:07:06 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id k11sm2024032wmi.18.2017.12.08.08.07.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Dec 2017 08:07:05 -0800 (PST) Date: Fri, 8 Dec 2017 16:07:03 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20171208160703.znbgwsk7m22ds53y@bivouac.eciton.net> References: <20171205101326.23732-1-ard.biesheuvel@linaro.org> <20171205101326.23732-5-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20171205101326.23732-5-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH 4/5] ArmPlatformPkg: add Null implementation of NorFlashPlatformLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 16:02:34 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 05, 2017 at 10:13:25AM +0000, Ard Biesheuvel wrote: > In order to be able to build ArmPlatformPkg components outside of > the context of a particular platform, add Null implementation of > NorFlashPlatformLib. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel Question/comment: Not only ARM Ltd. platforms implement this API. Would it be worth moving this (as well as ArmPlatformPkg/Include/Library/NorFlashPlatformLib.h) into EmbeddedPkg and actually documenting the inputs/outputs? / Leif > --- > ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c | 34 ++++++++++++++++++++ > ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf | 30 +++++++++++++++++ > 2 files changed, 64 insertions(+) > > diff --git a/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c b/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c > new file mode 100644 > index 000000000000..264d18719763 > --- /dev/null > +++ b/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.c > @@ -0,0 +1,34 @@ > +/** @file > + > + Copyright (c) 2014, Linaro Ltd. All rights reserved.
> + > + This program and the accompanying materials > + are licensed and made available under the terms and conditions of the BSD License > + which accompanies this distribution. The full text of the license may be found at > + http://opensource.org/licenses/bsd-license.php > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > + > + **/ > + > +#include > + > +EFI_STATUS > +NorFlashPlatformInitialization ( > + VOID > + ) > +{ > + return EFI_SUCCESS; > +} > + > +EFI_STATUS > +NorFlashPlatformGetDevices ( > + OUT NOR_FLASH_DESCRIPTION **NorFlashDescriptions, > + OUT UINT32 *Count > + ) > +{ > + *NorFlashDescriptions = NULL; > + *Count = 0; > + return EFI_SUCCESS; > +} > diff --git a/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf b/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf > new file mode 100644 > index 000000000000..777a629678e1 > --- /dev/null > +++ b/ArmPlatformPkg/Library/NorFlashPlatformNullLib/NorFlashPlatformNullLib.inf > @@ -0,0 +1,30 @@ > +#/** @file > +# > +# Component description file for NorFlashPlatformNullLib module > +# > +# Copyright (c) 2017, Linaro Ltd. All rights reserved.
> +# > +# This program and the accompanying materials > +# are licensed and made available under the terms and conditions of the BSD License > +# which accompanies this distribution. The full text of the license may be found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +# > +#**/ > + > +[Defines] > + INF_VERSION = 0x00010005 > + BASE_NAME = NorFlashPlatformNullLib > + FILE_GUID = 29b733ad-d066-4df6-8a89-b9df1beb818a > + MODULE_TYPE = DXE_DRIVER > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = NorFlashPlatformLib > + > +[Sources.common] > + NorFlashPlatformNullLib.c > + > +[Packages] > + MdePkg/MdePkg.dec > + ArmPlatformPkg/ArmPlatformPkg.dec > -- > 2.11.0 >