Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-10-12 Thread Yao, Jiewen
Sounds good! Thanks to confirm that.

From: Carsey, Jaben
Sent: Thursday, October 13, 2016 5:04 AM
To: Yao, Jiewen ; Ni, Ruiyu ; 
Rothman, Michael A ; Kinney, Michael D 
; 'edk2-devel@lists.01.org' 

Cc: Tian, Feng ; Zhang, Chao B ; 
Gao, Liming ; Zeng, Star ; Carsey, 
Jaben 
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

I agree.

We should move the 3 protocols from the UEFI Shell Specification from ShellPkg 
to MdePkg.

I think that this is a non-backwards-compatible-change and will require a new 
GUID in ShellPkg.

-Jaben

From: Yao, Jiewen
Sent: Tuesday, October 11, 2016 7:45 AM
To: Ni, Ruiyu >; Carsey, Jaben 
>; Rothman, Michael A 
>; Kinney, 
Michael D >; 
'edk2-devel@lists.01.org' 
>
Cc: Tian, Feng >; Zhang, Chao B 
>; Gao, Liming 
>; Zeng, Star 
>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Yes, I think that is a very good idea.

Shell spec defines EFI_SHELL_PROTOCOL, EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL, 
EFI_SHELL_PARAMETERS_PROTOCOL.
These should be treated as industry stand and we can move these 3 to MdePkg.

SHELL_ENVIRONMENT_2_PROTOCOL and SHELL_INTERFACE_PROTOCOL should be still in 
ShellPkg, since it is not standard.

Thank you
Yao Jiewen


From: Ni, Ruiyu
Sent: Tuesday, October 11, 2016 4:28 PM
To: Carsey, Jaben >; 
Rothman, Michael A 
>; Yao, Jiewen 
>; Kinney, Michael D 
>; 
'edk2-devel@lists.01.org' 
>
Cc: Tian, Feng >; Zhang, Chao B 
>; Gao, Liming 
>; Zeng, Star 
>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jaben,
The reason I propose to move the Shell protocol definitions to MdePkg is that 
all applications that wants to use the ARGV can use the ShellParameter 
protocol, without depending on ShellPkg.

Thanks/Ray

From: Ni, Ruiyu
Sent: Tuesday, October 11, 2016 4:08 PM
To: Carsey, Jaben >; 
Rothman, Michael A 
>; Yao, Jiewen 
>; Kinney, Michael D 
>; 
edk2-devel@lists.01.org
Cc: Tian, Feng >; Zhang, Chao B 
>; Gao, Liming 
>; Zeng, Star 
>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jaben,
How about moving the contents in ShellPkg\Include\Protocol\ to 
MdePkg\Include\Protocol\?
All industry standard protocols are defined in MdePkg, except the Shell related 
protocols.

Thanks/Ray
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-10-12 Thread Carsey, Jaben
I agree.

We should move the 3 protocols from the UEFI Shell Specification from ShellPkg 
to MdePkg.

I think that this is a non-backwards-compatible-change and will require a new 
GUID in ShellPkg.

-Jaben

From: Yao, Jiewen
Sent: Tuesday, October 11, 2016 7:45 AM
To: Ni, Ruiyu ; Carsey, Jaben ; 
Rothman, Michael A ; Kinney, Michael D 
; 'edk2-devel@lists.01.org' 

Cc: Tian, Feng ; Zhang, Chao B ; 
Gao, Liming ; Zeng, Star 
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Yes, I think that is a very good idea.

Shell spec defines EFI_SHELL_PROTOCOL, EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL, 
EFI_SHELL_PARAMETERS_PROTOCOL.
These should be treated as industry stand and we can move these 3 to MdePkg.

SHELL_ENVIRONMENT_2_PROTOCOL and SHELL_INTERFACE_PROTOCOL should be still in 
ShellPkg, since it is not standard.

Thank you
Yao Jiewen


From: Ni, Ruiyu
Sent: Tuesday, October 11, 2016 4:28 PM
To: Carsey, Jaben >; 
Rothman, Michael A 
>; Yao, Jiewen 
>; Kinney, Michael D 
>; 
'edk2-devel@lists.01.org' 
>
Cc: Tian, Feng >; Zhang, Chao B 
>; Gao, Liming 
>; Zeng, Star 
>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jaben,
The reason I propose to move the Shell protocol definitions to MdePkg is that 
all applications that wants to use the ARGV can use the ShellParameter 
protocol, without depending on ShellPkg.

Thanks/Ray

From: Ni, Ruiyu
Sent: Tuesday, October 11, 2016 4:08 PM
To: Carsey, Jaben >; 
Rothman, Michael A 
>; Yao, Jiewen 
>; Kinney, Michael D 
>; 
edk2-devel@lists.01.org
Cc: Tian, Feng >; Zhang, Chao B 
>; Gao, Liming 
>; Zeng, Star 
>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jaben,
How about moving the contents in ShellPkg\Include\Protocol\ to 
MdePkg\Include\Protocol\?
All industry standard protocols are defined in MdePkg, except the Shell related 
protocols.

