Re: [edk2] [PATCH RFC v2 1/7] MdeModulePkg: introduce PcdPciAllowFullEnumeration

Subject: Re: [edk2] [PATCH RFC v2 1/7] MdeModulePkg: introduce PcdPciAllowFullEnumeration

From: Jordan Justen <jljusten@gmail.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>, "Tian, Feng" <feng.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>

Date: 2013-11-24 22:05:01

Feng, what do you think of this change to MdeModulePkg?

Wei, How about PcdPciDisableBusEnumeration instead?

-Jordan

On Tue, Nov 19, 2013 at 12:38 PM, Wei Liu  wrote:
> Platforms such as Xen already enumerates PCI bridges and devices. Use
> this PCD to control EDK2 behavior.
>
> The default behavior is to allow full PCI enumeration. This is the same
> behavior as before this change.
>
> Signed-off-by: Wei Liu 
> Cc: Gerd Hoffmann 
> Cc: Laszlo Ersek 
> ---
>  MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c      |    5 ++++-
>  MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf |    1 +
>  MdeModulePkg/MdeModulePkg.dec                |    3 +++
>  3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> index 5afbb82..49c204c 100644
> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> @@ -284,7 +284,10 @@ PciBusDriverBindingStart (
>            );
>    }
>
> -  gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));
> +  if (PcdGetBool (PcdPciAllowFullEnumeration))
> +    gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));
> +  else
> +    gFullEnumeration = FALSE;
>
>    //
>    // Open Device Path Protocol for PCI root bridge
> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> index 34eb672..626ae99 100644
> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> @@ -108,6 +108,7 @@
>    gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport
>    gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport
>    gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdPciAllowFullEnumeration
>
>  # [Event]
>  #   ##
> diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
> index b627eb1..274d2e5 100644
> --- a/MdeModulePkg/MdeModulePkg.dec
> +++ b/MdeModulePkg/MdeModulePkg.dec
> @@ -737,6 +737,9 @@
>    ## This PCD specifies whether the Multi Root I/O virtualization support.
>    gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport|FALSE|BOOLEAN|0x10000046
>
> +  ## This PCD specifies whether full PCI enumeration is allowed.
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdPciAllowFullEnumeration|TRUE|BOOLEAN|0x10000048
> +
>  [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
>    ## Single root I/O virtualization virtual function memory BAR alignment
>    #  BITN set indicates 2 of n+12 power
> --
> 1.7.10.4
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel