From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2607:f8b0:4001:c06::22e; helo=mail-io0-x22e.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (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 4AB7C2034D81F for ; Tue, 7 Nov 2017 07:41:21 -0800 (PST) Received: by mail-io0-x22e.google.com with SMTP id b186so2566895iof.8 for ; Tue, 07 Nov 2017 07:45:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5SqR8mZUMO7vpek8Im6xXZ7TILddwUspAdlyCV6LFA4=; b=y7YgyuKkoHB0lYhlX9vN0cj4Dgrv9k57gFWGsa4jDGPNBpWyCyxo9tLIYEKHwiSirJ Gl9xlnZrT8fHVuIzI4bQ1crmONX82Qze/gejkcZ9ntSHCbMleZz93K8iXGqWppnqIst7 AoSmvoSbGZfCgIaCnX9bVUEzlrEQ9IsJ2MnD2xHBmIL2Afp24yLgXaSMgFfjoy8ZurRs ATR0bNlaCbsTWCCBio4Y9mju4I95NhP8emV0UauXK/e/49i9pQ46XX0ix1vJxMTxkyNa Tit0z3mJz5tCn6WFFLa4KxLPnH9ZFb5t3iGpJIL3KX1woVnombc90jEiAnuZ38pdJ1yB UzmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5SqR8mZUMO7vpek8Im6xXZ7TILddwUspAdlyCV6LFA4=; b=YGKt8rAJSvzvKgh8u13cQ+Lad2fh5bMHKwuKc8muz6R8voX0rqC+La/n9QomWm0UWL aSSHU4Jztyn9sRQtut2z0eDn1kZ5RJ1oA+BuTIuKCFCgB0cprA5Np7FrYnPDrF7kcD2J BnWkI4hPaqwlw4KiEgKQAeRMF3xTsECHrzNbQLvhFsFEXP3K7hzXtFejbtyqoaYYcxHD JYEeE1JM0aOMmPhx3B2V5PgxmmgNde7qHO2TIhICCmpWttmryQPonKMMUn8w3SymxauY 541oPYvJuzxtB+z8Nun+v/x/2PewxW8gkzYkEoKUHN47d1Sg9orQ85+V4jxYrnN6Iab0 Nj5Q== X-Gm-Message-State: AJaThX4QZjCU66SMQcOV5omJIHryhUv7UcaMNZOQS80kA0lnDO2xVNjt ZVYuFr7UoTowT/UgvJXsKd6jSgxk8Vg/03ewjpLbNA== X-Google-Smtp-Source: ABhQp+QtOWSK8VxOad0ep/9VOB8YpsvCbihB7JdFSrC55btdHdAgdTfvlg/PvQh1VK9lOqb6GpvFxYkZUcu9ivp5IsY= X-Received: by 10.107.174.32 with SMTP id x32mr24345998ioe.44.1510069520115; Tue, 07 Nov 2017 07:45:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.167.208 with HTTP; Tue, 7 Nov 2017 07:45:19 -0800 (PST) In-Reply-To: <20171107153751.xz2nb4eeo6ihxso3@bivouac.eciton.net> References: <1509731717-5620-1-git-send-email-mw@semihalf.com> <20171107153751.xz2nb4eeo6ihxso3@bivouac.eciton.net> From: Marcin Wojtas Date: Tue, 7 Nov 2017 16:45:19 +0100 Message-ID: To: Leif Lindholm Cc: edk2-devel-01 , "Tian, Feng" , "Kinney, Michael D" , "Gao, Liming" , Ard Biesheuvel , nadavh@marvell.com, Neta Zur Hershkovits , Kostya Porotchkin , Hua Jing , semihalf-dabros-jan Subject: Re: [PATCH v3 1/1] EmbeddedPkg: Implement NorFlashInfoLib 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: Tue, 07 Nov 2017 15:41:21 -0000 Content-Type: text/plain; charset="UTF-8" Hi Leif, 2017-11-07 16:37 GMT+01:00 Leif Lindholm : > On Fri, Nov 03, 2017 at 06:55:17PM +0100, Marcin Wojtas wrote: >> The SPI NOR flash drivers which base on ArmPlatformPkg's >> NorFlashDxe usually make use of static declarations of the >> flash instances with their type and parameters. As a result >> it implies hardcoding the exact way of flash handling, not to >> mention the code does not look very nice. Much better solution >> would be obtaining the flash ID and hence its description >> in runtime. >> >> JEDEC compliant SPI NOR devices allow to obtain their IDs with >> READ_ID command (0x9f), which should return the vendor ID byte, >> followed by 2 to 4 following device ID bytes. Use this capability >> for implementing a NorFlashInfoLib that gives an access to the >> NOR flash description data, such as name, page size, sector >> (block) size and others, of more than 50 different models. >> The new library user should pass an output array from issuing >> READ_ID command to the NorFlashGetInfo () routine - if the >> match is found, an allocated (optionally for RT) pool with >> the flash description copy will be returned. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Marcin Wojtas >> >> ========================== > > Please, the separator is --- > The below does not belong in the commit message (but should be > included below --- for clarity). > > > I would however also like to fold in the following hunk, to enable > standalone building: > > diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc > index d7ee6a3018..bc19000e4b 100644 > --- a/EmbeddedPkg/EmbeddedPkg.dsc > +++ b/EmbeddedPkg/EmbeddedPkg.dsc > @@ -282,6 +282,8 @@ [Components.common] > > EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf > > + EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.inf > + > [Components.ARM] > EmbeddedPkg/Drivers/Isp1761UsbDxe/Isp1761UsbDxe.inf > > If you are OK with these changes: > Reviewed-by: Leif Lindholm > (do let me know) > Thanks, I'm of course ok with the changes. Should I resubmit? Best regards, Marcin