Thanks/Ray
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-10-11 Thread Yao, Jiewen
ailto:edk2-devel@lists.01.org>; Rothman, Michael A 
<michael.a.roth...@intel.com<mailto:michael.a.roth...@intel.com>>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Mike Rothman,

Can we get LoadOptions and LoadOptionsSize clarified in the UEFI Spec?  This 
seems like a simple clarification and I would argue its needed.  The UEFI Shell 
is not the only producer of this protocol.  BDS launches things (like the UEFI 
Shell itself) and the shell already consumes it for itself (and it works).  I 
think it just needs clarification so people can depend on the current 
implementation not changing.

-Jaben

From: Ni, Ruiyu
Sent: Thursday, September 29, 2016 9:13 PM
To: Carsey, Jaben <jaben.car...@intel.com<mailto:jaben.car...@intel.com>>; Yao, 
Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Supposing user inputs “CapsuleApp.efi Parameter1 Parameter2”.
There is no spec to define what the LoadOption should equal to.
If there is another UEFI Shell implementation, it could interpret the command 
line then sets only “Parameter1 Parameter2” into LoadOption, or sets 
“CapsuleApp.efi\tParameter1\tParameter2” to LoadOption, or sets 
“[Shell]\tCapsuleApp.efi\tParameter1\tParameter2” to LoadOption.
Because it“produces” such LoadOption, it knows how to “consume”/parse it to get 
the ARGVs.

So I suggest we put the CapsuleApp in ShellPkg and let it use the 
ShellParameter protocol.

Regards,
Ray

From: Carsey, Jaben
Sent: Friday, September 30, 2016 3:11 AM
To: Ni, Ruiyu <ruiyu...@intel.com<mailto:ruiyu...@intel.com>>; Yao, Jiewen 
<jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

I am confused.

Why is LoadOption and LoadOptionSize not working?  This is specified as part of 
UEFI Spec (Note: Not UEFI Shell Spec) as a standard way to pass parameters to 
UEFI appliations.  I think this should work (although it is more work than just 
examining argc/argv).

-Jaben

From: Ni, Ruiyu
Sent: Wednesday, September 28, 2016 11:40 PM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, 
Michael D <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Jiewen,
The way CapsuleApp extracts the ARGV assumes UEFI Shell encodes the parameters 
using a certain way. But the parameter encoding way is not described in the 
Shell spec.
Maybe we can put the CapsuleApp in ShellPkg, then let it directly use 
ShellParameter protocol to get the ARGV.

Copying Jaben.

Regards,
Ray

From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, 
Jiewen
Sent: Thursday, September 29, 2016 10:37 AM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-10-11 Thread Ni, Ruiyu
m>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

I am confused.

Why is LoadOption and LoadOptionSize not working?  This is specified as part of 
UEFI Spec (Note: Not UEFI Shell Spec) as a standard way to pass parameters to 
UEFI appliations.  I think this should work (although it is more work than just 
examining argc/argv).

-Jaben

From: Ni, Ruiyu
Sent: Wednesday, September 28, 2016 11:40 PM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, 
Michael D <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Jiewen,
The way CapsuleApp extracts the ARGV assumes UEFI Shell encodes the parameters 
using a certain way. But the parameter encoding way is not described in the 
Shell spec.
Maybe we can put the CapsuleApp in ShellPkg, then let it directly use 
ShellParameter protocol to get the ARGV.

Copying Jaben.

Regards,
Ray

From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, 
Jiewen
Sent: Thursday, September 29, 2016 10:37 AM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>
Subject: Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp 
application.

Right. CapsuleOnDisk is not supported in BIOS yet.
I will remove it in CapsuleApp.

CapsuleApp just works as an agent to pass capsule to CapsuleDxeRuntime driver.
So it is checked by CapsuleDxeRuntime, not CapsuleApp.

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Thursday, September 29, 2016 9:06 AM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jiewen,

Does the capsule on disk feature provided by this app work?

I tried it with the QuarkPlatformPkg capsule and I can get
The app to copy the capsule to an EFI System Partition, but
The logic after that point looks incomplete.

Also, if I clear the Persist and Reset flags on the capsule,
the immediate processing of the capsule does not work.

Is there any FW code that will look for capsules on disk?

If there are incomplete features in CapsuleApp, then I think
we should remove them.

