mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-22 12:35:19 +00:00
07bef815cc
Currently, a tuple containing PCI space start address and PCI space size is used to pass the PCI space information to the FDT creator. In order to support the multiple PCI segment for FDT, more information such as the PCI segment ID should be passed to the FDT creator. If we still use a tuple to store these information, the code flexibility and readablity will be harmed. To address this issue, this commit replaces the tuple containing the PCI space information to a structure `PciSpaceInfo` and uses a vector of `PciSpaceInfo` to store PCI space information for each segment, so that multiple PCI segment information can be passed to the FDT together. Note that the scope of this commit will only contain the refactor of original code, the actual multiple PCI segments support will be in following series, and for now `--platform num_pci_segments` should only be 1. Signed-off-by: Henry Wang <Henry.Wang@arm.com>