mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 02:01:38 +00:00
platform_drv: make devices ROM name configureable
Fix genodelabs/genode#4504
This commit is contained in:
parent
438870e223
commit
14f192fb00
@ -1,5 +1,22 @@
|
||||
This directory contains the implementation of Genode's platform driver.
|
||||
|
||||
Devices ROM
|
||||
-----------
|
||||
|
||||
The platform driver knows which devices exist, as well as what resources
|
||||
they need by parsing XML information from a devices ROM. This ROM might be
|
||||
a boot module written by a system integrator, or is dynamically produced
|
||||
after investigating ACPI and PCI(*) information. The devices ROM name can be
|
||||
defined by setting the "devices_rom" attribute in the config of the
|
||||
platform driver:
|
||||
|
||||
! <config devices_rom="my_devices">
|
||||
! ...
|
||||
! </config>
|
||||
|
||||
If the attribute isn't set, the platform driver asks for a ROM called
|
||||
"devices" by default.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
|
@ -20,7 +20,8 @@ class Driver::Common
|
||||
private:
|
||||
|
||||
Env & _env;
|
||||
Attached_rom_dataspace _devices_rom { _env, "devices" };
|
||||
String<64> _rom_name;
|
||||
Attached_rom_dataspace _devices_rom { _env, _rom_name.string() };
|
||||
Reporter _cfg_reporter { _env, "config" };
|
||||
Reporter _dev_reporter { _env, "devices" };
|
||||
Heap _heap { _env.ram(), _env.rm() };
|
||||
@ -82,6 +83,8 @@ Driver::Common::Common(Genode::Env & env,
|
||||
Attached_rom_dataspace & config_rom)
|
||||
:
|
||||
_env(env),
|
||||
_rom_name(config_rom.xml().attribute_value("devices_rom",
|
||||
String<64>("devices"))),
|
||||
_root(_env, _sliced_heap, config_rom, _devices)
|
||||
{
|
||||
_handle_devices();
|
||||
|
Loading…
x
Reference in New Issue
Block a user