On Wed, Feb 22, 2023 at 1:10 AM Tiger Liu(BJ-RD) <tiger...@zhaoxin.com> wrote:
>
> 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?

Hi,

>From a brief look at
MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c, it does seem
that it should enumerate in the order the root bridges were given by
PciHostBridgeGetRootBridges.
I don't know if this reflects your internal code. If so, I would try
just swapping the bridges in your PciHostBridgeGetRootBridges
implementation.

Although since I'm lacking details, I'll assume you really shouldn't
do this? I'm failing to see what purpose this can have, apart from
some other code that needs to be fixed.

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#100426): https://edk2.groups.io/g/devel/message/100426
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