[edk2] [Patch 0/2] Add missed Depex Protocol/Ppi.

Eric Dong posted 2 patches 7 years, 1 month ago
Failed in applying to current master (apply log)
UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.inf | 2 +-
UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[edk2] [Patch 0/2] Add missed Depex Protocol/Ppi.
Posted by Eric Dong 7 years, 1 month ago
The Protocol/Ppi used in the drivers but the it not add them
in the dependence section, it may cause driver assert. 
This patch series add the missed Protocol/Ppi.

Eric Dong (2):
  UefiCpuPkg/CpuFeaturesDxe.inf: Add missed Depex protocol.
  UefiCpuPkg/CpuFeaturesPei.inf: Add missed Depex Ppi.

 UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.inf | 2 +-
 UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/2] Add missed Depex Protocol/Ppi.
Posted by Laszlo Ersek 7 years, 1 month ago
Hi Eric,

On 11/06/17 13:26, Eric Dong wrote:
> The Protocol/Ppi used in the drivers but the it not add them
> in the dependence section, it may cause driver assert. 
> This patch series add the missed Protocol/Ppi.
> 
> Eric Dong (2):
>   UefiCpuPkg/CpuFeaturesDxe.inf: Add missed Depex protocol.
>   UefiCpuPkg/CpuFeaturesPei.inf: Add missed Depex Ppi.
> 
>  UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.inf | 2 +-
>  UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 

(hopefully I'm commenting soon enough,)

where exactly are the MP protocol and PPI used in UefiCpuPkg/CpuFeatures/?

I grepped the directory for both protocol and PPI, and I found no matches.

If the dependencies are incurred via library instances, then those
library instances should spell out the depex.

The only library class used by CpuFeaturesDxe.inf and
CpuFeaturesPei.inf, for which multi-processing looks remotely relevant,
is: RegisterCpuFeaturesLib.

For this class, two instances appear to exist:

UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.inf
UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.inf

The DXE instance consumes gEfiMpServiceProtocolGuid alright, but it also
spells out the protocol in the depex:

[Depex]
  gEfiMpServiceProtocolGuid AND gEdkiiCpuFeaturesSetDoneGuid

The PEI instance is similar, wrt. the PPI:

[Depex]
  gEfiPeiMpServicesPpiGuid AND gEdkiiCpuFeaturesSetDoneGuid

So, this series appears unnecessary. What am I missing?

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/2] Add missed Depex Protocol/Ppi.
Posted by Dong, Eric 7 years, 1 month ago
Hi Laszlo,

Agree with you, I'm not aware the consume protocol/Ppi code is in the library till now. I will discard the changes.

Thanks,
Eric
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Wednesday, November 8, 2017 2:18 AM
> To: Dong, Eric <eric.dong@intel.com>
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] [Patch 0/2] Add missed Depex Protocol/Ppi.
> 
> Hi Eric,
> 
> On 11/06/17 13:26, Eric Dong wrote:
> > The Protocol/Ppi used in the drivers but the it not add them in the
> > dependence section, it may cause driver assert.
> > This patch series add the missed Protocol/Ppi.
> >
> > Eric Dong (2):
> >   UefiCpuPkg/CpuFeaturesDxe.inf: Add missed Depex protocol.
> >   UefiCpuPkg/CpuFeaturesPei.inf: Add missed Depex Ppi.
> >
> >  UefiCpuPkg/CpuFeatures/CpuFeaturesDxe.inf | 2 +-
> > UefiCpuPkg/CpuFeatures/CpuFeaturesPei.inf | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> 
> (hopefully I'm commenting soon enough,)
> 
> where exactly are the MP protocol and PPI used in
> UefiCpuPkg/CpuFeatures/?
> 
> I grepped the directory for both protocol and PPI, and I found no matches.
> 
> If the dependencies are incurred via library instances, then those library
> instances should spell out the depex.
> 
> The only library class used by CpuFeaturesDxe.inf and CpuFeaturesPei.inf,
> for which multi-processing looks remotely relevant,
> is: RegisterCpuFeaturesLib.
> 
> For this class, two instances appear to exist:
> 
> UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.inf
> UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.inf
> 
> The DXE instance consumes gEfiMpServiceProtocolGuid alright, but it also
> spells out the protocol in the depex:
> 
> [Depex]
>   gEfiMpServiceProtocolGuid AND gEdkiiCpuFeaturesSetDoneGuid
> 
> The PEI instance is similar, wrt. the PPI:
> 
> [Depex]
>   gEfiPeiMpServicesPpiGuid AND gEdkiiCpuFeaturesSetDoneGuid
> 
> So, this series appears unnecessary. What am I missing?
> 
> Thanks
> Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel