From 3161daacd75c2a379e3ddcf83203926252395de5 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 14 Jun 2018 16:35:44 +0200 Subject: [PATCH] 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. --- .../drivers/platform/spec/x86/pci_session_component.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/repos/os/src/drivers/platform/spec/x86/pci_session_component.h b/repos/os/src/drivers/platform/spec/x86/pci_session_component.h index 524d4324aa..6e7ffd4ac6 100644 --- a/repos/os/src/drivers/platform/spec/x86/pci_session_component.h +++ b/repos/os/src/drivers/platform/spec/x86/pci_session_component.h @@ -835,7 +835,7 @@ class Platform::Root : public Genode::Root_component Genode::Constructible _pci_confspace { }; - Genode::Reporter _pci_reporter { _env, "pci" }; + Genode::Constructible _pci_reporter { }; Genode::Heap _heap { _env.ram(), _env.rm() }; @@ -1086,17 +1086,16 @@ class Platform::Root : public Genode::Root_component _construct_buses(); - _pci_reporter.enabled(config.xml().has_sub_node("report") && - config.xml().sub_node("report") - .attribute_value("pci", true)); + if (config.xml().has_sub_node("report") + && config.xml().sub_node("report").attribute_value("pci", true)) { - if (_pci_reporter.enabled()) { + _pci_reporter.construct(_env, "pci", "pci"); Config_access config_access(*_pci_confspace); Device_config config; 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 */ while (true) { function += 1;