Re: [edk2-devel] [patch] ShellBinPkg: Remove ShellBinPkg

2019-05-07 Thread Liming Gao
Binary Shell can still be got from 
https://github.com/tianocore/edk2/tree/edk2-stable201903/ShellBinPkg/UefiShell/X64

For next stable tag, Binary Shell will be uploaded into 
https://github.com/tianocore/edk2/releases tag.

Thanks
Liming
From: Minnow Ware [mailto:minnoww...@outlook.com]
Sent: Wednesday, May 8, 2019 2:35 PM
To: devel@edk2.groups.io; Carsey, Jaben ; Bi, Dandan 
; Laszlo Ersek ; Ard Biesheuvel 

Cc: edk2-devel-groups-io ; Ni, Ray ; 
Leif Lindholm ; Gao, Liming ; 
Richardson, Brian 
Subject: RE: [edk2-devel] [patch] ShellBinPkg: Remove ShellBinPkg


Hi all,



does that mean, that SHELL.EFI from a trusted source is currently unavailable

for the industry?



There are a couple of web sites that refer to 
"https://github.com/tianocore/edk2/raw/master/ShellBinPkg/UefiShell/X64";



(https://www.google.com/search?ei=SUvPXPneNIeFmwXQvo6gAg&q=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fraw%2Fmaster%2FShellBinPkg%2FUefiShell%2FX64&oq=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fraw%2Fmaster%2FShellBinPkg%2FUefiShell%2FX64&gs_l=psy-ab.3...3050.3050..3392...0.0..0.102.102.0j1..02j1..gws-wiz.9e-I_-IL7Zs)



Where get I SHELL.EFI right now?



Best regards,

Kilian










From: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> on behalf of Carsey, Jaben 
mailto:jaben.car...@intel.com>>
Sent: Tuesday, April 23, 2019 4:03:05 AM
To: Bi, Dandan; Laszlo Ersek; Ard Biesheuvel
Cc: edk2-devel-groups-io; Ni, Ray; Leif Lindholm; Gao, Liming
Subject: Re: [edk2-devel] [patch] ShellBinPkg: Remove ShellBinPkg

Assuming Laszlo's comment is addressed.
Reviewed-by: Jaben Carsey 
mailto:jaben.car...@intel.com>>

> -Original Message-
> From: Bi, Dandan
> Sent: Wednesday, April 17, 2019 6:12 PM
> To: Laszlo Ersek mailto:ler...@redhat.com>>; Ard Biesheuvel
> mailto:ard.biesheu...@linaro.org>>
> Cc: edk2-devel-groups-io mailto:devel@edk2.groups.io>>; 
> Carsey, Jaben
> mailto:jaben.car...@intel.com>>; Ni, Ray 
> mailto:ray...@intel.com>>; Leif Lindholm
> mailto:leif.lindh...@linaro.org>>; Gao, Liming 
> mailto:liming@intel.com>>
> Subject: RE: [patch] ShellBinPkg: Remove ShellBinPkg
> Importance: High
>
> Thank you all.
> I will update the patch according to Laszlo's comments before commit the
> patch.
>
>
> Thanks,
> Dandan
> > -Original Message-
> > From: Laszlo Ersek [mailto:ler...@redhat.com]
> > Sent: Wednesday, April 17, 2019 6:53 PM
> > To: Ard Biesheuvel 
> > mailto:ard.biesheu...@linaro.org>>; Bi, Dandan
> > mailto:dandan...@intel.com>>
> > Cc: edk2-devel-groups-io 
> > mailto:devel@edk2.groups.io>>; Carsey, Jaben
> > mailto:jaben.car...@intel.com>>; Ni, Ray 
> > mailto:ray...@intel.com>>; Leif Lindholm
> > mailto:leif.lindh...@linaro.org>>; Gao, Liming 
> > mailto:liming@intel.com>>
> > Subject: Re: [patch] ShellBinPkg: Remove ShellBinPkg
> >
> > On 04/17/19 09:16, Ard Biesheuvel wrote:
> > > On Tue, 16 Apr 2019 at 23:40, Dandan Bi 
> > > mailto:dandan...@intel.com>> wrote:
> > >>
> > >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1675
> > >>
> > >> Remove ShellBinPkg from edk2.
> > >> If developers work on current edk2 master and still want to use
> > >> Shell binary after this removal, they can get it from source code
> > >> in the Assets part of edk2-stable201903 tag release page.
> > >> And from next release (edk2-stable201905 tag), we will publish all
> > >> Shell binaries to the according Assets part directly.
> > >> edk2 release link: https://github.com/tianocore/edk2/releases
> > >>
> > >> Cc: Jaben Carsey mailto:jaben.car...@intel.com>>
> > >> Cc: Ray Ni mailto:ray...@intel.com>>
> > >> Cc: Leif Lindholm 
> > >> mailto:leif.lindh...@linaro.org>>
> > >> Cc: Ard Biesheuvel 
> > >> mailto:ard.biesheu...@linaro.org>>
> > >> Cc: Liming Gao mailto:liming@intel.com>>
> > >> Cc: Laszlo Ersek mailto:ler...@redhat.com>>
> > >> Signed-off-by: Dandan Bi 
> > >> mailto:dandan...@intel.com>>
> > >
> > > Acked-by: Ard Biesheuvel 
> > > mailto:ard.biesheu...@linaro.org>>
> > >
> > > BTW you can use the --no-binary option to git to omit the binary
> > > diffs in the patch. Especially when deleting binaries, that saves a
> > > lot of hassle dealing with a multimegabyte patch email.
> >
> > +1
> >
> > For the patch, I have a request towards Dandan: regarding the line
> >
> > +Maintainers for stable Shell binaries generation when need to publish
> > +Shell
> > binaries with edk2 release:
> >
> > please:
> >
> > (1) wrap it with an 80-char margin,
> > (2) please insert a blank line just above it.
> >
> > With those:
> >
> > Acked-by: Laszlo Ersek mailto:ler...@redhat.com>>
> >
> > Thanks
> > Laszlo



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40182): https://edk2.groups.io/g/devel/message/40182
Mute This Topic: https://groups.io/mt/31209298/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-

Re: [edk2-devel] [PATCH v3] MdeModulePkg/DumpDynPcd: Add application to dump dynamic PCD settings

2019-05-07 Thread Wu, Hao A
Patch has been pushed via commit:
a642e2b42e

Best Regards,
Hao Wu


> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Wu,
> Hao A
> Sent: Tuesday, May 07, 2019 8:50 PM
> To: devel@edk2.groups.io; Zhang, Shenglei
> Cc: Wang, Jian J; Ni, Ray; Zeng, Star; Dong, Eric
> Subject: Re: [edk2-devel] [PATCH v3] MdeModulePkg/DumpDynPcd: Add
> application to dump dynamic PCD settings
> 
> > -Original Message-
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Zhang, Shenglei
> > Sent: Tuesday, May 07, 2019 1:55 PM
> > To: devel@edk2.groups.io
> > Cc: Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Dong, Eric
> > Subject: [edk2-devel] [PATCH v3] MdeModulePkg/DumpDynPcd: Add
> application
> > to dump dynamic PCD settings
> >
> > This is a shell application to dump dynamic PCD settings.
> > Type DumpDynPcd -?/h/H to get help information.
> > Type DumpDynPcd -v/V to get version information.
> > Type DumpDynPcd [PcdName] to get Pcd information.
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1541
> >
> > v2:1.Add static for global variables.
> >2.Change the parameter amount of InternalStrnCatGrow in DumpDynPcd.c.
> >3.Add open brace according to EDK II C Coding Standards Specification.
> >4.Remove the dependency on ShellPkg.dec in DumpDynPcd.inf.
> >
> > v3:Add static for all global variables and internal functions.
> 
> I found that the ECC tool cannot handle lower case 'static' before
> functions at this moment. Hence, I filed the below BZ for ECC:
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1778
> 
> Meanwhile, I think the behavior in this patch is good.
> 
> >
> > Cc: Jian J Wang 
> > Cc: Hao Wu 
> > Cc: Ray Ni 
> > Cc: Star Zeng 
> > Cc: Eric Dong 
> > Signed-off-by: Shenglei Zhang 
> > ---
> >  .../Application/DumpDynPcd/DumpDynPcd.c   | 612 ++
> >  .../Application/DumpDynPcd/DumpDynPcd.inf |  50 ++
> >  .../Application/DumpDynPcd/DumpDynPcdStr.uni  |  28 +
> >  MdeModulePkg/MdeModulePkg.dsc |   1 +
> >  4 files changed, 691 insertions(+)
> >  create mode 100644
> MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
> >  create mode 100644
> > MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.inf
> >  create mode 100644
> > MdeModulePkg/Application/DumpDynPcd/DumpDynPcdStr.uni
> >
> > diff --git a/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
> > b/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
> > new file mode 100644
> > index 00..025300ae3f
> > --- /dev/null
> > +++ b/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
> > @@ -0,0 +1,612 @@
> > +/** @file
> > +  A shell application to dump dynamic PCD settings.
> > +
> > +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent
> > +
> > +**/
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +
> > +//
> > +// String token ID of help message text.
> > +// Shell supports to find help message in the resource section of an
> > application image if
> > +// .MAN file is not found. This global variable is added to make build tool
> > recognizes
> > +// that the help string is consumed by user and then build tool will add 
> > the
> > string into
> > +// the resource section. Thus the application can use '-?' option to show 
> > help
> > message in
> > +// Shell.
> > +//
> > +GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID
> > mStrDumpDynPcdHelpTokenId = STRING_TOKEN
> > (STR_DUMP_DYN_PCD_HELP_INFORMATION);
> > +
> > +#define MAJOR_VERSION   1
> > +#define MINOR_VERSION   0
> > +
> > +static EFI_UNICODE_COLLATION_PROTOCOL  *mUnicodeCollation  = NULL;
> > +static EFI_PCD_PROTOCOL*mPiPcd = NULL;
> > +static PCD_PROTOCOL*mPcd   = NULL;
> > +static EFI_GET_PCD_INFO_PROTOCOL   *mPiPcdInfo = NULL;
> > +static GET_PCD_INFO_PROTOCOL   *mPcdInfo   = NULL;
> > +static CHAR16   *mTempPcdNameBuffer = NULL;
> > +static UINTN mTempPcdNameBufferSize = 0;
> > +
> > +static CONST CHAR8 mHex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', 
> > '9', 'A', 'B',
> > 'C', 'D', 'E', 'F'};
> > +
> > +static UINTN  Argc;
> > +static CHAR16 **Argv;
> > +
> > +
> > +/**
> > +
> > +  This function parse application ARG.
> > +
> > +  @return Status
> > +**/
> > +static
> > +EFI_STATUS
> > +GetArg (
> > +  VOID
> > +  )
> > +{
> > +  EFI_STATUSStatus;
> > +  EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters;
> > +
> > +  Status = gBS->HandleProtocol (
> > +  gImageHandle,
> > +  &gEfiShellParametersProtocolGuid,
> > +  (VOID**)&ShellParameters
> > +  );
> > +  if (EFI_ERROR(Status)) {
> > +return Status;
> > + 

Re: [edk2-devel] [PATCH 3/3] ArmPlatformPkg:Delete FrameworkDatabase from ArmPlatformPkg

2019-05-07 Thread Thomas Abraham
Hi Leif, Sami,


On 5/7/19 3:18 PM, Sami Mujawar wrote:
> Hi Leif,
>
> We do not use this file and am ok if this is removed. However, I will let 
> Thomas confirm this.

This makefile is not used for ARM platforms (FVP, Juno, SGI, RD) and so
this makefile can be removed.

Thanks,
Thomas.

>
> Regards,
>
> Sami Mujawar
>
> -Original Message-
> From: Leif Lindholm 
> Sent: 07 May 2019 10:31 AM
> To: Fan, ZhijuX 
> Cc: devel@edk2.groups.io; Thomas Abraham ; Sami 
> Mujawar ; Cohen, Eugene 
> Subject: Re: [PATCH 3/3] ArmPlatformPkg:Delete FrameworkDatabase from 
> ArmPlatformPkg
>
> On Mon, May 06, 2019 at 09:20:12AM +, Fan, ZhijuX wrote:
>> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1627
>>
>> The FrameworkDatabase was already obsolete, So, FrameworkDatabase can
>> be removed from ArmPlatformPkg.
>>
>> This patch is going to fix this issue.
>>
>> Cc: Leif Lindholm 
>> Cc: Ard Biesheuvel 
>> Signed-off-by: Zhiju.Fan 
>
> So, first of all:
> Reviewed-by: Leif Lindholm 
>
> Hmm. I wonder if anyone actually uses this Makefile at all since we moved the 
> platforms out. Thomas? Sami? Eugene?
>
> Best Regards,
>
> Leif
>
>> ---
>>   ArmPlatformPkg/Scripts/Makefile | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/ArmPlatformPkg/Scripts/Makefile
>> b/ArmPlatformPkg/Scripts/Makefile index 09f1c90923..76f25e35e8 100644
>> --- a/ArmPlatformPkg/Scripts/Makefile
>> +++ b/ArmPlatformPkg/Scripts/Makefile
>> @@ -65,7 +65,6 @@ endif
>>   $(EDK2_CONF):
>>   ifeq ("$(OS)","Windows_NT")
>>   copy $(EDK_TOOLS_PATH)\Conf\build_rule.template Conf\build_rule.txt
>> -copy $(EDK_TOOLS_PATH)\Conf\FrameworkDatabase.template 
>> Conf\FrameworkDatabase.txt
>>   copy $(EDK_TOOLS_PATH)\Conf\target.template Conf\target.txt
>>   copy $(EDK_TOOLS_PATH)\Conf\tools_def.template Conf\tools_def.txt
>> else
>> --
>> 2.14.1.windows.1
>>
>
>
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40180): https://edk2.groups.io/g/devel/message/40180
Mute This Topic: https://groups.io/mt/31518094/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] Maintainers.txt: Update the name of 'Hao Wu' to 'Hao A Wu'

2019-05-07 Thread Liming Gao
Reviewed-by: Liming Gao 

>-Original Message-
>From: Wu, Hao A
>Sent: Wednesday, May 08, 2019 1:39 PM
>To: devel@edk2.groups.io
>Cc: Wu, Hao A ; Wang, Jian J ;
>Ni, Ray ; Gao, Liming 
>Subject: [PATCH] Maintainers.txt: Update the name of 'Hao Wu' to 'Hao A Wu'
>
>This commit will update the name of 'Hao Wu' to 'Hao A Wu' to match the
>mail address.
>
>Cc: Jian J Wang 
>Cc: Ray Ni 
>Cc: Liming Gao 
>Signed-off-by: Hao A Wu 
>---
> Maintainers.txt | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/Maintainers.txt b/Maintainers.txt
>index 7b432494ce..ff5ae4af93 100644
>--- a/Maintainers.txt
>+++ b/Maintainers.txt
>@@ -172,7 +172,7 @@ M: Rangasai V Chaganty
>
> MdeModulePkg
> W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg
> M: Jian J Wang 
>-M: Hao Wu 
>+M: Hao A Wu 
> M: NetworkPkg maintainers
>   (Universal/Network and related libraries, header files)
> R: Ray Ni 
>@@ -193,7 +193,7 @@ M: Jiaxin Wu 
> Nt32Pkg
> W: https://github.com/tianocore/tianocore.github.io/wiki/Nt32Pkg
> M: Ray Ni 
>-M: Hao Wu 
>+M: Hao A Wu 
>
> Omap35xxPkg
> W: https://github.com/tianocore/tianocore.github.io/wiki/Omap35xxPkg
>@@ -252,7 +252,7 @@ M: Chao Zhang 
>
> SourceLevelDebugPkg
> W:
>https://github.com/tianocore/tianocore.github.io/wiki/SourceLevelDebugPkg
>-M: Hao Wu 
>+M: Hao A Wu 
>
> UefiCpuPkg
> W: https://github.com/tianocore/tianocore.github.io/wiki/UefiCpuPkg
>--
>2.12.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40179): https://edk2.groups.io/g/devel/message/40179
Mute This Topic: https://groups.io/mt/31540491/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] Maintainers.txt: Update the name of 'Hao Wu' to 'Hao A Wu'

2019-05-07 Thread Wu, Hao A
This commit will update the name of 'Hao Wu' to 'Hao A Wu' to match the
mail address.

Cc: Jian J Wang 
Cc: Ray Ni 
Cc: Liming Gao 
Signed-off-by: Hao A Wu 
---
 Maintainers.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index 7b432494ce..ff5ae4af93 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -172,7 +172,7 @@ M: Rangasai V Chaganty 
 MdeModulePkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg
 M: Jian J Wang 
-M: Hao Wu 
+M: Hao A Wu 
 M: NetworkPkg maintainers
   (Universal/Network and related libraries, header files)
 R: Ray Ni 
@@ -193,7 +193,7 @@ M: Jiaxin Wu 
 Nt32Pkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/Nt32Pkg
 M: Ray Ni 
-M: Hao Wu 
+M: Hao A Wu 
 
 Omap35xxPkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/Omap35xxPkg
@@ -252,7 +252,7 @@ M: Chao Zhang 
 
 SourceLevelDebugPkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/SourceLevelDebugPkg
-M: Hao Wu 
+M: Hao A Wu 
 
 UefiCpuPkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/UefiCpuPkg
-- 
2.12.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40178): https://edk2.groups.io/g/devel/message/40178
Mute This Topic: https://groups.io/mt/31540491/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 1/4] MdeModulePkg: Add reset data difinition and guid

2019-05-07 Thread Gao, Zhichao
I think ResetUtilityLib.h is a good place to add the new structure definition.
But I think this lib cannot be consumed in some conditions. The new 
ResetUtilityLib add a new API which would consume a new API ResetSystem in 
ResetSystemLib.
As we know different platforms have different instances of ResetSystemLib. And 
I think all of them do not implement the new API yet. So if they consume the 
ResetUtilityLib, a link error would happen. As an alternative, I define the 
structure in the ResetSystemLib.h. And do not use the new API 
ResetSystemWithSubtype in ResetUtilityLib to transfer the ResetData.
Here are some detail conditions:
The platform normally use its own ResetSystemLib. That would lack the new API 
implement. If it works with the edk2 master and some driver consume the new 
API. Then a link error would occur.
If the platform add the new API and it works both with edk2 master and some 
stable tag before, then a name conflict would occur with the stable tag. 
Because the new API name is conflict with ResetSystemRuntimeDxe and we already 
change it to RuntimeServiceResetSystem while we add the new API.

All the above is why I want to define the structure in ResetSystemLib.h and not 
to use the ResetSystemWithSubtype to transfer the ResetData.

Thanks,
Zhichao

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> Sent: Tuesday, May 7, 2019 6:15 PM
> To: Kinney, Michael D ; devel@edk2.groups.io;
> Gao, Zhichao 
> Cc: Bret Barkelew ; Wang, Jian J
> ; Wu, Hao A ; Ni, Ray
> ; Zeng, Star ; Gao, Liming
> ; Sean Brogan ;
> Michael Turner 
> Subject: Re: [edk2-devel] [PATCH 1/4] MdeModulePkg: Add reset data
> difinition and guid
> 
> On 05/06/19 23:02, Kinney, Michael D wrote:
> > Laszlo,
> >
> > I agree with both your points.  The file name should not imply that it
> > can only be used for capsule resets.
> >
> > I also agree that the structure name and GUIDs should use EDKII_ and
> > gEdkii prefixes.
> >
> > I also suggest, since the 2 new GUIDs are not associated with a
> > structure (they are used to fill in a GUID value field in a
> > structure), that they can be declared in the DEC file alone and do not
> > require the MACRO name or extern declaration in a new .h file.  The .h
> > file should only contain the new data structure
> > EDKII_RESET_DATA_WITH_NULL_STRING.
> >
> > Depending on what modules/libs use
> EDKII_RESET_DATA_WITH_NULL_STRING,
> > it may make more sense to add this structure to an existing library
> > class .h file.
> 
> The lib class header "MdeModulePkg/Include/Library/ResetUtilityLib.h"
> definitely crossed my mind, but I didn't dare suggest it. :)
> 
> Thanks
> Laszlo
> 
> > Best regards,
> >
> > Mike
> >
> >> -Original Message-
> >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >> Laszlo Ersek
> >> Sent: Monday, May 6, 2019 8:44 AM
> >> To: devel@edk2.groups.io; Gao, Zhichao 
> >> Cc: Bret Barkelew ; Wang, Jian J
> >> ; Wu, Hao A ; Ni, Ray
> >> ; Zeng, Star ; Gao, Liming
> >> ; Sean Brogan ;
> >> Michael Turner 
> >> Subject: Re: [edk2-devel] [PATCH 1/4] MdeModulePkg: Add reset data
> >> difinition and guid
> >>
> >> On 05/05/19 09:50, Gao, Zhichao wrote:
> >>> From: Bret Barkelew 
> >>>
> >>> REF:
> >> https://bugzilla.tianocore.org/show_bug.cgi?id=1772
> >>>
> >>> Add a useful definition of reset data for capsule
> >> function. And add
> >>> two guids gCapsuleArmedResetGuid and
> >> gCapsuleUpdateCompleteResetGuid.
> >>>
> >>> Cc: Jian J Wang 
> >>> Cc: Hao Wu 
> >>> Cc: Ray Ni 
> >>> Cc: Star Zeng 
> >>> Cc: Liming Gao 
> >>> Cc: Sean Brogan 
> >>> Cc: Michael Turner 
> >>> Cc: Bret Barkelew 
> >>> Signed-off-by: Zhichao Gao 
> >>> ---
> >>>  MdeModulePkg/Include/Guid/CapsuleResetData.h | 40
> >> 
> >>>  MdeModulePkg/MdeModulePkg.dec|  5 +++
> >>>  2 files changed, 45 insertions(+)
> >>>  create mode 100644
> >> MdeModulePkg/Include/Guid/CapsuleResetData.h
> >>>
> >>> diff --git
> >> a/MdeModulePkg/Include/Guid/CapsuleResetData.h
> >> b/MdeModulePkg/Include/Guid/CapsuleResetData.h
> >>> new file mode 100644
> >>> index 00..b0666a0da2
> >>> --- /dev/null
> >>> +++ b/MdeModulePkg/Include/Guid/CapsuleResetData.h
> >>> @@ -0,0 +1,40 @@
> >>> +/** @file
> >>> +  The capsule reset data difinition and guids.
> >>> +
> >>> +  Copyright (c) 2019, Intel Corporation. All rights
> >> reserved.
> >>> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> >>> +
> >>> +**/
> >>> +#ifndef __CAPSULE_RESET_DATA_H__
> >>> +#define __CAPSULE_RESET_DATA_H__
> >>> +
> >>> +#include 
> >>> +
> >>> +//
> >>> +// reset data started with a null string and followed
> >> by a guid data
> >>> +//
> >>> +#pragma pack(1)
> >>> +typedef struct {
> >>> +  CHAR16  NullString;
> >>> +  EFI_GUIDResetGuid;
> >>> +} RESET_DATA_WITH_NULL_STRING;
> >>> +#pragma pack()
> >>> +
> >>> +VERIFY_SIZE_OF (RESET_DATA_WITH_NULL_STRING, 18);
> >>
> >> I think that exposing RESET_DA

[edk2-devel] [PATCH V2 3/6] MdeModulePkg/CapsuleLib: Transfer reset data

2019-05-07 Thread Gao, Zhichao
From: Bret Barkelew 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1772

Transfer reset data start with a null sting and followed by
gEdkiiCapsuleUpdateCompleteResetGuid for capsule update.

Cc: Jian J Wang 
Cc: Hao Wu 
Cc: Ray Ni 
Cc: Star Zeng 
Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Michael Turner 
Cc: Bret Barkelew 
Signed-off-by: Zhichao Gao 
---
 .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf   |  4 +++-
 .../Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c  | 12 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf 
b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
index 14c3d19bc3..0ad9b2827b 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf
@@ -3,7 +3,7 @@
 #
 #  Capsule library instance for DXE_DRIVER module types.
 #
-#  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+#  Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -47,6 +47,7 @@
   HobLib
   BmpSupportLib
   DisplayUpdateProgressLib
+  ResetSystemLib
 
 [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleMax   
## CONSUMES
@@ -74,6 +75,7 @@
   gEfiCapsuleReportGuid
   gEfiCapsuleVendorGuid   ## SOMETIMES_CONSUMES ## 
Variable:L"CapsuleUpdateData"
   gEfiEndOfDxeEventGroupGuid  ## CONSUMES ## Event
+  gEdkiiCapsuleUpdateCompleteResetGuid## SOMETIMES_CONSUMES
 
 [Depex]
   gEfiVariableWriteArchProtocolGuid
diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c 
b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
index 5e2d2b87a8..5fb3a9af32 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c
@@ -9,7 +9,7 @@
   ProcessCapsules(), ProcessTheseCapsules() will receive untrusted
   input and do basic validation.
 
-  Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -514,11 +515,18 @@ DoResetSystem (
   VOID
   )
 {
+  RESET_DATA_WITH_NULL_STRING   ResetData;
+
   DEBUG((DEBUG_INFO, "Capsule Request Cold Reboot."));
 
   REPORT_STATUS_CODE(EFI_PROGRESS_CODE, (EFI_SOFTWARE | 
PcdGet32(PcdStatusCodeSubClassCapsule) | 
PcdGet32(PcdCapsuleStatusCodeResettingSystem)));
 
-  gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
+  ResetData.NullString = CHAR_NULL;
+  CopyGuid (
+(GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_DATA_WITH_NULL_STRING, 
ResetGuid)),
+&gEdkiiCapsuleUpdateCompleteResetGuid
+);
+  gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, sizeof 
(RESET_DATA_WITH_NULL_STRING), &ResetData);
 
   CpuDeadLoop();
 }
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40173): https://edk2.groups.io/g/devel/message/40173
Mute This Topic: https://groups.io/mt/31540324/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH V2 1/6] MdeModulePkg/ResetSystemLib.h: Add useful reset data definition

2019-05-07 Thread Gao, Zhichao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1772

Add a useful definition of reset data which start with a NULL
string and followed by a EFI_GUID.

Cc: Jian J Wang 
Cc: Hao Wu 
Cc: Ray Ni 
Cc: Star Zeng 
Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Michael Turner 
Cc: Bret Barkelew 
Cc: Laszlo Ersek 
Signed-off-by: Zhichao Gao 
---
 MdeModulePkg/Include/Library/ResetSystemLib.h | 9 +
 1 file changed, 9 insertions(+)

diff --git a/MdeModulePkg/Include/Library/ResetSystemLib.h 
b/MdeModulePkg/Include/Library/ResetSystemLib.h
index 3b2a098a60..e39e8c748c 100644
--- a/MdeModulePkg/Include/Library/ResetSystemLib.h
+++ b/MdeModulePkg/Include/Library/ResetSystemLib.h
@@ -13,6 +13,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 
+#pragma pack(1)
+typedef struct {
+  CHAR16  NullString;
+  EFI_GUIDResetGuid;
+} RESET_DATA_WITH_NULL_STRING;
+#pragma pack()
+
+VERIFY_SIZE_OF (RESET_DATA_WITH_NULL_STRING, 18);
+
 /**
   This function causes a system-wide reset (cold reset), in which
   all circuitry within the system returns to its initial state. This type of 
reset
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40171): https://edk2.groups.io/g/devel/message/40171
Mute This Topic: https://groups.io/mt/31540322/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH V2 5/6] MdePkg/UefiRuntimeLib.h: Change the comment

2019-05-07 Thread Gao, Zhichao
Change the comment of EfiResetSystem base on the
UEFI spec 2.8

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Zhichao Gao 
---
 MdePkg/Include/Library/UefiRuntimeLib.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Include/Library/UefiRuntimeLib.h 
b/MdePkg/Include/Library/UefiRuntimeLib.h
index 8f13ca275d..3962347d36 100644
--- a/MdePkg/Include/Library/UefiRuntimeLib.h
+++ b/MdePkg/Include/Library/UefiRuntimeLib.h
@@ -321,10 +321,10 @@ EfiGetNextHighMonotonicCount (
   @param  DataSizeThe size, in bytes, of ResetData.
   @param  ResetData   For a ResetType of EfiResetCold, EfiResetWarm, or 
EfiResetShutdown the data buffer starts with a
   Null-terminated Unicode string, optionally followed by 
additional binary data. The string is a
-  description that the caller may use to further indicate 
the reason for the system reset. ResetData
-  is only valid if ResetStatus is something other then 
EFI_SUCCESS. This pointer must be a physical
-  address. For a ResetType of EfiResetPlatformSpecific the 
data buffer also starts with a Null-terminated
-  string that is followed by an EFI_GUID that describes 
the specific type of reset to perform.
+  description that the caller may use to further indicate 
the reason for the system reset. This
+  pointer must be a physical address. For a ResetType of 
EfiResetPlatformSpecific the data buffer
+  also starts with a Null-terminated string that is 
followed by an EFI_GUID that describes the
+  specific type of reset to perform.
 **/
 VOID
 EFIAPI
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40175): https://edk2.groups.io/g/devel/message/40175
Mute This Topic: https://groups.io/mt/31540326/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH V2 0/6] MdeModulePkg: Transfer reset data

2019-05-07 Thread Gao, Zhichao
Indicate two guids gCapsuleArmedResetGuid and gCapsuleUpdateCompleteResetGuid
for capsule update. And define a struct which start with a null string and
followed by a EFI_GUID.

V2:
Add prefix Edkii to the new guids.
Move the new struct definition to ResetSystemLib.h.
Fix the wrong reset data to transfer.
Fix the comment of EfiResetSystem in RuntimeLib base on UEFI spec 2.8.

Cc: Jian J Wang 
Cc: Hao Wu 
Cc: Ray Ni 
Cc: Star Zeng 
Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Michael Turner 
Cc: Bret Barkelew 

Bret Barkelew (2):
  MdeModulePkg/CapsuleRuntimeDxe: Transfer reset data
  MdeModulePkg/CapsuleLib: Transfer reset data

Zhichao Gao (4):
  MdeModulePkg/ResetSystemLib.h: Add useful reset data definition
  MdeModulePkg/ResetUtilityLib: Replace the reset data difinition
  MdePkg/UefiRuntimeLib.h: Change the comment
  MdePkg/UefiRuntimeLib: Change the comment

 MdeModulePkg/Include/Library/ResetSystemLib.h |  9 +++
 .../DxeCapsuleLibFmp/DxeCapsuleLib.inf|  4 +++-
 .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c   | 12 --
 .../Library/ResetUtilityLib/ResetUtility.c| 15 +++-
 .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf   |  2 ++
 .../CapsuleRuntimeDxe/CapsuleService.c| 24 ---
 .../CapsuleRuntimeDxe/CapsuleService.h|  3 ++-
 MdePkg/Include/Library/UefiRuntimeLib.h   |  8 +++
 MdePkg/Library/UefiRuntimeLib/RuntimeLib.c|  8 +++
 9 files changed, 52 insertions(+), 33 deletions(-)

-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40170): https://edk2.groups.io/g/devel/message/40170
Mute This Topic: https://groups.io/mt/31540321/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH V2 6/6] MdePkg/UefiRuntimeLib: Change the comment

2019-05-07 Thread Gao, Zhichao
Change the comment of EfiResetSystem base on the
UEFI spec 2.8

Cc: Michael D Kinney 
Cc: Liming Gao 
Signed-off-by: Zhichao Gao 
---
 MdePkg/Library/UefiRuntimeLib/RuntimeLib.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c 
b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
index 933e0099ce..28cbf493b6 100644
--- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
+++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c
@@ -218,10 +218,10 @@ EfiGoneVirtual (
   @param  DataSizeThe size, in bytes, of ResetData.
   @param  ResetData   For a ResetType of EfiResetCold, EfiResetWarm, or 
EfiResetShutdown the data buffer starts with a
   Null-terminated Unicode string, optionally followed by 
additional binary data. The string is a
-  description that the caller may use to further indicate 
the reason for the system reset. ResetData
-  is only valid if ResetStatus is something other then 
EFI_SUCCESS. This pointer must be a physical
-  address. For a ResetType of EfiRestUpdate the data 
buffer also starts with a Null-terminated string
-  that is followed by a physical VOID * to an 
EFI_CAPSULE_HEADER.
+  description that the caller may use to further indicate 
the reason for the system reset. This
+  pointer must be a physical address. For a ResetType of 
EfiResetPlatformSpecific the data buffer
+  also starts with a Null-terminated string that is 
followed by an EFI_GUID that describes the
+  specific type of reset to perform.
 
 **/
 VOID
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40176): https://edk2.groups.io/g/devel/message/40176
Mute This Topic: https://groups.io/mt/31540327/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH V2 4/6] MdeModulePkg/ResetUtilityLib: Replace the reset data difinition

2019-05-07 Thread Gao, Zhichao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1772

Replace the definition of 'RESET_UTILITY_GUID_SPECIFIC_RESET_DATA'
with 'RESET_DATA_WITH_NULL_STRING'.

Cc: Jian J Wang 
Cc: Hao Wu 
Cc: Ray Ni 
Cc: Star Zeng 
Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Michael Turner 
Cc: Bret Barkelew 
Signed-off-by: Zhichao Gao 
---
 .../Library/ResetUtilityLib/ResetUtility.c| 15 +++
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c 
b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
index 2b5af4b95a..1bf8a694fb 100644
--- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
+++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
@@ -13,15 +13,6 @@
 #include 
 #include 
 
-#pragma pack(1)
-typedef struct {
-  CHAR16 NullTerminator;
-  GUID   ResetSubtype;
-} RESET_UTILITY_GUID_SPECIFIC_RESET_DATA;
-#pragma pack()
-
-VERIFY_SIZE_OF (RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, 18);
-
 /**
   This is a shorthand helper function to reset with reset type and a subtype
   so that the caller doesn't have to bother with a function that has half
@@ -46,11 +37,11 @@ ResetSystemWithSubtype (
   IN CONST  GUID*ResetSubtype
   )
 {
-  RESET_UTILITY_GUID_SPECIFIC_RESET_DATA  ResetData;
+  RESET_DATA_WITH_NULL_STRING   ResetData;
 
-  ResetData.NullTerminator = CHAR_NULL;
+  ResetData.NullString = CHAR_NULL;
   CopyGuid (
-(GUID *)((UINT8 *)&ResetData + OFFSET_OF 
(RESET_UTILITY_GUID_SPECIFIC_RESET_DATA, ResetSubtype)),
+(GUID *)((UINT8 *)&ResetData + OFFSET_OF (RESET_DATA_WITH_NULL_STRING, 
ResetGuid)),
 ResetSubtype
 );
 
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40174): https://edk2.groups.io/g/devel/message/40174
Mute This Topic: https://groups.io/mt/31540325/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH V2 2/6] MdeModulePkg/CapsuleRuntimeDxe: Transfer reset data

2019-05-07 Thread Gao, Zhichao
From: Bret Barkelew 

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1772

Transfer reset data start with a null sting and followed by
gEdkiiCapsuleArmedResetGuid for capsule update.

Cc: Jian J Wang 
Cc: Hao Wu 
Cc: Ray Ni 
Cc: Star Zeng 
Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Michael Turner 
Cc: Bret Barkelew 
Signed-off-by: Zhichao Gao 
---
 .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf   |  2 ++
 .../CapsuleRuntimeDxe/CapsuleService.c| 24 ---
 .../CapsuleRuntimeDxe/CapsuleService.h|  3 ++-
 3 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf 
b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
index 338577e293..43d295f5cf 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
@@ -62,6 +62,7 @@
   PrintLib
   BaseMemoryLib
   CacheMaintenanceLib
+  ResetSystemLib
 
 [LibraryClasses.X64]
   UefiLib
@@ -72,6 +73,7 @@
   ## SOMETIMES_PRODUCES   ## Variable:L"CapsuleLongModeBuffer" # The long mode 
buffer used by IA32 Capsule PEIM to call X64 CapsuleCoalesce code to handle 
>4GB capsule blocks
   gEfiCapsuleVendorGuid
   gEfiFmpCapsuleGuid## SOMETIMES_CONSUMES   ## 
GUID # FMP capsule GUID
+  gEdkiiCapsuleArmedResetGuid   ## SOMETIMES_CONSUMES
 
 [Protocols]
   gEfiCapsuleArchProtocolGuid   ## PRODUCES
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c 
b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
index aaf819c4c6..77cfe11e00 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c
@@ -4,7 +4,7 @@
   It installs the Capsule Architectural Protocol defined in PI1.0a to signify
   the capsule runtime services are ready.
 
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -63,13 +63,14 @@ UpdateCapsule (
   IN EFI_PHYSICAL_ADDRESSScatterGatherList OPTIONAL
   )
 {
-  UINTN ArrayNumber;
-  EFI_STATUSStatus;
-  EFI_CAPSULE_HEADER*CapsuleHeader;
-  BOOLEAN   NeedReset;
-  BOOLEAN   InitiateReset;
-  CHAR16CapsuleVarName[30];
-  CHAR16*TempVarName;
+  UINTN ArrayNumber;
+  EFI_STATUSStatus;
+  EFI_CAPSULE_HEADER*CapsuleHeader;
+  BOOLEAN   NeedReset;
+  BOOLEAN   InitiateReset;
+  CHAR16CapsuleVarName[30];
+  CHAR16*TempVarName;
+  RESET_DATA_WITH_NULL_STRING   ResetData;
 
   //
   // Capsule Count can't be less than one.
@@ -210,7 +211,12 @@ UpdateCapsule (
// will initiate a reset of the platform which is compatible with the 
passed-in capsule request and will
// not return back to the caller.
//
-   EfiResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
+   ResetData.NullString = CHAR_NULL;
+   CopyGuid (
+  (GUID *)((UINT8 *)&ResetData + OFFSET_OF 
(RESET_DATA_WITH_NULL_STRING, ResetGuid)),
+  &gEdkiiCapsuleArmedResetGuid
+  );
+   EfiResetSystem (EfiResetWarm, EFI_SUCCESS, sizeof 
(RESET_DATA_WITH_NULL_STRING), &ResetData);
  }
   }
   return Status;
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h 
b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h
index 069df3c750..6790810cf4 100644
--- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h
+++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h
@@ -4,7 +4,7 @@
   It installs the Capsule Architectural Protocol defined in PI1.0a to signify
   the capsule runtime services are ready.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
   Copyright (c) 2018, Linaro, Ltd. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /**
   Create the variable to save the base address of page table and stack
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40172): https://edk2.groups.io/g/devel/message/40172
Mute This Topic: https://groups.io/mt/31540323/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] Python 3.8 compatibility

2019-05-07 Thread Mikhail Terekhov
Fix SyntaxWarning in regular expression on Python 3.8

Signed-off-by: Mikhail Terekhov 
---
 BaseTools/Source/Python/build/build.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index 7271570d29..52e535b4e4 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1228,7 +1228,7 @@ class Build():
 # run
 if Target == 'run':
 RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir, 
GlobalData.gGlobalDefines['ARCH']))
-Command = '.\SecMain'
+Command = '.\\SecMain'
 os.chdir(RunDir)
 LaunchCommand(Command, RunDir)
 return True
@@ -1360,7 +1360,7 @@ class Build():
 # run
 if Target == 'run':
 RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir, 
GlobalData.gGlobalDefines['ARCH']))
-Command = '.\SecMain'
+Command = '.\\SecMain'
 os.chdir(RunDir)
 LaunchCommand(Command, RunDir)
 return True
@@ -1482,7 +1482,7 @@ class Build():
 if self.Fdf:
 # First get the XIP base address for FV map file.
 GuidPattern = re.compile("[-a-fA-F0-9]+")
-GuidName = re.compile("\(GUID=[-a-fA-F0-9]+")
+GuidName = re.compile("[(]GUID=[-a-fA-F0-9]+")
 for FvName in Wa.FdfProfile.FvDict:
 FvMapBuffer = os.path.join(Wa.FvDir, FvName + '.Fv.map')
 if not os.path.exists(FvMapBuffer):
-- 
2.20.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40169): https://edk2.groups.io/g/devel/message/40169
Mute This Topic: https://groups.io/mt/31540277/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch v2 3/3] SecurityPkg/OpalPassword: Fix "Enable Feature" Menu disappear issue.

2019-05-07 Thread Dong, Eric
https://bugzilla.tianocore.org/show_bug.cgi?id=1782

After change behavior to send BlockSid command at EndOfDxe point,
check device ownership command will return un-authority error, it
finally caused opal driver can't show "Enable Feature" menu.

Update the code logic to send detect device ownership command
before send BlockSID command.

Signed-off-by: Eric Dong 
Cc: Hao Wu 
---
 .../Tcg/Opal/OpalPassword/OpalDriver.c| 11 +
 .../Tcg/Opal/OpalPassword/OpalDriver.h|  1 +
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c   | 46 +++
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h   | 15 ++
 4 files changed, 63 insertions(+), 10 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index 009a97f66f..965205c0b2 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -458,6 +458,11 @@ SendBlockSidCommand (
   DEBUG ((DEBUG_ERROR, "OpalBlockSid fail\n"));
   break;
 }
+
+//
+// Record BlockSID command has been sent.
+//
+Itr->OpalDisk.SentBlockSID = TRUE;
   }
 
   Itr = Itr->Next;
@@ -2204,6 +2209,12 @@ ProcessOpalRequest (
 ProcessOpalRequestEnableFeature (Dev, L"Enable Feature:");
   }
 
+  //
+  // Update Device ownership.
+  // Later BlockSID command may block the update.
+  //
+  OpalDiskUpdateOwnerShip (&Dev->OpalDisk);
+
   break;
 }
 
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
index a056e06106..beeabb1c0a 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
@@ -143,6 +143,7 @@ typedef struct {
   UINT8   
Password[OPAL_MAX_PASSWORD_SIZE];
 
   UINT32  EstimateTimeCost;
+  BOOLEAN SentBlockSID;   // 
Check whether BlockSid command has been sent.
 } OPAL_DISK;
 
 //
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
index d0f3eda1e8..f101ca1c20 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
@@ -1215,6 +1215,40 @@ OpalDiskInitialize (
   return OpalDiskUpdateStatus (&Dev->OpalDisk);
 }
 
+/**
+  Update the device ownship
+
+  @param OpalDiskThe Opal device.
+
+  @retval EFI_SUCESS Get ownership success.
+  @retval EFI_ACCESS_DENIED  Has send BlockSID command, can't change 
ownership.
+  @retval EFI_INVALID_PARAMETER  Not get Msid info before get ownership info.
+
+**/
+EFI_STATUS
+OpalDiskUpdateOwnerShip (
+  OPAL_DISK*OpalDisk
+  )
+{

+  OPAL_SESSION  Session;
+
+  if (OpalDisk->MsidLength == 0) {
+return EFI_INVALID_PARAMETER;
+  }
+
+  if (OpalDisk->SentBlockSID) {
+return EFI_ACCESS_DENIED;
+  }
+
+  ZeroMem(&Session, sizeof(Session));
+  Session.Sscp = OpalDisk->Sscp;
+  Session.MediaId = OpalDisk->MediaId;
+  Session.OpalBaseComId = OpalDisk->OpalBaseComId;
+
+  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);

+  return EFI_SUCCESS;
+}
+
 /**
   Update the device info.
 
@@ -1223,6 +1257,7 @@ OpalDiskInitialize (
   @retval EFI_SUCESS Initialize the device success.
   @retval EFI_DEVICE_ERROR   Get info from device failed.
   @retval EFI_INVALID_PARAMETER  Not get Msid info before get ownership info.
+  @retval EFI_ACCESS_DENIED  Has send BlockSID command, can't change 
ownership.
 
 **/
 EFI_STATUS
@@ -1243,15 +1278,6 @@ OpalDiskUpdateStatus (
 return EFI_DEVICE_ERROR;
   }
 
-  if (OpalDisk->MsidLength == 0) {
-return EFI_INVALID_PARAMETER;
-  } else {
-//
-// Base on the Msid info to get the ownership, so Msid info must get first.
-//
-OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);
-  }
-
-  return EFI_SUCCESS;
+  return OpalDiskUpdateOwnerShip (OpalDisk);
 }
 
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
index d3e236e2fe..89c709df99 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
@@ -357,4 +357,19 @@ OpalDiskInitialize (
   IN OPAL_DRIVER_DEVICE  *Dev
   );
 
+/**
+  Update the device ownership
+
+  @param OpalDiskThe Opal device.
+
+  @retval EFI_SUCESS Get ownership success.
+  @retval EFI_ACCESS_DENIED  Has send BlockSID command, can't change 
ownership.
+  @retval EFI_INVALID_PARAMETER  Not get Msid info before get ownership info.
+
+**/
+EFI_STATUS
+OpalDiskUpdateOwnerShip (
+  OPAL_DISK*OpalDisk
+  );
+
 #endif // _HII_H_
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this g

[edk2-devel] [Patch v2 1/3] SecurityPkg/SecurityPkg.dec: Change default value.

2019-05-07 Thread Dong, Eric
https://bugzilla.tianocore.org/show_bug.cgi?id=1782

Change BlockSID default policy, default enable BlockSid.

Signed-off-by: Eric Dong 
Cc: Hao Wu 
---
 SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h | 3 ++-
 SecurityPkg/SecurityPkg.dec   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h 
b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
index d9eee7f3e8..8da3deaf86 100644
--- a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
+++ b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
@@ -51,7 +51,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 // Default value
 //
 #define TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT 
(TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID | \
-   
TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID)
+   
TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID |\
+   
TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID)
 
 /**
   Check and execute the pending TPM request.
diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
index 6e4c4c3a02..3314f1854b 100644
--- a/SecurityPkg/SecurityPkg.dec
+++ b/SecurityPkg/SecurityPkg.dec
@@ -410,7 +410,7 @@
   # PCD can be configured for different settings in different scenarios
   # Default setting is TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT | 
TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT
   # @Prompt Initial setting of TCG2 Persistent Firmware Management Flags
-  
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2PhysicalPresenceFlags|0x300E2|UINT32|0x0001001B
+  
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2PhysicalPresenceFlags|0x700E2|UINT32|0x0001001B
 
   ## Indicate current TPM2 Interrupt Number reported by _CRS control 
method.
   # TPM2 Interrupt feature is disabled If the pcd is set to 0.
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40167): https://edk2.groups.io/g/devel/message/40167
Mute This Topic: https://groups.io/mt/31539610/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch v2 2/3] SecurityPkg/OpalPassword: Change send BlockSID policy.

2019-05-07 Thread Dong, Eric
https://bugzilla.tianocore.org/show_bug.cgi?id=1782

Change Send BlockSID command time from ReadyToBoot to
EndOfDxe.

Signed-off-by: Eric Dong 
Cc: Hao Wu 
---
 .../Tcg/Opal/OpalPassword/OpalDriver.c| 104 --
 1 file changed, 46 insertions(+), 58 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index 42999c89f0..009a97f66f 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -424,6 +424,47 @@ BuildOpalDeviceInfo (
   FreePool (S3InitDevices);
 }
 
+/**
+
+  Send BlockSid command if needed.
+
+**/
+VOID
+SendBlockSidCommand (
+  VOID
+  )
+{
+  OPAL_DRIVER_DEVICE *Itr;
+  TCG_RESULT Result;
+  OPAL_SESSION   Session;
+  UINT32 PpStorageFlag;
+
+  PpStorageFlag = Tcg2PhysicalPresenceLibGetManagementFlags ();
+  if ((PpStorageFlag & TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID) != 
0) {
+//
+// Send BlockSID command to each Opal disk
+//
+Itr = mOpalDriver.DeviceList;
+while (Itr != NULL) {
+  if (Itr->OpalDisk.SupportedAttributes.BlockSid) {
+ZeroMem(&Session, sizeof(Session));
+Session.Sscp = Itr->OpalDisk.Sscp;
+Session.MediaId = Itr->OpalDisk.MediaId;
+Session.OpalBaseComId = Itr->OpalDisk.OpalBaseComId;
+
+DEBUG ((DEBUG_INFO, "OpalPassword: EndOfDxe point, send BlockSid 
command to device!\n"));
+Result = OpalBlockSid (&Session, TRUE);  // HardwareReset must always 
be TRUE
+if (Result != TcgResultSuccess) {
+  DEBUG ((DEBUG_ERROR, "OpalBlockSid fail\n"));
+  break;
+}
+  }
+
+  Itr = Itr->Next;
+}
+  }
+}
+
 /**
   Notification function of EFI_END_OF_DXE_EVENT_GROUP_GUID event group.
 
@@ -475,6 +516,11 @@ OpalEndOfDxeEventNotify (
 TmpDev = TmpDev->Next;
   }
 
+  //
+  // Send BlockSid command if needed.
+  //
+  SendBlockSidCommand ();
+
   DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__));
 
   gBS->CloseEvent (Event);
@@ -2262,53 +2308,6 @@ OpalDriverGetDeviceList(
   return mOpalDriver.DeviceList;
 }
 
-/**
-  ReadyToBoot callback to send BlockSid command.
-
-  @param  Event   Pointer to this event
-  @param  Context Event handler private Data
-
-**/
-VOID
-EFIAPI
-ReadyToBootCallback (
-  IN EFI_EVENTEvent,
-  IN VOID *Context
-  )
-{
-  OPAL_DRIVER_DEVICE *Itr;
-  TCG_RESULT Result;
-  OPAL_SESSION   Session;
-  UINT32 PpStorageFlag;
-
-  gBS->CloseEvent (Event);
-
-  PpStorageFlag = Tcg2PhysicalPresenceLibGetManagementFlags ();
-  if ((PpStorageFlag & TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID) != 
0) {
-//
-// Send BlockSID command to each Opal disk
-//
-Itr = mOpalDriver.DeviceList;
-while (Itr != NULL) {
-  if (Itr->OpalDisk.SupportedAttributes.BlockSid) {
-ZeroMem(&Session, sizeof(Session));
-Session.Sscp = Itr->OpalDisk.Sscp;
-Session.MediaId = Itr->OpalDisk.MediaId;
-Session.OpalBaseComId = Itr->OpalDisk.OpalBaseComId;
-
-DEBUG ((DEBUG_INFO, "OpalPassword: ReadyToBoot point, send BlockSid 
command to device!\n"));
-Result = OpalBlockSid (&Session, TRUE);  // HardwareReset must always 
be TRUE
-if (Result != TcgResultSuccess) {
-  DEBUG ((DEBUG_ERROR, "OpalBlockSid fail\n"));
-  break;
-}
-  }
-
-  Itr = Itr->Next;
-}
-  }
-}
-
 /**
   Stop this Controller.
 
@@ -2571,7 +2570,6 @@ EfiDriverEntryPoint(
   )
 {
   EFI_STATUS Status;
-  EFI_EVENT  ReadyToBootEvent;
   EFI_EVENT  EndOfDxeEvent;
 
   Status = EfiLibInstallDriverBindingComponentName2 (
@@ -2604,16 +2602,6 @@ EfiDriverEntryPoint(
   );
   ASSERT_EFI_ERROR (Status);
 
-  //
-  // register a ReadyToBoot event callback for sending BlockSid command
-  //
-  Status = EfiCreateEventReadyToBootEx (
-  TPL_CALLBACK,
-  ReadyToBootCallback,
-  (VOID *) &ImageHandle,
-  &ReadyToBootEvent
-  );
-
   //
   // Install Hii packages.
   //
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40166): https://edk2.groups.io/g/devel/message/40166
Mute This Topic: https://groups.io/mt/31539609/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch v2 0/3] SecurityPkg/Opal: Change BlockSid policy

2019-05-07 Thread Dong, Eric
This patch serial includes:
1. Change BlockSID default policy, default enable BlockSid.
2. Change SendBlockSID command time from ReadyToBoot to EndOfDxe.
3. Fix "Enable Feature" Menu disappear issue.

V2 change:
1. Include the Bugz link.

Eric Dong (3):
  SecurityPkg/SecurityPkg.dec: Change default value.
  SecurityPkg/OpalPassword: Change send BlockSID policy.
  SecurityPkg/OpalPassword: Fix "Enable Feature" Menu disappear issue.

 .../Include/Library/Tcg2PhysicalPresenceLib.h |   3 +-
 SecurityPkg/SecurityPkg.dec   |   2 +-
 .../Tcg/Opal/OpalPassword/OpalDriver.c| 115 +-
 .../Tcg/Opal/OpalPassword/OpalDriver.h|   1 +
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c   |  46 +--
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h   |  15 +++
 6 files changed, 112 insertions(+), 70 deletions(-)

-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40168): https://edk2.groups.io/g/devel/message/40168
Mute This Topic: https://groups.io/mt/31539611/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [[PATCH v2] 1/7] EmbeddedPkg: Fix DwEmmc driver bugs

2019-05-07 Thread Loh, Tien Hock
Hi Leif,

Sorry for the late reply, I were held up in other areas of the work.

> -Original Message-
> From: Leif Lindholm 
> Sent: Friday, May 3, 2019 7:52 PM
> To: Loh, Tien Hock 
> Cc: devel@edk2.groups.io; thlo...@gmail.com; Ard Biesheuvel
> 
> Subject: Re: [[PATCH v2] 1/7] EmbeddedPkg: Fix DwEmmc driver bugs
> 
> Hi Tien Hock,
> 
> Thanks for splitting the patches back up, and sorry for taking so long to get
> around to reviewing. But could you please add some descriptive subject lines
> back as well?

OK noted. My bad, I thought the content of the commit would suffice.

> 
> Most of my comments on this series are purely coding style related, a couple
> are not.
> 
> On Fri, May 03, 2019 at 11:26:57AM +0800, tien.hock@intel.com wrote:
> > From: "Tien Hock, Loh" 
> >
> > Added ACMD6 for SD support. For SD, after CMD55 is sent, the next
> > command should be an application command, which should not expect
> data
> >
> > Signed-off-by: "Tien Hock, Loh" 
> > Cc: Leif Lindholm 
> > Cc: Ard Biesheuvel 
> > ---
> >  EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 15
> +++
> >  1 file changed, 15 insertions(+)
> >
> > diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
> > b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
> > index adc6b06..fa24802 100644
> > --- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
> > +++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
> > @@ -39,6 +39,7 @@ DWEMMC_IDMAC_DESCRIPTOR   *gpIdmacDesc;
> >  EFI_GUID mDwEmmcDevicePathGuid = EFI_CALLER_ID_GUID;  STATIC
> UINT32
> > mDwEmmcCommand;  STATIC UINT32 mDwEmmcArgument;
> > +STATIC BOOLEAN mIsACmd = FALSE;
> 
> Could we move this variable into DwEmmcSendCommand and drop the 'm'?
OK, so static variable in the function it is.

> 
> >
> >  EFI_STATUS
> >  DwEmmcReadBlockData (
> > @@ -321,6 +322,15 @@ DwEmmcSendCommand (
> >  Cmd = BIT_CMD_RESPONSE_EXPECT |
> BIT_CMD_CHECK_RESPONSE_CRC |
> > BIT_CMD_SEND_INIT;
> >  break;
> > +  case MMC_INDX(6):
> > +if(mIsACmd) {
> > +  Cmd = BIT_CMD_RESPONSE_EXPECT ;
> 
> Drop space before ;.
OK
> 
> > +}
> > +else {
> 
> } else {
> 
> > +  Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_DATA_EXPECTED |
> > +BIT_CMD_READ;
> > +}
> > +break;
> >case MMC_INDX(7):
> >  if (Argument)
> >  Cmd = BIT_CMD_RESPONSE_EXPECT |
> BIT_CMD_CHECK_RESPONSE_CRC;
> > @@ -371,6 +381,11 @@ DwEmmcSendCommand (
> >}
> >
> >Cmd |= MMC_GET_INDX(MmcCmd) | BIT_CMD_USE_HOLD_REG |
> BIT_CMD_START;
> > +
> > +  if(MMC_INDX(55) == MMC_GET_INDX(MmcCmd))
> > +mIsACmd = TRUE;
> > +  else
> > +mIsACmd = FALSE;
> 
>   if () {
>   } else {
>   }
> 
> There should also be spaces between MMC_INDX and (55), as well as
> between MMC_GET_INDX (MmcCmd). Surrounding code does not follow
> the
> style, but I would still prefer to keep to this for new/modified code.
> 
> I also think we should add IsACmd = FALSE to the default: case.
OK, I'll fix this. Thanks for the review.

> 
> /
> Leif
> 
> >if (IsPendingReadCommand (Cmd) || IsPendingWriteCommand (Cmd)) {
> >  mDwEmmcCommand = Cmd;
> >  mDwEmmcArgument = Argument;
> > --
> > 2.2.2
> >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40164): https://edk2.groups.io/g/devel/message/40164
Mute This Topic: https://groups.io/mt/31480077/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms] [patch 1/7] Platform/AMD: Update UefiDecompressLib instance

2019-05-07 Thread Dandan Bi
Hi all,

Thank you for the reminding and guidance.
V2 patch series has been sent out.


Regards,
Dandan

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> Sent: Tuesday, May 7, 2019 8:53 PM
> To: devel@edk2.groups.io; leif.lindh...@linaro.org; Bi, Dandan
> 
> Cc: Ard Biesheuvel ; Kinney, Michael D
> 
> Subject: Re: [edk2-devel] [edk2-platforms] [patch 1/7] Platform/AMD:
> Update UefiDecompressLib instance
> 
> On 05/07/19 13:31, Leif Lindholm wrote:
> > Hi Dandan,
> >
> > Sorry to be a pain, but could you follow the steps in
> > https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt
> > -git-guide-for-edk2-contributors-and-maintainers#contrib-09
> > and then regenerate these patches and send out again?
> >
> > That way, it is obvious from the diff which sections are being
> > modified.
> 
> (
> also needed:
> 
>   git config diff.ini.xfuncname '^\[[A-Za-z0-9_., ]+]'
> 
> from
> 
> https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-
> guide-for-edk2-contributors-and-maintainers#contrib-05
> 
> thanks
> Laszlo
> )
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40163): https://edk2.groups.io/g/devel/message/40163
Mute This Topic: https://groups.io/mt/31507427/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel][edk2-test][PATCH V2] EFI/Protocol: Fix to use VENDOR_DEVICE_PATH to create the Debug port device node for DevicePath related protocol tests.

2019-05-07 Thread Nick Wang
Follow edk2 tree hash: 9343d0a1cd09544686b14dba5b428d7bc811f6b9 to use 
VENDOR_DEVICE_PATH to create the Debug port device node.


Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Nick Wang 
---
.../DevicePathFromTextBBTestCoverage.c | 16 +++-
.../BlackBoxTest/DevicePathToTextBBTestMain.c | 5 +++--
uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h | 15 +++
3 files changed, 25 insertions(+), 11 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c

index 96cd84fd..98187a62 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c

@@ -2,6 +2,7 @@

Copyright 2006 - 2017 Unified EFI, Inc.

Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.

+ Copyright (c) 2019, Insyde Software Corp. All Rights Reserved.


This program and the accompanying materials
are licensed and made available under the terms and conditions of the 
BSD License

@@ -1105,22 +1106,19 @@ CreateSASExDeviceNode (
return (EFI_DEVICE_PATH_PROTOCOL *) SasEx;
}

-#define DebugPortNodeType 3
-#define DebugPortNodeSubType 10
-
STATIC
EFI_DEVICE_PATH_PROTOCOL *
CreateDebugPortDeviceNode (
IN CHAR16 *TextDeviceNode
)
{
- VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend;
+ VENDOR_DEVICE_PATH *Vend;

- Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (
- DebugPortNodeType,
- DebugPortNodeSubType,
- sizeof(VENDOR_DEFINED_MESSAGING_DEVICE_PATH)
- );
+ Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (
+ MESSAGING_DEVICE_PATH,
+ MSG_VENDOR_DP,
+ sizeof(VENDOR_DEVICE_PATH)
+ );
Vend->Guid = gBlackBoxEfiDebugPortProtocolGuid;

return (EFI_DEVICE_PATH_PROTOCOL *) Vend;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c

index d0809776..32ce720d 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c

@@ -2,6 +2,7 @@

Copyright 2006 - 2017 Unified EFI, Inc.

Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.

+ Copyright (c) 2019, Insyde Software Corp. All Rights Reserved.


This program and the accompanying materials
are licensed and made available under the terms and conditions of the 
BSD License

@@ -1708,9 +1709,9 @@ BuildDebugPortDeviceNode (
IN CHAR16 *TextDeviceNode
)
{
- VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend;
+ VENDOR_DEVICE_PATH *Vend;

- Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (0x3, 
0x0a, sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH));
+ Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (MESSAGING_DEVICE_PATH, 
MSG_VENDOR_DP, sizeof (VENDOR_DEVICE_PATH));


Vend->Guid = gBlackBoxEfiDebugPortProtocolGuid;

diff --git a/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h 
b/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h

index f69dc761..8bce7f14 100644
--- a/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h
+++ b/uefi-sct/SctPkg/UEFI/Protocol/DevicePath.h
@@ -2,6 +2,7 @@

Copyright 2006 - 2017 Unified EFI, Inc.

Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.

+ Copyright (c) 2019, Insyde Software Corp. All Rights Reserved.


This program and the accompanying materials
are licensed and made available under the terms and conditions of the 
BSD License

@@ -502,6 +503,14 @@ typedef struct {
//
} ACPI_ADR_DEVICE_PATH;

+
+///
+/// Messaging Device Paths.
+/// This Device Path is used to describe the connection of devices 
outside the resource domain of the
+/// system. This Device Path can describe physical messaging 
information like SCSI ID, or abstract

+/// information like networking protocol IP addresses.
+///
+#define MESSAGING_DEVICE_PATH 0x03
///
/// SCSI Device Path SubType.
///
@@ -662,6 +671,12 @@ typedef struct {
UINT8 Lun;
} DEVICE_LOGICAL_UNIT_DEVICE_PATH;

+//
+// Use VENDOR_DEVICE_PATH struct
+//
+#define MSG_VENDOR_DP 0x0a
+typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;
+
///
/// CD-ROM Media Device Path SubType.
///
--
2.19.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40162): https://edk2.groups.io/g/devel/message/40162
Mute This Topic: https://groups.io/mt/31539240/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH V2] BaseTools:improve code to support C files with .C suffixes

2019-05-07 Thread Andrew Fish via Groups.Io


> On May 7, 2019, at 7:40 AM, Leif Lindholm  wrote:
> 
> Hi Fan Zhiju,
> 
> But where does the string come from that contains a .C suffix?
> Is the tool internally converting things to uppercase, or is some
> source file in the build incorrectly named?
> 

Leif,

Our build system defines .C as correct! I think it has been that way a very 
long time. 

https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/build_rule.template#L109

[C-Code-File]

?.c
?.C
?.cc
?.CC
?.cpp
?.Cpp
?.CPP

Thanks,

Andrew Fish


> I am asking because it is not clear to me whether the patch resolves a
> problem or hides one.
> 
> Best Regards,
> 
> Leif
> 
> On Tue, May 07, 2019 at 03:05:02AM +, Fan, ZhijuX wrote:
>> This problem has nothing to do with the file system, We just use the
>> filename as a string to compare with other strings
>> Our unittest tested minplatform, Ovmf. This problem was found when
>> building a platform inside Intel.
>> We've tested it on Linux and Windows.
>> 
>> Any question, please let me know. Thanks.
>> 
>> Best Regards
>> Fan Zhiju
>> 
>> -Original Message-
>> From: af...@apple.com [mailto:af...@apple.com] 
>> Sent: Tuesday, May 7, 2019 10:31 AM
>> To: devel@edk2.groups.io; Fan, ZhijuX 
>> Cc: Gao, Liming ; Feng, Bob C 
>> Subject: Re: [edk2-devel] [PATCH V2] BaseTools:improve code to support C 
>> files with .C suffixes
>> 
>> This brings up a question? Do we tests on a file system that is case 
>> sensitive? Is this just lack of a test case?
>> 
>> Thanks,
>> 
>> Andrew Fish
>> 
>>> On May 6, 2019, at 7:22 PM, Fan, ZhijuX  wrote:
>>> 
>>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1773
>>> 
>>> Build break if C file suffixes of named .C instead of .c Code not 
>>> recognize filenames with .C suffixes.
>>> 
>>> This patch adds code to Support both .c file and .C file
>>> 
>>> Cc: Bob Feng 
>>> Cc: Liming Gao 
>>> Signed-off-by: Zhiju.Fan 
>>> ---
>>> BaseTools/Source/Python/AutoGen/GenMake.py | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>> 
>>> diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py 
>>> b/BaseTools/Source/Python/AutoGen/GenMake.py
>>> index 0e0f9fd9b0..858ddedf8e 100644
>>> --- a/BaseTools/Source/Python/AutoGen/GenMake.py
>>> +++ b/BaseTools/Source/Python/AutoGen/GenMake.py
>>> @@ -1035,7 +1035,8 @@ cleanlib:
>>>CmdTargetDict[CmdSign] = "%s %s" % 
>>> (CmdTargetDict[CmdSign], SingleCommandList[-1])
>>>Index = CommandList.index(Item)
>>>CommandList.pop(Index)
>>> -if SingleCommandList[-1].endswith("%s%s.c" % 
>>> (TAB_SLASH, CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])):
>>> +if SingleCommandList[-1].endswith("%s%s.c" % 
>>> (TAB_SLASH, CmdSumDict[T.Target.SubDir])) or \
>>> +SingleCommandList[-1].endswith("%s%s.C" % 
>>> (TAB_SLASH, CmdSumDict[T.Target.SubDir])):
>>>Cpplist = CmdCppDict[T.Target.SubDir]
>>>Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' % 
>>> list(self.ObjTargetDict.keys()).index(T.Target.SubDir))
>>>T.Commands[Index] = '%s\n\t%s' % (' 
>>> \\\n\t'.join(Cpplist), CmdTargetDict[CmdSign])
>>> --
>>> 2.14.1.windows.1
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> 
>> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40161): https://edk2.groups.io/g/devel/message/40161
Mute This Topic: https://groups.io/mt/31539232/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [patch v2 7/7] Platform: Remove TIANOCOMPRESSED rule

2019-05-07 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

TIANOCOMPRESSED rule in fdf is not used, so remove it.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi 
---
 Platform/ARM/SgiPkg/SgiPlatform.fdf  | 9 -
 Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 9 -
 .../Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf  | 9 -
 3 files changed, 27 deletions(-)

diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf 
b/Platform/ARM/SgiPkg/SgiPlatform.fdf
index 3d450a8e28..b163dab5c3 100644
--- a/Platform/ARM/SgiPkg/SgiPlatform.fdf
+++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf
@@ -292,19 +292,10 @@ [Rule.Common.PEIM]
  PEI_DEPEX PEI_DEPEX Optional   $(INF_OUTPUT)/$(MODULE_NAME).depex
  TE  TE Align = Auto$(INF_OUTPUT)/$(MODULE_NAME).efi
  UI  STRING="$(MODULE_NAME)" Optional
   }
 
-[Rule.Common.PEIM.TIANOCOMPRESSED]
-  FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
-PEI_DEPEX PEI_DEPEX Optional$(INF_OUTPUT)/$(MODULE_NAME).depex
-GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
-  PE32  PE32$(INF_OUTPUT)/$(MODULE_NAME).efi
-  UISTRING="$(MODULE_NAME)" Optional
-}
-  }
-
 [Rule.Common.DXE_CORE]
   FILE DXE_CORE = $(NAMED_GUID) {
 PE32 PE32   $(INF_OUTPUT)/$(MODULE_NAME).efi
 UI   STRING="$(MODULE_NAME)" Optional
   }
diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf 
b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
index e6b42fc202..5309a77c1a 100644
--- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
+++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf
@@ -440,19 +440,10 @@ [Rule.Common.PEIM]
  PEI_DEPEX PEI_DEPEX Optional   $(INF_OUTPUT)/$(MODULE_NAME).depex
  TE  TE Align = Auto$(INF_OUTPUT)/$(MODULE_NAME).efi
  UI  STRING="$(MODULE_NAME)" Optional
   }
 
-[Rule.Common.PEIM.TIANOCOMPRESSED]
-  FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
-PEI_DEPEX PEI_DEPEX Optional$(INF_OUTPUT)/$(MODULE_NAME).depex
-GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
-  PE32  PE32$(INF_OUTPUT)/$(MODULE_NAME).efi
-  UISTRING="$(MODULE_NAME)" Optional
-}
-  }
-
 [Rule.Common.DXE_CORE]
   FILE DXE_CORE = $(NAMED_GUID) {
 PE32 PE32   $(INF_OUTPUT)/$(MODULE_NAME).efi
 UI   STRING="$(MODULE_NAME)" Optional
   }
diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf 
b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
index 3f47781fe9..1e07f579a8 100644
--- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
+++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf
@@ -390,19 +390,10 @@ [Rule.Common.PEIM]
  PEI_DEPEX PEI_DEPEX Optional   $(INF_OUTPUT)/$(MODULE_NAME).depex
  TE  TE Align = Auto$(INF_OUTPUT)/$(MODULE_NAME).efi
  UI  STRING="$(MODULE_NAME)" Optional
   }
 
-[Rule.Common.PEIM.TIANOCOMPRESSED]
-  FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
-PEI_DEPEX PEI_DEPEX Optional$(INF_OUTPUT)/$(MODULE_NAME).depex
-GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
-  PE32  PE32$(INF_OUTPUT)/$(MODULE_NAME).efi
-  UISTRING="$(MODULE_NAME)" Optional
-}
-  }
-
 [Rule.Common.DXE_CORE]
   FILE DXE_CORE = $(NAMED_GUID) {
 PE32 PE32   $(INF_OUTPUT)/$(MODULE_NAME).efi
 UI   STRING="$(MODULE_NAME)" Optional
   }
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40160): https://edk2.groups.io/g/devel/message/40160
Mute This Topic: https://groups.io/mt/31539227/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [patch v2 2/7] Platform/LeMaker: Update UefiDecompressLib instance

2019-05-07 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

BaseUefiDecompressLib in MdePkg is the
base UEFI decompress Library.
BaseUefiTianoCustomDecompressLib in MdeModulePkg
implements the base UEFI decompress functionality and
Tiano decompress functionality.

1. TIANOCOMPRESSED rule in fdf is not used, so remove it.
2. Platform doesn't use the TianoCompress, so do
not have to use BaseUefiTianoCustomDecompressLib,
can use the BaseUefiDecompressLib in MdePkg directly.
3. A common UefiDecompressLib resolution can apply to
all module types now. So keep the common one in
[LibraryClasses.common] section and remove all others.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi 
---
 Platform/LeMaker/CelloBoard/CelloBoard.dsc | 5 -
 Platform/LeMaker/CelloBoard/CelloBoard.fdf | 9 -
 2 files changed, 14 deletions(-)

diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc 
b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
index c26d38226c..bc2f3e2076 100644
--- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc
+++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc
@@ -170,11 +170,10 @@ [LibraryClasses.common.PEI_CORE]
   PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
 
   
PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
 
 [LibraryClasses.common.PEIM]
@@ -185,22 +184,20 @@ [LibraryClasses.common.PEIM]
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   
PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
 
   
PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
 
 [LibraryClasses.common.DXE_CORE]
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
   
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
@@ -216,19 +213,17 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
 !if $(TARGET) != RELEASE
   
DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
 !endif
 
 [LibraryClasses.common.UEFI_APPLICATION]
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
 [LibraryClasses.ARM]
diff --git a/Platform/LeMaker/CelloBoard/Cell

[edk2-devel] [edk2-platforms] [patch v2 0/7] Update UefiDecompressLib instance

2019-05-07 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

BaseUefiDecompressLib in MdePkg is the
base UEFI decompress Library.
BaseUefiTianoCustomDecompressLib in MdeModulePkg
implements the base UEFI decompress functionality and
Tiano decompress functionality.

1. TIANOCOMPRESSED rule in OverdriveBoard.fdf
is not used, so remove it.
2. Platform doesn't use the TianoCompress, so do
not have to use BaseUefiTianoCustomDecompressLib,
can use the BaseUefiDecompressLib in MdePkg directly.
3. A common UefiDecompressLib resolution can apply to
all module types now. So keep the common one in
[LibraryClasses.common] section and remove all others.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 

Dandan Bi (7):
  Platform/AMD: Update UefiDecompressLib instance
  Platform/LeMaker: Update UefiDecompressLib instance
  Platform/RPi3: Update UefiDecompressLib instance
  Platform/SoftIron: Update UefiDecompressLib instance
  Silicon/Hisilicon: Update UefiDecompressLib instance
  Silicon/Armada7k8k: Remove TIANOCOMPRESSED rule
  Platform: Remove TIANOCOMPRESSED rule

 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc   | 5 -
 Platform/AMD/OverdriveBoard/OverdriveBoard.fdf   | 9 -
 Platform/ARM/SgiPkg/SgiPlatform.fdf  | 9 -
 Platform/LeMaker/CelloBoard/CelloBoard.dsc   | 5 -
 Platform/LeMaker/CelloBoard/CelloBoard.fdf   | 9 -
 Platform/RaspberryPi/RPi3/RPi3.dsc   | 3 ---
 Platform/RaspberryPi/RPi3/RPi3.fdf   | 9 -
 Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 9 -
 .../Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf  | 9 -
 .../SoftIron/Overdrive1000Board/Overdrive1000Board.dsc   | 5 -
 .../SoftIron/Overdrive1000Board/Overdrive1000Board.fdf   | 9 -
 Silicon/Hisilicon/Hisilicon.dsc.inc  | 5 -
 Silicon/Hisilicon/Hisilicon.fdf.inc  | 9 -
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc| 1 -
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf| 9 -
 15 files changed, 105 deletions(-)

-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40153): https://edk2.groups.io/g/devel/message/40153
Mute This Topic: https://groups.io/mt/31539219/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [patch v2 6/7] Silicon/Armada7k8k: Remove TIANOCOMPRESSED rule

2019-05-07 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

1. TIANOCOMPRESSED rule in fdf is not used, so remove it.
2. The common UefiDecompressLib resolution in
[LibraryClasses.common] section can apply to
all module types. Remove the additional one.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi 
---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 1 -
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf | 9 -
 2 files changed, 10 deletions(-)

diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc 
b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
index 545b369f27..0cf5d8447a 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
@@ -188,11 +188,10 @@ [LibraryClasses.common.PEIM]
 [LibraryClasses.common.DXE_CORE]
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
   
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf 
b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
index 3a320ba64d..8a050ef987 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
@@ -352,19 +352,10 @@ [Rule.Common.PEIM]
  PEI_DEPEX PEI_DEPEX Optional   $(INF_OUTPUT)/$(MODULE_NAME).depex
  TE   TE Align = Auto   $(INF_OUTPUT)/$(MODULE_NAME).efi
  UI   STRING="$(MODULE_NAME)" Optional
   }
 
-[Rule.Common.PEIM.TIANOCOMPRESSED]
-  FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
-PEI_DEPEX PEI_DEPEX Optional$(INF_OUTPUT)/$(MODULE_NAME).depex
-GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
-  PE32  PE32$(INF_OUTPUT)/$(MODULE_NAME).efi
-  UISTRING="$(MODULE_NAME)" Optional
-}
-  }
-
 [Rule.Common.DXE_CORE]
   FILE DXE_CORE = $(NAMED_GUID) {
 PE32 PE32   $(INF_OUTPUT)/$(MODULE_NAME).efi
 UI   STRING="$(MODULE_NAME)" Optional
   }
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40159): https://edk2.groups.io/g/devel/message/40159
Mute This Topic: https://groups.io/mt/31539226/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [patch v2 4/7] Platform/SoftIron: Update UefiDecompressLib instance

2019-05-07 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

BaseUefiDecompressLib in MdePkg is the
base UEFI decompress Library.
BaseUefiTianoCustomDecompressLib in MdeModulePkg
implements the base UEFI decompress functionality and
Tiano decompress functionality.

1. TIANOCOMPRESSED rule in fdf is not used, so remove it.
2. Platform doesn't use the TianoCompress, so do
not have to use BaseUefiTianoCustomDecompressLib,
can use the BaseUefiDecompressLib in MdePkg directly.
3. A common UefiDecompressLib resolution can apply to
all module types now. So keep the common one in
[LibraryClasses.common] section and remove all others.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi 
---
 .../SoftIron/Overdrive1000Board/Overdrive1000Board.dsc   | 5 -
 .../SoftIron/Overdrive1000Board/Overdrive1000Board.fdf   | 9 -
 2 files changed, 14 deletions(-)

diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc 
b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
index 4fbc4201cf..cc4f2facd0 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
@@ -168,11 +168,10 @@ [LibraryClasses.common.PEI_CORE]
   PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
 
   
PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
 
@@ -184,22 +183,20 @@ [LibraryClasses.common.PEIM]
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   
PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
 
   
PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
 
 [LibraryClasses.common.DXE_CORE]
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
   
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
@@ -215,19 +212,17 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
 !if $(TARGET) != RELEASE
   
DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
 !endif
 
 [LibraryClasses.common.UEFI_APPLICATION]
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg

[edk2-devel] [edk2-platforms] [patch v2 5/7] Silicon/Hisilicon: Update UefiDecompressLib instance

2019-05-07 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

BaseUefiDecompressLib in MdePkg is the
base UEFI decompress Library.
BaseUefiTianoCustomDecompressLib in MdeModulePkg
implements the base UEFI decompress functionality and
Tiano decompress functionality.

1. TIANOCOMPRESSED rule in fdf is not used, so remove it.
2. Platform doesn't use the TianoCompress, so do
not have to use BaseUefiTianoCustomDecompressLib,
can use the BaseUefiDecompressLib in MdePkg directly.
3. A common UefiDecompressLib resolution can apply to
all module types now. So keep the common one in
[LibraryClasses.common] section and remove all others.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi 
---
 Silicon/Hisilicon/Hisilicon.dsc.inc | 5 -
 Silicon/Hisilicon/Hisilicon.fdf.inc | 9 -
 2 files changed, 14 deletions(-)

diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc 
b/Silicon/Hisilicon/Hisilicon.dsc.inc
index a2ade57451..8a9812b9ed 100644
--- a/Silicon/Hisilicon/Hisilicon.dsc.inc
+++ b/Silicon/Hisilicon/Hisilicon.dsc.inc
@@ -138,11 +138,10 @@ [LibraryClasses.common.PEI_CORE]
   PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
 
   
PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
   PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
   BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
@@ -155,11 +154,10 @@ [LibraryClasses.common.PEIM]
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   
PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
 
   
PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
 
   ## Fixed compile error after upgrade to 14.10
@@ -172,11 +170,10 @@ [LibraryClasses.common.DXE_CORE]
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
   
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
   
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
@@ -184,11 +181,10 @@ [LibraryClasses.common.DXE_DRIVER]
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
 [LibraryClasses.common.UEFI_APPLICATION]
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
@@ -196,11 +192,10 @@ 
[LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeR

[edk2-devel] [edk2-platforms] [patch v2 3/7] Platform/RPi3: Update UefiDecompressLib instance

2019-05-07 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

BaseUefiDecompressLib in MdePkg is the
base UEFI decompress Library.
BaseUefiTianoCustomDecompressLib in MdeModulePkg
implements the base UEFI decompress functionality and
Tiano decompress functionality.

1. TIANOCOMPRESSED rule in fdf is not used, so remove it.
2. Platform doesn't use the TianoCompress, so do
not have to use BaseUefiTianoCustomDecompressLib,
can use the BaseUefiDecompressLib in MdePkg directly.
3. A common UefiDecompressLib resolution can apply to
all module types now. So keep the common one in
[LibraryClasses.common] section and remove all others.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi 
---
 Platform/RaspberryPi/RPi3/RPi3.dsc | 3 ---
 Platform/RaspberryPi/RPi3/RPi3.fdf | 9 -
 2 files changed, 12 deletions(-)

diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc 
b/Platform/RaspberryPi/RPi3/RPi3.dsc
index f1143b1471..dcdfa10290 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -178,31 +178,28 @@ [LibraryClasses.common.DXE_CORE]
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
   
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
 [LibraryClasses.common.UEFI_APPLICATION]
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
 [LibraryClasses.common.DXE_RUNTIME_DRIVER]
diff --git a/Platform/RaspberryPi/RPi3/RPi3.fdf 
b/Platform/RaspberryPi/RPi3/RPi3.fdf
index 22813d453c..85f2187545 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.fdf
+++ b/Platform/RaspberryPi/RPi3/RPi3.fdf
@@ -386,19 +386,10 @@ [Rule.Common.PEIM]
  PEI_DEPEX PEI_DEPEX Optional   $(INF_OUTPUT)/$(MODULE_NAME).depex
  TE   TE Align = Auto   $(INF_OUTPUT)/$(MODULE_NAME).efi
  UI   STRING="$(MODULE_NAME)" Optional
   }
 
-[Rule.Common.PEIM.TIANOCOMPRESSED]
-  FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
-PEI_DEPEX PEI_DEPEX Optional$(INF_OUTPUT)/$(MODULE_NAME).depex
-GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
-  PE32  PE32$(INF_OUTPUT)/$(MODULE_NAME).efi
-  UISTRING="$(MODULE_NAME)" Optional
-}
-  }
-
 [Rule.Common.DXE_CORE]
   FILE DXE_CORE = $(NAMED_GUID) {
 PE32 PE32   $(INF_OUTPUT)/$(MODULE_NAME).efi
 UI   STRING="$(MODULE_NAME)" Optional
   }
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40156): https://edk2.groups.io/g/devel/message/40156
Mute This Topic: https://groups.io/mt/31539222/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms] [patch v2 1/7] Platform/AMD: Update UefiDecompressLib instance

2019-05-07 Thread Dandan Bi
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722

BaseUefiDecompressLib in MdePkg is the
base UEFI decompress Library.
BaseUefiTianoCustomDecompressLib in MdeModulePkg
implements the base UEFI decompress functionality and
Tiano decompress functionality.

1. TIANOCOMPRESSED rule in OverdriveBoard.fdf
is not used, so remove it.
2. Platform doesn't use the TianoCompress, so do
not have to use BaseUefiTianoCustomDecompressLib,
can use the BaseUefiDecompressLib in MdePkg directly.
3. A common UefiDecompressLib resolution can apply to
all module types now. So keep the common one in
[LibraryClasses.common] section and remove all others.

Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi 
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 5 -
 Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 9 -
 2 files changed, 14 deletions(-)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 616553172b..39b5dad154 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -186,11 +186,10 @@ [LibraryClasses.common.PEI_CORE]
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
   
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
   PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
 
   
PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
 
 [LibraryClasses.common.PEIM]
@@ -199,21 +198,19 @@ [LibraryClasses.common.PEIM]
   
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
   PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
   PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
   
PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
 
   
PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
 
 [LibraryClasses.common.DXE_CORE]
   HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
   
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
   DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
-  
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
   
PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
 
 [LibraryClasses.common.DXE_DRIVER]
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
@@ -227,17 +224,15 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER]
 !if $(TARGET) != RELEASE
   
DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
 !endif
 
 [LibraryClasses.common.UEFI_APPLICATION]
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
-  
UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
   PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
 
 [LibraryClasses.ARM]
diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf 
b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
index a058665bcc..2aaf83084e 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf
@@ -416,19 +416,10 @@ [Rule.Common.PEIM.Binary]
  PEI_DEPEX PEI_DEPEX Optional   |.depex
  TE   TE Align = Auto   |.efi
  UI   STRING="$(MODULE_NAME)" Optional
   }
 
-[Rule.Commo

Re: FW: [edk2-devel] [PATCH V2] BaseTools:improve code to support C files with .C suffixes

2019-05-07 Thread Fan, ZhijuX
Hi Leif,

In AutoGen\GenMake.py.   It's around line 917
if File.Ext not in [".c", ".C"] or File.Name == "AutoGen.c"
there is similar code to check the .C file.
The 'File' above refers to the source File.Some source files are named.C


Any question, please let me know. Thanks.

Best Regards
Fan Zhiju



> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Leif Lindholm
> Sent: Tuesday, May 7, 2019 10:40 PM
> To: devel@edk2.groups.io; Fan, ZhijuX 
> Cc: af...@apple.com; Gao, Liming ; Feng, Bob C
> 
> Subject: Re: FW: [edk2-devel] [PATCH V2] BaseTools:improve code to
> support C files with .C suffixes
> 
> Hi Fan Zhiju,
> 
> But where does the string come from that contains a .C suffix?
> Is the tool internally converting things to uppercase, or is some source file 
> in
> the build incorrectly named?
> 
> I am asking because it is not clear to me whether the patch resolves a
> problem or hides one.
> 
> Best Regards,
> 
> Leif
> 
> On Tue, May 07, 2019 at 03:05:02AM +, Fan, ZhijuX wrote:
> > This problem has nothing to do with the file system, We just use the
> > filename as a string to compare with other strings Our unittest tested
> > minplatform, Ovmf. This problem was found when building a platform
> > inside Intel.
> > We've tested it on Linux and Windows.
> >
> > Any question, please let me know. Thanks.
> >
> > Best Regards
> > Fan Zhiju
> >
> > -Original Message-
> > From: af...@apple.com [mailto:af...@apple.com]
> > Sent: Tuesday, May 7, 2019 10:31 AM
> > To: devel@edk2.groups.io; Fan, ZhijuX 
> > Cc: Gao, Liming ; Feng, Bob C
> > 
> > Subject: Re: [edk2-devel] [PATCH V2] BaseTools:improve code to support
> > C files with .C suffixes
> >
> > This brings up a question? Do we tests on a file system that is case 
> > sensitive?
> Is this just lack of a test case?
> >
> > Thanks,
> >
> > Andrew Fish
> >
> > > On May 6, 2019, at 7:22 PM, Fan, ZhijuX  wrote:
> > >
> > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1773
> > >
> > > Build break if C file suffixes of named .C instead of .c Code not
> > > recognize filenames with .C suffixes.
> > >
> > > This patch adds code to Support both .c file and .C file
> > >
> > > Cc: Bob Feng 
> > > Cc: Liming Gao 
> > > Signed-off-by: Zhiju.Fan 
> > > ---
> > > BaseTools/Source/Python/AutoGen/GenMake.py | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py
> > > b/BaseTools/Source/Python/AutoGen/GenMake.py
> > > index 0e0f9fd9b0..858ddedf8e 100644
> > > --- a/BaseTools/Source/Python/AutoGen/GenMake.py
> > > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py
> > > @@ -1035,7 +1035,8 @@ cleanlib:
> > > CmdTargetDict[CmdSign] = "%s %s" %
> (CmdTargetDict[CmdSign], SingleCommandList[-1])
> > > Index = CommandList.index(Item)
> > > CommandList.pop(Index)
> > > -if SingleCommandList[-1].endswith("%s%s.c" % 
> > > (TAB_SLASH,
> CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])):
> > > +if SingleCommandList[-1].endswith("%s%s.c" % 
> > > (TAB_SLASH,
> CmdSumDict[T.Target.SubDir])) or \
> > > +SingleCommandList[-1].endswith("%s%s.C" %
> (TAB_SLASH, CmdSumDict[T.Target.SubDir])):
> > > Cpplist = CmdCppDict[T.Target.SubDir]
> > > Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' 
> > > %
> list(self.ObjTargetDict.keys()).index(T.Target.SubDir))
> > > T.Commands[Index] = '%s\n\t%s' % ('
> > > \\\n\t'.join(Cpplist), CmdTargetDict[CmdSign])
> > > --
> > > 2.14.1.windows.1
> > >
> > >
> > >
> > >
> > > 
> >
> >
> >
> >
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40152): https://edk2.groups.io/g/devel/message/40152
Mute This Topic: https://groups.io/mt/31528253/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] SecurityPkg/OpalPassword: Add warning message for Secure Erase

2019-05-07 Thread Dong, Eric
Hi Maggie,

Reviewed-by: Eric Dong 

And pushed.

SHA-1: f5245a1db144be95046deaed71a99b64362595b6

* SecurityPkg/OpalPassword: Add warning message for Secure Erase

https://bugzilla.tianocore.org/show_bug.cgi?id=1753
Add pop-up warning messages before secure erase action.
In order to notify user the secure erase action will take a longer time.
This change also fix some pop-up windows are unable to show up
complete message due to some strings are too long.

Signed-off-by: Maggie Chu 
Cc: Chao Zhang 
Cc: Jiewen Yao 
Reviewed-by: Eric Dong 

Thanks,
Eric
> -Original Message-
> From: Chu, Maggie
> Sent: Tuesday, May 7, 2019 2:20 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Chao B ; Yao, Jiewen
> ; Dong, Eric 
> Subject: [PATCH] SecurityPkg/OpalPassword: Add warning message for
> Secure Erase
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1753
> Add pop-up warning messages before secure erase action.
> In order to notify user the secure erase action will take a longer time.
> This change also fix some pop-up windows are unable to show up complete
> message due to some strings are too long.
> 
> Signed-off-by: Maggie Chu 
> Cc: Chao Zhang 
> Cc: Jiewen Yao 
> Cc: Eric Dong 
> ---
>  SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 131
> ++---
>  SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c|  23 +++--
>  2 files changed, 112 insertions(+), 42 deletions(-)
> 
> diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> index ed7f968255..42999c89f0 100644
> --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> @@ -487,6 +487,7 @@ OpalEndOfDxeEventNotify (
>  OPAL request.
>@param[in]  PopUpString   Pop up string.
>@param[in]  PopUpString2  Pop up string in line 2.
> +  @param[in]  PopUpString3  Pop up string in line 3.
> 
>@param[out] PressEsc  Whether user escape function through Press ESC.
> 
> @@ -498,6 +499,7 @@ OpalDriverPopUpPsidInput (
>IN OPAL_DRIVER_DEVICE *Dev,
>IN CHAR16 *PopUpString,
>IN CHAR16 *PopUpString2,
> +  IN CHAR16 *PopUpString3,
>OUT BOOLEAN   *PressEsc
>)
>  {
> @@ -527,15 +529,28 @@ OpalDriverPopUpPsidInput (
>  NULL
>);
>  } else {
> -  CreatePopUp (
> -EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> -&InputKey,
> -PopUpString,
> -PopUpString2,
> -L"-",
> -Mask,
> -NULL
> -  );
> +  if (PopUpString3 == NULL) {
> +CreatePopUp (
> +  EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> +  &InputKey,
> +  PopUpString,
> +  PopUpString2,
> +  L"-",
> +  Mask,
> +  NULL
> +);
> +  } else {
> +CreatePopUp (
> +  EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> +  &InputKey,
> +  PopUpString,
> +  PopUpString2,
> +  PopUpString3,
> +  L"-",
> +  Mask,
> +  NULL
> +);
> +  }
>  }
> 
>  //
> @@ -625,6 +640,7 @@ OpalDriverPopUpPsidInput (
>  process OPAL request.
>@param[in]  PopUpString1  Pop up string 1.
>@param[in]  PopUpString2  Pop up string 2.
> +  @param[in]  PopUpString3  Pop up string 3.
>@param[out] PressEsc  Whether user escape function through Press ESC.
> 
>@retval Password string if success. NULL if failed.
> @@ -635,6 +651,7 @@ OpalDriverPopUpPasswordInput (
>IN OPAL_DRIVER_DEVICE *Dev,
>IN CHAR16 *PopUpString1,
>IN CHAR16 *PopUpString2,
> +  IN CHAR16 *PopUpString3,
>OUT BOOLEAN   *PressEsc
>)
>  {
> @@ -664,15 +681,28 @@ OpalDriverPopUpPasswordInput (
>  NULL
>);
>  } else {
> -  CreatePopUp (
> -EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> -&InputKey,
> -PopUpString1,
> -PopUpString2,
> -L"-",
> -Mask,
> -NULL
> -  );
> +  if (PopUpString3 == NULL) {
> +CreatePopUp (
> +  EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> +  &InputKey,
> +  PopUpString1,
> +  PopUpString2,
> +  L"-",
> +  Mask,
> +  NULL
> +);
> +  } else {
> +CreatePopUp (
> +  EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> +  &InputKey,
> +  PopUpString1,
> +  PopUpString2,
> +  PopUpString3,
> +  L"-",
> +  Mask,
> +  NULL
> +);
> +  }
>  }
> 
>  //
> @@ -823,7 +853,7 @@ OpalDriverRequestPassword (
>  }
> 
>  while (Count < MAX_PASSWORD_TRY_COUNT) {
> -  Password = OpalDriverPopUpPasswordInput (Dev, PopUpString, NULL,
> &PressEsc);
> +  Pa

Re: [edk2-devel][edk2-test][PATCH] EFI/Protocol: Fix to use VENDOR_DEVICE_PATH to create the Debug port device node for DevicePath related protocol tests.

2019-05-07 Thread Eric Jin
Hi Nick,

Thank you for the patch.
Comments (same as Supreeth) as below.

1. Please add your email . E.g:   Signed-off-by: Nick Wang 

2. replace 0x03 and 0x0a with meaningful macros. The macro can be defined in 
SctPkg/UEFI/Protocol/DevicePath.h

Best Regards
Eric

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Supreeth 
Venkatesh
Sent: Tuesday, May 7, 2019 12:42 AM
To: devel@edk2.groups.io; nick.w...@insyde.com
Cc: @intel.com >> Jin ; 
Jin, Eric ; Li, Ruth ; 
leon.c...@insyde.com; sunny@insyde.com >> sunny hsu 
Subject: Re: [edk2-devel][edk2-test][PATCH] EFI/Protocol: Fix to use 
VENDOR_DEVICE_PATH to create the Debug port device node for DevicePath related 
protocol tests.

Hi Nick,
Thanks for the patch.

On Sun, 2019-05-05 at 22:10 -0500,  via Groups.Io wrote:
> Follow edk2 tree hash: 9343d0a1cd09544686b14dba5b428d7bc811f6b9 to use 
> VENDOR_DEVICE_PATH to create the Debug port device node.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Nick Wang
Please add your email E.g., Signed-off-by: Name 

> ---
> .../BlackBoxTest/DevicePathFromTextBBTestCoverage.c | 13 +++-
> -
> .../BlackBoxTest/DevicePathToTextBBTestMain.c | 5 +++--
> 2 files changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest
> /DevicePathFromTextBBTestCoverage.c b/uefi- 
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest
> /DevicePathFromTextBBTestCoverage.c
> index 96cd84fd..56128f2a 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest
> /DevicePathFromTextBBTestCoverage.c
> +++ b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest
> /DevicePathFromTextBBTestCoverage.c
> @@ -2,6 +2,7 @@
> 
> Copyright 2006 - 2017 Unified EFI, Inc.
> 
> Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> 
> + Copyright (c) 2019, Insyde Software Corp. All Rights Reserved.
> 
> 
> This program and the accompanying materials are licensed and made 
> available under the terms and conditions of the BSD License @@ 
> -1114,13 +1115,13 @@ CreateDebugPortDeviceNode ( IN CHAR16 
> *TextDeviceNode
> )
> {
> - VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend;
> + VENDOR_DEVICE_PATH *Vend;
> 
> - Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode (
> - DebugPortNodeType,
> - DebugPortNodeSubType,
> - sizeof(VENDOR_DEFINED_MESSAGING_DEVICE_PATH)
> - );
> + Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode ( DebugPortNodeType, 
> + DebugPortNodeSubType,
> + sizeof(VENDOR_DEVICE_PATH)
> + );
> Vend->Guid = gBlackBoxEfiDebugPortProtocolGuid;
> 
> return (EFI_DEVICE_PATH_PROTOCOL *) Vend; diff --git a/uefi- 
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/D
> evicePathToTextBBTestMain.c b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/D
> evicePathToTextBBTestMain.c
> index d0809776..2fe58337 100644
> --- a/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/D
> evicePathToTextBBTestMain.c
> +++ b/uefi-
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/D
> evicePathToTextBBTestMain.c
> @@ -2,6 +2,7 @@
> 
> Copyright 2006 - 2017 Unified EFI, Inc.
> 
> Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
> 
> + Copyright (c) 2019, Insyde Software Corp. All Rights Reserved.
> 
> 
> This program and the accompanying materials are licensed and made 
> available under the terms and conditions of the BSD License @@ -1708,9 
> +1709,9 @@ BuildDebugPortDeviceNode ( IN CHAR16 *TextDeviceNode
> )
> {
> - VENDOR_DEFINED_MESSAGING_DEVICE_PATH *Vend;
> + VENDOR_DEVICE_PATH *Vend;
> 
> - Vend = (VENDOR_DEFINED_MESSAGING_DEVICE_PATH *) CreateDeviceNode 
> (0x3, 0x0a, sizeof (VENDOR_DEFINED_MESSAGING_DEVICE_PATH));
> + Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode (0x3, 0x0a, sizeof
> (VENDOR_DEVICE_PATH));
Can you please define meaningful macros/constants for 0x03 and 0x0a (E.g., 
DebugNodeType, DebugNodeSubType) ?

>  
> 
> Vend->Guid = gBlackBoxEfiDebugPortProtocolGuid;
> 





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40150): https://edk2.groups.io/g/devel/message/40150
Mute This Topic: https://groups.io/mt/31520513/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch v5 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2019-05-07 Thread Liming Gao
Sure. Thanks for your detail review. 

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Laszlo 
> Ersek
> Sent: Wednesday, May 8, 2019 2:38 AM
> To: devel@edk2.groups.io; Gao, Liming 
> Cc: Wu, Jiaxin ; Ye, Ting ; Fu, 
> Siyuan 
> Subject: Re: [edk2-devel] [Patch v5 2/3] NetworkPkg: Add DSC/FDF include 
> segment files to NetworkPkg.
> 
> Hi Liming,
> 
> On 05/07/19 16:27, Liming Gao wrote:
> > This patch provides a set of include segment files for platform owner to
> > easily enable/disable network stack support on their platform.
> >
> > For DSC, there are:
> > - a "NetworkDefines.dsc.inc" for the [Defines] section(s),
> > - a "NetworkLibs.dsc.inc" for the [LibraryClasses*] section(s),
> > - a "NetworkPcds.dsc.inc" for the [Pcds*] section(s),
> > - a "NetworkComponents.dsc.inc" for the [Components*] section(s).
> > For FDF, there is:
> > - a "Network.fdf.inc" for the [Fv*] section(s).
> >
> > These files can be added to the platform DSC/FDF file by using
> >   !include NetworkPkg/xxx
> > where "xxx" is the *.inc file name.
> >
> > A platform DSC file can diverge from the defaults in
> > "NetworkDefines.dsc.inc" by setting the individual DEFINEs before
> > including "NetworkDefines.dsc.inc".
> > And, build command line ("-D FLAG=VALUE") can be used to enable or
> > disable related feature set, please check "NetworkDefines.dsc.inc"
> > for a detail description of each flag.
> >
> > The default value of these flags are:
> >   DEFINE NETWORK_ENABLE = TRUE
> >   DEFINE NETWORK_SNP_ENABLE = TRUE
> >   DEFINE NETWORK_IP4_ENABLE = TRUE
> >   DEFINE NETWORK_IP6_ENABLE = TRUE
> >   DEFINE NETWORK_TLS_ENABLE = TRUE
> >   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
> >   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
> >   DEFINE NETWORK_ISCSI_ENABLE   = TRUE
> >   DEFINE NETWORK_VLAN_ENABLE= TRUE
> >
> > Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
> >
> > Cc: Jiaxin Wu 
> > Cc: Ting Ye 
> > Signed-off-by: Fu Siyuan 
> > ---
> >  NetworkPkg/Network.fdf.inc   |  60 ++
> >  NetworkPkg/NetworkComponents.dsc.inc |  61 ++
> >  NetworkPkg/NetworkDefines.dsc.inc| 118 
> > +++
> >  NetworkPkg/NetworkLibs.dsc.inc   |  20 ++
> >  NetworkPkg/NetworkPcds.dsc.inc   |  16 +
> >  5 files changed, 275 insertions(+)
> >  create mode 100644 NetworkPkg/Network.fdf.inc
> >  create mode 100644 NetworkPkg/NetworkComponents.dsc.inc
> >  create mode 100644 NetworkPkg/NetworkDefines.dsc.inc
> >  create mode 100644 NetworkPkg/NetworkLibs.dsc.inc
> >  create mode 100644 NetworkPkg/NetworkPcds.dsc.inc
> 
> Before you push this patch, please also add your own "Signed-off-by" tag
> at the bottom of the commit message. In the end, the patch should carry
> both Siyuan's and your S-o-b.
> 
> Thanks
> Laszlo
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40149): https://edk2.groups.io/g/devel/message/40149
Mute This Topic: https://groups.io/mt/31532468/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Tim Lewis
Yes, I would support it. Tim

-Original Message-
From: Carsey, Jaben  
Sent: Tuesday, May 7, 2019 5:00 PM
To: Jonathan Watt ; devel@edk2.groups.io; 
tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 

Cc: Bi, Dandan 
Subject: RE: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

Tim,

Does this mean you would support such an errata? I would like to get the spec 
to a place where the behavior is at least nailed down one way or the other...

-Jaben

> -Original Message-
> From: Jonathan Watt [mailto:jw...@jwatt.org]
> Sent: Tuesday, May 7, 2019 2:08 PM
> To: devel@edk2.groups.io; tim.le...@insyde.com; Carsey, Jaben 
> ; Gao, Zhichao ; Ni, 
> Ray 
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib:
> Fix '-opt' option
> Importance: High
> 
> No apologies necessary! Raising compatibility concerns is very valid. 
> As I said, I just wanted to provide some other considerations I saw to 
> weigh in the decision.
> 
> All the best,
> Jonathan
> 
> On 07/05/2019 22:02, Tim Lewis wrote:
> > Jonathan --
> >
> > My apologies. I jumped because we've been bitten by shell "clarifications"
> in the past.
> >
> > As you've probably read in the other thread, it turns out that I 
> > (we) actually
> did agree with your interpretation of the spec in our alternate 
> implementation and have been using it that way for 2+ years. And it 
> didn't cause us grief with our other product which does use an EDK2-derived 
> shell.
> >
> > Best regards,
> > Tim
> >
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of 
> > Jonathan Watt
> > Sent: Tuesday, May 7, 2019 1:51 PM
> > To: Tim Lewis ; 'Carsey, Jaben'
> > ; devel@edk2.groups.io; 'Gao, Zhichao'
> > ; 'Ni, Ray' 
> > Cc: 'Bi, Dandan' 
> > Subject: Re: [edk2-devel] [PATCH v1 1/1]
> > ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> >
> > Hi Tim,
> >
> > For context, I'm just some random guy who tripped over this issue on 
> > his
> home workstation and thought he'd try and remove the footgun to save 
> anyone else the same pain. I was specifically replying to the 
> unconditional statement "It will break existing scripts." (not made by 
> you) to provide what I hope was some qualification and balance to the 
> face value of that statement, and to suggest some other things that 
> should be considered. As far as deciding what the best resolution is, I'm not 
> qualified for that.
> >
> > I am curious about one thing though. The sentence you wrote that 
> > ends
> with "that are implemented to the specification" sounds like you're 
> saying making the proposed change would violate the specification. 
> That does not seem to be the case from my reading, and my reading 
> would be that it would actually make it do what most people would 
> expect from reading the specification.
> >
> > Specifically, the usage block for bcfg in the specification says:
> >
> >   Usage:
> > bcfg driver|boot [dump [-v]]
> > bcfg driver|boot [add # file "desc"] [addp # file “desc”]
> >  [addh # handle “desc”]
> > bcfg driver|boot [rm #]
> > bcfg driver|boot [mv # #]
> > bcfg driver|boot [mod # “desc”] | [modf # file] | [modp # file] |
> >  [modh # handle]
> > bcfg driver|boot [-opt # [[filename]|[”data”]] |
> >  [KeyData *]]
> >
> > It seems natural to assume from that that the "#" for all options is 
> > the
> "same thing" and would be handled the same way.
> >
> > The comment for the -opt option does not indicate otherwise:
> >
> >   -opt
> > Modify the optional data associated with a driver or boot option.
> > Followed either by the filename of the file which contains the
> > binary data to be associated with the driver or boot option
> > optional data, or else the quote-delimited data that will be
> > associated with the driver or boot option optional data.
> >
> > In fact the use of the term "driver or boot option" for -opt and the 
> > other
> options indicates that it is the same thing as for the other options 
> (which explicitly say that the "#" is a hexadecimal number), even if 
> "#" isn't described explicitly in this case.
> >
> > I'm glad to hear there are other implementations, because given the
> disagreement over what the spec intends, it would be useful to compare 
> them and consider converging.
> >
> > Anyway, that's probably enough from me. :)
> >
> > Jonathan
> >
> > On 07/05/2019 21:04, Tim Lewis wrote:
> >> Jonathan --
> >>
> >> The bcfg command pre-dates the UEFI shell specification. I know of 
> >> at
> least two non-EDK2 implementations, including one maintained by my 
> company, that are implemented to the specification. Server platforms 
> that use the "application" style boot options can regularly run over 10 
> options.
> >>
> >> I believe the better  alternative is to add a new option in the 
> >> specification
> and leave the existing syntax for -opt.
> >>
> >> Th

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Carsey, Jaben
Tim,

Does this mean you would support such an errata? I would like to get the spec 
to a place where the behavior is at least nailed down one way or the other...

-Jaben

> -Original Message-
> From: Jonathan Watt [mailto:jw...@jwatt.org]
> Sent: Tuesday, May 7, 2019 2:08 PM
> To: devel@edk2.groups.io; tim.le...@insyde.com; Carsey, Jaben
> ; Gao, Zhichao ; Ni, Ray
> 
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib:
> Fix '-opt' option
> Importance: High
> 
> No apologies necessary! Raising compatibility concerns is very valid. As I 
> said,
> I just wanted to provide some other considerations I saw to weigh in the
> decision.
> 
> All the best,
> Jonathan
> 
> On 07/05/2019 22:02, Tim Lewis wrote:
> > Jonathan --
> >
> > My apologies. I jumped because we've been bitten by shell "clarifications"
> in the past.
> >
> > As you've probably read in the other thread, it turns out that I (we) 
> > actually
> did agree with your interpretation of the spec in our alternate
> implementation and have been using it that way for 2+ years. And it didn't
> cause us grief with our other product which does use an EDK2-derived shell.
> >
> > Best regards,
> > Tim
> >
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of
> > Jonathan Watt
> > Sent: Tuesday, May 7, 2019 1:51 PM
> > To: Tim Lewis ; 'Carsey, Jaben'
> > ; devel@edk2.groups.io; 'Gao, Zhichao'
> > ; 'Ni, Ray' 
> > Cc: 'Bi, Dandan' 
> > Subject: Re: [edk2-devel] [PATCH v1 1/1]
> > ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> >
> > Hi Tim,
> >
> > For context, I'm just some random guy who tripped over this issue on his
> home workstation and thought he'd try and remove the footgun to save
> anyone else the same pain. I was specifically replying to the unconditional
> statement "It will break existing scripts." (not made by you) to provide what 
> I
> hope was some qualification and balance to the face value of that statement,
> and to suggest some other things that should be considered. As far as
> deciding what the best resolution is, I'm not qualified for that.
> >
> > I am curious about one thing though. The sentence you wrote that ends
> with "that are implemented to the specification" sounds like you're saying
> making the proposed change would violate the specification. That does not
> seem to be the case from my reading, and my reading would be that it would
> actually make it do what most people would expect from reading the
> specification.
> >
> > Specifically, the usage block for bcfg in the specification says:
> >
> >   Usage:
> > bcfg driver|boot [dump [-v]]
> > bcfg driver|boot [add # file "desc"] [addp # file “desc”]
> >  [addh # handle “desc”]
> > bcfg driver|boot [rm #]
> > bcfg driver|boot [mv # #]
> > bcfg driver|boot [mod # “desc”] | [modf # file] | [modp # file] |
> >  [modh # handle]
> > bcfg driver|boot [-opt # [[filename]|[”data”]] |
> >  [KeyData *]]
> >
> > It seems natural to assume from that that the "#" for all options is the
> "same thing" and would be handled the same way.
> >
> > The comment for the -opt option does not indicate otherwise:
> >
> >   -opt
> > Modify the optional data associated with a driver or boot option.
> > Followed either by the filename of the file which contains the
> > binary data to be associated with the driver or boot option
> > optional data, or else the quote-delimited data that will be
> > associated with the driver or boot option optional data.
> >
> > In fact the use of the term "driver or boot option" for -opt and the other
> options indicates that it is the same thing as for the other options (which
> explicitly say that the "#" is a hexadecimal number), even if "#" isn't
> described explicitly in this case.
> >
> > I'm glad to hear there are other implementations, because given the
> disagreement over what the spec intends, it would be useful to compare
> them and consider converging.
> >
> > Anyway, that's probably enough from me. :)
> >
> > Jonathan
> >
> > On 07/05/2019 21:04, Tim Lewis wrote:
> >> Jonathan --
> >>
> >> The bcfg command pre-dates the UEFI shell specification. I know of at
> least two non-EDK2 implementations, including one maintained by my
> company, that are implemented to the specification. Server platforms that
> use the "application" style boot options can regularly run over 10 options.
> >>
> >> I believe the better  alternative is to add a new option in the 
> >> specification
> and leave the existing syntax for -opt.
> >>
> >> Thanks,
> >>
> >> Tim
> >>
> >> -Original Message-
> >> From: Jonathan Watt 
> >> Sent: Tuesday, May 7, 2019 12:06 PM
> >> To: Carsey, Jaben ; devel@edk2.groups.io;
> >> tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray
> >> 
> >> Cc: Bi, Dandan 
> >> Subject: Re: [edk2-devel] [PATCH v1 1/1]
> >> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> >>
> >> I sh

[edk2-devel] [PATCH 0/2] Retire CorebootModulePkg and CorebootPayloadPkg

2019-05-07 Thread Guo Dong
Since UefiPayloadPkg in EDK2 supports Coreboot and Slim Bootloader, and 
no concerns were received for the RFC to remove CorebootModulePkg and
CorebootPayloadPkg from EDK2 (https://edk2.groups.io/g/devel/message/39126),
here is the action patch to remove CorebootModulePkg and CorebootPayloadPkg.

Guo Dong (2):
  Retire CorebootModulePkg from EDK2
  Retire CorebootPayloadPkg from EDK2

 CorebootModulePkg/CbSupportDxe/CbSupportDxe.c  |  158 --
 CorebootModulePkg/CbSupportDxe/CbSupportDxe.h  |   30 -
 CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf|   60 -
 CorebootModulePkg/CbSupportPei/CbSupportPei.c  |  440 --
 CorebootModulePkg/CbSupportPei/CbSupportPei.h  |   42 -
 CorebootModulePkg/CbSupportPei/CbSupportPei.inf|   74 -
 CorebootModulePkg/CorebootModulePkg.dec|   59 -
 CorebootModulePkg/Include/Coreboot.h   |  249 
 CorebootModulePkg/Include/Guid/AcpiBoardInfoGuid.h |   26 -
 .../Include/Guid/FrameBufferInfoGuid.h |   34 -
 .../Include/Guid/SystemTableInfoGuid.h |   24 -
 CorebootModulePkg/Include/Library/CbParseLib.h |  186 ---
 .../Include/Library/CbPlatformSupportLib.h |   28 -
 .../BaseSerialPortLib16550.c   | 1089 --
 .../BaseSerialPortLib16550.inf |   42 -
 .../BaseSerialPortLib16550.uni |   16 -
 CorebootModulePkg/Library/CbParseLib/CbParseLib.c  |  721 -
 .../Library/CbParseLib/CbParseLib.inf  |   39 -
 .../CbPlatformSupportLibNull.c |   29 -
 .../CbPlatformSupportLibNull.inf   |   29 -
 .../CbPlatformSupportLibNull.uni   |   14 -
 .../SataControllerDxe/ComponentName.c  |  170 ---
 .../SataControllerDxe/SataController.c | 1043 -
 .../SataControllerDxe/SataController.h |  536 ---
 .../SataControllerDxe/SataControllerDxe.inf|   43 -
 CorebootModulePkg/SecCore/FindPeiCore.c|  193 ---
 CorebootModulePkg/SecCore/Ia32/SecEntry.asm|   72 -
 CorebootModulePkg/SecCore/Ia32/SecEntry.nasm   |   66 -
 CorebootModulePkg/SecCore/Ia32/Stack.asm   |   76 -
 CorebootModulePkg/SecCore/Ia32/Stack.nasm  |   72 -
 CorebootModulePkg/SecCore/SecCore.inf  |   57 -
 CorebootModulePkg/SecCore/SecMain.c|  285 
 CorebootModulePkg/SecCore/SecMain.h|  128 --
 .../BuildAndIntegrationInstructions.txt|   82 --
 CorebootPayloadPkg/CorebootPayloadPkg.dec  |   48 -
 CorebootPayloadPkg/CorebootPayloadPkg.fdf  |  285 
 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc  |  574 
 CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc   |  575 
 CorebootPayloadPkg/FbGop/ComponentName.c   |  306 
 CorebootPayloadPkg/FbGop/FbGop.c   | 1536 
 CorebootPayloadPkg/FbGop/FbGop.h   |  413 --
 CorebootPayloadPkg/FbGop/FbGop.inf |   63 -
 .../Library/AcpiTimerLib/AcpiTimerLib.c|  270 
 .../Library/AcpiTimerLib/AcpiTimerLib.inf  |   40 -
 .../Library/PciHostBridgeLib/PciHostBridge.h   |   80 -
 .../Library/PciHostBridgeLib/PciHostBridgeLib.c|  222 ---
 .../Library/PciHostBridgeLib/PciHostBridgeLib.inf  |   41 -
 .../PciHostBridgeLib/PciHostBridgeSupport.c|  584 
 .../PlatformBootManagerLib/PlatformBootManager.c   |  265 
 .../PlatformBootManagerLib/PlatformBootManager.h   |  121 --
 .../PlatformBootManagerLib.inf |   74 -
 .../PlatformBootManagerLib/PlatformConsole.c   |  611 
 .../PlatformBootManagerLib/PlatformConsole.h   |   70 -
 .../Library/PlatformBootManagerLib/PlatformData.c  |   19 -
 .../Library/PlatformHookLib/PlatformHookLib.c  |  105 --
 .../Library/PlatformHookLib/PlatformHookLib.inf|   39 -
 .../Library/ResetSystemLib/ResetSystemLib.c|  221 ---
 .../Library/ResetSystemLib/ResetSystemLib.inf  |   38 -
 58 files changed, 12812 deletions(-)
 delete mode 100755 CorebootModulePkg/CbSupportDxe/CbSupportDxe.c
 delete mode 100644 CorebootModulePkg/CbSupportDxe/CbSupportDxe.h
 delete mode 100644 CorebootModulePkg/CbSupportDxe/CbSupportDxe.inf
 delete mode 100755 CorebootModulePkg/CbSupportPei/CbSupportPei.c
 delete mode 100644 CorebootModulePkg/CbSupportPei/CbSupportPei.h
 delete mode 100644 CorebootModulePkg/CbSupportPei/CbSupportPei.inf
 delete mode 100644 CorebootModulePkg/CorebootModulePkg.dec
 delete mode 100644 CorebootModulePkg/Include/Coreboot.h
 delete mode 100644 CorebootModulePkg/Include/Guid/AcpiBoardInfoGuid.h
 delete mode 100644 CorebootModulePkg/Include/Guid/FrameBufferInfoGuid.h
 delete mode 100644 CorebootModulePkg/Include/Guid/SystemTableInfoGuid.h
 delete mode 100644 CorebootModulePkg/Include/Library/CbParseLib.h
 delete mode 100644 CorebootModulePkg/Include/Library/CbPlatformSupportLib.h
 delete mode 100644 
Coreboo

[edk2-devel] RFC for Edk2-Library

2019-05-07 Thread Sean via Groups.Io
RFC  Edk2-Library creation

Create a new tianocore owned repository to host a python library package in 
support of UEFI development.  This package will allow easy sharing of python 
library code to facilitate reuse.  Inclusion of this package and dependency 
management should be managed using Pip/Pypi.   To start this is a supplemental 
package and is not required to be used for edk2 builds.

 

Examples of content here

* Edk2 file type parsing
* UEFI structure encode/decode in python
* Packaging tools (Capsules generation, signing, INF gen, Cat gen)
* TPM support code
* Potentially move content from basetools/source/python/common/*
* No command line tools/interface

Maintainers

* Sean Brogan
* Bret Barkelew
* Placeholder for existing maintainer from the basetools

License

* BSD + Patent (edk2 aligned)

Contribution process and issue tracking

* Follow Github PR process for contributions and issue tracking
* Contributor forks repo in github
* Contributor creates branch for work
* Contributor updates release notes to indicate change (if necessary)
* Contributor submits PR to master branch of tianocore/Edk2-Library repo
* Review feedback is given in PR
* Python Tests are run on the repo (new contributions need unit tests)
* Python Style (flake8) must pass
* All review feedback must be completed, maintainers approved, and tests run 
successfully before PR is *squash merged* into master

Documentation

* Use Github IO documentation/wiki hosting
* Example content

  i.  
https://microsoft.github.io/mu/dyn/mu_pip_python_library/developing/ ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2Fdyn%2Fmu_pip_python_library%2Fdeveloping%2F&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=fKIb1Pfj4AqoGVOWudcyFMxMypJk%2FHTts9aMxZ8HukI%3D&reserved=0
 )

ii. 
https://microsoft.github.io/mu/dyn/mu_pip_python_library/publishing/ ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicrosoft.github.io%2Fmu%2Fdyn%2Fmu_pip_python_library%2Fpublishing%2F&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=QJMUMB1hIusaRVJhgsi9kF9KIbgdhS0WRnIXVkGeBCM%3D&reserved=0
 )

* Readme at root of repo
* Example: https://github.com/Microsoft/mu_pip_python_library ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmu_pip_python_library&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=DiuPnNMagvYYf0XXxDycSVHqijBBcDT0fXHzVY9U6%2Fw%3D&reserved=0
 )

CI Builds

* CI build process using dev ops
* Validation is done thru build process
* Release publication done thru manual CI Build
* Examples from Mu-Python-Library
* Windows CI - https://dev.azure.com/projectmu/mu%20pip/_build?definitionId=13 
( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdev.azure.com%2Fprojectmu%2Fmu%2520pip%2F_build%3FdefinitionId%3D13&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=jQCCZo2u8JVisCchOoMLSgKJbG3YEk%2FG1JP9fI4g2JY%3D&reserved=0
 )
* Linux CI - https://dev.azure.com/projectmu/mu%20pip/_build?definitionId=12 ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdev.azure.com%2Fprojectmu%2Fmu%2520pip%2F_build%3FdefinitionId%3D12&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=CILlTdeEGpsi%2BCQNiZdIqd2Vt2RQV6L3qjz2rWEARYE%3D&reserved=0
 )
* Publishing - https://dev.azure.com/projectmu/mu%20pip/_build?definitionId=16 
( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdev.azure.com%2Fprojectmu%2Fmu%2520pip%2F_build%3FdefinitionId%3D16&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=hkpzn9P6RBjduYBWjN56Y2qRBWyOG32mFkP%2BwtY7KBQ%3D&reserved=0
 )

Release

* Release to Pypi as Edk2-Library for easy usage in product environment
* Versioned follows: Aa.bb.cc.dd
* AA == Major version.  Changes don’t need to be backward compatible
* BB == Minor version.  Significant new features.  Backward compatibility 
maintained
* CC == Bug fix/patch/small optional feature
* DD == build/Release version. 
* Package on Pypi will be owned by Tianocore group
* Example for mu-python-library: https://pypi.org/project/mu-python-library/ ( 
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpypi.org%2Fproject%2Fmu-python-library%2F&data=01%7C01%7Csean.brogan%40microsoft.com%7C47c4ca03e19b4fffc8ad08d6d314774a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=5nTb93dDnAo%2FsWyfv1zYEIkJF8L58YY5P3BkzKi4Ivc%3D&reserved=0
 )

Other Notes

* Only support Python 3 (prefer 3

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Jonathan Watt
Ah, hopefully that simplifies the decision. At any rate, thank you for checking
and clarifying.

For those working on the spec, in addition to clarifying -opt to avoid this
confusion, one further thing to do would be to clarify the format of the "in
hexadecimal" option. It would be good if it could state which of leading "0x",
just leading zeros, and no prefix at all, are valid. The edk2 implementation
only appeared to support leading "0x" and no prefix at all based on my previous
testing, but I saw (what appeared to nowadays be incorrect) comments in the code
stating that leading zeros were also valid.

Jonathan

On 07/05/2019 21:48, Tim Lewis wrote:
> Jim --
> 
> Well, speaking of shooting-oneself-in-the-foot, it turns out that our 
> non-EDK2 implementation followed the recommendation in the patch. 
> 
> I agree that the spec is ambiguous and, it turns out that our largest use 
> case already uses the recommended behavior.
> 
> Sorry to one and all.
> 
> Tim
> 
> -Original Message-
> From: jim.dai...@dell.com  
> Sent: Tuesday, May 7, 2019 1:30 PM
> To: devel@edk2.groups.io; tim.le...@insyde.com
> Cc: dandan...@intel.com; jw...@jwatt.org; jaben.car...@intel.com; 
> zhichao@intel.com; ray...@intel.com
> Subject: RE: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: 
> Fix '-opt' option
> 
> Tim,
> 
> Out of curiosity, what does the specification you refer to that was used to 
> write the non-EDK2 implementations say about the -opt switch?
> 
> Regards,
> Jim
> 
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Tim Lewis
> Sent: Tuesday, May 7, 2019 3:04 PM
> To: 'Jonathan Watt'; 'Carsey, Jaben'; devel@edk2.groups.io; 'Gao, Zhichao'; 
> 'Ni, Ray'
> Cc: 'Bi, Dandan'
> Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: 
> Fix '-opt' option
> 
> Jonathan --
> 
> The bcfg command pre-dates the UEFI shell specification. I know of at least 
> two non-EDK2 implementations, including one maintained by my company, that 
> are implemented to the specification. Server platforms that use the 
> "application" style boot options can regularly run over 10 options. 
> 
> I believe the better  alternative is to add a new option in the specification 
> and leave the existing syntax for -opt.
> 
> Thanks,
> 
> Tim
> 
> -Original Message-
> From: Jonathan Watt 
> Sent: Tuesday, May 7, 2019 12:06 PM
> To: Carsey, Jaben ; devel@edk2.groups.io; 
> tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 
> 
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: 
> Fix '-opt' option
> 
> I should add, for me personally, once I noticed the inconsistency I changed 
> my scripts to use the "0x" prefix to avoid this real footgun. I imagine that 
> anyone else that may have encountered this would have done the same and so, 
> like me, wouldn't be affected by the change if it were to happen.
> 
> On 07/05/2019 20:00, Jonathan Watt wrote:
>> There is potential for that, but it's not certain. For it to happen 
>> scripts would need to be both omitting the "0x" prefix and be pass an 
>> option number greater than 9. The fact this very unexpected 
>> inconsistency (which will corrupt the wrong option when those same two 
>> things are true!) hasn't been reported before would seem to indicate 
>> this combination doesn't really happen/is rare in practice.
>>
>> Also, is TianoCore's bcfg the only implementation people are using? If 
>> there are other implementations, would this bring TianoCore's 
>> implementation into or out of line with them? That may impact whether the 
>> spec could/should change.
>>
>> On 07/05/2019 18:40, Carsey, Jaben wrote:
>>> It will break existing scripts.  Do you have such scripts in your 
>>> environment dependent on this parameter?
>>>
 -Original Message-
 From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
 Of Tim Lewis
 Sent: Tuesday, May 07, 2019 9:20 AM
 To: devel@edk2.groups.io; Carsey, Jaben ; 
 Gao, Zhichao ; Ni, Ray ; 
 jw...@jwatt.org
 Cc: Bi, Dandan 
 Subject: Re: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
 Importance: High

 The question is whether this will break compatibility with existing 
 shell scripts. In order to maintain that compatibility, it may be 
 necessary to add a new option rather than trying to update an existing one.

 Tim

 -Original Message-
 From: devel@edk2.groups.io  On Behalf Of 
 Carsey, Jaben
 Sent: Tuesday, May 7, 2019 7:36 AM
 To: Gao, Zhichao ; devel@edk2.groups.io; Ni, 
 Ray ; jw...@jwatt.org
 Cc: Bi, Dandan 
 Subject: Re: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib:
 Fix '-opt' option

 Zhichao,
 I can help submit errata for shell spec if needed.

 Per patch,
 I agree. This looks good.
 Reviewed-by: Jaben Carsey 


> -Origin

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Jim.Dailey
That is good news!  Mostly because assuming it was decimal should make no sense 
to an engineer! :-)

-Original Message-
From: Tim Lewis  
Sent: Tuesday, May 7, 2019 3:49 PM
To: Dailey, Jim; devel@edk2.groups.io
Cc: dandan...@intel.com; jw...@jwatt.org; jaben.car...@intel.com; 
zhichao@intel.com; ray...@intel.com
Subject: RE: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

Jim --

Well, speaking of shooting-oneself-in-the-foot, it turns out that our non-EDK2 
implementation followed the recommendation in the patch. 

I agree that the spec is ambiguous and, it turns out that our largest use case 
already uses the recommended behavior.

Sorry to one and all.

Tim

-Original Message-
From: jim.dai...@dell.com  
Sent: Tuesday, May 7, 2019 1:30 PM
To: devel@edk2.groups.io; tim.le...@insyde.com
Cc: dandan...@intel.com; jw...@jwatt.org; jaben.car...@intel.com; 
zhichao@intel.com; ray...@intel.com
Subject: RE: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

Tim,

Out of curiosity, what does the specification you refer to that was used to 
write the non-EDK2 implementations say about the -opt switch?

Regards,
Jim

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Tim Lewis
Sent: Tuesday, May 7, 2019 3:04 PM
To: 'Jonathan Watt'; 'Carsey, Jaben'; devel@edk2.groups.io; 'Gao, Zhichao'; 
'Ni, Ray'
Cc: 'Bi, Dandan'
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

Jonathan --

The bcfg command pre-dates the UEFI shell specification. I know of at least two 
non-EDK2 implementations, including one maintained by my company, that are 
implemented to the specification. Server platforms that use the "application" 
style boot options can regularly run over 10 options. 

I believe the better  alternative is to add a new option in the specification 
and leave the existing syntax for -opt.

Thanks,

Tim

-Original Message-
From: Jonathan Watt 
Sent: Tuesday, May 7, 2019 12:06 PM
To: Carsey, Jaben ; devel@edk2.groups.io; 
tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 

Cc: Bi, Dandan 
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

I should add, for me personally, once I noticed the inconsistency I changed my 
scripts to use the "0x" prefix to avoid this real footgun. I imagine that 
anyone else that may have encountered this would have done the same and so, 
like me, wouldn't be affected by the change if it were to happen.

On 07/05/2019 20:00, Jonathan Watt wrote:
> There is potential for that, but it's not certain. For it to happen 
> scripts would need to be both omitting the "0x" prefix and be pass an 
> option number greater than 9. The fact this very unexpected 
> inconsistency (which will corrupt the wrong option when those same two 
> things are true!) hasn't been reported before would seem to indicate 
> this combination doesn't really happen/is rare in practice.
> 
> Also, is TianoCore's bcfg the only implementation people are using? If 
> there are other implementations, would this bring TianoCore's 
> implementation into or out of line with them? That may impact whether the 
> spec could/should change.
> 
> On 07/05/2019 18:40, Carsey, Jaben wrote:
>> It will break existing scripts.  Do you have such scripts in your 
>> environment dependent on this parameter?
>>
>>> -Original Message-
>>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
>>> Of Tim Lewis
>>> Sent: Tuesday, May 07, 2019 9:20 AM
>>> To: devel@edk2.groups.io; Carsey, Jaben ; 
>>> Gao, Zhichao ; Ni, Ray ; 
>>> jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
>>> Importance: High
>>>
>>> The question is whether this will break compatibility with existing 
>>> shell scripts. In order to maintain that compatibility, it may be 
>>> necessary to add a new option rather than trying to update an existing one.
>>>
>>> Tim
>>>
>>> -Original Message-
>>> From: devel@edk2.groups.io  On Behalf Of 
>>> Carsey, Jaben
>>> Sent: Tuesday, May 7, 2019 7:36 AM
>>> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, 
>>> Ray ; jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib:
>>> Fix '-opt' option
>>>
>>> Zhichao,
>>> I can help submit errata for shell spec if needed.
>>>
>>> Per patch,
>>> I agree. This looks good.
>>> Reviewed-by: Jaben Carsey 
>>>
>>>
 -Original Message-
 From: Gao, Zhichao
 Sent: Tuesday, May 07, 2019 2:52 AM
 To: devel@edk2.groups.io; Ni, Ray ; 
 jw...@jwatt.org
 Cc: Carsey, Jaben ; Bi, Dandan 
 
 Subject: RE: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
 Importance: High

 This patch looks good for me.
 Reviewed-by: Zhichao Gao 

 But when I view the command in UE

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Tim Lewis
Jonathan --

My apologies. I jumped because we've been bitten by shell "clarifications" in 
the past.

As you've probably read in the other thread, it turns out that I (we) actually 
did agree with your interpretation of the spec in our alternate implementation 
and have been using it that way for 2+ years. And it didn't cause us grief with 
our other product which does use an EDK2-derived shell. 

Best regards,
Tim

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Jonathan Watt
Sent: Tuesday, May 7, 2019 1:51 PM
To: Tim Lewis ; 'Carsey, Jaben' ; 
devel@edk2.groups.io; 'Gao, Zhichao' ; 'Ni, Ray' 

Cc: 'Bi, Dandan' 
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

Hi Tim,

For context, I'm just some random guy who tripped over this issue on his home 
workstation and thought he'd try and remove the footgun to save anyone else the 
same pain. I was specifically replying to the unconditional statement "It will 
break existing scripts." (not made by you) to provide what I hope was some 
qualification and balance to the face value of that statement, and to suggest 
some other things that should be considered. As far as deciding what the best 
resolution is, I'm not qualified for that.

I am curious about one thing though. The sentence you wrote that ends with 
"that are implemented to the specification" sounds like you're saying making 
the proposed change would violate the specification. That does not seem to be 
the case from my reading, and my reading would be that it would actually make 
it do what most people would expect from reading the specification.

Specifically, the usage block for bcfg in the specification says:

  Usage:
bcfg driver|boot [dump [-v]]
bcfg driver|boot [add # file "desc"] [addp # file “desc”]
 [addh # handle “desc”]
bcfg driver|boot [rm #]
bcfg driver|boot [mv # #]
bcfg driver|boot [mod # “desc”] | [modf # file] | [modp # file] |
 [modh # handle]
bcfg driver|boot [-opt # [[filename]|[”data”]] |
 [KeyData *]]

It seems natural to assume from that that the "#" for all options is the "same 
thing" and would be handled the same way.

The comment for the -opt option does not indicate otherwise:

  -opt
Modify the optional data associated with a driver or boot option.
Followed either by the filename of the file which contains the
binary data to be associated with the driver or boot option
optional data, or else the quote-delimited data that will be
associated with the driver or boot option optional data.

In fact the use of the term "driver or boot option" for -opt and the other 
options indicates that it is the same thing as for the other options (which 
explicitly say that the "#" is a hexadecimal number), even if "#" isn't 
described explicitly in this case.

I'm glad to hear there are other implementations, because given the 
disagreement over what the spec intends, it would be useful to compare them and 
consider converging.

Anyway, that's probably enough from me. :)

Jonathan

On 07/05/2019 21:04, Tim Lewis wrote:
> Jonathan --
> 
> The bcfg command pre-dates the UEFI shell specification. I know of at least 
> two non-EDK2 implementations, including one maintained by my company, that 
> are implemented to the specification. Server platforms that use the 
> "application" style boot options can regularly run over 10 options. 
> 
> I believe the better  alternative is to add a new option in the specification 
> and leave the existing syntax for -opt.
> 
> Thanks,
> 
> Tim
> 
> -Original Message-
> From: Jonathan Watt 
> Sent: Tuesday, May 7, 2019 12:06 PM
> To: Carsey, Jaben ; devel@edk2.groups.io; 
> tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 
> 
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1] 
> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> 
> I should add, for me personally, once I noticed the inconsistency I changed 
> my scripts to use the "0x" prefix to avoid this real footgun. I imagine that 
> anyone else that may have encountered this would have done the same and so, 
> like me, wouldn't be affected by the change if it were to happen.
> 
> On 07/05/2019 20:00, Jonathan Watt wrote:
>> There is potential for that, but it's not certain. For it to happen 
>> scripts would need to be both omitting the "0x" prefix and be pass an 
>> option number greater than 9. The fact this very unexpected 
>> inconsistency (which will corrupt the wrong option when those same 
>> two things are true!) hasn't been reported before would seem to 
>> indicate this combination doesn't really happen/is rare in practice.
>>
>> Also, is TianoCore's bcfg the only implementation people are using? 
>> If there are other implementations, would this bring TianoCore's 
>> implementation into or out of line with them? That may impact whether the 
>> spec could/should change.
>>
>> On 07/05/2019 18:40, Carsey, Jaben wr

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Jonathan Watt
No apologies necessary! Raising compatibility concerns is very valid. As I said,
I just wanted to provide some other considerations I saw to weigh in the 
decision.

All the best,
Jonathan

On 07/05/2019 22:02, Tim Lewis wrote:
> Jonathan --
> 
> My apologies. I jumped because we've been bitten by shell "clarifications" in 
> the past.
> 
> As you've probably read in the other thread, it turns out that I (we) 
> actually did agree with your interpretation of the spec in our alternate 
> implementation and have been using it that way for 2+ years. And it didn't 
> cause us grief with our other product which does use an EDK2-derived shell. 
> 
> Best regards,
> Tim
> 
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Jonathan Watt
> Sent: Tuesday, May 7, 2019 1:51 PM
> To: Tim Lewis ; 'Carsey, Jaben' 
> ; devel@edk2.groups.io; 'Gao, Zhichao' 
> ; 'Ni, Ray' 
> Cc: 'Bi, Dandan' 
> Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: 
> Fix '-opt' option
> 
> Hi Tim,
> 
> For context, I'm just some random guy who tripped over this issue on his home 
> workstation and thought he'd try and remove the footgun to save anyone else 
> the same pain. I was specifically replying to the unconditional statement "It 
> will break existing scripts." (not made by you) to provide what I hope was 
> some qualification and balance to the face value of that statement, and to 
> suggest some other things that should be considered. As far as deciding what 
> the best resolution is, I'm not qualified for that.
> 
> I am curious about one thing though. The sentence you wrote that ends with 
> "that are implemented to the specification" sounds like you're saying making 
> the proposed change would violate the specification. That does not seem to be 
> the case from my reading, and my reading would be that it would actually make 
> it do what most people would expect from reading the specification.
> 
> Specifically, the usage block for bcfg in the specification says:
> 
>   Usage:
> bcfg driver|boot [dump [-v]]
> bcfg driver|boot [add # file "desc"] [addp # file “desc”]
>  [addh # handle “desc”]
> bcfg driver|boot [rm #]
> bcfg driver|boot [mv # #]
> bcfg driver|boot [mod # “desc”] | [modf # file] | [modp # file] |
>  [modh # handle]
> bcfg driver|boot [-opt # [[filename]|[”data”]] |
>  [KeyData *]]
> 
> It seems natural to assume from that that the "#" for all options is the 
> "same thing" and would be handled the same way.
> 
> The comment for the -opt option does not indicate otherwise:
> 
>   -opt
> Modify the optional data associated with a driver or boot option.
> Followed either by the filename of the file which contains the
> binary data to be associated with the driver or boot option
> optional data, or else the quote-delimited data that will be
> associated with the driver or boot option optional data.
> 
> In fact the use of the term "driver or boot option" for -opt and the other 
> options indicates that it is the same thing as for the other options (which 
> explicitly say that the "#" is a hexadecimal number), even if "#" isn't 
> described explicitly in this case.
> 
> I'm glad to hear there are other implementations, because given the 
> disagreement over what the spec intends, it would be useful to compare them 
> and consider converging.
> 
> Anyway, that's probably enough from me. :)
> 
> Jonathan
> 
> On 07/05/2019 21:04, Tim Lewis wrote:
>> Jonathan --
>>
>> The bcfg command pre-dates the UEFI shell specification. I know of at least 
>> two non-EDK2 implementations, including one maintained by my company, that 
>> are implemented to the specification. Server platforms that use the 
>> "application" style boot options can regularly run over 10 options. 
>>
>> I believe the better  alternative is to add a new option in the 
>> specification and leave the existing syntax for -opt.
>>
>> Thanks,
>>
>> Tim
>>
>> -Original Message-
>> From: Jonathan Watt 
>> Sent: Tuesday, May 7, 2019 12:06 PM
>> To: Carsey, Jaben ; devel@edk2.groups.io; 
>> tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 
>> 
>> Cc: Bi, Dandan 
>> Subject: Re: [edk2-devel] [PATCH v1 1/1] 
>> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
>>
>> I should add, for me personally, once I noticed the inconsistency I changed 
>> my scripts to use the "0x" prefix to avoid this real footgun. I imagine that 
>> anyone else that may have encountered this would have done the same and so, 
>> like me, wouldn't be affected by the change if it were to happen.
>>
>> On 07/05/2019 20:00, Jonathan Watt wrote:
>>> There is potential for that, but it's not certain. For it to happen 
>>> scripts would need to be both omitting the "0x" prefix and be pass an 
>>> option number greater than 9. The fact this very unexpected 
>>> inconsistency (which will corrupt the wrong option when those same 
>>> two things are true

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Jim.Dailey
Tim,

Out of curiosity, what does the specification you refer to that was used to 
write the non-EDK2 implementations say about the -opt switch?

Regards,
Jim

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Tim Lewis
Sent: Tuesday, May 7, 2019 3:04 PM
To: 'Jonathan Watt'; 'Carsey, Jaben'; devel@edk2.groups.io; 'Gao, Zhichao'; 
'Ni, Ray'
Cc: 'Bi, Dandan'
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

Jonathan --

The bcfg command pre-dates the UEFI shell specification. I know of at least two 
non-EDK2 implementations, including one maintained by my company, that are 
implemented to the specification. Server platforms that use the "application" 
style boot options can regularly run over 10 options. 

I believe the better  alternative is to add a new option in the specification 
and leave the existing syntax for -opt.

Thanks,

Tim

-Original Message-
From: Jonathan Watt  
Sent: Tuesday, May 7, 2019 12:06 PM
To: Carsey, Jaben ; devel@edk2.groups.io; 
tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 

Cc: Bi, Dandan 
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

I should add, for me personally, once I noticed the inconsistency I changed my 
scripts to use the "0x" prefix to avoid this real footgun. I imagine that 
anyone else that may have encountered this would have done the same and so, 
like me, wouldn't be affected by the change if it were to happen.

On 07/05/2019 20:00, Jonathan Watt wrote:
> There is potential for that, but it's not certain. For it to happen 
> scripts would need to be both omitting the "0x" prefix and be pass an 
> option number greater than 9. The fact this very unexpected 
> inconsistency (which will corrupt the wrong option when those same two 
> things are true!) hasn't been reported before would seem to indicate 
> this combination doesn't really happen/is rare in practice.
> 
> Also, is TianoCore's bcfg the only implementation people are using? If 
> there are other implementations, would this bring TianoCore's 
> implementation into or out of line with them? That may impact whether the 
> spec could/should change.
> 
> On 07/05/2019 18:40, Carsey, Jaben wrote:
>> It will break existing scripts.  Do you have such scripts in your 
>> environment dependent on this parameter?
>>
>>> -Original Message-
>>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
>>> Of Tim Lewis
>>> Sent: Tuesday, May 07, 2019 9:20 AM
>>> To: devel@edk2.groups.io; Carsey, Jaben ; 
>>> Gao, Zhichao ; Ni, Ray ; 
>>> jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
>>> Importance: High
>>>
>>> The question is whether this will break compatibility with existing 
>>> shell scripts. In order to maintain that compatibility, it may be 
>>> necessary to add a new option rather than trying to update an existing one.
>>>
>>> Tim
>>>
>>> -Original Message-
>>> From: devel@edk2.groups.io  On Behalf Of 
>>> Carsey, Jaben
>>> Sent: Tuesday, May 7, 2019 7:36 AM
>>> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, 
>>> Ray ; jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib:
>>> Fix '-opt' option
>>>
>>> Zhichao,
>>> I can help submit errata for shell spec if needed.
>>>
>>> Per patch,
>>> I agree. This looks good.
>>> Reviewed-by: Jaben Carsey 
>>>
>>>
 -Original Message-
 From: Gao, Zhichao
 Sent: Tuesday, May 07, 2019 2:52 AM
 To: devel@edk2.groups.io; Ni, Ray ; 
 jw...@jwatt.org
 Cc: Carsey, Jaben ; Bi, Dandan 
 
 Subject: RE: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
 Importance: High

 This patch looks good for me.
 Reviewed-by: Zhichao Gao 

 But when I view the command in UEFI SHELL 2.2 spec:
 ...
 bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData >>> UnicodeChar>*]]
 ...
 -opt
 Modify the optional data associated with a driver or boot option.
 Followed either by the filename of the file which contains the 
 binary data to be associated with the driver or boot option 
 optional data, or else the quote- delimited data that will be 
 associated with the driver or boot option optional data.
 ...

 This description lack the comment of '#' parameter and that may 
 make the consumer confused. Usually consumers would regard it as 
 the same in other option, such as ' bcfg driver|boot [rm #]'. The 
 '#' is clearly descripted as a hexadecimal parameter:
 rm
 Remove an option. The # parameter lists the option number to remove 
 in hexadecimal.

 So I think we should update the shell spec by the way.

 Thanks,
 Zhichao

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On 

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Jonathan Watt
Hi Tim,

For context, I'm just some random guy who tripped over this issue on his home
workstation and thought he'd try and remove the footgun to save anyone else the
same pain. I was specifically replying to the unconditional statement "It will
break existing scripts." (not made by you) to provide what I hope was some
qualification and balance to the face value of that statement, and to suggest
some other things that should be considered. As far as deciding what the best
resolution is, I'm not qualified for that.

I am curious about one thing though. The sentence you wrote that ends with "that
are implemented to the specification" sounds like you're saying making the
proposed change would violate the specification. That does not seem to be the
case from my reading, and my reading would be that it would actually make it do
what most people would expect from reading the specification.

Specifically, the usage block for bcfg in the specification says:

  Usage:
bcfg driver|boot [dump [-v]]
bcfg driver|boot [add # file "desc"] [addp # file “desc”]
 [addh # handle “desc”]
bcfg driver|boot [rm #]
bcfg driver|boot [mv # #]
bcfg driver|boot [mod # “desc”] | [modf # file] | [modp # file] |
 [modh # handle]
bcfg driver|boot [-opt # [[filename]|[”data”]] |
 [KeyData *]]

It seems natural to assume from that that the "#" for all options is the "same
thing" and would be handled the same way.

The comment for the -opt option does not indicate otherwise:

  -opt
Modify the optional data associated with a driver or boot option.
Followed either by the filename of the file which contains the
binary data to be associated with the driver or boot option
optional data, or else the quote-delimited data that will be
associated with the driver or boot option optional data.

In fact the use of the term "driver or boot option" for -opt and the other
options indicates that it is the same thing as for the other options (which
explicitly say that the "#" is a hexadecimal number), even if "#" isn't
described explicitly in this case.

I'm glad to hear there are other implementations, because given the disagreement
over what the spec intends, it would be useful to compare them and consider
converging.

Anyway, that's probably enough from me. :)

Jonathan

On 07/05/2019 21:04, Tim Lewis wrote:
> Jonathan --
> 
> The bcfg command pre-dates the UEFI shell specification. I know of at least 
> two non-EDK2 implementations, including one maintained by my company, that 
> are implemented to the specification. Server platforms that use the 
> "application" style boot options can regularly run over 10 options. 
> 
> I believe the better  alternative is to add a new option in the specification 
> and leave the existing syntax for -opt.
> 
> Thanks,
> 
> Tim
> 
> -Original Message-
> From: Jonathan Watt  
> Sent: Tuesday, May 7, 2019 12:06 PM
> To: Carsey, Jaben ; devel@edk2.groups.io; 
> tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 
> 
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: 
> Fix '-opt' option
> 
> I should add, for me personally, once I noticed the inconsistency I changed 
> my scripts to use the "0x" prefix to avoid this real footgun. I imagine that 
> anyone else that may have encountered this would have done the same and so, 
> like me, wouldn't be affected by the change if it were to happen.
> 
> On 07/05/2019 20:00, Jonathan Watt wrote:
>> There is potential for that, but it's not certain. For it to happen 
>> scripts would need to be both omitting the "0x" prefix and be pass an 
>> option number greater than 9. The fact this very unexpected 
>> inconsistency (which will corrupt the wrong option when those same two 
>> things are true!) hasn't been reported before would seem to indicate 
>> this combination doesn't really happen/is rare in practice.
>>
>> Also, is TianoCore's bcfg the only implementation people are using? If 
>> there are other implementations, would this bring TianoCore's 
>> implementation into or out of line with them? That may impact whether the 
>> spec could/should change.
>>
>> On 07/05/2019 18:40, Carsey, Jaben wrote:
>>> It will break existing scripts.  Do you have such scripts in your 
>>> environment dependent on this parameter?
>>>
 -Original Message-
 From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
 Of Tim Lewis
 Sent: Tuesday, May 07, 2019 9:20 AM
 To: devel@edk2.groups.io; Carsey, Jaben ; 
 Gao, Zhichao ; Ni, Ray ; 
 jw...@jwatt.org
 Cc: Bi, Dandan 
 Subject: Re: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
 Importance: High

 The question is whether this will break compatibility with existing 
 shell scripts. In order to maintain that compatibility, it may be 
 necessary to add a new option rather than trying to update an

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Tim Lewis
Jim --

Well, speaking of shooting-oneself-in-the-foot, it turns out that our non-EDK2 
implementation followed the recommendation in the patch. 

I agree that the spec is ambiguous and, it turns out that our largest use case 
already uses the recommended behavior.

Sorry to one and all.

Tim

-Original Message-
From: jim.dai...@dell.com  
Sent: Tuesday, May 7, 2019 1:30 PM
To: devel@edk2.groups.io; tim.le...@insyde.com
Cc: dandan...@intel.com; jw...@jwatt.org; jaben.car...@intel.com; 
zhichao@intel.com; ray...@intel.com
Subject: RE: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

Tim,

Out of curiosity, what does the specification you refer to that was used to 
write the non-EDK2 implementations say about the -opt switch?

Regards,
Jim

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Tim Lewis
Sent: Tuesday, May 7, 2019 3:04 PM
To: 'Jonathan Watt'; 'Carsey, Jaben'; devel@edk2.groups.io; 'Gao, Zhichao'; 
'Ni, Ray'
Cc: 'Bi, Dandan'
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

Jonathan --

The bcfg command pre-dates the UEFI shell specification. I know of at least two 
non-EDK2 implementations, including one maintained by my company, that are 
implemented to the specification. Server platforms that use the "application" 
style boot options can regularly run over 10 options. 

I believe the better  alternative is to add a new option in the specification 
and leave the existing syntax for -opt.

Thanks,

Tim

-Original Message-
From: Jonathan Watt 
Sent: Tuesday, May 7, 2019 12:06 PM
To: Carsey, Jaben ; devel@edk2.groups.io; 
tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 

Cc: Bi, Dandan 
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

I should add, for me personally, once I noticed the inconsistency I changed my 
scripts to use the "0x" prefix to avoid this real footgun. I imagine that 
anyone else that may have encountered this would have done the same and so, 
like me, wouldn't be affected by the change if it were to happen.

On 07/05/2019 20:00, Jonathan Watt wrote:
> There is potential for that, but it's not certain. For it to happen 
> scripts would need to be both omitting the "0x" prefix and be pass an 
> option number greater than 9. The fact this very unexpected 
> inconsistency (which will corrupt the wrong option when those same two 
> things are true!) hasn't been reported before would seem to indicate 
> this combination doesn't really happen/is rare in practice.
> 
> Also, is TianoCore's bcfg the only implementation people are using? If 
> there are other implementations, would this bring TianoCore's 
> implementation into or out of line with them? That may impact whether the 
> spec could/should change.
> 
> On 07/05/2019 18:40, Carsey, Jaben wrote:
>> It will break existing scripts.  Do you have such scripts in your 
>> environment dependent on this parameter?
>>
>>> -Original Message-
>>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
>>> Of Tim Lewis
>>> Sent: Tuesday, May 07, 2019 9:20 AM
>>> To: devel@edk2.groups.io; Carsey, Jaben ; 
>>> Gao, Zhichao ; Ni, Ray ; 
>>> jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
>>> Importance: High
>>>
>>> The question is whether this will break compatibility with existing 
>>> shell scripts. In order to maintain that compatibility, it may be 
>>> necessary to add a new option rather than trying to update an existing one.
>>>
>>> Tim
>>>
>>> -Original Message-
>>> From: devel@edk2.groups.io  On Behalf Of 
>>> Carsey, Jaben
>>> Sent: Tuesday, May 7, 2019 7:36 AM
>>> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, 
>>> Ray ; jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib:
>>> Fix '-opt' option
>>>
>>> Zhichao,
>>> I can help submit errata for shell spec if needed.
>>>
>>> Per patch,
>>> I agree. This looks good.
>>> Reviewed-by: Jaben Carsey 
>>>
>>>
 -Original Message-
 From: Gao, Zhichao
 Sent: Tuesday, May 07, 2019 2:52 AM
 To: devel@edk2.groups.io; Ni, Ray ; 
 jw...@jwatt.org
 Cc: Carsey, Jaben ; Bi, Dandan 
 
 Subject: RE: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
 Importance: High

 This patch looks good for me.
 Reviewed-by: Zhichao Gao 

 But when I view the command in UEFI SHELL 2.2 spec:
 ...
 bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData >>> UnicodeChar>*]]
 ...
 -opt
 Modify the optional data associated with a driver or boot option.
 Followed either by the filename of the file which contains the 
 binary data to be associated with the driver or boot option 
 optional data, or else the quote- delimited data that will be 
 associated wi

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Tim Lewis
Jonathan --

The bcfg command pre-dates the UEFI shell specification. I know of at least two 
non-EDK2 implementations, including one maintained by my company, that are 
implemented to the specification. Server platforms that use the "application" 
style boot options can regularly run over 10 options. 

I believe the better  alternative is to add a new option in the specification 
and leave the existing syntax for -opt.

Thanks,

Tim

-Original Message-
From: Jonathan Watt  
Sent: Tuesday, May 7, 2019 12:06 PM
To: Carsey, Jaben ; devel@edk2.groups.io; 
tim.le...@insyde.com; Gao, Zhichao ; Ni, Ray 

Cc: Bi, Dandan 
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix 
'-opt' option

I should add, for me personally, once I noticed the inconsistency I changed my 
scripts to use the "0x" prefix to avoid this real footgun. I imagine that 
anyone else that may have encountered this would have done the same and so, 
like me, wouldn't be affected by the change if it were to happen.

On 07/05/2019 20:00, Jonathan Watt wrote:
> There is potential for that, but it's not certain. For it to happen 
> scripts would need to be both omitting the "0x" prefix and be pass an 
> option number greater than 9. The fact this very unexpected 
> inconsistency (which will corrupt the wrong option when those same two 
> things are true!) hasn't been reported before would seem to indicate 
> this combination doesn't really happen/is rare in practice.
> 
> Also, is TianoCore's bcfg the only implementation people are using? If 
> there are other implementations, would this bring TianoCore's 
> implementation into or out of line with them? That may impact whether the 
> spec could/should change.
> 
> On 07/05/2019 18:40, Carsey, Jaben wrote:
>> It will break existing scripts.  Do you have such scripts in your 
>> environment dependent on this parameter?
>>
>>> -Original Message-
>>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
>>> Of Tim Lewis
>>> Sent: Tuesday, May 07, 2019 9:20 AM
>>> To: devel@edk2.groups.io; Carsey, Jaben ; 
>>> Gao, Zhichao ; Ni, Ray ; 
>>> jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
>>> Importance: High
>>>
>>> The question is whether this will break compatibility with existing 
>>> shell scripts. In order to maintain that compatibility, it may be 
>>> necessary to add a new option rather than trying to update an existing one.
>>>
>>> Tim
>>>
>>> -Original Message-
>>> From: devel@edk2.groups.io  On Behalf Of 
>>> Carsey, Jaben
>>> Sent: Tuesday, May 7, 2019 7:36 AM
>>> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, 
>>> Ray ; jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib:
>>> Fix '-opt' option
>>>
>>> Zhichao,
>>> I can help submit errata for shell spec if needed.
>>>
>>> Per patch,
>>> I agree. This looks good.
>>> Reviewed-by: Jaben Carsey 
>>>
>>>
 -Original Message-
 From: Gao, Zhichao
 Sent: Tuesday, May 07, 2019 2:52 AM
 To: devel@edk2.groups.io; Ni, Ray ; 
 jw...@jwatt.org
 Cc: Carsey, Jaben ; Bi, Dandan 
 
 Subject: RE: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
 Importance: High

 This patch looks good for me.
 Reviewed-by: Zhichao Gao 

 But when I view the command in UEFI SHELL 2.2 spec:
 ...
 bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData >>> UnicodeChar>*]]
 ...
 -opt
 Modify the optional data associated with a driver or boot option.
 Followed either by the filename of the file which contains the 
 binary data to be associated with the driver or boot option 
 optional data, or else the quote- delimited data that will be 
 associated with the driver or boot option optional data.
 ...

 This description lack the comment of '#' parameter and that may 
 make the consumer confused. Usually consumers would regard it as 
 the same in other option, such as ' bcfg driver|boot [rm #]'. The 
 '#' is clearly descripted as a hexadecimal parameter:
 rm
 Remove an option. The # parameter lists the option number to remove 
 in hexadecimal.

 So I think we should update the shell spec by the way.

 Thanks,
 Zhichao

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
> Of
 Ni,
> Ray
> Sent: Monday, May 6, 2019 10:02 PM
> To: jw...@jwatt.org; devel@edk2.groups.io
> Cc: Carsey, Jaben ; Bi, Dandan 
> 
> Subject: Re: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib:
> Fix '-opt' option
>
> Dandan,
> Can you please help to review?
>
> Thanks,
> Ray
>
>> -Original Message-
>> From: jw...@jwatt.org [mailto:jw...@jwatt.org]
>> Sent

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Jonathan Watt
I should add, for me personally, once I noticed the inconsistency I changed my
scripts to use the "0x" prefix to avoid this real footgun. I imagine that anyone
else that may have encountered this would have done the same and so, like me,
wouldn't be affected by the change if it were to happen.

On 07/05/2019 20:00, Jonathan Watt wrote:
> There is potential for that, but it's not certain. For it to happen scripts
> would need to be both omitting the "0x" prefix and be pass an option number
> greater than 9. The fact this very unexpected inconsistency (which will 
> corrupt
> the wrong option when those same two things are true!) hasn't been reported
> before would seem to indicate this combination doesn't really happen/is rare 
> in
> practice.
> 
> Also, is TianoCore's bcfg the only implementation people are using? If there 
> are
> other implementations, would this bring TianoCore's implementation into or out
> of line with them? That may impact whether the spec could/should change.
> 
> On 07/05/2019 18:40, Carsey, Jaben wrote:
>> It will break existing scripts.  Do you have such scripts in your 
>> environment dependent on this parameter?
>>
>>> -Original Message-
>>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>>> Tim Lewis
>>> Sent: Tuesday, May 07, 2019 9:20 AM
>>> To: devel@edk2.groups.io; Carsey, Jaben ; Gao,
>>> Zhichao ; Ni, Ray ;
>>> jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
>>> Importance: High
>>>
>>> The question is whether this will break compatibility with existing shell
>>> scripts. In order to maintain that compatibility, it may be necessary to add
>>> a new option rather than trying to update an existing one.
>>>
>>> Tim
>>>
>>> -Original Message-
>>> From: devel@edk2.groups.io  On Behalf Of Carsey,
>>> Jaben
>>> Sent: Tuesday, May 7, 2019 7:36 AM
>>> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, Ray
>>> ; jw...@jwatt.org
>>> Cc: Bi, Dandan 
>>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib:
>>> Fix '-opt' option
>>>
>>> Zhichao,
>>> I can help submit errata for shell spec if needed.
>>>
>>> Per patch,
>>> I agree. This looks good.
>>> Reviewed-by: Jaben Carsey 
>>>
>>>
 -Original Message-
 From: Gao, Zhichao
 Sent: Tuesday, May 07, 2019 2:52 AM
 To: devel@edk2.groups.io; Ni, Ray ; jw...@jwatt.org
 Cc: Carsey, Jaben ; Bi, Dandan
 
 Subject: RE: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
 Importance: High

 This patch looks good for me.
 Reviewed-by: Zhichao Gao 

 But when I view the command in UEFI SHELL 2.2 spec:
 ...
 bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData >>> UnicodeChar>*]]
 ...
 -opt
 Modify the optional data associated with a driver or boot option.
 Followed either by the filename of the file which contains the binary
 data to be associated with the driver or boot option optional data, or
 else the quote- delimited data that will be associated with the driver
 or boot option optional data.
 ...

 This description lack the comment of '#' parameter and that may make
 the consumer confused. Usually consumers would regard it as the same
 in other option, such as ' bcfg driver|boot [rm #]'. The '#' is
 clearly descripted as a hexadecimal parameter:
 rm
 Remove an option. The # parameter lists the option number to remove in
 hexadecimal.

 So I think we should update the shell spec by the way.

 Thanks,
 Zhichao

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
> Of
 Ni,
> Ray
> Sent: Monday, May 6, 2019 10:02 PM
> To: jw...@jwatt.org; devel@edk2.groups.io
> Cc: Carsey, Jaben ; Bi, Dandan
> 
> Subject: Re: [edk2-devel] [PATCH v1 1/1]
 ShellPkg/UefiShellBcfgCommandLib:
> Fix '-opt' option
>
> Dandan,
> Can you please help to review?
>
> Thanks,
> Ray
>
>> -Original Message-
>> From: jw...@jwatt.org [mailto:jw...@jwatt.org]
>> Sent: Monday, May 6, 2019 9:03 PM
>> To: devel@edk2.groups.io
>> Cc: Carsey, Jaben ; Ni, Ray
>> 
>> Subject: [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt'
>> option
>>
>> From: Jonathan Watt 
>>
>> For all other bcfg commands the "#" (option number) argument(s)
>> are treated as hexedecimal values regardless of whether or not
>> they are prefixed by "0x".  This change fixes '-opt' to handle its "#"
>> (option number) argument consistently with the other commands.
>>
>> Making this change removes a potential footgun whereby a user that
>> has been using a number without a "0x" prefix with other bcfg
>> commands finds that, on using that exact same number with '-opt',
>>>

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Jonathan Watt
There is potential for that, but it's not certain. For it to happen scripts
would need to be both omitting the "0x" prefix and be pass an option number
greater than 9. The fact this very unexpected inconsistency (which will corrupt
the wrong option when those same two things are true!) hasn't been reported
before would seem to indicate this combination doesn't really happen/is rare in
practice.

Also, is TianoCore's bcfg the only implementation people are using? If there are
other implementations, would this bring TianoCore's implementation into or out
of line with them? That may impact whether the spec could/should change.

On 07/05/2019 18:40, Carsey, Jaben wrote:
> It will break existing scripts.  Do you have such scripts in your environment 
> dependent on this parameter?
> 
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>> Tim Lewis
>> Sent: Tuesday, May 07, 2019 9:20 AM
>> To: devel@edk2.groups.io; Carsey, Jaben ; Gao,
>> Zhichao ; Ni, Ray ;
>> jw...@jwatt.org
>> Cc: Bi, Dandan 
>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
>> Importance: High
>>
>> The question is whether this will break compatibility with existing shell
>> scripts. In order to maintain that compatibility, it may be necessary to add
>> a new option rather than trying to update an existing one.
>>
>> Tim
>>
>> -Original Message-
>> From: devel@edk2.groups.io  On Behalf Of Carsey,
>> Jaben
>> Sent: Tuesday, May 7, 2019 7:36 AM
>> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, Ray
>> ; jw...@jwatt.org
>> Cc: Bi, Dandan 
>> Subject: Re: [edk2-devel] [PATCH v1 1/1]
>> ShellPkg/UefiShellBcfgCommandLib:
>> Fix '-opt' option
>>
>> Zhichao,
>> I can help submit errata for shell spec if needed.
>>
>> Per patch,
>> I agree. This looks good.
>> Reviewed-by: Jaben Carsey 
>>
>>
>>> -Original Message-
>>> From: Gao, Zhichao
>>> Sent: Tuesday, May 07, 2019 2:52 AM
>>> To: devel@edk2.groups.io; Ni, Ray ; jw...@jwatt.org
>>> Cc: Carsey, Jaben ; Bi, Dandan
>>> 
>>> Subject: RE: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
>>> Importance: High
>>>
>>> This patch looks good for me.
>>> Reviewed-by: Zhichao Gao 
>>>
>>> But when I view the command in UEFI SHELL 2.2 spec:
>>> ...
>>> bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData >> UnicodeChar>*]]
>>> ...
>>> -opt
>>> Modify the optional data associated with a driver or boot option.
>>> Followed either by the filename of the file which contains the binary
>>> data to be associated with the driver or boot option optional data, or
>>> else the quote- delimited data that will be associated with the driver
>>> or boot option optional data.
>>> ...
>>>
>>> This description lack the comment of '#' parameter and that may make
>>> the consumer confused. Usually consumers would regard it as the same
>>> in other option, such as ' bcfg driver|boot [rm #]'. The '#' is
>>> clearly descripted as a hexadecimal parameter:
>>> rm
>>> Remove an option. The # parameter lists the option number to remove in
>>> hexadecimal.
>>>
>>> So I think we should update the shell spec by the way.
>>>
>>> Thanks,
>>> Zhichao
>>>
 -Original Message-
 From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
 Of
>>> Ni,
 Ray
 Sent: Monday, May 6, 2019 10:02 PM
 To: jw...@jwatt.org; devel@edk2.groups.io
 Cc: Carsey, Jaben ; Bi, Dandan
 
 Subject: Re: [edk2-devel] [PATCH v1 1/1]
>>> ShellPkg/UefiShellBcfgCommandLib:
 Fix '-opt' option

 Dandan,
 Can you please help to review?

 Thanks,
 Ray

> -Original Message-
> From: jw...@jwatt.org [mailto:jw...@jwatt.org]
> Sent: Monday, May 6, 2019 9:03 PM
> To: devel@edk2.groups.io
> Cc: Carsey, Jaben ; Ni, Ray
> 
> Subject: [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt'
> option
>
> From: Jonathan Watt 
>
> For all other bcfg commands the "#" (option number) argument(s)
> are treated as hexedecimal values regardless of whether or not
> they are prefixed by "0x".  This change fixes '-opt' to handle its "#"
> (option number) argument consistently with the other commands.
>
> Making this change removes a potential footgun whereby a user that
> has been using a number without a "0x" prefix with other bcfg
> commands finds that, on using that exact same number with '-opt',
> it has this time unexpectedly been interpreted as a decimal number
> and they have modified
> (corrupted) an unrelated load option.  For example, a user may
> have been specifying "10" to other commands to have them act on
> the 16th option (because simply "10", without any prefix, is how
> 'bcfg boot dump' displayed the option number for the 16th option).
> Unfortunately for them, if they also use '-opt' with "10" it would
> unexpectedly and inconsist

Re: [edk2-devel] [Patch v5 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2019-05-07 Thread Laszlo Ersek
Hi Liming,

On 05/07/19 16:27, Liming Gao wrote:
> This patch provides a set of include segment files for platform owner to
> easily enable/disable network stack support on their platform.
> 
> For DSC, there are:
> - a "NetworkDefines.dsc.inc" for the [Defines] section(s),
> - a "NetworkLibs.dsc.inc" for the [LibraryClasses*] section(s),
> - a "NetworkPcds.dsc.inc" for the [Pcds*] section(s),
> - a "NetworkComponents.dsc.inc" for the [Components*] section(s).
> For FDF, there is:
> - a "Network.fdf.inc" for the [Fv*] section(s).
> 
> These files can be added to the platform DSC/FDF file by using
>   !include NetworkPkg/xxx
> where "xxx" is the *.inc file name.
> 
> A platform DSC file can diverge from the defaults in
> "NetworkDefines.dsc.inc" by setting the individual DEFINEs before
> including "NetworkDefines.dsc.inc".
> And, build command line ("-D FLAG=VALUE") can be used to enable or
> disable related feature set, please check "NetworkDefines.dsc.inc"
> for a detail description of each flag.
> 
> The default value of these flags are:
>   DEFINE NETWORK_ENABLE = TRUE
>   DEFINE NETWORK_SNP_ENABLE = TRUE
>   DEFINE NETWORK_IP4_ENABLE = TRUE
>   DEFINE NETWORK_IP6_ENABLE = TRUE
>   DEFINE NETWORK_TLS_ENABLE = TRUE
>   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
>   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
>   DEFINE NETWORK_ISCSI_ENABLE   = TRUE
>   DEFINE NETWORK_VLAN_ENABLE= TRUE
> 
> Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
> 
> Cc: Jiaxin Wu 
> Cc: Ting Ye 
> Signed-off-by: Fu Siyuan 
> ---
>  NetworkPkg/Network.fdf.inc   |  60 ++
>  NetworkPkg/NetworkComponents.dsc.inc |  61 ++
>  NetworkPkg/NetworkDefines.dsc.inc| 118 
> +++
>  NetworkPkg/NetworkLibs.dsc.inc   |  20 ++
>  NetworkPkg/NetworkPcds.dsc.inc   |  16 +
>  5 files changed, 275 insertions(+)
>  create mode 100644 NetworkPkg/Network.fdf.inc
>  create mode 100644 NetworkPkg/NetworkComponents.dsc.inc
>  create mode 100644 NetworkPkg/NetworkDefines.dsc.inc
>  create mode 100644 NetworkPkg/NetworkLibs.dsc.inc
>  create mode 100644 NetworkPkg/NetworkPcds.dsc.inc

Before you push this patch, please also add your own "Signed-off-by" tag
at the bottom of the commit message. In the end, the patch should carry
both Siyuan's and your S-o-b.

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40132): https://edk2.groups.io/g/devel/message/40132
Mute This Topic: https://groups.io/mt/31532468/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch v5 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2019-05-07 Thread Laszlo Ersek
On 05/07/19 16:27, Liming Gao wrote:
> This patch provides a set of include segment files for platform owner to
> easily enable/disable network stack support on their platform.
> 
> For DSC, there are:
> - a "NetworkDefines.dsc.inc" for the [Defines] section(s),
> - a "NetworkLibs.dsc.inc" for the [LibraryClasses*] section(s),
> - a "NetworkPcds.dsc.inc" for the [Pcds*] section(s),
> - a "NetworkComponents.dsc.inc" for the [Components*] section(s).
> For FDF, there is:
> - a "Network.fdf.inc" for the [Fv*] section(s).
> 
> These files can be added to the platform DSC/FDF file by using
>   !include NetworkPkg/xxx
> where "xxx" is the *.inc file name.
> 
> A platform DSC file can diverge from the defaults in
> "NetworkDefines.dsc.inc" by setting the individual DEFINEs before
> including "NetworkDefines.dsc.inc".
> And, build command line ("-D FLAG=VALUE") can be used to enable or
> disable related feature set, please check "NetworkDefines.dsc.inc"
> for a detail description of each flag.
> 
> The default value of these flags are:
>   DEFINE NETWORK_ENABLE = TRUE
>   DEFINE NETWORK_SNP_ENABLE = TRUE
>   DEFINE NETWORK_IP4_ENABLE = TRUE
>   DEFINE NETWORK_IP6_ENABLE = TRUE
>   DEFINE NETWORK_TLS_ENABLE = TRUE
>   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
>   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
>   DEFINE NETWORK_ISCSI_ENABLE   = TRUE
>   DEFINE NETWORK_VLAN_ENABLE= TRUE
> 
> Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
> 
> Cc: Jiaxin Wu 
> Cc: Ting Ye 
> Signed-off-by: Fu Siyuan 
> ---
>  NetworkPkg/Network.fdf.inc   |  60 ++
>  NetworkPkg/NetworkComponents.dsc.inc |  61 ++
>  NetworkPkg/NetworkDefines.dsc.inc| 118 
> +++
>  NetworkPkg/NetworkLibs.dsc.inc   |  20 ++
>  NetworkPkg/NetworkPcds.dsc.inc   |  16 +
>  5 files changed, 275 insertions(+)
>  create mode 100644 NetworkPkg/Network.fdf.inc
>  create mode 100644 NetworkPkg/NetworkComponents.dsc.inc
>  create mode 100644 NetworkPkg/NetworkDefines.dsc.inc
>  create mode 100644 NetworkPkg/NetworkLibs.dsc.inc
>  create mode 100644 NetworkPkg/NetworkPcds.dsc.inc
> 
> diff --git a/NetworkPkg/Network.fdf.inc b/NetworkPkg/Network.fdf.inc
> new file mode 100644
> index 00..92e2c56cb8
> --- /dev/null
> +++ b/NetworkPkg/Network.fdf.inc
> @@ -0,0 +1,60 @@
> +## @file
> +# Network FDF include file for All Architectures.
> +#
> +# This file can be included to a platform FDF by using
> +# "!include NetworkPkg/Network.fdf.inc" to add EDKII network stack drivers
> +# according to the value of flags described in "NetworkPkg/Network.dsc.inc".

This addresses my comment (4) from the v3 review, thanks.

> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved.

Copyright year updated (5), thanks.

> +#
> +#SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +
> +!if $(NETWORK_ENABLE) == TRUE
> +  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
> +
> +  !if $(NETWORK_SNP_ENABLE) == TRUE
> +INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
> +  !endif
> +
> +  !if $(NETWORK_VLAN_ENABLE) == TRUE
> +INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
> +  !endif
> +
> +  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
> +
> +  !if $(NETWORK_IP4_ENABLE) == TRUE
> +INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf

I now understand that ArpDxe is IPv4 only. Answers my question (7).

> +INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
> +INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
> +INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
> +INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
> +  !endif
> +
> +  !if $(NETWORK_IP6_ENABLE) == TRUE
> +INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
> +INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
> +INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
> +INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
> +  !endif
> +
> +  INF  NetworkPkg/TcpDxe/TcpDxe.inf
> +  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
> +
> +  !if $(NETWORK_TLS_ENABLE) == TRUE
> +INF  NetworkPkg/TlsDxe/TlsDxe.inf
> +INF  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> +  !endif

This will be good for OVMF too, based on
.

> +
> +  !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE
> +INF  NetworkPkg/DnsDxe/DnsDxe.inf
> +INF  NetworkPkg/HttpDxe/HttpDxe.inf
> +INF  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
> +INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> +  !endif
> +
> +  !if $(NETWORK_ISCSI_ENABLE) == TRUE
> +INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
> +  !endif

Addresses my request (6).

> +
> +!endif
> diff --git a/NetworkPkg/NetworkComponents.dsc.inc 
> b/NetworkPkg/NetworkComponents.dsc.inc
> new file mode 100644
> index 00..aede5ea8be
> --- /dev/null
> +++ b/NetworkPkg/NetworkComponents.ds

Re: [edk2-devel] [PATCH 1/1] ArmPkg/CompilerIntrinsicsLib: Add lasr assembly source for gcc/arm

2019-05-07 Thread Pete Batard

Hi Leif,

On 2019.05.07 17:52, Leif Lindholm wrote:

On Tue, May 07, 2019 at 04:57:26PM +0100, Pete Batard wrote:

While compiling drivers or applications on Debian 9.8, using the native
gcc 6.3.0 ARM compiler, one may run into the following build failure:

   "undefined reference to `__aeabi_lasr'"

This patch adds the missing definition, through a port of the existing
RVCT lasr.asm source.


Ugh. Here's a module that could do with a bit of love.
ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch.asm,
ArmPkg/Library/CompilerIntrinsicsLib/Arm/uread.asm and
ArmPkg/Library/CompilerIntrinsicsLib/Arm/uwrite.asm
also all miss .S versions.


Well, I would assume the switch.asm counterparts are provided in the 
various switch##.S.


On the other hand, since I'm half expecting to run into undefined refs 
with regards to __aeabi_uread# and __aeabi_uwrite# sooner rather than 
later, I will take a stab at uread/uwrite.



And then there is an ominous comment in the .inf
"# Move .c to .s to work around LLVM issues"
and it appears all of the .c files are actually unused.


Okay. Unless someone objects, I'll remove these unused files as part of 
a v2 proposal.



I'm not going to try to make you fix those too, but if you're feeling
charitable...

One comment below.


CC: Ard Biesheuvel 
CC: Leif Lindholm 
Signed-off-by: Pete Batard 
---
  ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S| 22 

  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf |  1 +
  2 files changed, 23 insertions(+)

diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S 
b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S
new file mode 100644
index ..9ded045b8bc4
--- /dev/null
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S
@@ -0,0 +1,22 @@
+#--
+#
+# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+#--
+
+#include 
+


Could you add a "prototype" here?
The one in the original is nonsense, but
something like


Will do that too.

Regards,

/Pete



#
#INT64
#EFIAPI
#__aeabi_lasr (
#  IN INT64 Value,
#  IN INT32 Shift
#  );
#

?

/
 Leif


+ASM_FUNC(__aeabi_lasr)
+  subs r3,r2,#0x20
+  bpl  L_Test
+  rsb  r3,r2,#0x20
+  lsr  r0,r0,r2
+  orr  r0,r0,r1,LSL r3
+  asr  r1,r1,r2
+  bx   lr
+L_Test:
+  asr  r0,r1,r3
+  asr  r1,r1,#31
+  bx   lr
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf 
b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
index 0d5634959993..7cb8f194f210 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
@@ -90,6 +90,7 @@ [Sources.ARM]
Arm/uldiv.S  | GCC
Arm/ldivmod.S| GCC
  
+  Arm/lasr.S   | GCC

Arm/llsr.S   | GCC
Arm/llsl.S   | GCC
  
--

2.21.0.windows.1




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40130): https://edk2.groups.io/g/devel/message/40130
Mute This Topic: https://groups.io/mt/31533433/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Carsey, Jaben
It will break existing scripts.  Do you have such scripts in your environment 
dependent on this parameter?

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Tim Lewis
> Sent: Tuesday, May 07, 2019 9:20 AM
> To: devel@edk2.groups.io; Carsey, Jaben ; Gao,
> Zhichao ; Ni, Ray ;
> jw...@jwatt.org
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> Importance: High
> 
> The question is whether this will break compatibility with existing shell
> scripts. In order to maintain that compatibility, it may be necessary to add
> a new option rather than trying to update an existing one.
> 
> Tim
> 
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Carsey,
> Jaben
> Sent: Tuesday, May 7, 2019 7:36 AM
> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, Ray
> ; jw...@jwatt.org
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib:
> Fix '-opt' option
> 
> Zhichao,
> I can help submit errata for shell spec if needed.
> 
> Per patch,
> I agree. This looks good.
> Reviewed-by: Jaben Carsey 
> 
> 
> > -Original Message-
> > From: Gao, Zhichao
> > Sent: Tuesday, May 07, 2019 2:52 AM
> > To: devel@edk2.groups.io; Ni, Ray ; jw...@jwatt.org
> > Cc: Carsey, Jaben ; Bi, Dandan
> > 
> > Subject: RE: [edk2-devel] [PATCH v1 1/1]
> > ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> > Importance: High
> >
> > This patch looks good for me.
> > Reviewed-by: Zhichao Gao 
> >
> > But when I view the command in UEFI SHELL 2.2 spec:
> > ...
> > bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData  > UnicodeChar>*]]
> > ...
> > -opt
> > Modify the optional data associated with a driver or boot option.
> > Followed either by the filename of the file which contains the binary
> > data to be associated with the driver or boot option optional data, or
> > else the quote- delimited data that will be associated with the driver
> > or boot option optional data.
> > ...
> >
> > This description lack the comment of '#' parameter and that may make
> > the consumer confused. Usually consumers would regard it as the same
> > in other option, such as ' bcfg driver|boot [rm #]'. The '#' is
> > clearly descripted as a hexadecimal parameter:
> > rm
> > Remove an option. The # parameter lists the option number to remove in
> > hexadecimal.
> >
> > So I think we should update the shell spec by the way.
> >
> > Thanks,
> > Zhichao
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
> > > Of
> > Ni,
> > > Ray
> > > Sent: Monday, May 6, 2019 10:02 PM
> > > To: jw...@jwatt.org; devel@edk2.groups.io
> > > Cc: Carsey, Jaben ; Bi, Dandan
> > > 
> > > Subject: Re: [edk2-devel] [PATCH v1 1/1]
> > ShellPkg/UefiShellBcfgCommandLib:
> > > Fix '-opt' option
> > >
> > > Dandan,
> > > Can you please help to review?
> > >
> > > Thanks,
> > > Ray
> > >
> > > > -Original Message-
> > > > From: jw...@jwatt.org [mailto:jw...@jwatt.org]
> > > > Sent: Monday, May 6, 2019 9:03 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: Carsey, Jaben ; Ni, Ray
> > > > 
> > > > Subject: [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt'
> > > > option
> > > >
> > > > From: Jonathan Watt 
> > > >
> > > > For all other bcfg commands the "#" (option number) argument(s)
> > > > are treated as hexedecimal values regardless of whether or not
> > > > they are prefixed by "0x".  This change fixes '-opt' to handle its "#"
> > > > (option number) argument consistently with the other commands.
> > > >
> > > > Making this change removes a potential footgun whereby a user that
> > > > has been using a number without a "0x" prefix with other bcfg
> > > > commands finds that, on using that exact same number with '-opt',
> > > > it has this time unexpectedly been interpreted as a decimal number
> > > > and they have modified
> > > > (corrupted) an unrelated load option.  For example, a user may
> > > > have been specifying "10" to other commands to have them act on
> > > > the 16th option (because simply "10", without any prefix, is how
> > > > 'bcfg boot dump' displayed the option number for the 16th option).
> > > > Unfortunately for them, if they also use '-opt' with "10" it would
> > > > unexpectedly and inconsistently act on the 10th option.
> > > >
> > > > CC: Jaben Carsey 
> > > > CC: Ray Ni 
> > > > Signed-off-by: Jonathan Watt 
> > > > ---
> > > >
> > > >
> ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > |
> > > > 2
> > > > +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git
> > > >
> > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > >
> > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > > index d033c7c1dc59..e8b48b4990dd 100644
> > > > ---
> > > >
> > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > > +

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Tim Lewis
Yes. And we have been recommending the usage of bcfg to our customers for
years.

Tim

-Original Message-
From: Carsey, Jaben  
Sent: Tuesday, May 7, 2019 10:41 AM
To: devel@edk2.groups.io; tim.le...@insyde.com; Gao, Zhichao
; Ni, Ray ; jw...@jwatt.org
Cc: Bi, Dandan 
Subject: RE: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib:
Fix '-opt' option

It will break existing scripts.  Do you have such scripts in your
environment dependent on this parameter?

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of 
> Tim Lewis
> Sent: Tuesday, May 07, 2019 9:20 AM
> To: devel@edk2.groups.io; Carsey, Jaben ; Gao, 
> Zhichao ; Ni, Ray ; 
> jw...@jwatt.org
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> Importance: High
> 
> The question is whether this will break compatibility with existing 
> shell scripts. In order to maintain that compatibility, it may be 
> necessary to add a new option rather than trying to update an existing
one.
> 
> Tim
> 
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Carsey, 
> Jaben
> Sent: Tuesday, May 7, 2019 7:36 AM
> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, 
> Ray ; jw...@jwatt.org
> Cc: Bi, Dandan 
> Subject: Re: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib:
> Fix '-opt' option
> 
> Zhichao,
> I can help submit errata for shell spec if needed.
> 
> Per patch,
> I agree. This looks good.
> Reviewed-by: Jaben Carsey 
> 
> 
> > -Original Message-
> > From: Gao, Zhichao
> > Sent: Tuesday, May 07, 2019 2:52 AM
> > To: devel@edk2.groups.io; Ni, Ray ; 
> > jw...@jwatt.org
> > Cc: Carsey, Jaben ; Bi, Dandan 
> > 
> > Subject: RE: [edk2-devel] [PATCH v1 1/1]
> > ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> > Importance: High
> >
> > This patch looks good for me.
> > Reviewed-by: Zhichao Gao 
> >
> > But when I view the command in UEFI SHELL 2.2 spec:
> > ...
> > bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData  > UnicodeChar>*]]
> > ...
> > -opt
> > Modify the optional data associated with a driver or boot option.
> > Followed either by the filename of the file which contains the 
> > binary data to be associated with the driver or boot option optional 
> > data, or else the quote- delimited data that will be associated with 
> > the driver or boot option optional data.
> > ...
> >
> > This description lack the comment of '#' parameter and that may make 
> > the consumer confused. Usually consumers would regard it as the same 
> > in other option, such as ' bcfg driver|boot [rm #]'. The '#' is 
> > clearly descripted as a hexadecimal parameter:
> > rm
> > Remove an option. The # parameter lists the option number to remove 
> > in hexadecimal.
> >
> > So I think we should update the shell spec by the way.
> >
> > Thanks,
> > Zhichao
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
> > > Of
> > Ni,
> > > Ray
> > > Sent: Monday, May 6, 2019 10:02 PM
> > > To: jw...@jwatt.org; devel@edk2.groups.io
> > > Cc: Carsey, Jaben ; Bi, Dandan 
> > > 
> > > Subject: Re: [edk2-devel] [PATCH v1 1/1]
> > ShellPkg/UefiShellBcfgCommandLib:
> > > Fix '-opt' option
> > >
> > > Dandan,
> > > Can you please help to review?
> > >
> > > Thanks,
> > > Ray
> > >
> > > > -Original Message-
> > > > From: jw...@jwatt.org [mailto:jw...@jwatt.org]
> > > > Sent: Monday, May 6, 2019 9:03 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: Carsey, Jaben ; Ni, Ray 
> > > > 
> > > > Subject: [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt'
> > > > option
> > > >
> > > > From: Jonathan Watt 
> > > >
> > > > For all other bcfg commands the "#" (option number) argument(s) 
> > > > are treated as hexedecimal values regardless of whether or not 
> > > > they are prefixed by "0x".  This change fixes '-opt' to handle its
"#"
> > > > (option number) argument consistently with the other commands.
> > > >
> > > > Making this change removes a potential footgun whereby a user 
> > > > that has been using a number without a "0x" prefix with other 
> > > > bcfg commands finds that, on using that exact same number with 
> > > > '-opt', it has this time unexpectedly been interpreted as a 
> > > > decimal number and they have modified
> > > > (corrupted) an unrelated load option.  For example, a user may 
> > > > have been specifying "10" to other commands to have them act on 
> > > > the 16th option (because simply "10", without any prefix, is how 
> > > > 'bcfg boot dump' displayed the option number for the 16th option).
> > > > Unfortunately for them, if they also use '-opt' with "10" it 
> > > > would unexpectedly and inconsistently act on the 10th option.
> > > >
> > > > CC: Jaben Carsey 
> > > > CC: Ray Ni 
> > > > Signed-off-by: Jonathan Watt 
> > > > ---
> > > >
> > > >
> ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > |
> > > > 2
> 

Re: [edk2-devel] TianoCore Community Design Meeting Minutes

2019-05-07 Thread Brian J. Johnson

On 5/6/19 11:06 AM, Laszlo Ersek wrote:

On 05/03/19 23:41, Brian J. Johnson wrote:

On 5/2/19 2:33 PM, sean.brogan via groups.io wrote:

Brian,

I would really like to hear about the challenges your team faced and
issues that caused those solutions to be unworkable.  Project Mu has
and continues to invest a lot in testing capabilities, build
automation, and finding ways to improve quality that scale.



Our products depend on a reference BIOS tree provided to us by a major
processor vendor.  That tree includes portions of Edk2, plus numerous
proprietary additions.  Each new platform starts with a new drop of
vendor code.  They provide additional drops throughout the platform's
life.  In the past these were distributed as zip files, but more
recently they have transitioned to git.  We end up having to make
extensive changes to their code to port it to our platform.  In
addition, we maintain internally several packages of code used on all
our platforms, designed to be platform-independent, plus a
platform-dependent package which is intended to be modified for each
platform.

When we first started using git, we looked for a way to share our
all-platform code among platforms, and move our platform-dependent code
easily to new platforms, while making it easy to integrate new drops
from our vendor.  We considered using git submodules, but decided that
would be too awkward.  Modifying code in a submodule involves committing
in the submodule, then committing in the module containing it.  This
seemed like too much trouble for our developers, who were all new to
git.  Plus, it didn't interact well at all with our internal bug
tracking system.  Basically, there was no good way to tie commits in
various sub- and super-modules together in a straightforward, trackable
way.

We tried a package called gitslave 
(https://urldefense.proofpoint.com/v2/url?u=http-3A__gitslave.sourceforge.net_&d=DwIFaQ&c=C5b8zRQO1miGmBeVZ2LFWg&r=joEypYTP_0CJDmGFXzPM2s0mxEmiZkE9j8XY2t0muB0&m=1tiBKTNUl1hsutcV6QO4vfS5z-mNbJG27saNg6g5oxE&s=_kECBP00BbccSKeE1CThEYHF7EtrPa7XGIRfRUPq8i0&e=),
which automates running git commands across a super-repo and various
sub-repos, with some sugar for aggregating the results into a readable
whole.  It's a bit more transparent than submodules.  But at the end of
the day, you're still trying to coordinate multiple git repositories. We
gave it a try for a month or two, but having to manage multiple
repositories for day-to-day work, and the lack of a single commit
history spanning the entire tree doomed that scheme.  Developers rebelled.

Ever since, we've used a single git repo per platform.  We keep the
vendor code in a "base" branch, which we update as they provide drops,
then merge into our master branch.  When we start a new platform, we use
git filter-branch to extract our all-platform and platform-dependent
code into a new branch, which we move to the new platform's repo and
merge into master.  It's possible to re-extract the code if we need to
pick up updates.  This doesn't provide total flexibility... for
instance, backporting a fix in our all-platform code back to a previous
platform involves manual cherrypicking.


Good point -- and cherry-picking is a first class citizen in the git
toolset. Upstream projects use it all the time, between their master and
stable branches. And we (RH) happen to use it all the time too. "git
cherry-pick -s -x" (possibly "-e" too) is the main tool for backporting
upstream patches to downstream branches.


But for day-to-day development,
it lets us work in a single git tree, with a bisectable history, working
git-blame, commit IDs which tie directly to our bug tracker, and no
external tooling.  It's a bit of a pain to merge a new drop (shell
scripts are our friends), but we're optimizing for ease of local
development.  That seems like the best use of our resources.

So I'm leery of any scheme which involves multiple repos managed by an
external tool.  It sounds like a difficult way to do day-to-day
development.  If Edk2 does move to split repos, we could filter-branch
and merge them all together into a single branch for internal use, I
suppose.  But that does make it harder to push fixes upstream.


Even if that re-merging worked in practica, and even if two consumers of
edk2 followed the exact same procedure for re-unifying the repo, they
would still end up with different commit hashes -- and that would make
it more difficult to reference the same commits in upstream discussion.



Yes, we end up having to cherry pick (or more likely, outright port) any 
changes we want to send upstream back onto the upstream branch(es).  One 
reason we don't do a lot of that



(Not that we end up doing a lot of that... we're not developing an
open-source BIOS, just making use of open-source upstream components. So
our use case is quite a bit different from Laszlo's.)  We're also
generally focusing on one platform at a time, not trying to update
shared code across many at once.  So our 

Re: [edk2-devel] [PATCH 1/1] ArmPkg/CompilerIntrinsicsLib: Add lasr assembly source for gcc/arm

2019-05-07 Thread Leif Lindholm
On Tue, May 07, 2019 at 04:57:26PM +0100, Pete Batard wrote:
> While compiling drivers or applications on Debian 9.8, using the native
> gcc 6.3.0 ARM compiler, one may run into the following build failure:
> 
>   "undefined reference to `__aeabi_lasr'"
> 
> This patch adds the missing definition, through a port of the existing
> RVCT lasr.asm source.

Ugh. Here's a module that could do with a bit of love.
ArmPkg/Library/CompilerIntrinsicsLib/Arm/switch.asm,
ArmPkg/Library/CompilerIntrinsicsLib/Arm/uread.asm and
ArmPkg/Library/CompilerIntrinsicsLib/Arm/uwrite.asm
also all miss .S versions.

And then there is an ominous comment in the .inf
"# Move .c to .s to work around LLVM issues"
and it appears all of the .c files are actually unused.

I'm not going to try to make you fix those too, but if you're feeling
charitable...

One comment below.

> CC: Ard Biesheuvel 
> CC: Leif Lindholm 
> Signed-off-by: Pete Batard 
> ---
>  ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S| 22 
> 
>  ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf |  1 +
>  2 files changed, 23 insertions(+)
> 
> diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S 
> b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S
> new file mode 100644
> index ..9ded045b8bc4
> --- /dev/null
> +++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S
> @@ -0,0 +1,22 @@
> +#--
> +#
> +# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +#--
> +
> +#include 
> +

Could you add a "prototype" here?
The one in the original is nonsense, but
something like

#
#INT64
#EFIAPI
#__aeabi_lasr (
#  IN INT64 Value,
#  IN INT32 Shift
#  );
#

?

/
Leif

> +ASM_FUNC(__aeabi_lasr)
> +  subs r3,r2,#0x20
> +  bpl  L_Test
> +  rsb  r3,r2,#0x20
> +  lsr  r0,r0,r2
> +  orr  r0,r0,r1,LSL r3
> +  asr  r1,r1,r2
> +  bx   lr
> +L_Test:
> +  asr  r0,r1,r3
> +  asr  r1,r1,#31
> +  bx   lr
> diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf 
> b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> index 0d5634959993..7cb8f194f210 100644
> --- a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> +++ b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> @@ -90,6 +90,7 @@ [Sources.ARM]
>Arm/uldiv.S  | GCC
>Arm/ldivmod.S| GCC
>  
> +  Arm/lasr.S   | GCC
>Arm/llsr.S   | GCC
>Arm/llsl.S   | GCC
>  
> -- 
> 2.21.0.windows.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40126): https://edk2.groups.io/g/devel/message/40126
Mute This Topic: https://groups.io/mt/31533433/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Tim Lewis
The question is whether this will break compatibility with existing shell
scripts. In order to maintain that compatibility, it may be necessary to add
a new option rather than trying to update an existing one.

Tim

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Carsey, Jaben
Sent: Tuesday, May 7, 2019 7:36 AM
To: Gao, Zhichao ; devel@edk2.groups.io; Ni, Ray
; jw...@jwatt.org
Cc: Bi, Dandan 
Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib:
Fix '-opt' option

Zhichao,
I can help submit errata for shell spec if needed.

Per patch,
I agree. This looks good.
Reviewed-by: Jaben Carsey 


> -Original Message-
> From: Gao, Zhichao
> Sent: Tuesday, May 07, 2019 2:52 AM
> To: devel@edk2.groups.io; Ni, Ray ; jw...@jwatt.org
> Cc: Carsey, Jaben ; Bi, Dandan 
> 
> Subject: RE: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> Importance: High
> 
> This patch looks good for me.
> Reviewed-by: Zhichao Gao 
> 
> But when I view the command in UEFI SHELL 2.2 spec:
> ...
> bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData  UnicodeChar>*]]
> ...
> -opt
> Modify the optional data associated with a driver or boot option. 
> Followed either by the filename of the file which contains the binary 
> data to be associated with the driver or boot option optional data, or 
> else the quote- delimited data that will be associated with the driver 
> or boot option optional data.
> ...
> 
> This description lack the comment of '#' parameter and that may make 
> the consumer confused. Usually consumers would regard it as the same 
> in other option, such as ' bcfg driver|boot [rm #]'. The '#' is 
> clearly descripted as a hexadecimal parameter:
> rm
> Remove an option. The # parameter lists the option number to remove in 
> hexadecimal.
> 
> So I think we should update the shell spec by the way.
> 
> Thanks,
> Zhichao
> 
> > -Original Message-
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf 
> > Of
> Ni,
> > Ray
> > Sent: Monday, May 6, 2019 10:02 PM
> > To: jw...@jwatt.org; devel@edk2.groups.io
> > Cc: Carsey, Jaben ; Bi, Dandan 
> > 
> > Subject: Re: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib:
> > Fix '-opt' option
> >
> > Dandan,
> > Can you please help to review?
> >
> > Thanks,
> > Ray
> >
> > > -Original Message-
> > > From: jw...@jwatt.org [mailto:jw...@jwatt.org]
> > > Sent: Monday, May 6, 2019 9:03 PM
> > > To: devel@edk2.groups.io
> > > Cc: Carsey, Jaben ; Ni, Ray 
> > > 
> > > Subject: [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt'
> > > option
> > >
> > > From: Jonathan Watt 
> > >
> > > For all other bcfg commands the "#" (option number) argument(s) 
> > > are treated as hexedecimal values regardless of whether or not 
> > > they are prefixed by "0x".  This change fixes '-opt' to handle its "#"
> > > (option number) argument consistently with the other commands.
> > >
> > > Making this change removes a potential footgun whereby a user that 
> > > has been using a number without a "0x" prefix with other bcfg 
> > > commands finds that, on using that exact same number with '-opt', 
> > > it has this time unexpectedly been interpreted as a decimal number 
> > > and they have modified
> > > (corrupted) an unrelated load option.  For example, a user may 
> > > have been specifying "10" to other commands to have them act on 
> > > the 16th option (because simply "10", without any prefix, is how 
> > > 'bcfg boot dump' displayed the option number for the 16th option). 
> > > Unfortunately for them, if they also use '-opt' with "10" it would 
> > > unexpectedly and inconsistently act on the 10th option.
> > >
> > > CC: Jaben Carsey 
> > > CC: Ray Ni 
> > > Signed-off-by: Jonathan Watt 
> > > ---
> > >  
> > > ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> |
> > > 2
> > > +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git
> > >
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > >
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > index d033c7c1dc59..e8b48b4990dd 100644
> > > ---
> > >
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > +++
> > >
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > @@ -1019,7 +1019,7 @@ BcfgAddOpt(
> > >//
> > >// Get the index of the variable we are changing.
> > >//
> > > -  Status = ShellConvertStringToUint64(Walker, &Intermediate, 
> > > FALSE, TRUE);
> > > +  Status = ShellConvertStringToUint64(Walker, &Intermediate, 
> > > + TRUE, TRUE);
> > >if (EFI_ERROR(Status) || (((UINT16)Intermediate) != 
> > > Intermediate)
> > > || StrStr(Walker, L" ") == NULL || ((UINT16)Intermediate) >
> > > ((UINT16)OrderCount)) {
> > >  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN 
> > > (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
> > >  ShellStatus = SHELL_

Re: [edk2-devel][Patch 0/2] Remove BootInRecoveryMode PPI DEPEX

2019-05-07 Thread Zhang, Chao B
Reviewed-by : Chao Zhang 

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Xu, Wei6
Sent: Tuesday, May 7, 2019 6:08 PM
To: devel@edk2.groups.io
Cc: Ni, Ray ; Wu, Hao A 
Subject: [edk2-devel][Patch 0/2] Remove BootInRecoveryMode PPI DEPEX

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1777

BootInRecoveryMode Ppi dependency should be removed from PEI storage stack 
drivers.Besides recovery, more features are using the storage stack.

CC: Ni Ray 
CC: Wu Hao A 

xuwei6 (2):
  FatPkg/FatPei: Remove BootInRecoveryMode PPI DEPEX.
  MdeModulePkg: Remove BootInRecoveryMode PPI DEPEX from PEI storage
stack.

 FatPkg/FatPei/FatPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/UhciPei/UhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf  | 2 +-
 MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf  | 2 +-
 MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.16.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40124): https://edk2.groups.io/g/devel/message/40124
Mute This Topic: https://groups.io/mt/31530231/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH 1/1] ArmPkg/CompilerIntrinsicsLib: Add lasr assembly source for gcc/arm

2019-05-07 Thread Pete Batard
While compiling drivers or applications on Debian 9.8, using the native
gcc 6.3.0 ARM compiler, one may run into the following build failure:

  "undefined reference to `__aeabi_lasr'"

This patch adds the missing definition, through a port of the existing
RVCT lasr.asm source.

CC: Ard Biesheuvel 
CC: Leif Lindholm 
Signed-off-by: Pete Batard 
---
 ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S| 22 

 ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf |  1 +
 2 files changed, 23 insertions(+)

diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S 
b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S
new file mode 100644
index ..9ded045b8bc4
--- /dev/null
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/lasr.S
@@ -0,0 +1,22 @@
+#--
+#
+# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+#--
+
+#include 
+
+ASM_FUNC(__aeabi_lasr)
+  subs r3,r2,#0x20
+  bpl  L_Test
+  rsb  r3,r2,#0x20
+  lsr  r0,r0,r2
+  orr  r0,r0,r1,LSL r3
+  asr  r1,r1,r2
+  bx   lr
+L_Test:
+  asr  r0,r1,r3
+  asr  r1,r1,#31
+  bx   lr
diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf 
b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
index 0d5634959993..7cb8f194f210 100644
--- a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+++ b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
@@ -90,6 +90,7 @@ [Sources.ARM]
   Arm/uldiv.S  | GCC
   Arm/ldivmod.S| GCC
 
+  Arm/lasr.S   | GCC
   Arm/llsr.S   | GCC
   Arm/llsl.S   | GCC
 
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40123): https://edk2.groups.io/g/devel/message/40123
Mute This Topic: https://groups.io/mt/31533433/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] Adding DebugPkg to the main edk2 repo

2019-05-07 Thread rebecca
On 2019-05-07 05:49, Laszlo Ersek wrote:
>
> I'd expect it to interoperate with any gdb server implementation.
>
> Whenever I use DebugPkg, to connect to a running QEMU instance, I launch the 
> following gdb scriptlet (with "gdb -x") from a file:
>
> set height 0
> set architecture i386:x86-64:intel
> target remote localhost:1234
> source .../DebugPkg/Scripts/gdb_uefi.py
> reload-uefi -o 
> .../Build/Ovmf3264/NOOPT_GCC48/X64/DebugPkg/GdbSyms/GdbSyms/DEBUG/GdbSyms.dll


Yup, I've documented the steps to use it at
https://code.bluestop.org/w/tianocore/debugging-with-gdb/ .

To work with modern versions of gdb which use Python 3, you can just run
2to3 (https://docs.python.org/3.7/library/2to3.html) on gdb_uefi.py
which I checked last night works.


I tried using it with a Bhyve build of OVMF
(https://github.com/freebsd/uefi-edk2/tree/bhyve/edk2-stable201903) but
it didn't work and I didn't have time to look into why. It might just be
because Bhyve's gdb server is fairly basic at the moment.


-- 
Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40122): https://edk2.groups.io/g/devel/message/40122
Mute This Topic: https://groups.io/mt/31527543/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file

2019-05-07 Thread Liming Gao
The change is good. Reviewed-by: Liming Gao 

Thanks
Liming
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of 
> Krzysztof Koch
> Sent: Tuesday, May 7, 2019 8:56 PM
> To: devel@edk2.groups.io
> Cc: sami.muja...@arm.com; n...@arm.com
> Subject: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file
> 
> The patch includes the following ACPI 6.3 updates:
>  1. Reserve CRAT and CDIT table names in ACPI 6.3 header.
> - ACPI 6.3 January 2019, Table 5-30
> - Mantis ID 1883 (https://mantis.uefi.org/mantis/view.php?id=1883)
>  2. Add new processor structure flags in PPTT.
> - ACPI 6.3 January 2019, Section 5.2.29
> - Mantis ID 1870 (https://mantis.uefi.org/mantis/view.php?id=1870)
> - Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
>  3. Add SPE support to MADT.
> - ACPI 6.3 January 2019, Table 5-60
> - Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
>  4. Add 'Hot-plug Capable' flag to APIC.
> - ACPI 6.3 January 2019, Table 5-44, Table 5-47 & Table 5-58
> - Mantis ID 1948 (https://mantis.uefi.org/mantis/view.php?id=1948)
>  5. Add CNTHV timer to GTDT.
> - ACPI 6.3 January 2019, Section 5.2.24
> - Mantis ID 1851 (https://mantis.uefi.org/mantis/view.php?id=1851)
>  6. Add 'Trigger Order' to Platform Communication Channel Identification
> Structure.
> - ACPI 6.3 January 2019, Section 5.2.28
> - Mantis ID 1867 (https://mantis.uefi.org/mantis/view.php?id=1867)
>  7. Add Generic Initiator Affinity Structure to SRAT.
> - ACPI 6.3 January 2019, Section 5.2.16.6
> - Mantis ID 1904 (https://mantis.uefi.org/mantis/view.php?id=1904)
>  8. Add 'HMAT Enhancements'.
> - ACPI 6.3 January 2019, Section 5.2.27
> - Mantis ID 1914 (https://mantis.uefi.org/mantis/view.php?id=1914)
> - Mantis ID 1959 (https://mantis.uefi.org/mantis/view.php?id=1959)
>  9. Fix generic address structure definition to include all address
> space ID keywords.
>- ACPI 6.3 January 2019, Table 5-25
>- Mantis ID 1965 (https://mantis.uefi.org/mantis/view.php?id=1965)
> 10. Make Acpi63.h the latest ACPI definition.
> 
> Signed-off-by: Krzysztof Koch 
> ---
> Resending patch as it did not reach the mailing list.
> 
> The patch can be viewed at:
> https://github.com/KrzysztofKoch1/edk2/tree/woa_529_acpi63_header_v1
> 
> Notes:
> v1:
> - add header file for ACPI 6.3 [Krzysztof]
> 
>  MdePkg/Include/IndustryStandard/Acpi.h   |3 +-
>  MdePkg/Include/IndustryStandard/Acpi63.h | 2946 
>  2 files changed, 2948 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/IndustryStandard/Acpi.h 
> b/MdePkg/Include/IndustryStandard/Acpi.h
> index 
> cc3f34b6e2fa66d0e97ea1ee07bffce91a7dfcce..48f4d7176125ee33db0f103268af199c7efacdad
>  100644
> --- a/MdePkg/Include/IndustryStandard/Acpi.h
> +++ b/MdePkg/Include/IndustryStandard/Acpi.h
> @@ -3,6 +3,7 @@
>consumed by drivers that do not care about ACPI versions.
> 
>Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
> +  Copyright (c) 2019, ARM Ltd. All rights reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -10,6 +11,6 @@
>  #ifndef _ACPI_H_
>  #define _ACPI_H_
> 
> -#include 
> +#include 
> 
>  #endif
> diff --git a/MdePkg/Include/IndustryStandard/Acpi63.h 
> b/MdePkg/Include/IndustryStandard/Acpi63.h
> new file mode 100644
> index 
> ..a8e011579ffcf070ecdfd2c6726a16d1afd65891
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/Acpi63.h
> @@ -0,0 +1,2946 @@
> +/** @file
> +  ACPI 6.3 definitions from the ACPI Specification Revision 6.3 Jan, 2019.
> +
> +  Copyright (c) 2017, Intel Corporation. All rights reserved.
> +  Copyright (c) 2019, ARM Ltd. All rights reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#ifndef _ACPI_6_3_H_
> +#define _ACPI_6_3_H_
> +
> +#include 
> +
> +//
> +// Ensure proper structure formats
> +//
> +#pragma pack(1)
> +
> +///
> +/// ACPI 6.3 Generic Address Space definition
> +///
> +typedef struct {
> +  UINT8   AddressSpaceId;
> +  UINT8   RegisterBitWidth;
> +  UINT8   RegisterBitOffset;
> +  UINT8   AccessSize;
> +  UINT64  Address;
> +} EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE;
> +
> +//
> +// Generic Address Space Address IDs
> +//
> +#define EFI_ACPI_6_3_SYSTEM_MEMORY   0x00
> +#define EFI_ACPI_6_3_SYSTEM_IO   0x01
> +#define EFI_ACPI_6_3_PCI_CONFIGURATION_SPACE 0x02
> +#define EFI_ACPI_6_3_EMBEDDED_CONTROLLER 0x03
> +#define EFI_ACPI_6_3_SMBUS   0x04
> +#define EFI_ACPI_6_3_SYSTEM_CMOS 0x05
> +#define EFI_ACPI_6_3_PCI_BAR_TARGET  0x06
> +#define EFI_ACPI_6_3_IPMI0x07
> +#define EFI_ACPI_6_3_GENERAL_PURPOSE_IO  0x08
> +#define EFI_ACPI_6_3_GENERIC_SERIAL_BUS  0x09
> +#define EFI_ACPI_6_3_PLATF

Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Dandan Bi
Also agree to update Shell Spec to add description for "#" in "-opt" part to 
make it consistent with other options since this patch has updated the code 
behavior to be consistent.

For the patch
Reviewed-by: Bi Dandan 


Thanks,
Dandan

> -Original Message-
> From: Carsey, Jaben
> Sent: Tuesday, May 07, 2019 10:36 PM
> To: Gao, Zhichao ; devel@edk2.groups.io; Ni, Ray
> ; jw...@jwatt.org
> Cc: Bi, Dandan 
> Subject: RE: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> 
> Zhichao,
> I can help submit errata for shell spec if needed.
> 
> Per patch,
> I agree. This looks good.
> Reviewed-by: Jaben Carsey 
> 
> 
> > -Original Message-
> > From: Gao, Zhichao
> > Sent: Tuesday, May 07, 2019 2:52 AM
> > To: devel@edk2.groups.io; Ni, Ray ; jw...@jwatt.org
> > Cc: Carsey, Jaben ; Bi, Dandan
> > 
> > Subject: RE: [edk2-devel] [PATCH v1 1/1]
> > ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> > Importance: High
> >
> > This patch looks good for me.
> > Reviewed-by: Zhichao Gao 
> >
> > But when I view the command in UEFI SHELL 2.2 spec:
> > ...
> > bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData  > UnicodeChar>*]]
> > ...
> > -opt
> > Modify the optional data associated with a driver or boot option.
> > Followed either by the filename of the file which contains the binary
> > data to be associated with the driver or boot option optional data, or
> > else the quote- delimited data that will be associated with the driver
> > or boot option optional data.
> > ...
> >
> > This description lack the comment of '#' parameter and that may make
> > the consumer confused. Usually consumers would regard it as the same
> > in other option, such as ' bcfg driver|boot [rm #]'. The '#' is
> > clearly descripted as a hexadecimal parameter:
> > rm
> > Remove an option. The # parameter lists the option number to remove in
> > hexadecimal.
> >
> > So I think we should update the shell spec by the way.
> >
> > Thanks,
> > Zhichao
> >
> > > -Original Message-
> > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
> > > Of
> > Ni,
> > > Ray
> > > Sent: Monday, May 6, 2019 10:02 PM
> > > To: jw...@jwatt.org; devel@edk2.groups.io
> > > Cc: Carsey, Jaben ; Bi, Dandan
> > > 
> > > Subject: Re: [edk2-devel] [PATCH v1 1/1]
> > ShellPkg/UefiShellBcfgCommandLib:
> > > Fix '-opt' option
> > >
> > > Dandan,
> > > Can you please help to review?
> > >
> > > Thanks,
> > > Ray
> > >
> > > > -Original Message-
> > > > From: jw...@jwatt.org [mailto:jw...@jwatt.org]
> > > > Sent: Monday, May 6, 2019 9:03 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: Carsey, Jaben ; Ni, Ray
> > > > 
> > > > Subject: [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt'
> > > > option
> > > >
> > > > From: Jonathan Watt 
> > > >
> > > > For all other bcfg commands the "#" (option number) argument(s)
> > > > are treated as hexedecimal values regardless of whether or not
> > > > they are prefixed by "0x".  This change fixes '-opt' to handle its "#"
> > > > (option number) argument consistently with the other commands.
> > > >
> > > > Making this change removes a potential footgun whereby a user that
> > > > has been using a number without a "0x" prefix with other bcfg
> > > > commands finds that, on using that exact same number with '-opt',
> > > > it has this time unexpectedly been interpreted as a decimal number
> > > > and they have modified
> > > > (corrupted) an unrelated load option.  For example, a user may
> > > > have been specifying "10" to other commands to have them act on
> > > > the 16th option (because simply "10", without any prefix, is how
> > > > 'bcfg boot dump' displayed the option number for the 16th option).
> > > > Unfortunately for them, if they also use '-opt' with "10" it would
> > > > unexpectedly and inconsistently act on the 10th option.
> > > >
> > > > CC: Jaben Carsey 
> > > > CC: Ray Ni 
> > > > Signed-off-by: Jonathan Watt 
> > > > ---
> > > >
> > > >
> ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > |
> > > > 2
> > > > +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git
> > > >
> >
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > >
> >
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > > index d033c7c1dc59..e8b48b4990dd 100644
> > > > ---
> > > >
> >
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > > +++
> > > >
> >
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > > @@ -1019,7 +1019,7 @@ BcfgAddOpt(
> > > >//
> > > >// Get the index of the variable we are changing.
> > > >//
> > > > -  Status = ShellConvertStringToUint64(Walker, &Intermediate,
> > > > FALSE, TRUE);
> > > > +  Status = ShellConvertStringToUint64(Walker, &Intermediate,
> > > > + TRUE, TRUE);
> > > >if (EFI_ERROR(Status) || (((UINT16)Intermediate) !=
> > > > Intermediate)
> > > > || StrStr(W

Re: [edk2-devel] [Patch v5 3/3] NetworkPkg: Add package level include DSC file

2019-05-07 Thread Siyuan, Fu
Reviewed-by: Siyuan Fu 

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Liming
> Gao
> Sent: Tuesday, May 7, 2019 10:27 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [Patch v5 3/3] NetworkPkg: Add package level include DSC
> file
> 
> Platform DSC can include Network.dsc.inc to enable network features.
> 
> Signed-off-by: Liming Gao 
> Acked-by: Laszlo Ersek 
> ---
>  NetworkPkg/Network.dsc.inc | 40 
>  NetworkPkg/NetworkPkg.dsc  | 22 +-
>  2 files changed, 41 insertions(+), 21 deletions(-)
>  create mode 100644 NetworkPkg/Network.dsc.inc
> 
> diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc
> new file mode 100644
> index 00..c7f43282e4
> --- /dev/null
> +++ b/NetworkPkg/Network.dsc.inc
> @@ -0,0 +1,40 @@
> +## @file
> +# Network DSC include file for Platform DSC
> +#
> +# This file includes all required information to enable Network features.
> +# It can be included to a platform DSC file by using "!include
> NetworkPkg/Network.dsc.inc".
> +#
> +# This file defines one build flag PLATFORMX64_ENABLE to support
> +# IA32 PEI and X64 DXE platform. Its default value is FALSE.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> +#
> +#SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +[Defines]
> +!include NetworkPkg/NetworkDefines.dsc.inc
> +
> +!ifndef PLATFORMX64_ENABLE
> +  #
> +  # PLATFORMX64_ENABLE is set to TRUE when PEI is IA32 and DXE is X64
> platform
> +  #
> +  DEFINE PLATFORMX64_ENABLE = FALSE
> +!endif
> +
> +[PcdsFixedAtBuild]
> +!include NetworkPkg/NetworkPcds.dsc.inc
> +
> +[LibraryClasses]
> +!include NetworkPkg/NetworkLibs.dsc.inc
> +
> +!if $(PLATFORMX64_ENABLE) == TRUE
> +[Components.X64]
> +!include NetworkPkg/NetworkComponents.dsc.inc
> +
> +!else
> +[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
> +!include NetworkPkg/NetworkComponents.dsc.inc
> +
> +!endif
> diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
> index be9d9248e4..fe2fcf7b3c 100644
> --- a/NetworkPkg/NetworkPkg.dsc
> +++ b/NetworkPkg/NetworkPkg.dsc
> @@ -41,12 +41,6 @@
> 
> DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
>SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
> 
> -  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> -  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
> -  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
> -  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
> -  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
>BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
>OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
>IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> @@ -103,24 +97,10 @@
> 
> ##
> #
> 
>  [Components]
> -  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
> -  NetworkPkg/TcpDxe/TcpDxe.inf
> -  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
> -  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
> -  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
> -  NetworkPkg/DnsDxe/DnsDxe.inf
> -  NetworkPkg/HttpDxe/HttpDxe.inf
> -  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
> -  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
>NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.inf
> -
>NetworkPkg/Application/VConfig/VConfig.inf
> 
> -[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
> -  NetworkPkg/IScsiDxe/IScsiDxe.inf
> -  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
> -  NetworkPkg/TlsDxe/TlsDxe.inf
> -  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> +  !include NetworkPkg/Network.dsc.inc
> 
>  [BuildOptions]
>*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
> --
> 2.13.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40118): https://edk2.groups.io/g/devel/message/40118
Mute This Topic: https://groups.io/mt/31532469/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch v5 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2019-05-07 Thread Siyuan, Fu
Reviewed-by: Siyuan Fu 

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Liming
> Gao
> Sent: Tuesday, May 7, 2019 10:27 PM
> To: devel@edk2.groups.io
> Cc: Wu, Jiaxin ; Ye, Ting ; Fu, Siyuan
> 
> Subject: [edk2-devel] [Patch v5 2/3] NetworkPkg: Add DSC/FDF include segment
> files to NetworkPkg.
> 
> This patch provides a set of include segment files for platform owner to
> easily enable/disable network stack support on their platform.
> 
> For DSC, there are:
> - a "NetworkDefines.dsc.inc" for the [Defines] section(s),
> - a "NetworkLibs.dsc.inc" for the [LibraryClasses*] section(s),
> - a "NetworkPcds.dsc.inc" for the [Pcds*] section(s),
> - a "NetworkComponents.dsc.inc" for the [Components*] section(s).
> For FDF, there is:
> - a "Network.fdf.inc" for the [Fv*] section(s).
> 
> These files can be added to the platform DSC/FDF file by using
>   !include NetworkPkg/xxx
> where "xxx" is the *.inc file name.
> 
> A platform DSC file can diverge from the defaults in
> "NetworkDefines.dsc.inc" by setting the individual DEFINEs before
> including "NetworkDefines.dsc.inc".
> And, build command line ("-D FLAG=VALUE") can be used to enable or
> disable related feature set, please check "NetworkDefines.dsc.inc"
> for a detail description of each flag.
> 
> The default value of these flags are:
>   DEFINE NETWORK_ENABLE = TRUE
>   DEFINE NETWORK_SNP_ENABLE = TRUE
>   DEFINE NETWORK_IP4_ENABLE = TRUE
>   DEFINE NETWORK_IP6_ENABLE = TRUE
>   DEFINE NETWORK_TLS_ENABLE = TRUE
>   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
>   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
>   DEFINE NETWORK_ISCSI_ENABLE   = TRUE
>   DEFINE NETWORK_VLAN_ENABLE= TRUE
> 
> Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
> 
> Cc: Jiaxin Wu 
> Cc: Ting Ye 
> Signed-off-by: Fu Siyuan 
> ---
>  NetworkPkg/Network.fdf.inc   |  60 ++
>  NetworkPkg/NetworkComponents.dsc.inc |  61 ++
>  NetworkPkg/NetworkDefines.dsc.inc| 118
> +++
>  NetworkPkg/NetworkLibs.dsc.inc   |  20 ++
>  NetworkPkg/NetworkPcds.dsc.inc   |  16 +
>  5 files changed, 275 insertions(+)
>  create mode 100644 NetworkPkg/Network.fdf.inc
>  create mode 100644 NetworkPkg/NetworkComponents.dsc.inc
>  create mode 100644 NetworkPkg/NetworkDefines.dsc.inc
>  create mode 100644 NetworkPkg/NetworkLibs.dsc.inc
>  create mode 100644 NetworkPkg/NetworkPcds.dsc.inc
> 
> diff --git a/NetworkPkg/Network.fdf.inc b/NetworkPkg/Network.fdf.inc
> new file mode 100644
> index 00..92e2c56cb8
> --- /dev/null
> +++ b/NetworkPkg/Network.fdf.inc
> @@ -0,0 +1,60 @@
> +## @file
> +# Network FDF include file for All Architectures.
> +#
> +# This file can be included to a platform FDF by using
> +# "!include NetworkPkg/Network.fdf.inc" to add EDKII network stack drivers
> +# according to the value of flags described in "NetworkPkg/Network.dsc.inc".
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> +#
> +#SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +
> +!if $(NETWORK_ENABLE) == TRUE
> +  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
> +
> +  !if $(NETWORK_SNP_ENABLE) == TRUE
> +INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
> +  !endif
> +
> +  !if $(NETWORK_VLAN_ENABLE) == TRUE
> +INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
> +  !endif
> +
> +  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
> +
> +  !if $(NETWORK_IP4_ENABLE) == TRUE
> +INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
> +INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
> +INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
> +INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
> +INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
> +  !endif
> +
> +  !if $(NETWORK_IP6_ENABLE) == TRUE
> +INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
> +INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
> +INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
> +INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
> +  !endif
> +
> +  INF  NetworkPkg/TcpDxe/TcpDxe.inf
> +  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
> +
> +  !if $(NETWORK_TLS_ENABLE) == TRUE
> +INF  NetworkPkg/TlsDxe/TlsDxe.inf
> +INF  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> +  !endif
> +
> +  !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE
> +INF  NetworkPkg/DnsDxe/DnsDxe.inf
> +INF  NetworkPkg/HttpDxe/HttpDxe.inf
> +INF  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
> +INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
> +  !endif
> +
> +  !if $(NETWORK_ISCSI_ENABLE) == TRUE
> +INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
> +  !endif
> +
> +!endif
> diff --git a/NetworkPkg/NetworkComponents.dsc.inc
> b/NetworkPkg/NetworkComponents.dsc.inc
> new file mode 100644
> index 00..aede5ea8be
> --- /dev/null
> +++ b/NetworkPkg/

Re: FW: [edk2-devel] [PATCH V2] BaseTools:improve code to support C files with .C suffixes

2019-05-07 Thread Leif Lindholm
Hi Fan Zhiju,

But where does the string come from that contains a .C suffix?
Is the tool internally converting things to uppercase, or is some
source file in the build incorrectly named?

I am asking because it is not clear to me whether the patch resolves a
problem or hides one.

Best Regards,

Leif

On Tue, May 07, 2019 at 03:05:02AM +, Fan, ZhijuX wrote:
> This problem has nothing to do with the file system, We just use the
> filename as a string to compare with other strings
> Our unittest tested minplatform, Ovmf. This problem was found when
> building a platform inside Intel.
> We've tested it on Linux and Windows.
> 
> Any question, please let me know. Thanks.
> 
> Best Regards
> Fan Zhiju
> 
> -Original Message-
> From: af...@apple.com [mailto:af...@apple.com] 
> Sent: Tuesday, May 7, 2019 10:31 AM
> To: devel@edk2.groups.io; Fan, ZhijuX 
> Cc: Gao, Liming ; Feng, Bob C 
> Subject: Re: [edk2-devel] [PATCH V2] BaseTools:improve code to support C 
> files with .C suffixes
> 
> This brings up a question? Do we tests on a file system that is case 
> sensitive? Is this just lack of a test case?
> 
> Thanks,
> 
> Andrew Fish
> 
> > On May 6, 2019, at 7:22 PM, Fan, ZhijuX  wrote:
> > 
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1773
> > 
> > Build break if C file suffixes of named .C instead of .c Code not 
> > recognize filenames with .C suffixes.
> > 
> > This patch adds code to Support both .c file and .C file
> > 
> > Cc: Bob Feng 
> > Cc: Liming Gao 
> > Signed-off-by: Zhiju.Fan 
> > ---
> > BaseTools/Source/Python/AutoGen/GenMake.py | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py 
> > b/BaseTools/Source/Python/AutoGen/GenMake.py
> > index 0e0f9fd9b0..858ddedf8e 100644
> > --- a/BaseTools/Source/Python/AutoGen/GenMake.py
> > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py
> > @@ -1035,7 +1035,8 @@ cleanlib:
> > CmdTargetDict[CmdSign] = "%s %s" % 
> > (CmdTargetDict[CmdSign], SingleCommandList[-1])
> > Index = CommandList.index(Item)
> > CommandList.pop(Index)
> > -if SingleCommandList[-1].endswith("%s%s.c" % 
> > (TAB_SLASH, CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])):
> > +if SingleCommandList[-1].endswith("%s%s.c" % 
> > (TAB_SLASH, CmdSumDict[T.Target.SubDir])) or \
> > +SingleCommandList[-1].endswith("%s%s.C" % 
> > (TAB_SLASH, CmdSumDict[T.Target.SubDir])):
> > Cpplist = CmdCppDict[T.Target.SubDir]
> > Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' % 
> > list(self.ObjTargetDict.keys()).index(T.Target.SubDir))
> > T.Commands[Index] = '%s\n\t%s' % (' 
> > \\\n\t'.join(Cpplist), CmdTargetDict[CmdSign])
> > --
> > 2.14.1.windows.1
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40117): https://edk2.groups.io/g/devel/message/40117
Mute This Topic: https://groups.io/mt/31528253/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Carsey, Jaben
Zhichao,
I can help submit errata for shell spec if needed.

Per patch,
I agree. This looks good.
Reviewed-by: Jaben Carsey 


> -Original Message-
> From: Gao, Zhichao
> Sent: Tuesday, May 07, 2019 2:52 AM
> To: devel@edk2.groups.io; Ni, Ray ; jw...@jwatt.org
> Cc: Carsey, Jaben ; Bi, Dandan
> 
> Subject: RE: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option
> Importance: High
> 
> This patch looks good for me.
> Reviewed-by: Zhichao Gao 
> 
> But when I view the command in UEFI SHELL 2.2 spec:
> ...
> bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData  UnicodeChar>*]]
> ...
> -opt
> Modify the optional data associated with a driver or boot option. Followed
> either by the filename of the file which contains the binary data to be
> associated with the driver or boot option optional data, or else the quote-
> delimited data that will be associated with the driver or boot option optional
> data.
> ...
> 
> This description lack the comment of '#' parameter and that may make the
> consumer confused. Usually consumers would regard it as the same in other
> option, such as ' bcfg driver|boot [rm #]'. The '#' is clearly descripted as a
> hexadecimal parameter:
> rm
> Remove an option. The # parameter lists the option number to remove in
> hexadecimal.
> 
> So I think we should update the shell spec by the way.
> 
> Thanks,
> Zhichao
> 
> > -Original Message-
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Ni,
> > Ray
> > Sent: Monday, May 6, 2019 10:02 PM
> > To: jw...@jwatt.org; devel@edk2.groups.io
> > Cc: Carsey, Jaben ; Bi, Dandan
> > 
> > Subject: Re: [edk2-devel] [PATCH v1 1/1]
> ShellPkg/UefiShellBcfgCommandLib:
> > Fix '-opt' option
> >
> > Dandan,
> > Can you please help to review?
> >
> > Thanks,
> > Ray
> >
> > > -Original Message-
> > > From: jw...@jwatt.org [mailto:jw...@jwatt.org]
> > > Sent: Monday, May 6, 2019 9:03 PM
> > > To: devel@edk2.groups.io
> > > Cc: Carsey, Jaben ; Ni, Ray 
> > > Subject: [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt'
> > > option
> > >
> > > From: Jonathan Watt 
> > >
> > > For all other bcfg commands the "#" (option number) argument(s) are
> > > treated as hexedecimal values regardless of whether or not they are
> > > prefixed by "0x".  This change fixes '-opt' to handle its "#"
> > > (option number) argument consistently with the other commands.
> > >
> > > Making this change removes a potential footgun whereby a user that has
> > > been using a number without a "0x" prefix with other bcfg commands
> > > finds that, on using that exact same number with '-opt', it has this
> > > time unexpectedly been interpreted as a decimal number and they have
> > > modified
> > > (corrupted) an unrelated load option.  For example, a user may have
> > > been specifying "10" to other commands to have them act on the 16th
> > > option (because simply "10", without any prefix, is how 'bcfg boot
> > > dump' displayed the option number for the 16th option). Unfortunately
> > > for them, if they also use '-opt' with "10" it would unexpectedly and
> > > inconsistently act on the 10th option.
> > >
> > > CC: Jaben Carsey 
> > > CC: Ray Ni 
> > > Signed-off-by: Jonathan Watt 
> > > ---
> > >  ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> |
> > > 2
> > > +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git
> > >
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > >
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > index d033c7c1dc59..e8b48b4990dd 100644
> > > ---
> > >
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > +++
> > >
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > > @@ -1019,7 +1019,7 @@ BcfgAddOpt(
> > >//
> > >// Get the index of the variable we are changing.
> > >//
> > > -  Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE,
> > > TRUE);
> > > +  Status = ShellConvertStringToUint64(Walker, &Intermediate, TRUE,
> > > + TRUE);
> > >if (EFI_ERROR(Status) || (((UINT16)Intermediate) != Intermediate)
> > > || StrStr(Walker, L" ") == NULL || ((UINT16)Intermediate) >
> > > ((UINT16)OrderCount)) {
> > >  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV),
> > > gShellBcfgHiiHandle, L"bcfg", L"Option Index");
> > >  ShellStatus = SHELL_INVALID_PARAMETER;
> > > --
> > > 2.21.0
> >
> >
> > 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40116): https://edk2.groups.io/g/devel/message/40116
Mute This Topic: https://groups.io/mt/31520134/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch v5 1/3] NetworkPkg DSC: Add the required ARM library to pass ARM build

2019-05-07 Thread Liming Gao
Signed-off-by: Liming Gao 
Reviewed-by: Laszlo Ersek 
---
 NetworkPkg/NetworkPkg.dsc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
index b5416b1614..be9d9248e4 100644
--- a/NetworkPkg/NetworkPkg.dsc
+++ b/NetworkPkg/NetworkPkg.dsc
@@ -72,6 +72,8 @@
   # [LibraryClasses.ARM] and NULL mean link this library into all ARM images.
   #
   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
+  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+  ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
 
 [PcdsFeatureFlag]
   gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|TRUE
@@ -114,7 +116,7 @@
 
   NetworkPkg/Application/VConfig/VConfig.inf
 
-[Components.IA32, Components.X64]
+[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
   NetworkPkg/IScsiDxe/IScsiDxe.inf
   NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
   NetworkPkg/TlsDxe/TlsDxe.inf
-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40113): https://edk2.groups.io/g/devel/message/40113
Mute This Topic: https://groups.io/mt/31532467/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch v5 3/3] NetworkPkg: Add package level include DSC file

2019-05-07 Thread Liming Gao
Platform DSC can include Network.dsc.inc to enable network features.

Signed-off-by: Liming Gao 
Acked-by: Laszlo Ersek 
---
 NetworkPkg/Network.dsc.inc | 40 
 NetworkPkg/NetworkPkg.dsc  | 22 +-
 2 files changed, 41 insertions(+), 21 deletions(-)
 create mode 100644 NetworkPkg/Network.dsc.inc

diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc
new file mode 100644
index 00..c7f43282e4
--- /dev/null
+++ b/NetworkPkg/Network.dsc.inc
@@ -0,0 +1,40 @@
+## @file
+# Network DSC include file for Platform DSC
+#
+# This file includes all required information to enable Network features.
+# It can be included to a platform DSC file by using "!include 
NetworkPkg/Network.dsc.inc".
+#
+# This file defines one build flag PLATFORMX64_ENABLE to support
+# IA32 PEI and X64 DXE platform. Its default value is FALSE.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.
+#
+#SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+!include NetworkPkg/NetworkDefines.dsc.inc
+
+!ifndef PLATFORMX64_ENABLE
+  #
+  # PLATFORMX64_ENABLE is set to TRUE when PEI is IA32 and DXE is X64 platform
+  #
+  DEFINE PLATFORMX64_ENABLE = FALSE
+!endif
+
+[PcdsFixedAtBuild]
+!include NetworkPkg/NetworkPcds.dsc.inc
+
+[LibraryClasses]
+!include NetworkPkg/NetworkLibs.dsc.inc
+
+!if $(PLATFORMX64_ENABLE) == TRUE
+[Components.X64]
+!include NetworkPkg/NetworkComponents.dsc.inc
+
+!else
+[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
+!include NetworkPkg/NetworkComponents.dsc.inc
+
+!endif
diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
index be9d9248e4..fe2fcf7b3c 100644
--- a/NetworkPkg/NetworkPkg.dsc
+++ b/NetworkPkg/NetworkPkg.dsc
@@ -41,12 +41,6 @@
   
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
   SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
 
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
   BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
@@ -103,24 +97,10 @@
 
###
 
 [Components]
-  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
-  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
-  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
-  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
-  NetworkPkg/DnsDxe/DnsDxe.inf
-  NetworkPkg/HttpDxe/HttpDxe.inf
-  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
-  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
   NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.inf
-
   NetworkPkg/Application/VConfig/VConfig.inf
 
-[Components.IA32, Components.X64, Components.ARM, Components.AARCH64]
-  NetworkPkg/IScsiDxe/IScsiDxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/TlsDxe/TlsDxe.inf
-  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
+  !include NetworkPkg/Network.dsc.inc
 
 [BuildOptions]
   *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40115): https://edk2.groups.io/g/devel/message/40115
Mute This Topic: https://groups.io/mt/31532469/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch v5 0/3] Add package level include DSC/FDF in NetworkPkg

2019-05-07 Thread Liming Gao
v5:
Update Network.fdf.inc to include the missing IScsiDxe
Update NetworkLibs.dsc.inc to add the comments for HttpLib

v4:
Move library instance BaseStackCheckLib to ARM, AARCH64 arch in Patch 1/3
Move PLATFORMX64_ENABLE build flag to package level include DSC file
Correct typo in Patch 3/3

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
BZ 1293 requests to move Network modules from MdeModulePkg to NetworkPkg.
To keep the backword compatiblity, Network package level include DSC/FDF
are introduced to be used in the platform DSC/FDF files. When Network 
modules are moved from MdeModulePkg to NetworkPkg, Network package level 
include DSC/FDF will be updated together. There is no impact on the platform 
DSC/FDF file. 

This patch set is to introduce network package level include DSC/FDF files.
Bases on previous discussion and the existing usage case, build flag will be
used to enable/disable the network features. PCD control feature way can be
discussed later. And, to meet with the different usages, this patch set 
introduces the separate DSC for Defines/Pcds/Libraries/Components (Patch 2)
, and also adds the package level combined DSC to include them all (Patch 3).
If platform wants to use the flexible way to enable Network feature, it can 
use the separate DSCs. If the platform wants to directly enable Network 
feature, it can use the combined package DSC file.

This patch set is to update NetworkPkg only. If there is no objection on this
proposal, the following changes to platform DSC/FDF will be made and sent for
review. By default, the platform DSC/FDF will use the combined DSC/FDF file. 
If the platform owner wants to use the flexible way to enable Network feature,
please reply this mail. 

Feedback from Laszlo, OvmfPkg and ArmVirtPkg platforms to use the
standalone include files from patch #2.


Liming Gao (3):
  NetworkPkg DSC: Add the required ARM library to pass ARM build
  NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.
  NetworkPkg: Add package level include DSC file

 NetworkPkg/Network.dsc.inc   |  40 
 NetworkPkg/Network.fdf.inc   |  60 ++
 NetworkPkg/NetworkComponents.dsc.inc |  61 ++
 NetworkPkg/NetworkDefines.dsc.inc| 118 +++
 NetworkPkg/NetworkLibs.dsc.inc   |  20 ++
 NetworkPkg/NetworkPcds.dsc.inc   |  16 +
 NetworkPkg/NetworkPkg.dsc|  24 +--
 7 files changed, 318 insertions(+), 21 deletions(-)
 create mode 100644 NetworkPkg/Network.dsc.inc
 create mode 100644 NetworkPkg/Network.fdf.inc
 create mode 100644 NetworkPkg/NetworkComponents.dsc.inc
 create mode 100644 NetworkPkg/NetworkDefines.dsc.inc
 create mode 100644 NetworkPkg/NetworkLibs.dsc.inc
 create mode 100644 NetworkPkg/NetworkPcds.dsc.inc

-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40112): https://edk2.groups.io/g/devel/message/40112
Mute This Topic: https://groups.io/mt/31532466/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch v5 2/3] NetworkPkg: Add DSC/FDF include segment files to NetworkPkg.

2019-05-07 Thread Liming Gao
This patch provides a set of include segment files for platform owner to
easily enable/disable network stack support on their platform.

For DSC, there are:
- a "NetworkDefines.dsc.inc" for the [Defines] section(s),
- a "NetworkLibs.dsc.inc" for the [LibraryClasses*] section(s),
- a "NetworkPcds.dsc.inc" for the [Pcds*] section(s),
- a "NetworkComponents.dsc.inc" for the [Components*] section(s).
For FDF, there is:
- a "Network.fdf.inc" for the [Fv*] section(s).

These files can be added to the platform DSC/FDF file by using
  !include NetworkPkg/xxx
where "xxx" is the *.inc file name.

A platform DSC file can diverge from the defaults in
"NetworkDefines.dsc.inc" by setting the individual DEFINEs before
including "NetworkDefines.dsc.inc".
And, build command line ("-D FLAG=VALUE") can be used to enable or
disable related feature set, please check "NetworkDefines.dsc.inc"
for a detail description of each flag.

The default value of these flags are:
  DEFINE NETWORK_ENABLE = TRUE
  DEFINE NETWORK_SNP_ENABLE = TRUE
  DEFINE NETWORK_IP4_ENABLE = TRUE
  DEFINE NETWORK_IP6_ENABLE = TRUE
  DEFINE NETWORK_TLS_ENABLE = TRUE
  DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
  DEFINE NETWORK_ISCSI_ENABLE   = TRUE
  DEFINE NETWORK_VLAN_ENABLE= TRUE

Related BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293

Cc: Jiaxin Wu 
Cc: Ting Ye 
Signed-off-by: Fu Siyuan 
---
 NetworkPkg/Network.fdf.inc   |  60 ++
 NetworkPkg/NetworkComponents.dsc.inc |  61 ++
 NetworkPkg/NetworkDefines.dsc.inc| 118 +++
 NetworkPkg/NetworkLibs.dsc.inc   |  20 ++
 NetworkPkg/NetworkPcds.dsc.inc   |  16 +
 5 files changed, 275 insertions(+)
 create mode 100644 NetworkPkg/Network.fdf.inc
 create mode 100644 NetworkPkg/NetworkComponents.dsc.inc
 create mode 100644 NetworkPkg/NetworkDefines.dsc.inc
 create mode 100644 NetworkPkg/NetworkLibs.dsc.inc
 create mode 100644 NetworkPkg/NetworkPcds.dsc.inc

diff --git a/NetworkPkg/Network.fdf.inc b/NetworkPkg/Network.fdf.inc
new file mode 100644
index 00..92e2c56cb8
--- /dev/null
+++ b/NetworkPkg/Network.fdf.inc
@@ -0,0 +1,60 @@
+## @file
+# Network FDF include file for All Architectures.
+#
+# This file can be included to a platform FDF by using
+# "!include NetworkPkg/Network.fdf.inc" to add EDKII network stack drivers
+# according to the value of flags described in "NetworkPkg/Network.dsc.inc".
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.
+#
+#SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+!if $(NETWORK_ENABLE) == TRUE
+  INF  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
+
+  !if $(NETWORK_SNP_ENABLE) == TRUE
+INF  MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
+  !endif
+
+  !if $(NETWORK_VLAN_ENABLE) == TRUE
+INF  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
+  !endif
+
+  INF  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+
+  !if $(NETWORK_IP4_ENABLE) == TRUE
+INF  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
+INF  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
+INF  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
+INF  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+INF  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+  !endif
+
+  !if $(NETWORK_IP6_ENABLE) == TRUE
+INF  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf
+INF  NetworkPkg/Ip6Dxe/Ip6Dxe.inf
+INF  NetworkPkg/Udp6Dxe/Udp6Dxe.inf
+INF  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf
+  !endif
+
+  INF  NetworkPkg/TcpDxe/TcpDxe.inf
+  INF  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
+
+  !if $(NETWORK_TLS_ENABLE) == TRUE
+INF  NetworkPkg/TlsDxe/TlsDxe.inf
+INF  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
+  !endif
+
+  !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE
+INF  NetworkPkg/DnsDxe/DnsDxe.inf
+INF  NetworkPkg/HttpDxe/HttpDxe.inf
+INF  NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
+INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+  !endif
+
+  !if $(NETWORK_ISCSI_ENABLE) == TRUE
+INF  NetworkPkg/IScsiDxe/IScsiDxe.inf
+  !endif
+
+!endif
diff --git a/NetworkPkg/NetworkComponents.dsc.inc 
b/NetworkPkg/NetworkComponents.dsc.inc
new file mode 100644
index 00..aede5ea8be
--- /dev/null
+++ b/NetworkPkg/NetworkComponents.dsc.inc
@@ -0,0 +1,61 @@
+## @file
+# Network DSC include file for [Components*] section of all Architectures.
+#
+# This file can be included to the [Components*] section(s) of a platform DSC 
file
+# by using "!include NetworkPkg/NetworkComponents.dsc.inc" to specify the INF 
files
+# of EDKII network drivers according to the value of flags described in
+# "NetworkDefines.dsc.inc".
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.
+#
+#SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+!if $(NETWORK_ENABLE) == TRUE
+  MdeModulePkg/Universal/Network/D

Re: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file

2019-05-07 Thread Krzysztof Koch
Hi everyone,

My patch has finally reached the mailing list. The problem was the SMTP port 
number 587 that I was using. Sorry for the trouble.

Kind regards,

Krzysztof Koch

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Krzysztof Koch 
via Groups.Io
Sent: Tuesday, May 7, 2019 13:56
To: devel@edk2.groups.io
Cc: Sami Mujawar ; nd 
Subject: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file

The patch includes the following ACPI 6.3 updates:
 1. Reserve CRAT and CDIT table names in ACPI 6.3 header.
- ACPI 6.3 January 2019, Table 5-30
- Mantis ID 1883 (https://mantis.uefi.org/mantis/view.php?id=1883)
 2. Add new processor structure flags in PPTT.
- ACPI 6.3 January 2019, Section 5.2.29
- Mantis ID 1870 (https://mantis.uefi.org/mantis/view.php?id=1870)
- Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
 3. Add SPE support to MADT.
- ACPI 6.3 January 2019, Table 5-60
- Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
 4. Add 'Hot-plug Capable' flag to APIC.
- ACPI 6.3 January 2019, Table 5-44, Table 5-47 & Table 5-58
- Mantis ID 1948 (https://mantis.uefi.org/mantis/view.php?id=1948)
 5. Add CNTHV timer to GTDT.
- ACPI 6.3 January 2019, Section 5.2.24
- Mantis ID 1851 (https://mantis.uefi.org/mantis/view.php?id=1851)
 6. Add 'Trigger Order' to Platform Communication Channel Identification
Structure.
- ACPI 6.3 January 2019, Section 5.2.28
- Mantis ID 1867 (https://mantis.uefi.org/mantis/view.php?id=1867)
 7. Add Generic Initiator Affinity Structure to SRAT.
- ACPI 6.3 January 2019, Section 5.2.16.6
- Mantis ID 1904 (https://mantis.uefi.org/mantis/view.php?id=1904)
 8. Add 'HMAT Enhancements'.
- ACPI 6.3 January 2019, Section 5.2.27
- Mantis ID 1914 (https://mantis.uefi.org/mantis/view.php?id=1914)
- Mantis ID 1959 (https://mantis.uefi.org/mantis/view.php?id=1959)
 9. Fix generic address structure definition to include all address
space ID keywords.
   - ACPI 6.3 January 2019, Table 5-25
   - Mantis ID 1965 (https://mantis.uefi.org/mantis/view.php?id=1965)
10. Make Acpi63.h the latest ACPI definition.

Signed-off-by: Krzysztof Koch 
---
Resending patch as it did not reach the mailing list.

The patch can be viewed at:
https://github.com/KrzysztofKoch1/edk2/tree/woa_529_acpi63_header_v1

Notes:
v1:
- add header file for ACPI 6.3 [Krzysztof]

 MdePkg/Include/IndustryStandard/Acpi.h   |3 +-
 MdePkg/Include/IndustryStandard/Acpi63.h | 2946 
 2 files changed, 2948 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/IndustryStandard/Acpi.h 
b/MdePkg/Include/IndustryStandard/Acpi.h
index 
cc3f34b6e2fa66d0e97ea1ee07bffce91a7dfcce..48f4d7176125ee33db0f103268af199c7efacdad
 100644
--- a/MdePkg/Include/IndustryStandard/Acpi.h
+++ b/MdePkg/Include/IndustryStandard/Acpi.h
@@ -3,6 +3,7 @@
   consumed by drivers that do not care about ACPI versions.

   Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+  Copyright (c) 2019, ARM Ltd. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent

 **/
@@ -10,6 +11,6 @@
 #ifndef _ACPI_H_
 #define _ACPI_H_

-#include 
+#include 

 #endif
diff --git a/MdePkg/Include/IndustryStandard/Acpi63.h 
b/MdePkg/Include/IndustryStandard/Acpi63.h
new file mode 100644
index 
..a8e011579ffcf070ecdfd2c6726a16d1afd65891
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Acpi63.h
@@ -0,0 +1,2946 @@
+/** @file
+  ACPI 6.3 definitions from the ACPI Specification Revision 6.3 Jan, 2019.
+
+  Copyright (c) 2017, Intel Corporation. All rights reserved.
+  Copyright (c) 2019, ARM Ltd. All rights reserved.
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef _ACPI_6_3_H_
+#define _ACPI_6_3_H_
+
+#include 
+
+//
+// Ensure proper structure formats
+//
+#pragma pack(1)
+
+///
+/// ACPI 6.3 Generic Address Space definition
+///
+typedef struct {
+  UINT8   AddressSpaceId;
+  UINT8   RegisterBitWidth;
+  UINT8   RegisterBitOffset;
+  UINT8   AccessSize;
+  UINT64  Address;
+} EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE;
+
+//
+// Generic Address Space Address IDs
+//
+#define EFI_ACPI_6_3_SYSTEM_MEMORY   0x00
+#define EFI_ACPI_6_3_SYSTEM_IO   0x01
+#define EFI_ACPI_6_3_PCI_CONFIGURATION_SPACE 0x02
+#define EFI_ACPI_6_3_EMBEDDED_CONTROLLER 0x03
+#define EFI_ACPI_6_3_SMBUS   0x04
+#define EFI_ACPI_6_3_SYSTEM_CMOS 0x05
+#define EFI_ACPI_6_3_PCI_BAR_TARGET  0x06
+#define EFI_ACPI_6_3_IPMI0x07
+#define EFI_ACPI_6_3_GENERAL_PURPOSE_IO  0x08
+#define EFI_ACPI_6_3_GENERIC_SERIAL_BUS  0x09
+#define EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL  0x0A
+#define EFI_ACPI_6_3_FUNCTIONAL_FIXED_HARDWARE   0x7F
+
+//
+// Generic Address Space Access Sizes
+//
+#define EFI_ACPI_6_3_UNDEFINED  0
+#defi

[edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file

2019-05-07 Thread Krzysztof Koch
The patch includes the following ACPI 6.3 updates:
 1. Reserve CRAT and CDIT table names in ACPI 6.3 header.
- ACPI 6.3 January 2019, Table 5-30
- Mantis ID 1883 (https://mantis.uefi.org/mantis/view.php?id=1883)
 2. Add new processor structure flags in PPTT.
- ACPI 6.3 January 2019, Section 5.2.29
- Mantis ID 1870 (https://mantis.uefi.org/mantis/view.php?id=1870)
- Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
 3. Add SPE support to MADT.
- ACPI 6.3 January 2019, Table 5-60
- Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
 4. Add 'Hot-plug Capable' flag to APIC.
- ACPI 6.3 January 2019, Table 5-44, Table 5-47 & Table 5-58
- Mantis ID 1948 (https://mantis.uefi.org/mantis/view.php?id=1948)
 5. Add CNTHV timer to GTDT.
- ACPI 6.3 January 2019, Section 5.2.24
- Mantis ID 1851 (https://mantis.uefi.org/mantis/view.php?id=1851)
 6. Add 'Trigger Order' to Platform Communication Channel Identification
Structure.
- ACPI 6.3 January 2019, Section 5.2.28
- Mantis ID 1867 (https://mantis.uefi.org/mantis/view.php?id=1867)
 7. Add Generic Initiator Affinity Structure to SRAT.
- ACPI 6.3 January 2019, Section 5.2.16.6
- Mantis ID 1904 (https://mantis.uefi.org/mantis/view.php?id=1904)
 8. Add 'HMAT Enhancements'.
- ACPI 6.3 January 2019, Section 5.2.27
- Mantis ID 1914 (https://mantis.uefi.org/mantis/view.php?id=1914)
- Mantis ID 1959 (https://mantis.uefi.org/mantis/view.php?id=1959)
 9. Fix generic address structure definition to include all address
space ID keywords.
   - ACPI 6.3 January 2019, Table 5-25
   - Mantis ID 1965 (https://mantis.uefi.org/mantis/view.php?id=1965)
10. Make Acpi63.h the latest ACPI definition.

Signed-off-by: Krzysztof Koch 
---
Resending patch as it did not reach the mailing list.

The patch can be viewed at:
https://github.com/KrzysztofKoch1/edk2/tree/woa_529_acpi63_header_v1

Notes:
v1:
- add header file for ACPI 6.3 [Krzysztof]

 MdePkg/Include/IndustryStandard/Acpi.h   |3 +-
 MdePkg/Include/IndustryStandard/Acpi63.h | 2946 
 2 files changed, 2948 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/IndustryStandard/Acpi.h 
b/MdePkg/Include/IndustryStandard/Acpi.h
index 
cc3f34b6e2fa66d0e97ea1ee07bffce91a7dfcce..48f4d7176125ee33db0f103268af199c7efacdad
 100644
--- a/MdePkg/Include/IndustryStandard/Acpi.h
+++ b/MdePkg/Include/IndustryStandard/Acpi.h
@@ -3,6 +3,7 @@
   consumed by drivers that do not care about ACPI versions.

   Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+  Copyright (c) 2019, ARM Ltd. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent

 **/
@@ -10,6 +11,6 @@
 #ifndef _ACPI_H_
 #define _ACPI_H_

-#include 
+#include 

 #endif
diff --git a/MdePkg/Include/IndustryStandard/Acpi63.h 
b/MdePkg/Include/IndustryStandard/Acpi63.h
new file mode 100644
index 
..a8e011579ffcf070ecdfd2c6726a16d1afd65891
--- /dev/null
+++ b/MdePkg/Include/IndustryStandard/Acpi63.h
@@ -0,0 +1,2946 @@
+/** @file
+  ACPI 6.3 definitions from the ACPI Specification Revision 6.3 Jan, 2019.
+
+  Copyright (c) 2017, Intel Corporation. All rights reserved.
+  Copyright (c) 2019, ARM Ltd. All rights reserved.
+
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+**/
+
+#ifndef _ACPI_6_3_H_
+#define _ACPI_6_3_H_
+
+#include 
+
+//
+// Ensure proper structure formats
+//
+#pragma pack(1)
+
+///
+/// ACPI 6.3 Generic Address Space definition
+///
+typedef struct {
+  UINT8   AddressSpaceId;
+  UINT8   RegisterBitWidth;
+  UINT8   RegisterBitOffset;
+  UINT8   AccessSize;
+  UINT64  Address;
+} EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE;
+
+//
+// Generic Address Space Address IDs
+//
+#define EFI_ACPI_6_3_SYSTEM_MEMORY   0x00
+#define EFI_ACPI_6_3_SYSTEM_IO   0x01
+#define EFI_ACPI_6_3_PCI_CONFIGURATION_SPACE 0x02
+#define EFI_ACPI_6_3_EMBEDDED_CONTROLLER 0x03
+#define EFI_ACPI_6_3_SMBUS   0x04
+#define EFI_ACPI_6_3_SYSTEM_CMOS 0x05
+#define EFI_ACPI_6_3_PCI_BAR_TARGET  0x06
+#define EFI_ACPI_6_3_IPMI0x07
+#define EFI_ACPI_6_3_GENERAL_PURPOSE_IO  0x08
+#define EFI_ACPI_6_3_GENERIC_SERIAL_BUS  0x09
+#define EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL  0x0A
+#define EFI_ACPI_6_3_FUNCTIONAL_FIXED_HARDWARE   0x7F
+
+//
+// Generic Address Space Access Sizes
+//
+#define EFI_ACPI_6_3_UNDEFINED  0
+#define EFI_ACPI_6_3_BYTE   1
+#define EFI_ACPI_6_3_WORD   2
+#define EFI_ACPI_6_3_DWORD  3
+#define EFI_ACPI_6_3_QWORD  4
+
+//
+// ACPI 6.3 table structures
+//
+
+///
+/// Root System Description Pointer Structure
+///
+typedef struct {
+  UINT64  Signature;
+  UINT8   Checksum;
+  UINT8   OemId[6];
+  UINT8   Revision;
+  UINT32  RsdtAddress;
+  UINT32  Length;
+  UINT64  XsdtAddress;
+  UINT8   ExtendedChecksum;
+ 

Re: [edk2-devel] [edk2-platforms] [patch 1/7] Platform/AMD: Update UefiDecompressLib instance

2019-05-07 Thread Laszlo Ersek
On 05/07/19 13:31, Leif Lindholm wrote:
> Hi Dandan,
> 
> Sorry to be a pain, but could you follow the steps in
> https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-09
> and then regenerate these patches and send out again?
> 
> That way, it is obvious from the diff which sections are being
> modified.

(
also needed:

  git config diff.ini.xfuncname '^\[[A-Za-z0-9_., ]+]'

from

https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-05

thanks
Laszlo
)

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40109): https://edk2.groups.io/g/devel/message/40109
Mute This Topic: https://groups.io/mt/31507427/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v3] MdeModulePkg/DumpDynPcd: Add application to dump dynamic PCD settings

2019-05-07 Thread Wu, Hao A
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Zhang, Shenglei
> Sent: Tuesday, May 07, 2019 1:55 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Dong, Eric
> Subject: [edk2-devel] [PATCH v3] MdeModulePkg/DumpDynPcd: Add application
> to dump dynamic PCD settings
> 
> This is a shell application to dump dynamic PCD settings.
> Type DumpDynPcd -?/h/H to get help information.
> Type DumpDynPcd -v/V to get version information.
> Type DumpDynPcd [PcdName] to get Pcd information.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1541
> 
> v2:1.Add static for global variables.
>2.Change the parameter amount of InternalStrnCatGrow in DumpDynPcd.c.
>3.Add open brace according to EDK II C Coding Standards Specification.
>4.Remove the dependency on ShellPkg.dec in DumpDynPcd.inf.
> 
> v3:Add static for all global variables and internal functions.

I found that the ECC tool cannot handle lower case 'static' before
functions at this moment. Hence, I filed the below BZ for ECC:

https://bugzilla.tianocore.org/show_bug.cgi?id=1778

Meanwhile, I think the behavior in this patch is good.

> 
> Cc: Jian J Wang 
> Cc: Hao Wu 
> Cc: Ray Ni 
> Cc: Star Zeng 
> Cc: Eric Dong 
> Signed-off-by: Shenglei Zhang 
> ---
>  .../Application/DumpDynPcd/DumpDynPcd.c   | 612 ++
>  .../Application/DumpDynPcd/DumpDynPcd.inf |  50 ++
>  .../Application/DumpDynPcd/DumpDynPcdStr.uni  |  28 +
>  MdeModulePkg/MdeModulePkg.dsc |   1 +
>  4 files changed, 691 insertions(+)
>  create mode 100644 MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
>  create mode 100644
> MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.inf
>  create mode 100644
> MdeModulePkg/Application/DumpDynPcd/DumpDynPcdStr.uni
> 
> diff --git a/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
> b/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
> new file mode 100644
> index 00..025300ae3f
> --- /dev/null
> +++ b/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
> @@ -0,0 +1,612 @@
> +/** @file
> +  A shell application to dump dynamic PCD settings.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +
> +//
> +// String token ID of help message text.
> +// Shell supports to find help message in the resource section of an
> application image if
> +// .MAN file is not found. This global variable is added to make build tool
> recognizes
> +// that the help string is consumed by user and then build tool will add the
> string into
> +// the resource section. Thus the application can use '-?' option to show 
> help
> message in
> +// Shell.
> +//
> +GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID
> mStrDumpDynPcdHelpTokenId = STRING_TOKEN
> (STR_DUMP_DYN_PCD_HELP_INFORMATION);
> +
> +#define MAJOR_VERSION   1
> +#define MINOR_VERSION   0
> +
> +static EFI_UNICODE_COLLATION_PROTOCOL  *mUnicodeCollation  = NULL;
> +static EFI_PCD_PROTOCOL*mPiPcd = NULL;
> +static PCD_PROTOCOL*mPcd   = NULL;
> +static EFI_GET_PCD_INFO_PROTOCOL   *mPiPcdInfo = NULL;
> +static GET_PCD_INFO_PROTOCOL   *mPcdInfo   = NULL;
> +static CHAR16   *mTempPcdNameBuffer = NULL;
> +static UINTN mTempPcdNameBufferSize = 0;
> +
> +static CONST CHAR8 mHex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', 
> '9', 'A', 'B',
> 'C', 'D', 'E', 'F'};
> +
> +static UINTN  Argc;
> +static CHAR16 **Argv;
> +
> +
> +/**
> +
> +  This function parse application ARG.
> +
> +  @return Status
> +**/
> +static
> +EFI_STATUS
> +GetArg (
> +  VOID
> +  )
> +{
> +  EFI_STATUSStatus;
> +  EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters;
> +
> +  Status = gBS->HandleProtocol (
> +  gImageHandle,
> +  &gEfiShellParametersProtocolGuid,
> +  (VOID**)&ShellParameters
> +  );
> +  if (EFI_ERROR(Status)) {
> +return Status;
> +  }
> +
> +  Argc = ShellParameters->Argc;
> +  Argv = ShellParameters->Argv;
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +   Display current version.
> +**/
> +static
> +VOID
> +ShowVersion (
> +  )
> +{
> +  Print (L"DumpDynPcd Version %d.%02d\n", MAJOR_VERSION,
> MINOR_VERSION);
> +}
> +
> +/**
> +   Display Usage and Help information.
> +**/
> +static
> +VOID
> +ShowHelp (
> +  )
> +{
> +  Print (L"Dump dynamic[ex] PCD info.\n");
> +  Print (L"\n");
> +  Print (L"DumpDynPcd [PcdName]\n");
> +  Print (L"\n");
> +  Print (L"  PcdNameSpecifies the name of PCD.\n");
> +  Print (L" A literal[or partial] name or a pattern as specified 
> in\n");
> +  Print (L" the MetaiMatch() func

Re: [edk2-devel] reg : UEFI Secure Boot is stuck with Black Screen

2019-05-07 Thread Laszlo Ersek
On 05/07/19 06:59, pavankuma...@persistent.co.in wrote:
> On Thu, May 2, 2019 at 03:11 AM, 
> wrote:
> 
>> 
>> Hi Laszlo,
> 
> As you suggested in the in-line mail I have found a machine which
> supports EPT technology in our lab environment. And to maintain a
> homogeneous KVM Host environment used qemu-kvm packages which comes
> with the default repo.The thing is that by default qemu-kvm is not
> supporting q35 machine type .This is the reason earlier we went for
> Cent OS packages so that qemu-kvm can support  q35 chipset for Guest
> VM. Can you suggest me on the same , if i wanted to perform with RHEL
> 7.6 how can i proceed.

(Given that you asked earlier off-list as well, and that I happened to
answer there first, I think I won't repeat the answer here. The answer
is not related to upstream edk2 development anyway; it has to do with RH
products / RHEL packages. I would have been fine with answering here
only, but now it's not really useful to duplicate that info, which is
strictly speaking off-topic.

I'm posting this short note just to tell the list that I didn't ignore
the question.)

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40107): https://edk2.groups.io/g/devel/message/40107
Mute This Topic: https://groups.io/mt/31342849/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] Adding DebugPkg to the main edk2 repo

2019-05-07 Thread Laszlo Ersek
On 05/07/19 10:59, Ryszard Knop wrote:
> Hi Mike,
> 
> GdbSyms can be built separately from the debugged image. It produces a
> DLL file to load while starting GDB so that it properly detects the
> target once connected. The associated gdb_uefi.py script loads it with
> symbol-file to get some info required to find the system table, etc
> (see search_est function).

Yes, that function performs the 4MB-aligned search that Mike mentioned.

> 
> I'm using this script (with QEMU only, not sure about other platforms,
> but could work I guess?) and have a Python 3 port if someone needs it.
> 
> Thanks, Richard
> 
> On 2019-05-07 8:13, Michael D Kinney wrote:
>> Hi Rebecca,
>>
>> This content does not look OVMF specific.
>>
>> Does it depend on QEMU?  Or would this
>> Potentially work on any target that supports
>> gdb?

I'd expect it to interoperate with any gdb server implementation.

Whenever I use DebugPkg, to connect to a running QEMU instance, I launch the 
following gdb scriptlet (with "gdb -x") from a file:

set height 0
set architecture i386:x86-64:intel
target remote localhost:1234
source .../DebugPkg/Scripts/gdb_uefi.py
reload-uefi -o 
.../Build/Ovmf3264/NOOPT_GCC48/X64/DebugPkg/GdbSyms/GdbSyms/DEBUG/GdbSyms.dll

Thanks
Laszlo

>>
>> How about adding to SourceLevelDebugPkg as
>> an another method to load symbols?  Not sure
>> why the extra module is required.  The Debug
>> Image Info Table is defined to be on a 4MB
>> boundary and can be found with a search.
>>
>> Mike
>>
>>> -Original Message-
>>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
>>> On Behalf Of rebe...@bluestop.org
>>> Sent: Monday, May 6, 2019 7:04 PM
>>> To: devel@edk2.groups.io
>>> Subject: [edk2-devel] Adding DebugPkg to the main edk2
>>> repo
>>>
>>> I think this has been discussed previously, but since
>>> time has passed
>>> I'd like to check again: is there any possibility of
>>> having the DebugPkg
>>> from https://github.com/andreiw/andreiw-
>>> wip/tree/master/uefi/DebugPkg
>>> added to the main edk2 repo in some way (perhaps not as
>>> DebugPkg, but
>>> renamed/reorganized/integrated)?
>>>
>>>
>>> It seems such a useful addition for debugging UEFI code
>>> running under
>>> OVMF that it would be nice to have it somewhere it has
>>> less chance of
>>> bitrotting.
>>>
>>>
>>> -- 
>>> Rebecca Cran
>>>
>>>
>>>
>>
>>
>>
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40106): https://edk2.groups.io/g/devel/message/40106
Mute This Topic: https://groups.io/mt/31527543/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms] [patch 1/7] Platform/AMD: Update UefiDecompressLib instance

2019-05-07 Thread Leif Lindholm
Hi Dandan,

Sorry to be a pain, but could you follow the steps in
https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-09
and then regenerate these patches and send out again?

That way, it is obvious from the diff which sections are being
modified.

Best Regards,

Leif

On Sun, May 05, 2019 at 04:05:31PM +0800, Dandan Bi wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1722
> 
> BaseUefiDecompressLib in MdePkg is the
> base UEFI decompress Library.
> BaseUefiTianoCustomDecompressLib in MdeModulePkg
> implements the base UEFI decompress functionality and
> Tiano decompress functionality.
> 
> 1. TIANOCOMPRESSED rule in OverdriveBoard.fdf
> is not used, so remove it.
> 2. Platform doesn't use the TianoCompress, so do
> not have to use BaseUefiTianoCustomDecompressLib,
> can use the BaseUefiDecompressLib in MdePkg directly.
> 3. A common UefiDecompressLib resolution can apply to
> all module types now. So keep the common one in
> [LibraryClasses.common] section and remove all others.
> 
> Cc: Ard Biesheuvel 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi 
> ---
>  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 5 -
>  Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 9 -
>  2 files changed, 14 deletions(-)
> 
> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc 
> b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> index 616553172b..39b5dad154 100644
> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> @@ -186,11 +186,10 @@ DEFINE X64EMU_ENABLE  = FALSE
>HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
>
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
>PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
>
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
> -  
> UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
>
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
>  
>
> PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
>  
>  [LibraryClasses.common.PEIM]
> @@ -199,21 +198,19 @@ DEFINE X64EMU_ENABLE  = FALSE
>
> MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
>PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
>PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
>
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>
> PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
> -  
> UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
>
> ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
>  
>
> PeiServicesTablePointerLib|ArmPkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
>  
>  [LibraryClasses.common.DXE_CORE]
>HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
>
> MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
>DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
>
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
> -  
> UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
>
> PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
>  
>  [LibraryClasses.common.DXE_DRIVER]
>
> SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
>PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
> @@ -227,17 +224,15 @@ DEFINE X64EMU_ENABLE  = FALSE
>  !if $(TARGET) != RELEASE
>
> DebugLib|MdePkg/Library/DxeRuntimeDebugLibSerialPort/DxeRuntimeDebugLibSerialPort.inf
>  !endif
>  
>  [LibraryClasses.common.UEFI_APPLICATION]
> -  
> UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
>PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
>
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
>HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
>  
>  [LibraryClasses.common.UEFI_DRIVER]
> -  
> UefiDecompressLib|MdeModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
>
> ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
>PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePer

[edk2-devel] [PATCH 1/1] MdeModulePkg: BaseSerialPortLib16550: Update Mmio32 to UNI

2019-05-07 Thread Loh, Tien Hock
From: "tien.hock.loh" 

Some busses doesn't allow 8 bit MMIO read/write, this adds support for
32 bits read/write. This patch adds the UNI information on the new
Pcd introduced - PcdSerialRegisterAccessWidth

Signed-off-by: "Tien Hock, Loh" 
Cc: Jian J Wang 
Cc: Hao Wu 
Cc: "Zhu, YongHong" 

Signed-off-by: tien.hock.loh 
---
 MdeModulePkg/MdeModulePkg.uni | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni
index cf2aefa7ad..654dfeadb0 100644
--- a/MdeModulePkg/MdeModulePkg.uni
+++ b/MdeModulePkg/MdeModulePkg.uni
@@ -160,6 +160,12 @@

   "TRUE  - 16550 serial port registers are in MMIO space.\n"

   "FALSE - 16550 serial port registers are in I/O space."
 
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSerialRegisterAccessWidth_PROMPT 
 #language en-US "Serial port registers access width"
+
+#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSerialRegisterAccessWidth_HELP  
#language en-US "Sets the 16550 serial port registers access width in MMIO 
space. Default is 8 bits access.\n"
+   
   "8  - 16550 serial port MMIO register access are in 8 bits mode.\n"
+   
   "32 - 16550 serial port MMIO registers acess are in 32 bits mode.."
+
 #string 
STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSerialUseHardwareFlowControl_PROMPT  
#language en-US "Enable serial port hardware flow control"
 
 #string 
STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSerialUseHardwareFlowControl_HELP  
#language en-US "Indicates if the 16550 serial port hardware flow control will 
be enabled. Default is FALSE.\n"
-- 
2.13.0


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40104): https://edk2.groups.io/g/devel/message/40104
Mute This Topic: https://groups.io/mt/31530534/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 1/4] MdeModulePkg: Add reset data difinition and guid

2019-05-07 Thread Laszlo Ersek
On 05/06/19 23:02, Kinney, Michael D wrote:
> Laszlo,
> 
> I agree with both your points.  The file name should not imply
> that it can only be used for capsule resets.
> 
> I also agree that the structure name and GUIDs should use 
> EDKII_ and gEdkii prefixes.
> 
> I also suggest, since the 2 new GUIDs are not associated with 
> a structure (they are used to fill in a GUID value field in a
> structure), that they can be declared in the DEC file alone and
> do not require the MACRO name or extern declaration in a new .h
> file.  The .h file should only contain the new data structure
> EDKII_RESET_DATA_WITH_NULL_STRING.
> 
> Depending on what modules/libs use EDKII_RESET_DATA_WITH_NULL_STRING,
> it may make more sense to add this structure to an existing 
> library class .h file.

The lib class header "MdeModulePkg/Include/Library/ResetUtilityLib.h"
definitely crossed my mind, but I didn't dare suggest it. :)

Thanks
Laszlo

> Best regards,
> 
> Mike
> 
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
>> On Behalf Of Laszlo Ersek
>> Sent: Monday, May 6, 2019 8:44 AM
>> To: devel@edk2.groups.io; Gao, Zhichao
>> 
>> Cc: Bret Barkelew ; Wang,
>> Jian J ; Wu, Hao A
>> ; Ni, Ray ; Zeng,
>> Star ; Gao, Liming
>> ; Sean Brogan
>> ; Michael Turner
>> 
>> Subject: Re: [edk2-devel] [PATCH 1/4] MdeModulePkg: Add
>> reset data difinition and guid
>>
>> On 05/05/19 09:50, Gao, Zhichao wrote:
>>> From: Bret Barkelew 
>>>
>>> REF:
>> https://bugzilla.tianocore.org/show_bug.cgi?id=1772
>>>
>>> Add a useful definition of reset data for capsule
>> function. And add
>>> two guids gCapsuleArmedResetGuid and
>> gCapsuleUpdateCompleteResetGuid.
>>>
>>> Cc: Jian J Wang 
>>> Cc: Hao Wu 
>>> Cc: Ray Ni 
>>> Cc: Star Zeng 
>>> Cc: Liming Gao 
>>> Cc: Sean Brogan 
>>> Cc: Michael Turner 
>>> Cc: Bret Barkelew 
>>> Signed-off-by: Zhichao Gao 
>>> ---
>>>  MdeModulePkg/Include/Guid/CapsuleResetData.h | 40
>> 
>>>  MdeModulePkg/MdeModulePkg.dec|  5 +++
>>>  2 files changed, 45 insertions(+)
>>>  create mode 100644
>> MdeModulePkg/Include/Guid/CapsuleResetData.h
>>>
>>> diff --git
>> a/MdeModulePkg/Include/Guid/CapsuleResetData.h
>> b/MdeModulePkg/Include/Guid/CapsuleResetData.h
>>> new file mode 100644
>>> index 00..b0666a0da2
>>> --- /dev/null
>>> +++ b/MdeModulePkg/Include/Guid/CapsuleResetData.h
>>> @@ -0,0 +1,40 @@
>>> +/** @file
>>> +  The capsule reset data difinition and guids.
>>> +
>>> +  Copyright (c) 2019, Intel Corporation. All rights
>> reserved.
>>> +  SPDX-License-Identifier: BSD-2-Clause-Patent
>>> +
>>> +**/
>>> +#ifndef __CAPSULE_RESET_DATA_H__
>>> +#define __CAPSULE_RESET_DATA_H__
>>> +
>>> +#include 
>>> +
>>> +//
>>> +// reset data started with a null string and followed
>> by a guid data
>>> +//
>>> +#pragma pack(1)
>>> +typedef struct {
>>> +  CHAR16  NullString;
>>> +  EFI_GUIDResetGuid;
>>> +} RESET_DATA_WITH_NULL_STRING;
>>> +#pragma pack()
>>> +
>>> +VERIFY_SIZE_OF (RESET_DATA_WITH_NULL_STRING, 18);
>>
>> I think that exposing RESET_DATA_WITH_NULL_STRING as a
>> public structure
>> is a good idea -- it indeed looks like something useful
>> for many
>> platforms and for different purposes.
>>
>> - However, I'd argue that it should not go into an
>> include file called
>> "CapsuleResetData.h". The type looks generic and not
>> tied to capsules.
>>
>> - Additionally, I believe (but I'm not fully sure!) that
>> new structures
>> under MdeModulePkg/Include/Guid should be named EDKII_*.
>>
>> If the MdeModulePkg maintainers are OK with these
>> patches in the current
>> form, I'm fine too; I just thought we might want to
>> consider the above
>> points. (I certainly suggest waiting for their feedback
>> before starting
>> work on v2, just to address the above.)
>>
>> Thanks!
>> Laszlo
>>
>>> +
>>> +#define CAPSULE_ARMED_RESET_GUID \
>>> +  { \
>>> +0xc6b4eea7, 0xfce2, 0x4625, { 0x9c, 0x4f, 0xc4,
>> 0xb0, 0x82, 0x37, 0xae, 0x23 }  \
>>> +  }
>>> +
>>> +#define CAPSULE_UPDATE_COMPLETE_RESET_GUID \
>>> +  { \
>>> +0x5d512714, 0xa4df, 0x4e46, { 0xb6, 0xc7, 0xbc,
>> 0x9f, 0x97, 0x9d, 0x59, 0xa0 }  \
>>> +  }
>>> +
>>> +extern EFI_GUID gCapsuleArmedResetGuid;
>>> +
>>> +extern EFI_GUID gCapsuleUpdateCompleteResetGuid;
>>> +
>>> +#endif
>>> +
>>> diff --git a/MdeModulePkg/MdeModulePkg.dec
>> b/MdeModulePkg/MdeModulePkg.dec
>>> index 2ef48f2c37..c12b836c24 100644
>>> --- a/MdeModulePkg/MdeModulePkg.dec
>>> +++ b/MdeModulePkg/MdeModulePkg.dec
>>> @@ -423,6 +423,11 @@
>>>## Include/Guid/S3StorageDeviceInitList.h
>>>gS3StorageDeviceInitListGuid = { 0x310e9b8c,
>> 0xcf90, 0x421e, { 0x8e, 0x9b, 0x9e, 0xef, 0xb6, 0x17,
>> 0xc8, 0xef } }
>>>
>>> +  ## Guid to use for gRT->ResetSystem() to indicate
>> the type of reset that is being performed.
>>> +  #  Include/Guid/CapsuleResetData.h
>>> +  gCapsuleArmedResetGuid= {0xc6b4eea7,
>> 0xfce2, 0x4625, {0x9c, 0x4f, 0xc4, 0xb0, 0x82, 0x37,
>> 0xae, 0x23}}
>>> +  gCapsu

[edk2-devel][Patch 2/2] MdeModulePkg: Remove BootInRecoveryMode PPI DEPEX from PEI storage stack.

2019-05-07 Thread Xu, Wei6
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1777

BootInRecoveryMode Ppi dependency should be removed from PEI storage stack 
drivers. Besides recovery, more features are using the storage stack.
Platform can apply Ppi dependency in Recovery FV which contains full storage 
driver stack.
Platform storage stack modules, such as host controller init PEI module, should 
also remove this dependency.

CC: Ni Ray 
CC: Wu Hao A 
Signed-off-by: Xu Wei6 
---
 MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/UhciPei/UhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf  | 2 +-
 MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf  | 2 +-
 MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf 
b/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf
index a810c3c6bc..0fc09ffca4 100644
--- a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf
+++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf
@@ -57,9 +57,9 @@
   gPeiUsbControllerPpiGuid  ## CONSUMES
   gEdkiiIoMmuPpiGuid## CONSUMES
   gEfiEndOfPeiSignalPpiGuid ## CONSUMES
 
 [Depex]
-  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsbControllerPpiGuid AND 
gEfiPeiBootInRecoveryModePpiGuid
+  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsbControllerPpiGuid
 
 [UserExtensions.TianoCore."ExtraFiles"]
   EhciPeiExtra.uni
diff --git a/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.inf 
b/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.inf
index 074f12586c..ad50d4c0c9 100644
--- a/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.inf
+++ b/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.inf
@@ -54,9 +54,9 @@
 
 [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdSataSpinUpDelayInSecForRecoveryPath   ## 
CONSUMES
 
 [Depex]
-  gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiBootInRecoveryModePpiGuid AND 
gPeiAtaControllerPpiGuid
+  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiAtaControllerPpiGuid
 
 [UserExtensions.TianoCore."ExtraFiles"]
   IdeBusPeiExtra.uni
diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhciPei.inf 
b/MdeModulePkg/Bus/Pci/UhciPei/UhciPei.inf
index accb0e2460..06515b7ca7 100644
--- a/MdeModulePkg/Bus/Pci/UhciPei/UhciPei.inf
+++ b/MdeModulePkg/Bus/Pci/UhciPei/UhciPei.inf
@@ -52,9 +52,9 @@
   gEdkiiIoMmuPpiGuid## CONSUMES
   gEfiEndOfPeiSignalPpiGuid ## CONSUMES
 
 
 [Depex]
-  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsbControllerPpiGuid AND 
gEfiPeiBootInRecoveryModePpiGuid
+  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsbControllerPpiGuid
 
 [UserExtensions.TianoCore."ExtraFiles"]
   UhciPeiExtra.uni
diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf 
b/MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf
index 89bb28ee53..f216538f4d 100644
--- a/MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf
+++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf
@@ -52,9 +52,9 @@
   gPeiUsbControllerPpiGuid  ## CONSUMES
   gEdkiiIoMmuPpiGuid## CONSUMES
   gEfiEndOfPeiSignalPpiGuid ## CONSUMES
 
 [Depex]
-  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsbControllerPpiGuid AND 
gEfiPeiBootInRecoveryModePpiGuid
+  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsbControllerPpiGuid
 
 [UserExtensions.TianoCore."ExtraFiles"]
   XhciPeiExtra.uni
diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf 
b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf
index f9f44a883e..de2df5fe3c 100644
--- a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf
+++ b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf
@@ -54,9 +54,9 @@
   ## CONSUMES
   ## NOTIFY
   gPeiUsbIoPpiGuid
 
 [Depex]
-  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsbIoPpiGuid AND 
gEfiPeiBootInRecoveryModePpiGuid
+  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsbIoPpiGuid
 
 [UserExtensions.TianoCore."ExtraFiles"]
   UsbBotPeiExtra.uni
diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf 
b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf
index 617aa3bb10..31d7c2e2fe 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf
+++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf
@@ -52,9 +52,9 @@
   gPeiUsbIoPpiGuid  ## PRODUCES
   gPeiUsbHostControllerPpiGuid  ## SOMETIMES_CONSUMES
   gPeiUsb2HostControllerPpiGuid ## SOMETIMES_CONSUMES
 
 [Depex]
-  gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiBootInRecoveryModePpiGuid AND 
gPeiUsb2HostControllerPpiGuid OR gPeiUsbHostControllerPpiGuid
+  gEfiPeiMemoryDiscoveredPpiGuid AND gPeiUsb2HostControllerPpiGuid OR 
gPeiUsbHostControllerPpiGuid
 
 [UserExtensions.TianoCore."ExtraFiles"]
   UsbBusPeiExtra.uni
diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf 
b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf
index 11ab49b33b..6a8f3c2da8 100644
--

[edk2-devel][Patch 0/2] Remove BootInRecoveryMode PPI DEPEX

2019-05-07 Thread Xu, Wei6
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1777

BootInRecoveryMode Ppi dependency should be removed from PEI storage stack 
drivers.Besides recovery, more features are using the storage stack.

CC: Ni Ray 
CC: Wu Hao A 

xuwei6 (2):
  FatPkg/FatPei: Remove BootInRecoveryMode PPI DEPEX.
  MdeModulePkg: Remove BootInRecoveryMode PPI DEPEX from PEI storage
stack.

 FatPkg/FatPei/FatPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/UhciPei/UhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf  | 2 +-
 MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf  | 2 +-
 MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf  | 2 +-
 MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40100): https://edk2.groups.io/g/devel/message/40100
Mute This Topic: https://groups.io/mt/31530231/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel][Patch 1/2] FatPkg/FatPei: Remove BootInRecoveryMode PPI DEPEX.

2019-05-07 Thread Xu, Wei6
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1777

BootInRecoveryMode Ppi dependency should be removed from PEI storage stack 
drivers. Besides recovery, more features are using the storage stack.
Platform can apply Ppi dependency in Recovery FV which contains full storage 
driver stack.
Platform storage stack modules, such as host controller init PEI module, should 
also remove this dependency.

CC: Ni Ray 
CC: Wu Hao A 
Signed-off-by: Xu Wei6 
---
 FatPkg/FatPei/FatPei.inf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/FatPkg/FatPei/FatPei.inf b/FatPkg/FatPei/FatPei.inf
index b554aae040..4560dbaab4 100644
--- a/FatPkg/FatPei/FatPei.inf
+++ b/FatPkg/FatPei/FatPei.inf
@@ -71,9 +71,9 @@
 
 [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName ## CONSUMES
 
 [Depex]
-  gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiBootInRecoveryModePpiGuid
+  gEfiPeiMemoryDiscoveredPpiGuid
 
 [UserExtensions.TianoCore."ExtraFiles"]
   FatPeiExtra.uni
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40101): https://edk2.groups.io/g/devel/message/40101
Mute This Topic: https://groups.io/mt/31530232/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt' option

2019-05-07 Thread Gao, Zhichao
This patch looks good for me.
Reviewed-by: Zhichao Gao 

But when I view the command in UEFI SHELL 2.2 spec:
...
bcfg driver|boot [-opt # [[filename]|["data"]] | [KeyData *]]
...
-opt
Modify the optional data associated with a driver or boot option. Followed 
either by the filename of the file which contains the binary data to be 
associated with the driver or boot option optional data, or else the 
quote-delimited data that will be associated with the driver or boot option 
optional data.
...

This description lack the comment of '#' parameter and that may make the 
consumer confused. Usually consumers would regard it as the same in other 
option, such as ' bcfg driver|boot [rm #]'. The '#' is clearly descripted as a 
hexadecimal parameter:
rm
Remove an option. The # parameter lists the option number to remove in 
hexadecimal.

So I think we should update the shell spec by the way.

Thanks,
Zhichao

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Ni,
> Ray
> Sent: Monday, May 6, 2019 10:02 PM
> To: jw...@jwatt.org; devel@edk2.groups.io
> Cc: Carsey, Jaben ; Bi, Dandan
> 
> Subject: Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib:
> Fix '-opt' option
> 
> Dandan,
> Can you please help to review?
> 
> Thanks,
> Ray
> 
> > -Original Message-
> > From: jw...@jwatt.org [mailto:jw...@jwatt.org]
> > Sent: Monday, May 6, 2019 9:03 PM
> > To: devel@edk2.groups.io
> > Cc: Carsey, Jaben ; Ni, Ray 
> > Subject: [PATCH v1 1/1] ShellPkg/UefiShellBcfgCommandLib: Fix '-opt'
> > option
> >
> > From: Jonathan Watt 
> >
> > For all other bcfg commands the "#" (option number) argument(s) are
> > treated as hexedecimal values regardless of whether or not they are
> > prefixed by "0x".  This change fixes '-opt' to handle its "#"
> > (option number) argument consistently with the other commands.
> >
> > Making this change removes a potential footgun whereby a user that has
> > been using a number without a "0x" prefix with other bcfg commands
> > finds that, on using that exact same number with '-opt', it has this
> > time unexpectedly been interpreted as a decimal number and they have
> > modified
> > (corrupted) an unrelated load option.  For example, a user may have
> > been specifying "10" to other commands to have them act on the 16th
> > option (because simply "10", without any prefix, is how 'bcfg boot
> > dump' displayed the option number for the 16th option). Unfortunately
> > for them, if they also use '-opt' with "10" it would unexpectedly and
> > inconsistently act on the 10th option.
> >
> > CC: Jaben Carsey 
> > CC: Ray Ni 
> > Signed-off-by: Jonathan Watt 
> > ---
> >  ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c |
> > 2
> > +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > index d033c7c1dc59..e8b48b4990dd 100644
> > ---
> > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > +++
> > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
> > @@ -1019,7 +1019,7 @@ BcfgAddOpt(
> >//
> >// Get the index of the variable we are changing.
> >//
> > -  Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE,
> > TRUE);
> > +  Status = ShellConvertStringToUint64(Walker, &Intermediate, TRUE,
> > + TRUE);
> >if (EFI_ERROR(Status) || (((UINT16)Intermediate) != Intermediate)
> > || StrStr(Walker, L" ") == NULL || ((UINT16)Intermediate) >
> > ((UINT16)OrderCount)) {
> >  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV),
> > gShellBcfgHiiHandle, L"bcfg", L"Option Index");
> >  ShellStatus = SHELL_INVALID_PARAMETER;
> > --
> > 2.21.0
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40099): https://edk2.groups.io/g/devel/message/40099
Mute This Topic: https://groups.io/mt/31520134/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 3/3] ArmPlatformPkg:Delete FrameworkDatabase from ArmPlatformPkg

2019-05-07 Thread Sami Mujawar
Hi Leif,

We do not use this file and am ok if this is removed. However, I will let 
Thomas confirm this.

Regards,

Sami Mujawar

-Original Message-
From: Leif Lindholm  
Sent: 07 May 2019 10:31 AM
To: Fan, ZhijuX 
Cc: devel@edk2.groups.io; Thomas Abraham ; Sami Mujawar 
; Cohen, Eugene 
Subject: Re: [PATCH 3/3] ArmPlatformPkg:Delete FrameworkDatabase from 
ArmPlatformPkg

On Mon, May 06, 2019 at 09:20:12AM +, Fan, ZhijuX wrote:
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1627
> 
> The FrameworkDatabase was already obsolete, So, FrameworkDatabase can 
> be removed from ArmPlatformPkg.
> 
> This patch is going to fix this issue.
> 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Signed-off-by: Zhiju.Fan 

So, first of all:
Reviewed-by: Leif Lindholm 

Hmm. I wonder if anyone actually uses this Makefile at all since we moved the 
platforms out. Thomas? Sami? Eugene?

Best Regards,

Leif

> ---
>  ArmPlatformPkg/Scripts/Makefile | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/ArmPlatformPkg/Scripts/Makefile 
> b/ArmPlatformPkg/Scripts/Makefile index 09f1c90923..76f25e35e8 100644
> --- a/ArmPlatformPkg/Scripts/Makefile
> +++ b/ArmPlatformPkg/Scripts/Makefile
> @@ -65,7 +65,6 @@ endif
>  $(EDK2_CONF):
>  ifeq ("$(OS)","Windows_NT")
>   copy $(EDK_TOOLS_PATH)\Conf\build_rule.template Conf\build_rule.txt
> - copy $(EDK_TOOLS_PATH)\Conf\FrameworkDatabase.template 
> Conf\FrameworkDatabase.txt
>   copy $(EDK_TOOLS_PATH)\Conf\target.template Conf\target.txt
>   copy $(EDK_TOOLS_PATH)\Conf\tools_def.template Conf\tools_def.txt
> else
> --
> 2.14.1.windows.1
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40098): https://edk2.groups.io/g/devel/message/40098
Mute This Topic: https://groups.io/mt/31518094/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 3/3] ArmPlatformPkg:Delete FrameworkDatabase from ArmPlatformPkg

2019-05-07 Thread Leif Lindholm
On Mon, May 06, 2019 at 09:20:12AM +, Fan, ZhijuX wrote:
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1627
> 
> The FrameworkDatabase was already obsolete,
> So, FrameworkDatabase can be removed from ArmPlatformPkg.
> 
> This patch is going to fix this issue.
> 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Signed-off-by: Zhiju.Fan 

So, first of all:
Reviewed-by: Leif Lindholm 

Hmm. I wonder if anyone actually uses this Makefile at all since we
moved the platforms out. Thomas? Sami? Eugene?

Best Regards,

Leif

> ---
>  ArmPlatformPkg/Scripts/Makefile | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/ArmPlatformPkg/Scripts/Makefile b/ArmPlatformPkg/Scripts/Makefile
> index 09f1c90923..76f25e35e8 100644
> --- a/ArmPlatformPkg/Scripts/Makefile
> +++ b/ArmPlatformPkg/Scripts/Makefile
> @@ -65,7 +65,6 @@ endif
>  $(EDK2_CONF):
>  ifeq ("$(OS)","Windows_NT")
>   copy $(EDK_TOOLS_PATH)\Conf\build_rule.template Conf\build_rule.txt
> - copy $(EDK_TOOLS_PATH)\Conf\FrameworkDatabase.template 
> Conf\FrameworkDatabase.txt
>   copy $(EDK_TOOLS_PATH)\Conf\target.template Conf\target.txt
>   copy $(EDK_TOOLS_PATH)\Conf\tools_def.template Conf\tools_def.txt
>  else
> -- 
> 2.14.1.windows.1
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40097): https://edk2.groups.io/g/devel/message/40097
Mute This Topic: https://groups.io/mt/31518094/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] Adding DebugPkg to the main edk2 repo

2019-05-07 Thread Ryszard Knop

Hi Mike,

GdbSyms can be built separately from the debugged image. It produces a
DLL file to load while starting GDB so that it properly detects the
target once connected. The associated gdb_uefi.py script loads it with
symbol-file to get some info required to find the system table, etc
(see search_est function).

I'm using this script (with QEMU only, not sure about other platforms,
but could work I guess?) and have a Python 3 port if someone needs it.

Thanks, Richard

On 2019-05-07 8:13, Michael D Kinney wrote:

Hi Rebecca,

This content does not look OVMF specific.

Does it depend on QEMU?  Or would this
Potentially work on any target that supports
gdb?

How about adding to SourceLevelDebugPkg as
an another method to load symbols?  Not sure
why the extra module is required.  The Debug
Image Info Table is defined to be on a 4MB
boundary and can be found with a search.

Mike


-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io]
On Behalf Of rebe...@bluestop.org
Sent: Monday, May 6, 2019 7:04 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] Adding DebugPkg to the main edk2
repo

I think this has been discussed previously, but since
time has passed
I'd like to check again: is there any possibility of
having the DebugPkg
from https://github.com/andreiw/andreiw-
wip/tree/master/uefi/DebugPkg
added to the main edk2 repo in some way (perhaps not as
DebugPkg, but
renamed/reorganized/integrated)?


It seems such a useful addition for debugging UEFI code
running under
OVMF that it would be nice to have it somewhere it has
less chance of
bitrotting.


--
Rebecca Cran









-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40096): https://edk2.groups.io/g/devel/message/40096
Mute This Topic: https://groups.io/mt/31527543/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 2/3] Vlv2TbltDevicePkg:Delete FrameworkDatabase from Vlv2TbltDevicePkg

2019-05-07 Thread Sun, Zailiang
Reviewed-by: Zailiang Sun 

> -Original Message-
> From: Fan, ZhijuX
> Sent: Monday, May 6, 2019 5:19 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi 
> Subject: [PATCH 2/3] Vlv2TbltDevicePkg:Delete FrameworkDatabase from
> Vlv2TbltDevicePkg
> 
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1627
> 
> The FrameworkDatabase was already obsolete, So, FrameworkDatabase can
> be removed from Vlv2TbltDevicePkg.
> 
> This patch is going to fix this issue.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Signed-off-by: Zhiju.Fan 
> ---
>  Vlv2TbltDevicePkg/bldX64.bat  | 1 -
>  Vlv2TbltDevicePkg/bld_vlv.bat | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/bldX64.bat b/Vlv2TbltDevicePkg/bldX64.bat
> index 50dc5b1f07..14001ae71b 100644
> --- a/Vlv2TbltDevicePkg/bldX64.bat
> +++ b/Vlv2TbltDevicePkg/bldX64.bat
> @@ -12,7 +12,6 @@
>  @if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log  @if
> exist %WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log  @if
> exist %WORKSPACE%\Conf\build_rule.txt
> del %WORKSPACE%\Conf\build_rule.txt -@if
> exist %WORKSPACE%\Conf\FrameworkDatabase.db
> del %WORKSPACE%\Conf\FrameworkDatabase.db
>  @if exist %WORKSPACE%\Conf\target.txt
> del %WORKSPACE%\Conf\target.txt  @if
> exist %WORKSPACE%\Conf\tools_def.txt
> del %WORKSPACE%\Conf\tools_def.txt  @if exist conf\.cache rmdir /q /s
> conf\.cache diff --git a/Vlv2TbltDevicePkg/bld_vlv.bat
> b/Vlv2TbltDevicePkg/bld_vlv.bat index c5314833c0..746b0f4696 100644
> --- a/Vlv2TbltDevicePkg/bld_vlv.bat
> +++ b/Vlv2TbltDevicePkg/bld_vlv.bat
> @@ -32,7 +32,6 @@ if exist %CORE_PATH%\unitool.log
> del %CORE_PATH%\unitool.log  if exist %CORE_PATH%\Conf\target.txt
> del %CORE_PATH%\Conf\target.txt  if
> exist %CORE_PATH%\Conf\tools_def.txt
> del %CORE_PATH%\Conf\tools_def.txt  if
> exist %CORE_PATH%\Conf\build_rule.txt
> del %CORE_PATH%\Conf\build_rule.txt -if
> exist %CORE_PATH%\Conf\FrameworkDatabase.db
> del %CORE_PATH%\Conf\FrameworkDatabase.db
>  if exist conf\.cache rmdir /q/s conf\.cache
> 
>  :: Setup EDK environment. Edksetup puts new copies of target.txt,
> tools_def.txt, build_rule.txt in WorkSpace\Conf
> --
> 2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40094): https://edk2.groups.io/g/devel/message/40094
Mute This Topic: https://groups.io/mt/31518089/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [patch 10/11] Vlv2TbltDevicePkg: Remove PcdFrameworkCompatibilitySupport usage

2019-05-07 Thread Sun, Zailiang
Reviewed-by: Zailiang Sun 

> -Original Message-
> From: Bi, Dandan
> Sent: Monday, April 29, 2019 10:16 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi 
> Subject: [patch 10/11] Vlv2TbltDevicePkg: Remove
> PcdFrameworkCompatibilitySupport usage
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464
> 
> Currently Framework compatibility support is not needed and
> PcdFrameworkCompatibilitySupport will be removed from edk2.
> So remove the usage of this PCD firstly.
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Signed-off-by: Dandan Bi 
> ---
>  Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 3 +--
>  Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 3 +--
>  Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 3 +--
>  3 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> index b3642c5c7a..96e77d54e8 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> @@ -1,9 +1,9 @@
>  #/** @file
>  # Platform description.
>  #
> -# Copyright (c) 2012  - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2012  - 2019, Intel Corporation. All rights
> +reserved.
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  #  #**/ @@ -489,11
> +489,10 @@  !if $(CAPSULE_RESET_ENABLE) == TRUE
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE
>  !else
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALS
> E
>  !endif
> -
> gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport|T
> RUE
>gEfiCpuTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
>  !if $(DATAHUB_STATUS_CODE_ENABLE) == TRUE
> 
> gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub
> |TRUE
>  !else
> 
> gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub
> |FALSE
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> index 28e6f5a181..114353082b 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> @@ -1,9 +1,9 @@
>  #/** @file
>  # Platform description.
>  #
> -# Copyright (c) 2012  - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2012  - 2019, Intel Corporation. All rights
> +reserved.
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  #  #**/ @@ -491,11
> +491,10 @@  !if $(CAPSULE_RESET_ENABLE) == TRUE
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE
>  !else
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALS
> E
>  !endif
> -
> gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport|T
> RUE
>gEfiCpuTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
>  !if $(DATAHUB_STATUS_CODE_ENABLE) == TRUE
> 
> gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub
> |TRUE
>  !else
> 
> gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub
> |FALSE
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> index f9ba56ef4b..20fdc691cb 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> @@ -1,9 +1,9 @@
>  #/** @file
>  # Platform description.
>  #
> -# Copyright (c) 2012  - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2012  - 2019, Intel Corporation. All rights
> +reserved.
>  #
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  #  #**/ @@ -491,11
> +491,10 @@  !if $(CAPSULE_RESET_ENABLE) == TRUE
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE
>  !else
> 
> gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|FALS
> E
>  !endif
> -
> gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport|T
> RUE
>gEfiCpuTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE
>  !if $(DATAHUB_STATUS_CODE_ENABLE) == TRUE
> 
> gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub
> |TRUE
>  !else
> 
> gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdStatusCodeUseDataHub
> |FALSE
> --
> 2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40095): https://edk2.groups.io/g/devel/message/40095
Mute This Topic: https://groups.io/mt/31379005/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch] Document: Correct the Appendix G to Appendix F

2019-05-07 Thread Liming Gao
Reviewed-by: Liming Gao 

>-Original Message-
>From: Feng, Bob C
>Sent: Sunday, April 28, 2019 11:45 AM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C ; Gao, Liming 
>Subject: [Patch] Document: Correct the Appendix G to Appendix F
>
>BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1690
>
>This patch is going to fix the typo of Appendix G in Inf spec.
>
>Signed-off-by: Bob Feng 
>Cc: Liming Gao 
>---
> 2_inf_overview/24_[defines]_section.md | 2 +-
> appendix_f_module_types.md | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/2_inf_overview/24_[defines]_section.md
>b/2_inf_overview/24_[defines]_section.md
>index 54fa829..8949299 100644
>--- a/2_inf_overview/24_[defines]_section.md
>+++ b/2_inf_overview/24_[defines]_section.md
>@@ -84,11 +84,11 @@ implement functions that satisfy the
>BaseMemoryAllocation library class. In
> this instance, the driver module would also specify the `LIBRARY_CLASS` in
>the
> `[Defines]` section. Other DXE drivers that would require a library instance 
> for
> the `BaseMemoryAllocation` class could specify the `DXE_CORE` INF file as the
> recommended instance for satisfying the required library class instance.
>
>-Appendix G lists the available `MODULE_TYPE` values supported by EDK II INF
>+Appendix F lists the available `MODULE_TYPE` values supported by EDK II INF
> files.
>
> The EDK II `[Defines]` section is common to all architectures and does not
> permit using architectural modifiers in the section tag name.
>
>diff --git a/appendix_f_module_types.md b/appendix_f_module_types.md
>index 334d4b7..7082332 100644
>--- a/appendix_f_module_types.md
>+++ b/appendix_f_module_types.md
>@@ -1,7 +1,7 @@
> 2.20.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40093): https://edk2.groups.io/g/devel/message/40093
Mute This Topic: https://groups.io/mt/31369390/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH V2] BaseTools:corrected error message for the DatumType error

2019-05-07 Thread Bob Feng
Reviewed-by: Bob Feng 

-Original Message-
From: Fan, ZhijuX 
Sent: Tuesday, May 7, 2019 3:14 PM
To: devel@edk2.groups.io
Cc: Gao, Liming ; Feng, Bob C 
Subject: [PATCH V2] BaseTools:corrected error message for the DatumType error

BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1762

For structure Pcd, Its DatumType may be self-defined, If the PCD DatumType 
format is incorrect, this PCD DatumType error message is inappropriate.

This patch corrects the error message.

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Zhiju.Fan 
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py 
b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 1d7a6a11b8..e998aa7270 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -943,9 +943,13 @@ class DscBuildData(PlatformBuildClassObject):
 EdkLogger.error('build', FORMAT_INVALID, ErrStr, 
File=self.MetaFile, Line=LineNo,
 ExtraData="%s.%s" % (TokenSpaceGuid, PcdCName))
 if PcdType in (MODEL_PCD_DYNAMIC_DEFAULT, 
MODEL_PCD_DYNAMIC_EX_DEFAULT, MODEL_PCD_FIXED_AT_BUILD, 
MODEL_PCD_PATCHABLE_IN_MODULE):
-if self._DecPcds[PcdCName, TokenSpaceGuid].DatumType.strip() 
!= ValueList[1].strip():
-EdkLogger.error('build', FORMAT_INVALID, "Pcd datumtype 
used in DSC file is not the same as its declaration in DEC file.", 
File=self.MetaFile, Line=LineNo,
-ExtraData="%s.%s|%s" % (TokenSpaceGuid, 
PcdCName, Setting))
+if self._DecPcds[PcdCName, 
TokenSpaceGuid].BaseDatumType.strip() != ValueList[1].strip():
+DecPcd = self._DecPcds[PcdCName, TokenSpaceGuid]
+EdkLogger.error('build', FORMAT_INVALID,
+"Pcd datumtype used in DSC file is not the 
same as its declaration. DatumType:%s"%DecPcd.DatumType,
+File=self.MetaFile, Line=LineNo,
+ExtraData="Dsc:%s.%s|%s\n
Dec:%s.%s|%s|%s|%s" % (TokenSpaceGuid, PcdCName, Setting, TokenSpaceGuid, \
+PcdCName, DecPcd.DefaultValue, 
+ DecPcd.DatumType, DecPcd.TokenValue))
 if (TokenSpaceGuid + '.' + PcdCName) in GlobalData.gPlatformPcds:
 if GlobalData.gPlatformPcds[TokenSpaceGuid + '.' + PcdCName] != 
ValueList[Index]:
 GlobalData.gPlatformPcds[TokenSpaceGuid + '.' + PcdCName] = 
ValueList[Index]
--
2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40092): https://edk2.groups.io/g/devel/message/40092
Mute This Topic: https://groups.io/mt/31529546/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch 0/3] SecurityPkg/Opal: Change BlockSid policy.

2019-05-07 Thread Dong, Eric
This patch serial includes:
1. For safe concern, change BlockSID default policy.
2. Change SendBlockSID command time from ReadyToBoot to EndOfDxe.
3. Fix "Enable Feature" Menu disappear issue.

Eric Dong (3):
  SecurityPkg/SecurityPkg.dec: Change default value.
  SecurityPkg/OpalPassword: Change send BlockSID policy.
  SecurityPkg/OpalPassword: Fix "Enable Feature" Menu disappear issue.

 .../Include/Library/Tcg2PhysicalPresenceLib.h |   3 +-
 SecurityPkg/SecurityPkg.dec   |   2 +-
 .../Tcg/Opal/OpalPassword/OpalDriver.c| 115 +-
 .../Tcg/Opal/OpalPassword/OpalDriver.h|   1 +
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c   |  46 +--
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h   |  15 +++
 6 files changed, 112 insertions(+), 70 deletions(-)

-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40088): https://edk2.groups.io/g/devel/message/40088
Mute This Topic: https://groups.io/mt/31529813/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch 2/3] SecurityPkg/OpalPassword: Change send BlockSID policy.

2019-05-07 Thread Dong, Eric
Change SendBlockSID command time from ReadyToBoot to EndOfDxe.

Signed-off-by: Eric Dong 
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 104 +++--
 1 file changed, 46 insertions(+), 58 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index e3f5056953..a3d4350c67 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -574,6 +574,47 @@ BuildOpalDeviceInfoNvme (
   FreePool (DevInfoNvme);
 }
 
+/**
+
+  Send BlockSid command if needed.
+
+**/
+VOID
+SendBlockSidCommand (
+  VOID
+  )
+{
+  OPAL_DRIVER_DEVICE *Itr;
+  TCG_RESULT Result;
+  OPAL_SESSION   Session;
+  UINT32 PpStorageFlag;
+
+  PpStorageFlag = Tcg2PhysicalPresenceLibGetManagementFlags ();
+  if ((PpStorageFlag & TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID) != 
0) {
+//
+// Send BlockSID command to each Opal disk
+//
+Itr = mOpalDriver.DeviceList;
+while (Itr != NULL) {
+  if (Itr->OpalDisk.SupportedAttributes.BlockSid) {
+ZeroMem(&Session, sizeof(Session));
+Session.Sscp = Itr->OpalDisk.Sscp;
+Session.MediaId = Itr->OpalDisk.MediaId;
+Session.OpalBaseComId = Itr->OpalDisk.OpalBaseComId;
+
+DEBUG ((DEBUG_INFO, "OpalPassword: EndOfDxe point, send BlockSid 
command to device!\n"));
+Result = OpalBlockSid (&Session, TRUE);  // HardwareReset must always 
be TRUE
+if (Result != TcgResultSuccess) {
+  DEBUG ((DEBUG_ERROR, "OpalBlockSid fail\n"));
+  break;
+}
+  }
+
+  Itr = Itr->Next;
+}
+  }
+}
+
 /**
   Notification function of EFI_END_OF_DXE_EVENT_GROUP_GUID event group.
 
@@ -645,6 +686,11 @@ OpalEndOfDxeEventNotify (
 TmpDev = TmpDev->Next;
   }
 
+  //
+  // Send BlockSid command if needed.
+  //
+  SendBlockSidCommand ();
+
   DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__));
 
   gBS->CloseEvent (Event);
@@ -2368,53 +2414,6 @@ OpalDriverGetDeviceList(
   return mOpalDriver.DeviceList;
 }
 
-/**
-  ReadyToBoot callback to send BlockSid command.
-
-  @param  Event   Pointer to this event
-  @param  Context Event handler private Data
-
-**/
-VOID
-EFIAPI
-ReadyToBootCallback (
-  IN EFI_EVENTEvent,
-  IN VOID *Context
-  )
-{
-  OPAL_DRIVER_DEVICE *Itr;
-  TCG_RESULT Result;
-  OPAL_SESSION   Session;
-  UINT32 PpStorageFlag;
-
-  gBS->CloseEvent (Event);
-
-  PpStorageFlag = Tcg2PhysicalPresenceLibGetManagementFlags ();
-  if ((PpStorageFlag & TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID) != 
0) {
-//
-// Send BlockSID command to each Opal disk
-//
-Itr = mOpalDriver.DeviceList;
-while (Itr != NULL) {
-  if (Itr->OpalDisk.SupportedAttributes.BlockSid) {
-ZeroMem(&Session, sizeof(Session));
-Session.Sscp = Itr->OpalDisk.Sscp;
-Session.MediaId = Itr->OpalDisk.MediaId;
-Session.OpalBaseComId = Itr->OpalDisk.OpalBaseComId;
-
-DEBUG ((DEBUG_INFO, "OpalPassword: ReadyToBoot point, send BlockSid 
command to device!\n"));
-Result = OpalBlockSid (&Session, TRUE);  // HardwareReset must always 
be TRUE
-if (Result != TcgResultSuccess) {
-  DEBUG ((DEBUG_ERROR, "OpalBlockSid fail\n"));
-  break;
-}
-  }
-
-  Itr = Itr->Next;
-}
-  }
-}
-
 /**
   Stop this Controller.
 
@@ -2677,7 +2676,6 @@ EfiDriverEntryPoint(
   )
 {
   EFI_STATUS Status;
-  EFI_EVENT  ReadyToBootEvent;
   EFI_EVENT  EndOfDxeEvent;
 
   Status = EfiLibInstallDriverBindingComponentName2 (
@@ -2710,16 +2708,6 @@ EfiDriverEntryPoint(
   );
   ASSERT_EFI_ERROR (Status);
 
-  //
-  // register a ReadyToBoot event callback for sending BlockSid command
-  //
-  Status = EfiCreateEventReadyToBootEx (
-  TPL_CALLBACK,
-  ReadyToBootCallback,
-  (VOID *) &ImageHandle,
-  &ReadyToBootEvent
-  );
-
   //
   // Install Hii packages.
   //
-- 
2.15.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40090): https://edk2.groups.io/g/devel/message/40090
Mute This Topic: https://groups.io/mt/31529815/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch 3/3] SecurityPkg/OpalPassword: Fix "Enable Feature" Menu disappear issue.

2019-05-07 Thread Dong, Eric
After change behavior to send BlockSid command at EndOfDxe point,
check device ownership command will return un-authority error, it
finally caused opal driver can't show "Enable Feature" menu.

Update the code logic to send detect device ownership command
before send BlockSID command.

Signed-off-by: Eric Dong 
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 11 ++
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h |  1 +
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c| 46 --
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h| 15 +
 4 files changed, 63 insertions(+), 10 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index a3d4350c67..847749be66 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -608,6 +608,11 @@ SendBlockSidCommand (
   DEBUG ((DEBUG_ERROR, "OpalBlockSid fail\n"));
   break;
 }
+
+//
+// Record BlockSID command has been sent.
+//
+Itr->OpalDisk.SentBlockSID = TRUE;
   }
 
   Itr = Itr->Next;
@@ -2310,6 +2315,12 @@ ProcessOpalRequest (
 ProcessOpalRequestEnableFeature (Dev, L"Enable Feature:");
   }
 
+  //
+  // Update Device ownership.
+  // Later BlockSID command may block the update.
+  //
+  OpalDiskUpdateOwnerShip (&Dev->OpalDisk);
+
   break;
 }
 
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
index 2bca770620..1b1e372c51 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
@@ -149,6 +149,7 @@ typedef struct {
   UINT8   
Password[OPAL_MAX_PASSWORD_SIZE];
 
   UINT32  EstimateTimeCost;
+  BOOLEAN SentBlockSID;   // 
Check whether BlockSid command has been sent.
 } OPAL_DISK;
 
 //
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
index 4336604d0d..6587e0dd1a 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
@@ -1220,6 +1220,40 @@ OpalDiskInitialize (
   return OpalDiskUpdateStatus (&Dev->OpalDisk);
 }
 
+/**
+  Update the device ownship
+
+  @param OpalDiskThe Opal device.
+
+  @retval EFI_SUCESS Get ownership success.
+  @retval EFI_ACCESS_DENIED  Has send BlockSID command, can't change 
ownership.
+  @retval EFI_INVALID_PARAMETER  Not get Msid info before get ownership info.
+
+**/
+EFI_STATUS
+OpalDiskUpdateOwnerShip (
+  OPAL_DISK*OpalDisk
+  )
+{

+  OPAL_SESSION  Session;
+
+  if (OpalDisk->MsidLength == 0) {
+return EFI_INVALID_PARAMETER;
+  }
+
+  if (OpalDisk->SentBlockSID) {
+return EFI_ACCESS_DENIED;
+  }
+
+  ZeroMem(&Session, sizeof(Session));
+  Session.Sscp = OpalDisk->Sscp;
+  Session.MediaId = OpalDisk->MediaId;
+  Session.OpalBaseComId = OpalDisk->OpalBaseComId;
+
+  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);

+  return EFI_SUCCESS;
+}
+
 /**
   Update the device info.
 
@@ -1228,6 +1262,7 @@ OpalDiskInitialize (
   @retval EFI_SUCESS Initialize the device success.
   @retval EFI_DEVICE_ERROR   Get info from device failed.
   @retval EFI_INVALID_PARAMETER  Not get Msid info before get ownership info.
+  @retval EFI_ACCESS_DENIED  Has send BlockSID command, can't change 
ownership.
 
 **/
 EFI_STATUS
@@ -1248,15 +1283,6 @@ OpalDiskUpdateStatus (
 return EFI_DEVICE_ERROR;
   }
 
-  if (OpalDisk->MsidLength == 0) {
-return EFI_INVALID_PARAMETER;
-  } else {
-//
-// Base on the Msid info to get the ownership, so Msid info must get first.
-//
-OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);
-  }
-
-  return EFI_SUCCESS;
+  return OpalDiskUpdateOwnerShip (OpalDisk);
 }
 
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
index a4bb19ad60..6d01d3e614 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.h
@@ -385,4 +385,19 @@ OpalDiskInitialize (
   IN OPAL_DRIVER_DEVICE  *Dev
   );
 
+/**
+  Update the device ownership
+
+  @param OpalDiskThe Opal device.
+
+  @retval EFI_SUCESS Get ownership success.
+  @retval EFI_ACCESS_DENIED  Has send BlockSID command, can't change 
ownership.
+  @retval EFI_INVALID_PARAMETER  Not get Msid info before get ownership info.
+
+**/
+EFI_STATUS
+OpalDiskUpdateOwnerShip (
+  OPAL_DISK*OpalDisk
+  );
+
 #endif // _HII_H_
-- 
2.15.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40091): https://edk2.gr

[edk2-devel] [Patch 1/3] SecurityPkg/SecurityPkg.dec: Change default value.

2019-05-07 Thread Dong, Eric
For safe concern, change BlockSID default policy.

Signed-off-by: Eric Dong 
---
 SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h | 3 ++-
 SecurityPkg/SecurityPkg.dec   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h 
b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
index e08719003d..d8aedf1e4c 100644
--- a/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
+++ b/SecurityPkg/Include/Library/Tcg2PhysicalPresenceLib.h
@@ -57,7 +57,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 // Default value
 //
 #define TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT 
(TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_ENABLE_BLOCK_SID | \
-   
TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID)
+   
TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_PP_REQUIRED_FOR_DISABLE_BLOCK_SID |\
+   
TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_ENABLE_BLOCK_SID)
 
 /**
   Check and execute the pending TPM request.
diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
index 8d64b4fefe..edb31a1456 100644
--- a/SecurityPkg/SecurityPkg.dec
+++ b/SecurityPkg/SecurityPkg.dec
@@ -428,7 +428,7 @@
   # PCD can be configured for different settings in different scenarios
   # Default setting is TCG2_BIOS_TPM_MANAGEMENT_FLAG_DEFAULT | 
TCG2_BIOS_STORAGE_MANAGEMENT_FLAG_DEFAULT
   # @Prompt Initial setting of TCG2 Persistent Firmware Management Flags
-  
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2PhysicalPresenceFlags|0x300E2|UINT32|0x0001001B
+  
gEfiSecurityPkgTokenSpaceGuid.PcdTcg2PhysicalPresenceFlags|0x700E2|UINT32|0x0001001B
 
   ## Indicate current TPM2 Interrupt Number reported by _CRS control 
method.
   # TPM2 Interrupt feature is disabled If the pcd is set to 0.
-- 
2.15.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40089): https://edk2.groups.io/g/devel/message/40089
Mute This Topic: https://groups.io/mt/31529814/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch] AdvancedFeaturePkg/Cmos: Add Cmos related libraries.

2019-05-07 Thread Dong, Eric
Liming,

Got it. Already send a mail which include edk2-platform.  Will include 
edk2-platform/devel-MinPlatform if V2 version patch needs.

Thanks,
Eric

> -Original Message-
> From: Gao, Liming
> Sent: Tuesday, May 7, 2019 3:32 PM
> To: devel@edk2.groups.io; Dong, Eric 
> Subject: RE: [edk2-devel] [Patch] AdvancedFeaturePkg/Cmos: Add Cmos
> related libraries.
> 
> Eric:
>  The title should include edk2-platform/ devel-MinPlatform so that people
> know this patch for edk2-platform devel-MinPlatform branch.
> 
> >-Original Message-
> >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >Dong, Eric
> >Sent: Tuesday, May 07, 2019 3:28 PM
> >To: devel@edk2.groups.io
> >Cc: Ni, Ray ; Kubacki, Michael A
> >; Desimone, Nathaniel L
> >
> >Subject: [edk2-devel] [Patch] AdvancedFeaturePkg/Cmos: Add Cmos
> related
> >libraries.
> >
> >https://bugzilla.tianocore.org/show_bug.cgi?id=1552
> >
> >Add two libraries used to provide CMOS related operation.
> >
> >CmosAccessLib exports below APIs:
> >  CmosWrite32
> >  CmosWrite16
> >  CmosWrite8
> >  CmosRead32
> >  CmosRead16
> >  CmosRead8
> >  CmosInit
> >
> >PlatformCmosAccessLib export below APIs:
> >  PlatformCmosGetEntry
> >  PlatformCmosGetNmiState
> >
> >PlatformCmosAccessLib will be consumed by CmosAccessLib.
> >
> >Cc: Ray Ni 
> >Cc: Michael Kubacki 
> >Cc: Nate Desimone 
> >Signed-off-by: Eric Dong 
> >---
> > .../Cmos/Include/Library/CmosAccessLib.h  | 112 
> > .../Include/Library/PlatformCmosAccessLib.h   |  74 +++
> > .../Library/CmosAccessLib/CmosAccessLib.c | 492 ++
> > .../Library/CmosAccessLib/CmosAccessLib.inf   |  34 ++
> > .../CmosAccessLib/CmosAccessLibInternal.h |  41 ++
> > .../PlatformCmosAccessLibNull.c   |  45 ++
> > .../PlatformCmosAccessLibNull.inf |  30 ++
> > 7 files changed, 828 insertions(+)
> > create mode 100644
> >Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib
> .h
> > create mode 100644
> >Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmos
> Acc
> >essLib.h
> > create mode 100644
> >Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosA
> cc
> >essLib.c
> > create mode 100644
> >Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosA
> cc
> >essLib.inf
> > create mode 100644
> >Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosA
> cc
> >essLibInternal.h
> > create mode 100644
> >Platform/Intel/AdvancedFeaturePkg/Cmos/Library/PlatformCmosAccessLib
> N
> >ull/PlatformCmosAccessLibNull.c
> > create mode 100644
> >Platform/Intel/AdvancedFeaturePkg/Cmos/Library/PlatformCmosAccessLib
> N
> >ull/PlatformCmosAccessLibNull.inf
> >
> >diff --git
> >a/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessL
> ib
> >.h
> >b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccess
> Lib
> >.h
> >new file mode 100644
> >index 000..5f5029c
> >--- /dev/null
> >+++
> >b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccess
> Lib
> >.h
> >@@ -0,0 +1,112 @@
> >+/** @file
> >+  CmosAccessLib header file.
> >+
> >+Copyright (c) 2019, Intel Corporation. All rights reserved. This
> >+program and the accompanying materials are licensed and made
> >available under
> >+the terms and conditions of the BSD License that 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.
> >+
> >+**/
> >+
> >+#ifndef _CMOS_ACCESS_LIB_H_
> >+#define _CMOS_ACCESS_LIB_H_
> >+
> >+/**
> >+  Read a byte value from a CMOS address.
> >+
> >+  @param [in] Address   Location to read from CMOS
> >+
> >+  @return The byte value read from the CMOS address.
> >+**/
> >+UINT8
> >+EFIAPI
> >+CmosRead8 (
> >+  IN  UINT8 Address
> >+  );
> >+
> >+/**
> >+  Write a byte value to a CMOS address.
> >+
> >+  @param [in] Address Location to write to CMOS.
> >+  @param [in] DataThe byte value write to the CMOS address.
> >+**/
> >+VOID
> >+EFIAPI
> >+CmosWrite8 (
> >+  IN UINT8 Address,
> >+  IN UINT8 Data
> >+  );
> >+
> >+/**
> >+  Read a word value from a CMOS address.
> >+
> >+  @param [in] Address   Location to read from CMOS
> >+
> >+  @return The word value read from the CMOS address.
> >+**/
> >+UINT16
> >+EFIAPI
> >+CmosRead16 (
> >+  IN  UINT8  Address
> >+  );
> >+
> >+/**
> >+  Write a word value to a CMOS address.
> >+
> >+  @param [in] Address Location to write to CMOS.
> >+  @param [in] DataThe word value write to the CMOS address.
> >+**/
> >+VOID
> >+EFIAPI
> >+CmosWrite16 (
> >+  IN UINT8  Address,
> >+  IN UINT16 Data
> >+  );
> >+
> >+/**
> >+  Read a dword value from a CMOS address.
> >+
> >+  @param [in] Address   Location to read from CMOS
> >+
> >+  @return The dword value read from the CMOS address.
> >+**/
> >+UINT32
> >+EFI

Re: [edk2-devel] [Patch] AdvancedFeaturePkg/Cmos: Add Cmos related libraries.

2019-05-07 Thread Liming Gao
Eric:
 The title should include edk2-platform/ devel-MinPlatform so that people know 
this patch for edk2-platform devel-MinPlatform branch.

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Dong, Eric
>Sent: Tuesday, May 07, 2019 3:28 PM
>To: devel@edk2.groups.io
>Cc: Ni, Ray ; Kubacki, Michael A
>; Desimone, Nathaniel L
>
>Subject: [edk2-devel] [Patch] AdvancedFeaturePkg/Cmos: Add Cmos related
>libraries.
>
>https://bugzilla.tianocore.org/show_bug.cgi?id=1552
>
>Add two libraries used to provide CMOS related operation.
>
>CmosAccessLib exports below APIs:
>  CmosWrite32
>  CmosWrite16
>  CmosWrite8
>  CmosRead32
>  CmosRead16
>  CmosRead8
>  CmosInit
>
>PlatformCmosAccessLib export below APIs:
>  PlatformCmosGetEntry
>  PlatformCmosGetNmiState
>
>PlatformCmosAccessLib will be consumed by CmosAccessLib.
>
>Cc: Ray Ni 
>Cc: Michael Kubacki 
>Cc: Nate Desimone 
>Signed-off-by: Eric Dong 
>---
> .../Cmos/Include/Library/CmosAccessLib.h  | 112 
> .../Include/Library/PlatformCmosAccessLib.h   |  74 +++
> .../Library/CmosAccessLib/CmosAccessLib.c | 492 ++
> .../Library/CmosAccessLib/CmosAccessLib.inf   |  34 ++
> .../CmosAccessLib/CmosAccessLibInternal.h |  41 ++
> .../PlatformCmosAccessLibNull.c   |  45 ++
> .../PlatformCmosAccessLibNull.inf |  30 ++
> 7 files changed, 828 insertions(+)
> create mode 100644
>Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h
> create mode 100644
>Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAcc
>essLib.h
> create mode 100644
>Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAcc
>essLib.c
> create mode 100644
>Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAcc
>essLib.inf
> create mode 100644
>Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAcc
>essLibInternal.h
> create mode 100644
>Platform/Intel/AdvancedFeaturePkg/Cmos/Library/PlatformCmosAccessLibN
>ull/PlatformCmosAccessLibNull.c
> create mode 100644
>Platform/Intel/AdvancedFeaturePkg/Cmos/Library/PlatformCmosAccessLibN
>ull/PlatformCmosAccessLibNull.inf
>
>diff --git
>a/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib
>.h
>b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib
>.h
>new file mode 100644
>index 000..5f5029c
>--- /dev/null
>+++
>b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib
>.h
>@@ -0,0 +1,112 @@
>+/** @file
>+  CmosAccessLib header file.
>+
>+Copyright (c) 2019, Intel Corporation. All rights reserved.
>+This program and the accompanying materials are licensed and made
>available under
>+the terms and conditions of the BSD License that 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.
>+
>+**/
>+
>+#ifndef _CMOS_ACCESS_LIB_H_
>+#define _CMOS_ACCESS_LIB_H_
>+
>+/**
>+  Read a byte value from a CMOS address.
>+
>+  @param [in] Address   Location to read from CMOS
>+
>+  @return The byte value read from the CMOS address.
>+**/
>+UINT8
>+EFIAPI
>+CmosRead8 (
>+  IN  UINT8 Address
>+  );
>+
>+/**
>+  Write a byte value to a CMOS address.
>+
>+  @param [in] Address Location to write to CMOS.
>+  @param [in] DataThe byte value write to the CMOS address.
>+**/
>+VOID
>+EFIAPI
>+CmosWrite8 (
>+  IN UINT8 Address,
>+  IN UINT8 Data
>+  );
>+
>+/**
>+  Read a word value from a CMOS address.
>+
>+  @param [in] Address   Location to read from CMOS
>+
>+  @return The word value read from the CMOS address.
>+**/
>+UINT16
>+EFIAPI
>+CmosRead16 (
>+  IN  UINT8  Address
>+  );
>+
>+/**
>+  Write a word value to a CMOS address.
>+
>+  @param [in] Address Location to write to CMOS.
>+  @param [in] DataThe word value write to the CMOS address.
>+**/
>+VOID
>+EFIAPI
>+CmosWrite16 (
>+  IN UINT8  Address,
>+  IN UINT16 Data
>+  );
>+
>+/**
>+  Read a dword value from a CMOS address.
>+
>+  @param [in] Address   Location to read from CMOS
>+
>+  @return The dword value read from the CMOS address.
>+**/
>+UINT32
>+EFIAPI
>+CmosRead32 (
>+  IN  UINT8  Address
>+  );
>+
>+/**
>+  Write a dword value to a CMOS address.
>+
>+  @param [in] Address Location to write to CMOS.
>+  @param [in] DataThe dword value write to the CMOS address.
>+**/
>+VOID
>+EFIAPI
>+CmosWrite32 (
>+  IN UINT8  Address,
>+  IN UINT32 Data
>+  );
>+
>+/**
>+  Initialize the CMOS.
>+
>+  It initialize the CMOS area when Force is TRUE or the checksum is incorrect.
>+
>+  @param[in]  Force  TRUE indicating initializing the CMOS area without
>checking the checksum.
>+
>+  @retval TRUE  The CMOS is initialized to default value.
>+  @retval FALSE The CMOS isn't initialized to default value.
>+**/
>+BOOLEAN
>+EFIAPI
>+CmosInit (
>+  IN  BOOLEAN Force
>+  );
>+
>+

[edk2-devel] [Patch] [edk2-platforms] AdvancedFeaturePkg/Cmos: Add Cmos related libraries.

2019-05-07 Thread Dong, Eric
https://bugzilla.tianocore.org/show_bug.cgi?id=1552

Add two libraries used to provide CMOS related operation.

CmosAccessLib exports below APIs:
  CmosWrite32
  CmosWrite16
  CmosWrite8
  CmosRead32
  CmosRead16
  CmosRead8
  CmosInit

PlatformCmosAccessLib export below APIs:
  PlatformCmosGetEntry
  PlatformCmosGetNmiState

PlatformCmosAccessLib will be consumed by CmosAccessLib.

Cc: Ray Ni 
Cc: Michael Kubacki 
Cc: Nate Desimone 
Signed-off-by: Eric Dong 
---
 .../Cmos/Include/Library/CmosAccessLib.h  | 112 
 .../Include/Library/PlatformCmosAccessLib.h   |  74 +++
 .../Library/CmosAccessLib/CmosAccessLib.c | 492 ++
 .../Library/CmosAccessLib/CmosAccessLib.inf   |  34 ++
 .../CmosAccessLib/CmosAccessLibInternal.h |  41 ++
 .../PlatformCmosAccessLibNull.c   |  45 ++
 .../PlatformCmosAccessLibNull.inf |  30 ++
 7 files changed, 828 insertions(+)
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAccessLib.h
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAccessLib.c
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAccessLib.inf
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAccessLibInternal.h
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/PlatformCmosAccessLibNull/PlatformCmosAccessLibNull.c
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/PlatformCmosAccessLibNull/PlatformCmosAccessLibNull.inf

diff --git 
a/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h 
b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h
new file mode 100644
index 000..5f5029c
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h
@@ -0,0 +1,112 @@
+/** @file
+  CmosAccessLib header file.
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available 
under
+the terms and conditions of the BSD License that 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.
+
+**/
+
+#ifndef _CMOS_ACCESS_LIB_H_
+#define _CMOS_ACCESS_LIB_H_
+
+/**
+  Read a byte value from a CMOS address.
+
+  @param [in] Address   Location to read from CMOS
+
+  @return The byte value read from the CMOS address.
+**/
+UINT8
+EFIAPI
+CmosRead8 (
+  IN  UINT8 Address
+  );
+
+/**
+  Write a byte value to a CMOS address.
+
+  @param [in] Address Location to write to CMOS.
+  @param [in] DataThe byte value write to the CMOS address.
+**/
+VOID
+EFIAPI
+CmosWrite8 (
+  IN UINT8 Address,
+  IN UINT8 Data
+  );
+
+/**
+  Read a word value from a CMOS address.
+
+  @param [in] Address   Location to read from CMOS
+
+  @return The word value read from the CMOS address.
+**/
+UINT16
+EFIAPI
+CmosRead16 (
+  IN  UINT8  Address
+  );
+
+/**
+  Write a word value to a CMOS address.
+
+  @param [in] Address Location to write to CMOS.
+  @param [in] DataThe word value write to the CMOS address.
+**/
+VOID
+EFIAPI
+CmosWrite16 (
+  IN UINT8  Address,
+  IN UINT16 Data
+  );
+
+/**
+  Read a dword value from a CMOS address.
+
+  @param [in] Address   Location to read from CMOS
+
+  @return The dword value read from the CMOS address.
+**/
+UINT32
+EFIAPI
+CmosRead32 (
+  IN  UINT8  Address
+  );
+
+/**
+  Write a dword value to a CMOS address.
+
+  @param [in] Address Location to write to CMOS.
+  @param [in] DataThe dword value write to the CMOS address.
+**/
+VOID
+EFIAPI
+CmosWrite32 (
+  IN UINT8  Address,
+  IN UINT32 Data
+  );
+
+/**
+  Initialize the CMOS.
+
+  It initialize the CMOS area when Force is TRUE or the checksum is incorrect.
+
+  @param[in]  Force  TRUE indicating initializing the CMOS area without 
checking the checksum.
+
+  @retval TRUE  The CMOS is initialized to default value.
+  @retval FALSE The CMOS isn't initialized to default value.
+**/
+BOOLEAN
+EFIAPI
+CmosInit (
+  IN  BOOLEAN Force
+  );
+
+#endif // _CMOS_ACCESS_LIB_H_
diff --git 
a/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAccessLib.h
 
b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAccessLib.h
new file mode 100644
index 000..8c44ae2
--- /dev/null
+++ 
b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAccessLib.h
@@ -0,0 +1,74 @@
+/** @file
+  Platform CMOS Access Library Header File.
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available 
under
+the terms and conditions of the BSD License that accompanies this distrib

[edk2-devel] [Patch] AdvancedFeaturePkg/Cmos: Add Cmos related libraries.

2019-05-07 Thread Dong, Eric
https://bugzilla.tianocore.org/show_bug.cgi?id=1552

Add two libraries used to provide CMOS related operation.

CmosAccessLib exports below APIs:
  CmosWrite32
  CmosWrite16
  CmosWrite8
  CmosRead32
  CmosRead16
  CmosRead8
  CmosInit

PlatformCmosAccessLib export below APIs:
  PlatformCmosGetEntry
  PlatformCmosGetNmiState

PlatformCmosAccessLib will be consumed by CmosAccessLib.

Cc: Ray Ni 
Cc: Michael Kubacki 
Cc: Nate Desimone 
Signed-off-by: Eric Dong 
---
 .../Cmos/Include/Library/CmosAccessLib.h  | 112 
 .../Include/Library/PlatformCmosAccessLib.h   |  74 +++
 .../Library/CmosAccessLib/CmosAccessLib.c | 492 ++
 .../Library/CmosAccessLib/CmosAccessLib.inf   |  34 ++
 .../CmosAccessLib/CmosAccessLibInternal.h |  41 ++
 .../PlatformCmosAccessLibNull.c   |  45 ++
 .../PlatformCmosAccessLibNull.inf |  30 ++
 7 files changed, 828 insertions(+)
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAccessLib.h
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAccessLib.c
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAccessLib.inf
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/CmosAccessLib/CmosAccessLibInternal.h
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/PlatformCmosAccessLibNull/PlatformCmosAccessLibNull.c
 create mode 100644 
Platform/Intel/AdvancedFeaturePkg/Cmos/Library/PlatformCmosAccessLibNull/PlatformCmosAccessLibNull.inf

diff --git 
a/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h 
b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h
new file mode 100644
index 000..5f5029c
--- /dev/null
+++ b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/CmosAccessLib.h
@@ -0,0 +1,112 @@
+/** @file
+  CmosAccessLib header file.
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available 
under
+the terms and conditions of the BSD License that 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.
+
+**/
+
+#ifndef _CMOS_ACCESS_LIB_H_
+#define _CMOS_ACCESS_LIB_H_
+
+/**
+  Read a byte value from a CMOS address.
+
+  @param [in] Address   Location to read from CMOS
+
+  @return The byte value read from the CMOS address.
+**/
+UINT8
+EFIAPI
+CmosRead8 (
+  IN  UINT8 Address
+  );
+
+/**
+  Write a byte value to a CMOS address.
+
+  @param [in] Address Location to write to CMOS.
+  @param [in] DataThe byte value write to the CMOS address.
+**/
+VOID
+EFIAPI
+CmosWrite8 (
+  IN UINT8 Address,
+  IN UINT8 Data
+  );
+
+/**
+  Read a word value from a CMOS address.
+
+  @param [in] Address   Location to read from CMOS
+
+  @return The word value read from the CMOS address.
+**/
+UINT16
+EFIAPI
+CmosRead16 (
+  IN  UINT8  Address
+  );
+
+/**
+  Write a word value to a CMOS address.
+
+  @param [in] Address Location to write to CMOS.
+  @param [in] DataThe word value write to the CMOS address.
+**/
+VOID
+EFIAPI
+CmosWrite16 (
+  IN UINT8  Address,
+  IN UINT16 Data
+  );
+
+/**
+  Read a dword value from a CMOS address.
+
+  @param [in] Address   Location to read from CMOS
+
+  @return The dword value read from the CMOS address.
+**/
+UINT32
+EFIAPI
+CmosRead32 (
+  IN  UINT8  Address
+  );
+
+/**
+  Write a dword value to a CMOS address.
+
+  @param [in] Address Location to write to CMOS.
+  @param [in] DataThe dword value write to the CMOS address.
+**/
+VOID
+EFIAPI
+CmosWrite32 (
+  IN UINT8  Address,
+  IN UINT32 Data
+  );
+
+/**
+  Initialize the CMOS.
+
+  It initialize the CMOS area when Force is TRUE or the checksum is incorrect.
+
+  @param[in]  Force  TRUE indicating initializing the CMOS area without 
checking the checksum.
+
+  @retval TRUE  The CMOS is initialized to default value.
+  @retval FALSE The CMOS isn't initialized to default value.
+**/
+BOOLEAN
+EFIAPI
+CmosInit (
+  IN  BOOLEAN Force
+  );
+
+#endif // _CMOS_ACCESS_LIB_H_
diff --git 
a/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAccessLib.h
 
b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAccessLib.h
new file mode 100644
index 000..8c44ae2
--- /dev/null
+++ 
b/Platform/Intel/AdvancedFeaturePkg/Cmos/Include/Library/PlatformCmosAccessLib.h
@@ -0,0 +1,74 @@
+/** @file
+  Platform CMOS Access Library Header File.
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available 
under
+the terms and conditions of the BSD License that accompanies this distrib

[edk2-devel] [PATCH V2] BaseTools:corrected error message for the DatumType error

2019-05-07 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1762

For structure Pcd, Its DatumType may be self-defined,
If the PCD DatumType format is incorrect,
this PCD DatumType error message is inappropriate.

This patch corrects the error message.

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Zhiju.Fan 
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py 
b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 1d7a6a11b8..e998aa7270 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -943,9 +943,13 @@ class DscBuildData(PlatformBuildClassObject):
 EdkLogger.error('build', FORMAT_INVALID, ErrStr, 
File=self.MetaFile, Line=LineNo,
 ExtraData="%s.%s" % (TokenSpaceGuid, PcdCName))
 if PcdType in (MODEL_PCD_DYNAMIC_DEFAULT, 
MODEL_PCD_DYNAMIC_EX_DEFAULT, MODEL_PCD_FIXED_AT_BUILD, 
MODEL_PCD_PATCHABLE_IN_MODULE):
-if self._DecPcds[PcdCName, TokenSpaceGuid].DatumType.strip() 
!= ValueList[1].strip():
-EdkLogger.error('build', FORMAT_INVALID, "Pcd datumtype 
used in DSC file is not the same as its declaration in DEC file.", 
File=self.MetaFile, Line=LineNo,
-ExtraData="%s.%s|%s" % (TokenSpaceGuid, 
PcdCName, Setting))
+if self._DecPcds[PcdCName, 
TokenSpaceGuid].BaseDatumType.strip() != ValueList[1].strip():
+DecPcd = self._DecPcds[PcdCName, TokenSpaceGuid]
+EdkLogger.error('build', FORMAT_INVALID,
+"Pcd datumtype used in DSC file is not the 
same as its declaration. DatumType:%s"%DecPcd.DatumType,
+File=self.MetaFile, Line=LineNo,
+ExtraData="Dsc:%s.%s|%s\n
Dec:%s.%s|%s|%s|%s" % (TokenSpaceGuid, PcdCName, Setting, TokenSpaceGuid, \
+PcdCName, DecPcd.DefaultValue, 
DecPcd.DatumType, DecPcd.TokenValue))
 if (TokenSpaceGuid + '.' + PcdCName) in GlobalData.gPlatformPcds:
 if GlobalData.gPlatformPcds[TokenSpaceGuid + '.' + PcdCName] != 
ValueList[Index]:
 GlobalData.gPlatformPcds[TokenSpaceGuid + '.' + PcdCName] = 
ValueList[Index]
-- 
2.14.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40083): https://edk2.groups.io/g/devel/message/40083
Mute This Topic: https://groups.io/mt/31529546/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

<>

Re: [edk2-devel] [PATCH V3 2/2] MdeModulePkg/GraphicsConsoleDxe: Initialize the output mode

2019-05-07 Thread Gao, Zhichao


> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Tuesday, May 7, 2019 1:42 AM
> To: devel@edk2.groups.io; Gao, Zhichao 
> Cc: Wang, Jian J ; Wu, Hao A ;
> Ni, Ray ; Zeng, Star ; Gao, Liming
> ; Sean Brogan ;
> Michael Turner ; Bret Barkelew
> 
> Subject: Re: [edk2-devel] [PATCH V3 2/2]
> MdeModulePkg/GraphicsConsoleDxe: Initialize the output mode
> 
> On 05/05/19 04:17, Gao, Zhichao wrote:
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1412
> >
> > Original logic:
> > Connect the graphics device -> connect it as graphics consoles and
> > initialize its parameters(Mode = -1, invalid) -> connect it as console
> > spliter and add the device to the list(use SetMode to set mode to the
> > user defined mode or the best mode the devices supported if the mode
> > is invalid. *clear the screen at this phase*)
> >
> > Changed logic:
> > Connect the graphics device -> connect it as graphics consoles and
> > initialize its parameters(initialize the mode to the user defined mode
> > or the best mode. *directly set the mode value without using SetMode,
> > that would not clear the screen) -> connect it as console spliter and
> > add the device to the list(use SetMode to set mode to the user defined
> > mode or the best mode the devices supported if the mode is invalid.
> > *now the mode is already set, so it would not clear the screen*).
> >
> > Also remove the section of SetMode for debug version.
> >
> > But there would be no clear screen operation while reconnect the
> > graphics device. Instead, clear the screen when stop the graphics
> > console device.
> >
> > Cc: Jian J Wang 
> > Cc: Hao Wu 
> > Cc: Ray Ni 
> > Cc: Star Zeng 
> > Cc: Liming Gao 
> > Cc: Sean Brogan 
> > Cc: Michael Turner 
> > Cc: Bret Barkelew 
> > Cc: Laszlo Ersek 
> > Signed-off-by: Zhichao Gao 
> > ---
> >  .../GraphicsConsoleDxe/GraphicsConsole.c  | 44 ++-
> >  .../GraphicsConsoleDxe/GraphicsConsoleDxe.inf |  2 +
> >  2 files changed, 36 insertions(+), 10 deletions(-)
> 
> This driver is too complex for me to decide whether this patch is correct.
> 
> The spec writes:
> 
> > If the output device is not in a valid text mode at the time of the
> > EFI_BOOT_SERVICES.HandleProtocol() call, the device is to indicate
> > that its CurrentMode is -1.
> 
> (1) Because the patch sets a value different from -1 to CurrentMode, can we
> guarantee that the console will be usable immediately?

I think we can guarantee that the CurrentMode value is valid except the value 
is 0 or -1. Because the initialize mode section is same with the one in 
ConSplitterDxe.

> 
> 
> More comments below:
> 
> On 05/05/19 04:17, Gao, Zhichao wrote:
> > diff --git
> >
> a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole
> .c
> >
> b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsol
> e.c
> > index 26ea19f300..42386de3f5 100644
> > ---
> >
> a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole
> .c
> > +++
> b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsol
> > +++ e.c
> > @@ -1,7 +1,7 @@
> >  /** @file
> >This is the main routine for initializing the Graphics Console support
> routines.
> >
> > -Copyright (c) 2006 - 2018, Intel Corporation. All rights
> > reserved.
> > +Copyright (c) 2006 - 2019, Intel Corporation. All rights
> > +reserved.
> >  SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -384,6 +384,12 @@ GraphicsConsoleControllerDriverStart (
> >EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE*Mode;
> >UINTNSizeOfInfo;
> >EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
> > +  UINTNPreferMode;
> > +  UINTNIndex;
> > +  UINTNColumn;
> > +  UINTNRow;
> > +  UINTNDefaultColumn;
> > +  UINTNDefaultRow;
> >
> >ModeNumber = 0;
> >
> > @@ -567,16 +573,32 @@ GraphicsConsoleControllerDriverStart (
> >//
> >Private->SimpleTextOutputMode.MaxMode = (INT32) MaxMode;
> >
> > -  DEBUG_CODE_BEGIN ();
> > -Status = GraphicsConsoleConOutSetMode (&Private-
> >SimpleTextOutput, 0);
> > -if (EFI_ERROR (Status)) {
> > -  goto Error;
> > -}
> > -Status = GraphicsConsoleConOutOutputString (&Private-
> >SimpleTextOutput, (CHAR16 *)L"Graphics Console Started\n\r");
> > -if (EFI_ERROR (Status)) {
> > -  goto Error;
> > +  //
> > +  // Initialize the Mode of graphics console devices  //  PreferMode
> > + = 0;  DefaultColumn = PcdGet32 (PcdConOutColumn);  DefaultRow =
> > + PcdGet32 (PcdConOutRow);  Column = 0;  Row = 0;  for (Index = 0;
> > + Index < MaxMode; Index++) {
> > +if (DefaultColumn != 0 && DefaultRow != 0) {
> > +  if ((Private->ModeData[Index].Columns == Column) &&
> > +  (Private->ModeData[Index].Rows == Row)) {
> > +PreferMode = Index;
> > +break;

Re: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove PcdFrameworkCompatibilitySupport usage

2019-05-07 Thread Dandan Bi
Hi Hao and Liming,

Any comments for this patch itself?
As for whether delete the header definition of EFI_PE32_IMAGE_PROTOCOL , it is 
another topic. Liming, do you have any comments on this one?

Thanks,
Dandan
> -Original Message-
> From: Wu, Hao A
> Sent: Monday, May 6, 2019 10:55 AM
> To: Bi, Dandan ; devel@edk2.groups.io
> Cc: Gao, Liming 
> Subject: RE: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove
> PcdFrameworkCompatibilitySupport usage
> 
> > -Original Message-
> > From: Bi, Dandan
> > Sent: Monday, May 06, 2019 10:48 AM
> > To: Wu, Hao A; devel@edk2.groups.io
> > Cc: Gao, Liming; Bi, Dandan
> > Subject: RE: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove
> > PcdFrameworkCompatibilitySupport usage
> >
> > > -Original Message-
> > > From: Wu, Hao A
> > > Sent: Monday, May 6, 2019 9:23 AM
> > > To: devel@edk2.groups.io; Bi, Dandan 
> > > Cc: Gao, Liming 
> > > Subject: RE: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove
> > > PcdFrameworkCompatibilitySupport usage
> > >
> > > > -Original Message-
> > > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
> > > > Of Dandan Bi
> > > > Sent: Monday, April 29, 2019 10:16 AM
> > > > To: devel@edk2.groups.io
> > > > Cc: Gao, Liming
> > > > Subject: [edk2-devel] [patch 04/11] MdeModulePkg/Core: Remove
> > > > PcdFrameworkCompatibilitySupport usage
> > > >
> > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464
> > > >
> > > > Currently Framework compatibility is not needed and
> > > > PcdFrameworkCompatibilitySupport will be removed from edk2.
> > > > So remove the usage of this PCD firstly.
> > > >
> > > > Cc: Liming Gao 
> > > > Signed-off-by: Dandan Bi 
> > > > ---
> > > >  MdeModulePkg/Core/Dxe/DxeMain.inf   |   6 +-
> > > >  MdeModulePkg/Core/Dxe/Image/Image.c | 132
> > > > +---  MdeModulePkg/Core/Dxe/Image/Image.h
> > > > +|
> > > > 85 +-  MdeModulePkg/Core/Pei/FwVol/FwVol.c |  65
> > > > --
> > > 
> > > >  MdeModulePkg/Core/Pei/PeiMain.inf   |   1 -
> > > >  5 files changed, 3 insertions(+), 286 deletions(-)
> > > >
> > > > diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf
> > > > b/MdeModulePkg/Core/Dxe/DxeMain.inf
> > > > index 8dee5bee0a..61161bee28 100644
> > > > --- a/MdeModulePkg/Core/Dxe/DxeMain.inf
> > > > +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf
> > > > @@ -1,11 +1,11 @@
> > > >  ## @file
> > > >  #  This is core module in DXE phase.
> > > >  #
> > > >  #  It provides an implementation of DXE Core that is compliant
> > > > with DXE
> > CIS.
> > > >  #
> > > > -#  Copyright (c) 2006 - 2018, Intel Corporation. All rights
> > > > reserved.
> > > > +#  Copyright (c) 2006 - 2019, Intel Corporation. All rights
> > > > +reserved.
> > > >  #  SPDX-License-Identifier: BSD-2-Clause-Patent  #  ##
> > > >
> > > >  [Defines]
> > > > @@ -130,11 +130,10 @@
> > > >
> > > >  [Protocols]
> > > >## PRODUCES
> > > >## SOMETIMES_CONSUMES
> > > >gEfiDecompressProtocolGuid
> > > > -  gEfiLoadPeImageProtocolGuid   ## SOMETIMES_PRODUCES
> #
> > > > Produces when PcdFrameworkCompatibilitySupport is set
> > >
> > > A couple of questions.
> > >
> > > Is '#include ' in
> > > MdeModulePkg\Core\Dxe\DxeMain.h still needed?
> > >
> > > Can we remove EFI_PE32_IMAGE_PROTOCOL altogether? Seems to me
> there
> > > is no other consumer within edk2.
> > >
> > > Best Regards,
> > > Hao Wu
> >
> > Hi Hao,
> >
> > 1. Yes,  since following definitions in  are
> > still used in MdeModulePkg\Core\Dxe\Image\Image.c
> > #define EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION
> > 0x01
> > #define
> >
> EFI_LOAD_PE_IMAGE_ATTRIBUTE_DEBUG_IMAGE_INFO_TABLE_REGISTRA
> TIO
> > N  0x02
> 
> OK. I overlooked that these definitions are still being used.
> 
> >
> > 2. I also think we can remove this protocol, but I prefer a separate
> > patch (not covered by this patch series) to remove it and solve the
> > dependency issue in 1 together. Is it OK to you?
> 
> As point 1 mentioned above, I think the protocol should be kept to preserve
> the definitions.
> 
> Maybe Liming will have some comments on this.
> 
> Best Regards,
> Hao Wu
> 
> >
> > Thanks,
> > Dandan
> > >
> > > >gEfiSimpleFileSystemProtocolGuid  ## SOMETIMES_CONSUMES
> > > >gEfiLoadFileProtocolGuid  ## SOMETIMES_CONSUMES
> > > >gEfiLoadFile2ProtocolGuid ## SOMETIMES_CONSUMES
> > > >gEfiBusSpecificDriverOverrideProtocolGuid ##
> > SOMETIMES_CONSUMES
> > > >gEfiDriverFamilyOverrideProtocolGuid  ##
> SOMETIMES_CONSUMES
> > > > @@ -171,13 +170,10 @@
> > > >gEfiVariableWriteArchProtocolGuid ## CONSUMES
> > > >gEfiVariableArchProtocolGuid  ## CONSUMES
> > > >gEfiCapsuleArchProtocolGuid   ## CONSUMES
> > > >gEfiWatchdogTimerArchProtocolGuid ## CONSUMES
> > > >
> > > > -[FeaturePcd]
> > > > -
> > >
> gEfiMdeModulePkgTokenSpaceGuid.PcdFramewor

  1   2   >