We made a motherboard. A PCIe switch (1 upstream port, 4 downstream ports) is used. Each downstream port directly leads to a PCIe slot.
There is a problem that has been plagued for a long time. The No. 2 slot does not recognize the device and has this problem on multiple motherboards. We checked the power supply and wiring of slot 2 and everything worked fine. And carefully checked the PCB design and layout, slot 2 is no different from other slots. At present, the hardware has not found any doubts, so I wonder if I can get further fault information through the operating system. Can I get the details of the device enumeration by opening some configuration of the operating system or by kernel debugging?
1) I've used UEFI Shell V2.2 to see that the No.2 slot device is online and can be read out the configuration space. However, after entering Windows, the No.2 slot device is still not visible in the device manager. I tried to refresh the device by right-clicking on the device manager and the No.2 slot device appeared! By running the test application, it's found that the board is operating normally.
2) I did a comparative experiment and plugged a Samsung PCIe SSD into slot 2. The device would display properly whether in the EFI shell or in Windows.