platform_drv: use Expanding_reporter for pci report

If the number of PCI buses grows (seen with VMware player) the default
report size is exhausted quickly.
This commit is contained in:
Christian Helmuth 2018-06-14 16:35:44 +02:00 committed by Norman Feske
parent 6616b0efe7
commit 3161daacd7

View File

@ -835,7 +835,7 @@ class Platform::Root : public Genode::Root_component<Session_component>
Genode::Constructible<Genode::Attached_io_mem_dataspace> _pci_confspace { }; Genode::Constructible<Genode::Attached_io_mem_dataspace> _pci_confspace { };
Genode::Reporter _pci_reporter { _env, "pci" }; Genode::Constructible<Genode::Expanding_reporter> _pci_reporter { };
Genode::Heap _heap { _env.ram(), _env.rm() }; Genode::Heap _heap { _env.ram(), _env.rm() };
@ -1086,17 +1086,16 @@ class Platform::Root : public Genode::Root_component<Session_component>
_construct_buses(); _construct_buses();
_pci_reporter.enabled(config.xml().has_sub_node("report") && if (config.xml().has_sub_node("report")
config.xml().sub_node("report") && config.xml().sub_node("report").attribute_value("pci", true)) {
.attribute_value("pci", true));
if (_pci_reporter.enabled()) { _pci_reporter.construct(_env, "pci", "pci");
Config_access config_access(*_pci_confspace); Config_access config_access(*_pci_confspace);
Device_config config; Device_config config;
int bus = 0, device = 0, function = -1; int bus = 0, device = 0, function = -1;
Genode::Reporter::Xml_generator xml(_pci_reporter, [&] () { _pci_reporter->generate([&] (Genode::Reporter::Xml_generator &xml) {
/* iterate over pci devices */ /* iterate over pci devices */
while (true) { while (true) {
function += 1; function += 1;