mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
fw_cfg: Refactor extra pci roots addition
Extract extra pci roots addition from pc machine, which could be used by other machines. In order to make uefi get the extra roots, it is necessary to write extra roots into fw_cfg. And only if the uefi knows there are extra roots, the config spaces of devices behind the root could be obtained. Signed-off-by: Jiahui Cen <cenjiahui@huawei.com> Signed-off-by: Yubo Miao <miaoyubo@huawei.com> Message-Id: <20201119014841.7298-3-cenjiahui@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
a0e2905b41
commit
0abd38885a
3 changed files with 33 additions and 17 deletions
|
@ -308,6 +308,15 @@ void *fw_cfg_modify_file(FWCfgState *s, const char *filename, void *data,
|
|||
bool fw_cfg_add_from_generator(FWCfgState *s, const char *filename,
|
||||
const char *gen_id, Error **errp);
|
||||
|
||||
/**
|
||||
* fw_cfg_add_extra_pci_roots:
|
||||
* @bus: main pci root bus to be scanned from
|
||||
* @s: fw_cfg device being modified
|
||||
*
|
||||
* Add a new fw_cfg item...
|
||||
*/
|
||||
void fw_cfg_add_extra_pci_roots(PCIBus *bus, FWCfgState *s);
|
||||
|
||||
FWCfgState *fw_cfg_init_io_dma(uint32_t iobase, uint32_t dma_iobase,
|
||||
AddressSpace *dma_as);
|
||||
FWCfgState *fw_cfg_init_io(uint32_t iobase);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue