Re: Analyzing PCIe enumeration in u-boot or linux using qemu, is it possible?
On Thu, 27 Apr 2023 at 10:29, Chan Kim wrote: > I thought I would try to analyze u-boot's PCIe enumeration using qemu. > I used qemu-6.2 (old now) and built it for arm-softmmu. And I built > u-boot-v2022.07 using qemu_arm_defconfig and built linux-5.15.68 using > integrator_defconfig(just because I saw CONFIG_PCI=y). The linux image > doesn' matter much because I'm only interested in u-boot now.(but if I can > analyze linux too, it will be fantastic). The Integrator is a twenty year old development board. This is a terrible choice for doing just about anything with today. It is unsurprising that it only supports base PCI, not PCIe, because the PCIe spec was published after this board was made. The docs you have found tell you which board types to use if you want PCIe and not just PCI, so do that. -- PMM
Analyzing PCIe enumeration in u-boot or linux using qemu, is it possible?
Hello all, I thought I would try to analyze u-boot's PCIe enumeration using qemu. I used qemu-6.2 (old now) and built it for arm-softmmu. And I built u-boot-v2022.07 using qemu_arm_defconfig and built linux-5.15.68 using integrator_defconfig(just because I saw CONFIG_PCI=y). The linux image doesn' matter much because I'm only interested in u-boot now.(but if I can analyze linux too, it will be fantastic). I could break at u-boot's pci_init function (called inside board_init_r function, pci_init is one member function of init_sequence_r array) but it seemed it doesn't do anything interesting. And then I found this text is qemu-6.2.0's document (pcie.txt). "Note that the PCIe features are available only when using the 'q35' machine type on x86 architecture and the 'virt' machine type on AArch64. Other machine types do not use PCIe at this time." Then, does this mean I cannot attach a PCIe device model in qemu and debug PCIe related S/W operation? Can I do it with higher version of qemu? Thank you! Chan Kim