Mike

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, September 20, 2016 11:45 PM
> To: 
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org%3cmailto:edk2-devel@lists.01.org>>
> Cc: Tian, Feng 
> <feng.t...@intel.com<mailto:feng.t...@intel.com<mailto:feng.t...@intel.com%3cmailto:feng.t...@intel.com>>>;
>  Zeng, Star 
> <star.z...@intel.com<mailto:star.z...@intel.com<mailto:star.z...@intel.com%3cmailto:star.z...@intel.com>>>;
>  Kinney, Michael
> D 
> <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com%3cmailto:michael.d.kin...@intel.com>>>;
>  Gao, Liming 
> <liming@intel.com<mailto:liming@intel.com<mailto:liming@intel.com%3cmailto:liming@intel.com>>>;
>  Zhang

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-10-11 Thread Ni, Ruiyu
>>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Supposing user inputs “CapsuleApp.efi Parameter1 Parameter2”.
There is no spec to define what the LoadOption should equal to.
If there is another UEFI Shell implementation, it could interpret the command 
line then sets only “Parameter1 Parameter2” into LoadOption, or sets 
“CapsuleApp.efi\tParameter1\tParameter2” to LoadOption, or sets 
“[Shell]\tCapsuleApp.efi\tParameter1\tParameter2” to LoadOption.
Because it“produces” such LoadOption, it knows how to “consume”/parse it to get 
the ARGVs.

So I suggest we put the CapsuleApp in ShellPkg and let it use the 
ShellParameter protocol.

Regards,
Ray

From: Carsey, Jaben
Sent: Friday, September 30, 2016 3:11 AM
To: Ni, Ruiyu <ruiyu...@intel.com<mailto:ruiyu...@intel.com>>; Yao, Jiewen 
<jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

I am confused.

Why is LoadOption and LoadOptionSize not working?  This is specified as part of 
UEFI Spec (Note: Not UEFI Shell Spec) as a standard way to pass parameters to 
UEFI appliations.  I think this should work (although it is more work than just 
examining argc/argv).

-Jaben

From: Ni, Ruiyu
Sent: Wednesday, September 28, 2016 11:40 PM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, 
Michael D <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Jiewen,
The way CapsuleApp extracts the ARGV assumes UEFI Shell encodes the parameters 
using a certain way. But the parameter encoding way is not described in the 
Shell spec.
Maybe we can put the CapsuleApp in ShellPkg, then let it directly use 
ShellParameter protocol to get the ARGV.

Copying Jaben.

Regards,
Ray

From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, 
Jiewen
Sent: Thursday, September 29, 2016 10:37 AM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>
Subject: Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp 
application.

Right. CapsuleOnDisk is not supported in BIOS yet.
I will remove it in CapsuleApp.

CapsuleApp just works as an agent to pass capsule to CapsuleDxeRuntime driver.
So it is checked by CapsuleDxeRuntime, not CapsuleApp.

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Thursday, September 29, 2016 9:06 AM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>
S

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-10-11 Thread Yao, Jiewen
Yes, I think that is a very good idea.

Shell spec defines EFI_SHELL_PROTOCOL, EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL, 
EFI_SHELL_PARAMETERS_PROTOCOL.
These should be treated as industry stand and we can move these 3 to MdePkg.

SHELL_ENVIRONMENT_2_PROTOCOL and SHELL_INTERFACE_PROTOCOL should be still in 
ShellPkg, since it is not standard.

Thank you
Yao Jiewen


From: Ni, Ruiyu
Sent: Tuesday, October 11, 2016 4:28 PM
To: Carsey, Jaben ; Rothman, Michael A 
; Yao, Jiewen ; Kinney, 
Michael D ; 'edk2-devel@lists.01.org' 

Cc: Tian, Feng ; Zhang, Chao B ; 
Gao, Liming ; Zeng, Star 
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jaben,
The reason I propose to move the Shell protocol definitions to MdePkg is that 
all applications that wants to use the ARGV can use the ShellParameter 
protocol, without depending on ShellPkg.

Thanks/Ray

From: Ni, Ruiyu
Sent: Tuesday, October 11, 2016 4:08 PM
To: Carsey, Jaben >; 
Rothman, Michael A 
>; Yao, Jiewen 
>; Kinney, Michael D 
>; 
edk2-devel@lists.01.org
Cc: Tian, Feng >; Zhang, Chao B 
>; Gao, Liming 
>; Zeng, Star 
>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jaben,
How about moving the contents in ShellPkg\Include\Protocol\ to 
MdePkg\Include\Protocol\?
All industry standard protocols are defined in MdePkg, except the Shell related 
protocols.

Thanks/Ray
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-10-03 Thread Carsey, Jaben
s more work than just 
examining argc/argv).

-Jaben

From: Ni, Ruiyu
Sent: Wednesday, September 28, 2016 11:40 PM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, 
Michael D <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Jiewen,
The way CapsuleApp extracts the ARGV assumes UEFI Shell encodes the parameters 
using a certain way. But the parameter encoding way is not described in the 
Shell spec.
Maybe we can put the CapsuleApp in ShellPkg, then let it directly use 
ShellParameter protocol to get the ARGV.

Copying Jaben.

Regards,
Ray

From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, 
Jiewen
Sent: Thursday, September 29, 2016 10:37 AM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>
Subject: Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp 
application.

