Maurice,
When PcdPciDisableBusEnumeration is TRUE, PciBus driver assumes the bus number 
and IO/MMIO BAR are all initialized before it gets started, so it doesn't call 
SetBusNumbers(). It's also true for PciBusNoEnumeration driver in DuetPkg.
I compared the PciBus and PciBusNoEnumeration before, the major gap is PciBus 
won't dispatch the option roms collected by PciRootBridgeNoEnumeration driver.

Another gap is the PciRootBridgeNoEnumeration needs a slightly change in order 
to work with PciBus driver. Can you try this patch?

Thanks,
Ray

-----Original Message-----
From: Ma, Maurice 
Sent: Saturday, May 9, 2015 6:33 AM
To: Justen, Jordan L; Agyeman, Prince
Cc: reza.jel...@tuhh.de; Zeng, Star; Ni, Ruiyu; ler...@redhat.com; 
edk2-devel@lists.sourceforge.net
Subject: RE: [edk2] [PATCH] CorebootPayloadPkg: Replace PciHostBridge driver 
with PciRootBridgeNoEnumeration

Hi, Jordan,

Thank you for your feedback.

Ideally I don't want CorebootPayloadPkg to depend on DuetPkg.    But on the 
other side I hesitate to duplicate drivers into the CorebootPayloadPkg from 
other packages.
If I have to make a choice, I'd like the former.

I just tried to use the standard  PciBus driver  with  
PcdPciDisableBusEnumeration set to TRUE.  However It caused boot failure on my 
Baytrail platform.    I think it might needs some slightly changes to make it 
behavior the same way as PciBusNoEnumeration in DuetPkg.

However, even with the standard PciBus driver,  I still need a 
PciRootBridgeNoEnumeration equivalent driver.   By looking into the PciBus 
driver code,  I found PciBus driver will not call PCI host bridge resource 
allocation interface  SetBusNumbers() when PcdPciDisableBusEnumeration is set 
to TRUE.   As a result the PCI root bridge bus range is always 0 because nobody 
will updated it.   In this case Shell PCI command will think only bus 0 exists 
and no devices on other buses will be listed.

For SataControllerDxe driver,   I don't want to duplicate it CorebootPayloadPkg 
again if it has been done in OvmfPkg.

Unless we have a more functional common drivers to replace the current ones 
used in CorebootPayloadPkg,  I would prefer the current way.

Please let me know if you have any other ideas.

Thanks
Maurice  

-----Original Message-----
From: Justen, Jordan L 
Sent: Friday, May 08, 2015 1:03 PM
To: Ma, Maurice; edk2-devel@lists.sourceforge.net; Agyeman, Prince
Cc: reza.jel...@tuhh.de; Zeng, Star; Ni, Ruiyu; ler...@redhat.com
Subject: Re: [edk2] [PATCH] CorebootPayloadPkg: Replace PciHostBridge driver 
with PciRootBridgeNoEnumeration

Can you use git send-email to send your patches? (Note the email double-space 
strangeness below)

I don't think CorebootPayloadPkg should depend on DuetPkg.

Regarding the PciEnumeration issue, in OVMF we set 
gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration to TRUE at runtime 
for Xen to disable enumeration. Maybe CorebootPayloadPkg could just set it as a 
fixed PCD to TRUE?

Regarding using DuetPkg/SataControllerDxe in CorebootPayloadPkg, well, we tried 
to create a common module under PcAtChipsetPkg to share with OVMF, but it was 
rejected.

The recommendation was to duplicate the code in OVMF:
http://permalink.gmane.org/gmane.comp.bios.tianocore.devel/9036

Shouldn't CorebootPayloadPkg then do something similar?

One unfortunate outcome of the SataControllerDxe discussion for OVMF is that we 
still haven't managed to enable SATA in OVMF... But, I think this is maybe 
because Reza got tired of trying to work with us.
:)

-Jordan

On 2015-05-08 09:02:11, Ma, Maurice wrote:
>    Current CorebootPayloadPkg uses PciHostBridge and 
> PciBusNoEnumeration
> 
>    driver. It will cause the PCI bus resource incorrectly set in root
> 
>    bridge instance. As a result all PCI devices behind a PCI bridge 
> will
> 
>    not show up in Shell 'PCI' command.
> 
>     
> 
>    To resolve it use PciRootBridgeNoEnumeration driver instead.
> 
>     
> 
>    Contributed-under: TianoCore Contribution Agreement 1.0
> 
>    Signed-off-by: Maurice Ma <maurice...@intel.com>
> 
>    ---
> 
>    CorebootPayloadPkg/CorebootPayloadPkg.fdf        | 2 +-
> 
>    CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc    | 2 +-
> 
>    CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc | 4 ++--
> 
>    3 files changed, 4 insertions(+), 4 deletions(-)
> 
>     
> 
>    diff --git a/CorebootPayloadPkg/CorebootPayloadPkg.fdf
>    b/CorebootPayloadPkg/CorebootPayloadPkg.fdf
> 
>    index a1e72e7..810dcb1 100644
> 
>    --- a/CorebootPayloadPkg/CorebootPayloadPkg.fdf
> 
>    +++ b/CorebootPayloadPkg/CorebootPayloadPkg.fdf
> 
>    @@ -110,7 +110,7 @@ INF 
> MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
> 
>    #
> 
>    # PCI Support
> 
>    #
> 
>    -INF PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
> 
>    +INF 
> DuetPkg/PciRootBridgeNoEnumerationDxe/PciRootBridgeNoEnumeration.inf
> 
>    INF DuetPkg/PciBusNoEnumerationDxe/PciBusNoEnumeration.inf
> 
>     
> 
>     #
> 
>    diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
>    b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
> 
>    index feae027..a661f5d 100644
> 
>    --- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
> 
>    +++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
> 
>    @@ -312,7 +312,7 @@
> 
>       #
> 
>       # PCI Support
> 
>       #
> 
>    -  PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
> 
>    +  
> DuetPkg/PciRootBridgeNoEnumerationDxe/PciRootBridgeNoEnumeration.inf
> 
>       DuetPkg/PciBusNoEnumerationDxe/PciBusNoEnumeration.inf
> 
>       
> 
>       #
> 
>    diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
>    b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
> 
>    index d954666..ecd12fb 100644
> 
>    --- a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
> 
>    +++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
> 
>    @@ -313,8 +313,8 @@
> 
>      
> 
>       #
> 
>       # PCI Support
> 
>    -  #
> 
>    -  PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
> 
>    +  #
> 
>    +  
> DuetPkg/PciRootBridgeNoEnumerationDxe/PciRootBridgeNoEnumeration.inf
> 
>       DuetPkg/PciBusNoEnumerationDxe/PciBusNoEnumeration.inf
> 
>       
> 
>       #
> 
>    --
> 
>    1.8.3.1
> 
>     
> 
>    Thanks
> 
>    Maurice

Attachment: pcibridge_noenum.patch
Description: pcibridge_noenum.patch

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to