summaryrefslogtreecommitdiffstats
path: root/include/hw/nvram
diff options
context:
space:
mode:
authorJiahui Cen2020-11-19 02:48:34 +0100
committerMichael S. Tsirkin2020-12-08 19:48:57 +0100
commit0abd38885ac0fcdb08653922f339849cad387961 (patch)
tree5a2084a097ef0a7b60ac74443c7fceadd69cf564 /include/hw/nvram
parentacpi/gpex: Extract two APIs from acpi_dsdt_add_pci (diff)
downloadqemu-0abd38885ac0fcdb08653922f339849cad387961.tar.gz
qemu-0abd38885ac0fcdb08653922f339849cad387961.tar.xz
qemu-0abd38885ac0fcdb08653922f339849cad387961.zip
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>
Diffstat (limited to 'include/hw/nvram')
-rw-r--r--include/hw/nvram/fw_cfg.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 8a9f5738bf..0e7a8bc7af 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -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);