Right. CapsuleOnDisk is not supported in BIOS yet.
I will remove it in CapsuleApp.

CapsuleApp just works as an agent to pass capsule to CapsuleDxeRuntime driver.
So it is checked by CapsuleDxeRuntime, not CapsuleApp.

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Thursday, September 29, 2016 9:06 AM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jiewen,

Does the capsule on disk feature provided by this app work?

I tried it with the QuarkPlatformPkg capsule and I can get
The app to copy the capsule to an EFI System Partition, but
The logic after that point looks incomplete.

Also, if I clear the Persist and Reset flags on the capsule,
the immediate processing of the capsule does not work.

Is there any FW code that will look for capsules on disk?

If there are incomplete features in CapsuleApp, then I think
we should remove them.

Mike

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, September 20, 2016 11:45 PM
> To: 
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org%3cmailto:edk2-devel@lists.01.org>>
> Cc: Tian, Feng 
> <feng.t...@intel.com<mailto:feng.t...@intel.com<mailto:feng.t...@intel.com%3cmailto:feng.t...@intel.com>>>;
>  Zeng, Star 
> <star.z...@intel.com<mailto:star.z...@intel.com<mailto:star.z...@intel.com%3cmailto:star.z...@intel.com>>>;
>  Kinney, Michael
> D 
> <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com%3cmailto:michael.d.kin...@intel.com>>>;
>  Gao, Liming 
> <liming@intel.com<mailto:liming@intel.com<mailto:liming@intel.com%3cmailto:liming@intel.com>>>;
>  Zhang, Chao B
> <chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com%3cmailto:chao.b.zh...@intel.com>>>
> Subject: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
>
> This CapsuleApp can help perform capsule update in UEFI shell environment.
> It can also dump capsule information, capsule status variable, ESRT and FMP.
>
> Cc: Feng Tian 
> <feng.t...@intel.com<mailto:feng.t...@intel.com<mailto:feng.t...@intel.com%3cmailto:feng.t...@intel.com>>>
> Cc: Star Zeng 
> <star.z...@intel.com<mailto:star.z...@intel.com<mailto:star.z...@intel.com%3cmailto:star.z...@intel.com>>>
> Cc: Michael D Kinney 
> <michael.d.kin...@intel.com<mailto:michael

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-10-03 Thread Rothman, Michael A
nt: Thursday, September 29, 2016 10:37 AM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>
Subject: Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp 
application.

Right. CapsuleOnDisk is not supported in BIOS yet.
I will remove it in CapsuleApp.

CapsuleApp just works as an agent to pass capsule to CapsuleDxeRuntime driver.
So it is checked by CapsuleDxeRuntime, not CapsuleApp.

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Thursday, September 29, 2016 9:06 AM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jiewen,

Does the capsule on disk feature provided by this app work?

I tried it with the QuarkPlatformPkg capsule and I can get
The app to copy the capsule to an EFI System Partition, but
The logic after that point looks incomplete.

Also, if I clear the Persist and Reset flags on the capsule,
the immediate processing of the capsule does not work.

Is there any FW code that will look for capsules on disk?

If there are incomplete features in CapsuleApp, then I think
we should remove them.

Mike

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, September 20, 2016 11:45 PM
> To: 
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org%3cmailto:edk2-devel@lists.01.org>>
> Cc: Tian, Feng 
> <feng.t...@intel.com<mailto:feng.t...@intel.com<mailto:feng.t...@intel.com%3cmailto:feng.t...@intel.com>>>;
>  Zeng, Star 
> <star.z...@intel.com<mailto:star.z...@intel.com<mailto:star.z...@intel.com%3cmailto:star.z...@intel.com>>>;
>  Kinney, Michael
> D 
> <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com%3cmailto:michael.d.kin...@intel.com>>>;
>  Gao, Liming 
> <liming@intel.com<mailto:liming@intel.com<mailto:liming@intel.com%3cmailto:liming@intel.com>>>;
>  Zhang, Chao B
> <chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com%3cmailto:chao.b.zh...@intel.com>>>
> Subject: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
>
> This CapsuleApp can help perform capsule update in UEFI shell environment.
> It can also dump capsule information, capsule status variable, ESRT and FMP.
>
> Cc: Feng Tian 
> <feng.t...@intel.com<mailto:feng.t...@intel.com<mailto:feng.t...@intel.com%3cmailto:feng.t...@intel.com>>>
> Cc: Star Zeng 
> <star.z...@intel.com<mailto:star.z...@intel.com<mailto:star.z...@intel.com%3cmailto:star.z...@intel.com>>>
> Cc: Michael D Kinney 
> <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com%3cmailto:michael.d.kin...@intel.com>>>
> Cc: Liming Gao 
> <liming@intel.com<mailto:liming@intel.com<mailto:liming@intel.com%3cmailto:liming@intel.com>>>
> Cc: Chao Zhang 
> <chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com%3cmailto:chao.b.zh...@intel.com>>>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao 
> <jiewen@intel.com<mailto:jiewen@intel.com<mailto:jiewen@intel.com%3cmailto:jiewen@intel.com>>>
> ---
>  MdeModulePkg/Application/CapsuleApp/AppSupport.c|  480 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.c| 1047 
> 
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf  |   71 ++
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.uni  |   22 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleAppExtra.uni |   19 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleDump.c   |  840 
> 
>  6 files changed, 2479 insertions(+)
>
> diff --git a/MdeModulePkg/Application/CapsuleApp/AppSupport.c
> b/Mde

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-09-30 Thread Carsey, Jaben
Mike Rothman,

Can we get LoadOptions and LoadOptionsSize clarified in the UEFI Spec?  This 
seems like a simple clarification and I would argue its needed.  The UEFI Shell 
is not the only producer of this protocol.  BDS launches things (like the UEFI 
Shell itself) and the shell already consumes it for itself (and it works).  I 
think it just needs clarification so people can depend on the current 
implementation not changing.

-Jaben

From: Ni, Ruiyu
Sent: Thursday, September 29, 2016 9:13 PM
To: Carsey, Jaben <jaben.car...@intel.com>; Yao, Jiewen <jiewen@intel.com>; 
Kinney, Michael D <michael.d.kin...@intel.com>; edk2-devel@lists.01.org
Cc: Tian, Feng <feng.t...@intel.com>; Zhang, Chao B <chao.b.zh...@intel.com>; 
Gao, Liming <liming@intel.com>; Zeng, Star <star.z...@intel.com>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Supposing user inputs "CapsuleApp.efi Parameter1 Parameter2".
There is no spec to define what the LoadOption should equal to.
If there is another UEFI Shell implementation, it could interpret the command 
line then sets only "Parameter1 Parameter2" into LoadOption, or sets 
"CapsuleApp.efi\tParameter1\tParameter2" to LoadOption, or sets 
"[Shell]\tCapsuleApp.efi\tParameter1\tParameter2" to LoadOption.
Because it"produces" such LoadOption, it knows how to "consume"/parse it to get 
the ARGVs.

So I suggest we put the CapsuleApp in ShellPkg and let it use the 
ShellParameter protocol.

Regards,
Ray

From: Carsey, Jaben
Sent: Friday, September 30, 2016 3:11 AM
To: Ni, Ruiyu <ruiyu...@intel.com<mailto:ruiyu...@intel.com>>; Yao, Jiewen 
<jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

I am confused.

Why is LoadOption and LoadOptionSize not working?  This is specified as part of 
UEFI Spec (Note: Not UEFI Shell Spec) as a standard way to pass parameters to 
UEFI appliations.  I think this should work (although it is more work than just 
examining argc/argv).

-Jaben

From: Ni, Ruiyu
Sent: Wednesday, September 28, 2016 11:40 PM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, 
Michael D <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Jiewen,
The way CapsuleApp extracts the ARGV assumes UEFI Shell encodes the parameters 
using a certain way. But the parameter encoding way is not described in the 
Shell spec.
Maybe we can put the CapsuleApp in ShellPkg, then let it directly use 
ShellParameter protocol to get the ARGV.

Copying Jaben.

Regards,
Ray

From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, 
Jiewen
Sent: Thursday, September 29, 2016 10:37 AM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>
Subject: Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp 
application.

Right. CapsuleOnDisk is not supported in BIOS yet.
I will remove it in CapsuleApp.

CapsuleApp just works as an agent to pass capsule to CapsuleDxeRuntime driver.
So it is checked by CapsuleDxeRuntime, not CapsuleApp.

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Thursday, September 29, 2016 9:06 AM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-09-29 Thread Ni, Ruiyu
Supposing user inputs "CapsuleApp.efi Parameter1 Parameter2".
There is no spec to define what the LoadOption should equal to.
If there is another UEFI Shell implementation, it could interpret the command 
line then sets only "Parameter1 Parameter2" into LoadOption, or sets 
"CapsuleApp.efi\tParameter1\tParameter2" to LoadOption, or sets 
"[Shell]\tCapsuleApp.efi\tParameter1\tParameter2" to LoadOption.
Because it"produces" such LoadOption, it knows how to "consume"/parse it to get 
the ARGVs.

So I suggest we put the CapsuleApp in ShellPkg and let it use the 
ShellParameter protocol.

Regards,
Ray

From: Carsey, Jaben
Sent: Friday, September 30, 2016 3:11 AM
To: Ni, Ruiyu <ruiyu...@intel.com>; Yao, Jiewen <jiewen@intel.com>; Kinney, 
Michael D <michael.d.kin...@intel.com>; edk2-devel@lists.01.org
Cc: Tian, Feng <feng.t...@intel.com>; Zhang, Chao B <chao.b.zh...@intel.com>; 
Gao, Liming <liming@intel.com>; Zeng, Star <star.z...@intel.com>; Carsey, 
Jaben <jaben.car...@intel.com>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

I am confused.

Why is LoadOption and LoadOptionSize not working?  This is specified as part of 
UEFI Spec (Note: Not UEFI Shell Spec) as a standard way to pass parameters to 
UEFI appliations.  I think this should work (although it is more work than just 
examining argc/argv).

-Jaben

From: Ni, Ruiyu
Sent: Wednesday, September 28, 2016 11:40 PM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Kinney, 
Michael D <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Carsey, Jaben 
<jaben.car...@intel.com<mailto:jaben.car...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
Importance: High

Jiewen,
The way CapsuleApp extracts the ARGV assumes UEFI Shell encodes the parameters 
using a certain way. But the parameter encoding way is not described in the 
Shell spec.
Maybe we can put the CapsuleApp in ShellPkg, then let it directly use 
ShellParameter protocol to get the ARGV.

Copying Jaben.

Regards,
Ray

From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, 
Jiewen
Sent: Thursday, September 29, 2016 10:37 AM
To: Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>
Subject: Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp 
application.

Right. CapsuleOnDisk is not supported in BIOS yet.
I will remove it in CapsuleApp.

CapsuleApp just works as an agent to pass capsule to CapsuleDxeRuntime driver.
So it is checked by CapsuleDxeRuntime, not CapsuleApp.

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Thursday, September 29, 2016 9:06 AM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jiewen,

Does the capsule on disk feature provided by this app work?

I tried it with the QuarkPlatformPkg capsule and I can get
The app to copy the capsule to an EFI System Partition, but
The logic after that point looks incomplete.

Also, if I clear the Persist and Reset flags on the capsule,
the immediate processing of the capsule does not work.

Is there any FW code that will look for capsules on disk?

If there are incomplete features in CapsuleApp, then I think
we should remove them.

Mike

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, September 20, 2016 11:45 PM
> To: 
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org%3cmailto:edk2-devel@lists.01.org>>
> 

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-09-29 Thread Ni, Ruiyu
Jiewen,
The way CapsuleApp extracts the ARGV assumes UEFI Shell encodes the parameters 
using a certain way. But the parameter encoding way is not described in the 
Shell spec.
Maybe we can put the CapsuleApp in ShellPkg, then let it directly use 
ShellParameter protocol to get the ARGV.

Copying Jaben.

Regards,
Ray

From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, 
Jiewen
Sent: Thursday, September 29, 2016 10:37 AM
To: Kinney, Michael D <michael.d.kin...@intel.com>; edk2-devel@lists.01.org
Cc: Tian, Feng <feng.t...@intel.com>; Zhang, Chao B <chao.b.zh...@intel.com>; 
Gao, Liming <liming@intel.com>; Zeng, Star <star.z...@intel.com>
Subject: Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp 
application.

Right. CapsuleOnDisk is not supported in BIOS yet.
I will remove it in CapsuleApp.

CapsuleApp just works as an agent to pass capsule to CapsuleDxeRuntime driver.
So it is checked by CapsuleDxeRuntime, not CapsuleApp.

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Thursday, September 29, 2016 9:06 AM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>; Kinney, Michael D 
<michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
Cc: Tian, Feng <feng.t...@intel.com<mailto:feng.t...@intel.com>>; Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>>; Gao, Liming 
<liming@intel.com<mailto:liming@intel.com>>; Zhang, Chao B 
<chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com>>
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jiewen,

Does the capsule on disk feature provided by this app work?

I tried it with the QuarkPlatformPkg capsule and I can get
The app to copy the capsule to an EFI System Partition, but
The logic after that point looks incomplete.

Also, if I clear the Persist and Reset flags on the capsule,
the immediate processing of the capsule does not work.

Is there any FW code that will look for capsules on disk?

If there are incomplete features in CapsuleApp, then I think
we should remove them.

Mike

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, September 20, 2016 11:45 PM
> To: 
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org%3cmailto:edk2-devel@lists.01.org>>
> Cc: Tian, Feng 
> <feng.t...@intel.com<mailto:feng.t...@intel.com<mailto:feng.t...@intel.com%3cmailto:feng.t...@intel.com>>>;
>  Zeng, Star 
> <star.z...@intel.com<mailto:star.z...@intel.com<mailto:star.z...@intel.com%3cmailto:star.z...@intel.com>>>;
>  Kinney, Michael
> D 
> <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com%3cmailto:michael.d.kin...@intel.com>>>;
>  Gao, Liming 
> <liming@intel.com<mailto:liming@intel.com<mailto:liming@intel.com%3cmailto:liming@intel.com>>>;
>  Zhang, Chao B
> <chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com%3cmailto:chao.b.zh...@intel.com>>>
> Subject: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
>
> This CapsuleApp can help perform capsule update in UEFI shell environment.
> It can also dump capsule information, capsule status variable, ESRT and FMP.
>
> Cc: Feng Tian 
> <feng.t...@intel.com<mailto:feng.t...@intel.com<mailto:feng.t...@intel.com%3cmailto:feng.t...@intel.com>>>
> Cc: Star Zeng 
> <star.z...@intel.com<mailto:star.z...@intel.com<mailto:star.z...@intel.com%3cmailto:star.z...@intel.com>>>
> Cc: Michael D Kinney 
> <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com%3cmailto:michael.d.kin...@intel.com>>>
> Cc: Liming Gao 
> <liming@intel.com<mailto:liming@intel.com<mailto:liming@intel.com%3cmailto:liming@intel.com>>>
> Cc: Chao Zhang 
> <chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com<mailto:chao.b.zh...@intel.com%3cmailto:chao.b.zh...@intel.com>>>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao 
> <jiewen@intel.com<mailto:jiewen@intel.com<mailto:jiewen@intel.com%3cmailto:jiewen@intel.com>>>
> ---
>  MdeModulePkg/Application/CapsuleApp/AppSupport.c|  480 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.c| 1047 
> 
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf  |   71 ++
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.uni  |   22 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleAppExtra.uni |   19 +
>  MdeModulePkg

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-09-29 Thread Yao, Jiewen
Right. CapsuleOnDisk is not supported in BIOS yet.
I will remove it in CapsuleApp.

CapsuleApp just works as an agent to pass capsule to CapsuleDxeRuntime driver.
So it is checked by CapsuleDxeRuntime, not CapsuleApp.

Thank you
Yao Jiewen

From: Kinney, Michael D
Sent: Thursday, September 29, 2016 9:06 AM
To: Yao, Jiewen ; edk2-devel@lists.01.org; Kinney, 
Michael D 
Cc: Tian, Feng ; Zeng, Star ; Gao, 
Liming ; Zhang, Chao B 
Subject: RE: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

Jiewen,

Does the capsule on disk feature provided by this app work?

I tried it with the QuarkPlatformPkg capsule and I can get
The app to copy the capsule to an EFI System Partition, but
The logic after that point looks incomplete.

Also, if I clear the Persist and Reset flags on the capsule,
the immediate processing of the capsule does not work.

Is there any FW code that will look for capsules on disk?

If there are incomplete features in CapsuleApp, then I think
we should remove them.

Mike

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, September 20, 2016 11:45 PM
> To: edk2-devel@lists.01.org
> Cc: Tian, Feng >; Zeng, Star 
> >; Kinney, Michael
> D >; Gao, 
> Liming >; Zhang, Chao B
> >
> Subject: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
>
> This CapsuleApp can help perform capsule update in UEFI shell environment.
> It can also dump capsule information, capsule status variable, ESRT and FMP.
>
> Cc: Feng Tian >
> Cc: Star Zeng >
> Cc: Michael D Kinney 
> >
> Cc: Liming Gao >
> Cc: Chao Zhang >
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao >
> ---
>  MdeModulePkg/Application/CapsuleApp/AppSupport.c|  480 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.c| 1047 
> 
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf  |   71 ++
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.uni  |   22 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleAppExtra.uni |   19 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleDump.c   |  840 
> 
>  6 files changed, 2479 insertions(+)
>
> diff --git a/MdeModulePkg/Application/CapsuleApp/AppSupport.c
> b/MdeModulePkg/Application/CapsuleApp/AppSupport.c
> new file mode 100644
> index 000..365067d
> --- /dev/null
> +++ b/MdeModulePkg/Application/CapsuleApp/AppSupport.c
> @@ -0,0 +1,480 @@
> +/** @file
> +  A shell application that triggers capsule update process.
> +
> +  Copyright (c) 2016, 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
> +  which accompanies this distribution.  The full text of the license may be 
> found at
> +  http://opensource.org/licenses/bsd-license.php
> +
> +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define MAX_ARG_NUM 11
> +
> +UINTN  Argc = 0;
> +CHAR16 *Argv[MAX_ARG_NUM];
> +CHAR16 *ArgBuffer;
> +
> +/**
> +
> +  This function parse application ARG.
> +
> +  @return Status
> +**/
> +EFI_STATUS
> +GetArg (
> +  VOID
> +  )
> +{
> +  UINT8 *Data;
> +  UINTN DataSize;
> +  CHAR16*Index;
> +  CHAR16*End;
> +  CHAR16*DIndex;
> +  EFI_STATUSStatus;
> +  EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
> +
> +  Status = gBS->HandleProtocol (
> +  gImageHandle,
> +  ,
> +  (VOID**)
> +  );
> +  if (EFI_ERROR(Status)) {
> +return Status;
> +  }
> +
> +  Data = LoadedImage->LoadOptions;
> +  DataSize = LoadedImage->LoadOptionsSize;
> +
> +  End = (CHAR16*)(UINTN)(Data + DataSize);
> +  Status = gBS->AllocatePool (EfiBootServicesData, DataSize, (VOID 
> **));
> +  ASSERT_EFI_ERROR (Status);
> +  DIndex = ArgBuffer;
> +  

Re: [edk2] [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.

2016-09-28 Thread Kinney, Michael D
Jiewen,

Does the capsule on disk feature provided by this app work?

I tried it with the QuarkPlatformPkg capsule and I can get
The app to copy the capsule to an EFI System Partition, but
The logic after that point looks incomplete.

Also, if I clear the Persist and Reset flags on the capsule,
the immediate processing of the capsule does not work.

Is there any FW code that will look for capsules on disk?

If there are incomplete features in CapsuleApp, then I think 
we should remove them.

Mike

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, September 20, 2016 11:45 PM
> To: edk2-devel@lists.01.org
> Cc: Tian, Feng ; Zeng, Star ; 
> Kinney, Michael
> D ; Gao, Liming ; Zhang, 
> Chao B
> 
> Subject: [PATCH 17/45] MdeModulePkg/CapsuleApp: Add CapsuleApp application.
> 
> This CapsuleApp can help perform capsule update in UEFI shell environment.
> It can also dump capsule information, capsule status variable, ESRT and FMP.
> 
> Cc: Feng Tian 
> Cc: Star Zeng 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Chao Zhang 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao 
> ---
>  MdeModulePkg/Application/CapsuleApp/AppSupport.c|  480 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.c| 1047 
> 
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf  |   71 ++
>  MdeModulePkg/Application/CapsuleApp/CapsuleApp.uni  |   22 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleAppExtra.uni |   19 +
>  MdeModulePkg/Application/CapsuleApp/CapsuleDump.c   |  840 
> 
>  6 files changed, 2479 insertions(+)
> 
> diff --git a/MdeModulePkg/Application/CapsuleApp/AppSupport.c
> b/MdeModulePkg/Application/CapsuleApp/AppSupport.c
> new file mode 100644
> index 000..365067d
> --- /dev/null
> +++ b/MdeModulePkg/Application/CapsuleApp/AppSupport.c
> @@ -0,0 +1,480 @@
> +/** @file
> +  A shell application that triggers capsule update process.
> +
> +  Copyright (c) 2016, 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
> +  which accompanies this distribution.  The full text of the license may be 
> found at
> +  http://opensource.org/licenses/bsd-license.php
> +
> +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define MAX_ARG_NUM 11
> +
> +UINTN  Argc = 0;
> +CHAR16 *Argv[MAX_ARG_NUM];
> +CHAR16 *ArgBuffer;
> +
> +/**
> +
> +  This function parse application ARG.
> +
> +  @return Status
> +**/
> +EFI_STATUS
> +GetArg (
> +  VOID
> +  )
> +{
> +  UINT8 *Data;
> +  UINTN DataSize;
> +  CHAR16*Index;
> +  CHAR16*End;
> +  CHAR16*DIndex;
> +  EFI_STATUSStatus;
> +  EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
> +
> +  Status = gBS->HandleProtocol (
> +  gImageHandle,
> +  ,
> +  (VOID**)
> +  );
> +  if (EFI_ERROR(Status)) {
> +return Status;
> +  }
> +
> +  Data = LoadedImage->LoadOptions;
> +  DataSize = LoadedImage->LoadOptionsSize;
> +
> +  End = (CHAR16*)(UINTN)(Data + DataSize);
> +  Status = gBS->AllocatePool (EfiBootServicesData, DataSize, (VOID 
> **));
> +  ASSERT_EFI_ERROR (Status);
> +  DIndex = ArgBuffer;
> +  Argv[Argc++] = ArgBuffer;
> +  for (Index = (CHAR16*)Data; Index < End; ) {
> +if (*Index == L' ') {
> +  *DIndex = L'\0';
> +  if (Argc >= MAX_ARG_NUM) {
> +return EFI_UNSUPPORTED;
> +  }
> +  Argv[Argc++] = (++ DIndex);
> +  while(*Index == L' ') {
> +Index ++;
> +  }
> +}
> +(*(DIndex ++)) = (*(Index ++));
> +  }
> +  return EFI_SUCCESS;
> +}
> +
> +/**
> +  Clear APP ARG.
> +**/
> +VOID
> +CleanArg (
> +  VOID
> +  )
> +{
> +  FreePool (Argv[0]);
> +}
> +
> +/**
> +  Return File System Volume containing this shell application.
> +
> +  @return File System Volume containing this shell application.
> +**/
> +EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *
> +GetMyVol (
> +  VOID
> +  )
> +{
> +  EFI_STATUSStatus;
> +  EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
> +  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL   *Vol;
> +
> +  Status = gBS->HandleProtocol (
> +  gImageHandle,
> +  ,
> +  (VOID **)
> +