Hi, Pedro:
Thanks for your reply!

For example:
There are 4 root bridges in a server motherboard, named them as : RP-A / RP-B / 
RP-C / RP-D
RP-A : PCI Bus num range is 0 ~0x40 (hardware pre-configured)
RP-B : PCI Bus num range is 0x40 ~0x80 (hardware pre-configured)
RP-C : PCI Bus num range is 0x80 ~0xA0 (hardware pre-configured)
RP-D : PCI Bus num range is 0xA0 ~0xE0 (hardware pre-configured)

Usually, we create pci root bridge instances with sequence RP-A / RP-B / RP-C / 
RP-D.
So, Pci bus driver scan pci root bridge sequence is RP-A/RP-B/RP-C/RP-D.

So, could I rewrite pci root bridge driver with different root bridge report 
sequence?
For example:
I let pci root bridge driver create RP-D's pci root bridge io protocol first, 
and then RP-C / RP-B / RP-A, and so pci bus briver could scan RP-D's pci bus 
range first?


Thanks
-----邮件原件-----
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Pedro Falcato
发送时间: 2023年2月22日 3:18
收件人: devel@edk2.groups.io; yoshinoyat...@163.com
主题: Re: [edk2-devel] PciBus scan: Does it support scan from EndBusNum to 
StartBusNum?

On Tue, Feb 21, 2023 at 3:08 AM Yoshinoya <yoshinoyat...@163.com> wrote:
>
> Hi
> Usually PciBus scan is from low bus num to high bus num.
>
> So, does it support scan from end bus num to start bus num?
>
> Thanks
Hi,

What do you mean? Why do you want this?

Do you want to number buses in reverse? That is technically doable (apart from 
probably the host bridge itself) but absolutely useless.

If you mean "order of enumeration", then no. It is not possible. As
PCI(e) topology works, you always start at the host bridge(s)
(00:00.0) and its bus (bus 0, by definition), and then walk through whatever 
bridges you find. You cannot really start at any other place, unless you do 
some silly bruteforce method where you probe every bus for a device; and that 
method would not allow you to configure the buses and their BARs, as you need 
to.

--
Pedro







保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for 
the sole use of its intended recipient. Any unauthorized review, use, copying 
or forwarding of this email or the content of this email is strictly prohibited.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100424): https://edk2.groups.io/g/devel/message/100424
Mute This Topic: https://groups.io/mt/97101911/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to