On Tue, Dec 03, 2019 at 10:55:27AM +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> > > > +    // On real hardware especially server platforms, the bus number
> > > > +    // could run up to the top value, i.e. 0xff
> > > > +    if (CONFIG_CSM)
> > > > +        extraroots = 0xff;
> > > 
> > > What exactly you are trying to fix here?
> > > 
> > > seabios should find all pci devices behind bridges without problems.
> > 
> > The problem is from the following statement:
> > 
> > while (bus < 0xff && (bus < MaxPCIBus || rootbuses < extraroots)) {
> > 
> > extraroots always returns 0 in csm mode, and "bus < MaxPCIBus" returns 
> > false very early.
> > So the while loop ends early, leaving many pci devices un-scanned.
> 
> So the question is whenever there are *really* multiple roots
> or if that patch just papers over a bug somewhere in seabios.
> 
> > Without the patch, I got:
> > "Found 33 PCI devices (max PCI bus is 02)"
> > 
> > With the patch, I got:
> > "Found 159 PCI devices (max PCI bus is b2)"
> 
> Can you run "lspci -vt" and post the output here?

Here is the output of lspci -vt:

-+-[0000:b2]-+-05.0  Intel Corporation Device 2034
 |           +-05.2  Intel Corporation Sky Lake-E RAS Configuration Registers
 |           +-05.4  Intel Corporation Device 2036
 |           +-0e.0  Intel Corporation Device 2058
 |           +-0e.1  Intel Corporation Device 2059
 |           +-0f.0  Intel Corporation Device 2058
 |           +-0f.1  Intel Corporation Device 2059
 |           +-10.0  Intel Corporation Device 2058
 |           +-10.1  Intel Corporation Device 2059
 |           +-12.0  Intel Corporation Sky Lake-E M3KTI Registers
 |           +-12.1  Intel Corporation Sky Lake-E M3KTI Registers
 |           +-12.2  Intel Corporation Sky Lake-E M3KTI Registers
 |           +-12.4  Intel Corporation Sky Lake-E M3KTI Registers
 |           +-12.5  Intel Corporation Sky Lake-E M3KTI Registers
 |           +-15.0  Intel Corporation Sky Lake-E M2PCI Registers
 |           +-16.0  Intel Corporation Sky Lake-E M2PCI Registers
 |           +-16.4  Intel Corporation Sky Lake-E M2PCI Registers
 |           \-17.0  Intel Corporation Sky Lake-E M2PCI Registers
 +-[0000:64]-+-00.0-[65-68]----00.0-[66-68]----03.0-[67-68]--+-00.0  Intel 
Corporation Ethernet Connection X722 for 10GbE SFP+
 |           |                                               +-00.1  Intel 
Corporation Ethernet Connection X722 for 10GbE SFP+
 |           |                                               +-00.2  Intel 
Corporation Ethernet Connection X722 for 10GbE SFP+
 |           |                                               \-00.3  Intel 
Corporation Ethernet Connection X722 for 10GbE SFP+
 |           +-05.0  Intel Corporation Device 2034
 |           +-05.2  Intel Corporation Sky Lake-E RAS Configuration Registers
 |           +-05.4  Intel Corporation Device 2036
 |           +-08.0  Intel Corporation Device 2066
 |           +-09.0  Intel Corporation Device 2066
 |           +-0a.0  Intel Corporation Device 2040
 |           +-0a.1  Intel Corporation Device 2041
 |           +-0a.2  Intel Corporation Device 2042
 |           +-0a.3  Intel Corporation Device 2043
 |           +-0a.4  Intel Corporation Device 2044
 |           +-0a.5  Intel Corporation Device 2045
 |           +-0a.6  Intel Corporation Device 2046
 |           +-0a.7  Intel Corporation Device 2047
 |           +-0b.0  Intel Corporation Device 2048
 |           +-0b.1  Intel Corporation Device 2049
 |           +-0b.2  Intel Corporation Device 204a
 |           +-0b.3  Intel Corporation Device 204b
 |           +-0c.0  Intel Corporation Device 2040
 |           +-0c.1  Intel Corporation Device 2041
 |           +-0c.2  Intel Corporation Device 2042
 |           +-0c.3  Intel Corporation Device 2043
 |           +-0c.4  Intel Corporation Device 2044
 |           +-0c.5  Intel Corporation Device 2045
 |           +-0c.6  Intel Corporation Device 2046
 |           +-0c.7  Intel Corporation Device 2047
 |           +-0d.0  Intel Corporation Device 2048
 |           +-0d.1  Intel Corporation Device 2049
 |           +-0d.2  Intel Corporation Device 204a
 |           \-0d.3  Intel Corporation Device 204b
 +-[0000:16]-+-03.0-[17]----00.0  Device 1987:5012
 |           +-05.0  Intel Corporation Device 2034
 |           +-05.2  Intel Corporation Sky Lake-E RAS Configuration Registers
 |           +-05.4  Intel Corporation Device 2036
 |           +-08.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-08.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-08.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-08.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-08.4  Intel Corporation Sky Lake-E CHA Registers
 |           +-08.5  Intel Corporation Sky Lake-E CHA Registers
 |           +-08.6  Intel Corporation Sky Lake-E CHA Registers
 |           +-08.7  Intel Corporation Sky Lake-E CHA Registers
 |           +-09.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-09.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-09.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-09.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-09.4  Intel Corporation Sky Lake-E CHA Registers
 |           +-09.5  Intel Corporation Sky Lake-E CHA Registers
 |           +-09.6  Intel Corporation Sky Lake-E CHA Registers
 |           +-09.7  Intel Corporation Sky Lake-E CHA Registers
 |           +-0a.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-0a.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-0a.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-0a.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-0a.4  Intel Corporation Sky Lake-E CHA Registers
 |           +-0a.5  Intel Corporation Sky Lake-E CHA Registers
 |           +-0a.6  Intel Corporation Sky Lake-E CHA Registers
 |           +-0a.7  Intel Corporation Sky Lake-E CHA Registers
 |           +-0b.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-0b.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-0b.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-0b.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-0e.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-0e.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-0e.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-0e.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-0e.4  Intel Corporation Sky Lake-E CHA Registers
 |           +-0e.5  Intel Corporation Sky Lake-E CHA Registers
 |           +-0e.6  Intel Corporation Sky Lake-E CHA Registers
 |           +-0e.7  Intel Corporation Sky Lake-E CHA Registers
 |           +-0f.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-0f.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-0f.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-0f.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-0f.4  Intel Corporation Sky Lake-E CHA Registers
 |           +-0f.5  Intel Corporation Sky Lake-E CHA Registers
 |           +-0f.6  Intel Corporation Sky Lake-E CHA Registers
 |           +-0f.7  Intel Corporation Sky Lake-E CHA Registers
 |           +-10.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-10.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-10.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-10.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-10.4  Intel Corporation Sky Lake-E CHA Registers
 |           +-10.5  Intel Corporation Sky Lake-E CHA Registers
 |           +-10.6  Intel Corporation Sky Lake-E CHA Registers
 |           +-10.7  Intel Corporation Sky Lake-E CHA Registers
 |           +-11.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-11.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-11.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-11.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-1d.0  Intel Corporation Sky Lake-E CHA Registers
 |           +-1d.1  Intel Corporation Sky Lake-E CHA Registers
 |           +-1d.2  Intel Corporation Sky Lake-E CHA Registers
 |           +-1d.3  Intel Corporation Sky Lake-E CHA Registers
 |           +-1e.0  Intel Corporation Sky Lake-E PCU Registers
 |           +-1e.1  Intel Corporation Sky Lake-E PCU Registers
 |           +-1e.2  Intel Corporation Sky Lake-E PCU Registers
 |           +-1e.3  Intel Corporation Sky Lake-E PCU Registers
 |           +-1e.4  Intel Corporation Sky Lake-E PCU Registers
 |           +-1e.5  Intel Corporation Sky Lake-E PCU Registers
 |           \-1e.6  Intel Corporation Sky Lake-E PCU Registers
 \-[0000:00]-+-00.0  Intel Corporation Sky Lake-E DMI3 Registers
             +-04.0  Intel Corporation Sky Lake-E CBDMA Registers
             +-04.1  Intel Corporation Sky Lake-E CBDMA Registers
             +-04.2  Intel Corporation Sky Lake-E CBDMA Registers
             +-04.3  Intel Corporation Sky Lake-E CBDMA Registers
             +-04.4  Intel Corporation Sky Lake-E CBDMA Registers
             +-04.5  Intel Corporation Sky Lake-E CBDMA Registers
             +-04.6  Intel Corporation Sky Lake-E CBDMA Registers
             +-04.7  Intel Corporation Sky Lake-E CBDMA Registers
             +-05.0  Intel Corporation Sky Lake-E MM/Vt-d Configuration 
Registers
             +-05.2  Intel Corporation Device 2025
             +-05.4  Intel Corporation Device 2026
             +-08.0  Intel Corporation Sky Lake-E Ubox Registers
             +-08.1  Intel Corporation Sky Lake-E Ubox Registers
             +-08.2  Intel Corporation Sky Lake-E Ubox Registers
             +-11.0  Intel Corporation Device a1ec
             +-11.1  Intel Corporation Device a1ed
             +-11.5  Intel Corporation Lewisburg SSATA Controller [AHCI mode]
             +-14.0  Intel Corporation Lewisburg USB 3.0 xHCI Controller
             +-14.2  Intel Corporation Lewisburg Thermal Subsystem
             +-16.0  Intel Corporation Lewisburg CSME: HECI #1
             +-16.1  Intel Corporation Lewisburg CSME: HECI #2
             +-16.4  Intel Corporation Lewisburg CSME: HECI #3
             +-17.0  Intel Corporation Lewisburg SATA Controller [AHCI mode]
             +-1c.0-[01-02]----00.0-[02]----00.0  Matrox Electronics Systems 
Ltd. MGA G200e [Pilot] ServerEngines (SEP1)
             +-1f.0  Intel Corporation Lewisburg LPC Controller
             +-1f.2  Intel Corporation Lewisburg PMC
             +-1f.3  Intel Corporation Lewisburg MROM 0
             +-1f.4  Intel Corporation Lewisburg SMBus
             +-1f.5  Intel Corporation Lewisburg SPI Controller
             \-1f.6  Intel Corporation Ethernet Connection (3) I219-LM


> 
> thanks,
>   Gerd
> _______________________________________________
> SeaBIOS mailing list -- seabios@seabios.org
> To unsubscribe send an email to seabios-le...@seabios.org
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to