Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
platforms/qemu: Add slot table entries for a PCIe switch
Add a more complex slot table example to the Qemu platform. A more complex PCIe topology in qemu is useful for testing and it's simple enough to serve as an good example of how to use the slot table construction macros. Test in Qemu with: ./qemu-system-ppc64 -machine powernv -nographic -m 2G \ -bios ./skiboot.lid -kernel ./vmlinux -initrd ./petitfs \ -device x3130-upstream,id=sw0_up,bus=pcie.2 \ -device xio3130-downstream,id=sw0_down0,chassis=1,slot=0,bus=sw0_up,addr=0 \ -drive file=./disk1.img,format=raw,if=none,id=nvme1 \ -device nvme,drive=nvme1,bus=sw0_down0,serial=1 \ -device xio3130-downstream,id=sw0_down1,chassis=1,slot=1,bus=sw0_up,addr=1 \ -device xio3130-downstream,id=sw0_down2,chassis=1,slot=2,bus=sw0_up,addr=2 \ -device e1000e,bus=sw0_down2 Results in: PHB#0002:00:00.0 [ROOT] 1014 04c1 R:00 C:060400 B:01..05 SLOT=pcie.2 PHB#0002:01:00.0 [SWUP] 104c 8232 R:02 C:060400 B:02..05 SLOT=sw0_up PHB#0002:02:00.0 [SWDN] 104c 8233 R:01 C:060400 B:03..03 SLOT=sw0_down0 PHB#0002:03:00.0 [EP ] 8086 5845 R:02 C:010802 ( mass-storage) LOC_CODE=sw0_down0 PHB#0002:02:01.0 [SWDN] 104c 8233 R:01 C:060400 B:04..04 SLOT=sw0_down1 PHB#0002:02:02.0 [SWDN] 104c 8233 R:01 C:060400 B:05..05 SLOT=sw0_down2 PHB#0002:05:00.0 [EP ] 8086 10d3 R:00 C:020000 ( ethernet) LOC_CODE=sw0_down2 Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
- Loading branch information