mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-19 00:27:21 +00:00
platform_drv: propagate IOMMU devices to session
genodelabs/genode#4761
This commit is contained in:
parent
b2e4f95f27
commit
d3357b4c53
repos/os/src/drivers/platform
@ -167,7 +167,7 @@ Driver::Common::Common(Genode::Env & env,
|
||||
_env(env),
|
||||
_rom_name(config_rom.xml().attribute_value("devices_rom",
|
||||
String<64>("devices"))),
|
||||
_root(_env, _sliced_heap, config_rom, _devices, _iommu())
|
||||
_root(_env, _sliced_heap, config_rom, _devices, _io_mmu_devices, _iommu())
|
||||
{
|
||||
_devices_rom.sigh(_dev_handler);
|
||||
_handle_devices();
|
||||
|
@ -42,7 +42,8 @@ Driver::Session_component * Driver::Root::_create_session(const char *args)
|
||||
Session_policy const policy { label, _config.xml() };
|
||||
|
||||
sc = new (md_alloc())
|
||||
Session_component(_env, _config, _devices, _sessions, label,
|
||||
Session_component(_env, _config, _devices, _sessions, _io_mmu_devices,
|
||||
label,
|
||||
session_resources_from_args(args),
|
||||
session_diag_from_args(args),
|
||||
policy.attribute_value("info", false),
|
||||
@ -72,6 +73,9 @@ Driver::Root::Root(Env & env,
|
||||
Sliced_heap & sliced_heap,
|
||||
Attached_rom_dataspace const & config,
|
||||
Device_model & devices,
|
||||
Io_mmu_devices & io_mmu_devices,
|
||||
bool const iommu)
|
||||
: Root_component<Session_component>(env.ep(), sliced_heap),
|
||||
_env(env), _config(config), _devices(devices), _iommu(iommu) { }
|
||||
_env(env), _config(config), _devices(devices),
|
||||
_io_mmu_devices(io_mmu_devices), _iommu(iommu)
|
||||
{ }
|
||||
|
@ -31,6 +31,7 @@ class Driver::Root : public Root_component<Session_component>
|
||||
Sliced_heap & sliced_heap,
|
||||
Attached_rom_dataspace const & config,
|
||||
Device_model & devices,
|
||||
Io_mmu_devices & io_mmu_devices,
|
||||
bool const iommu);
|
||||
|
||||
void update_policy();
|
||||
@ -44,6 +45,7 @@ class Driver::Root : public Root_component<Session_component>
|
||||
Env & _env;
|
||||
Attached_rom_dataspace const & _config;
|
||||
Device_model & _devices;
|
||||
Io_mmu_devices & _io_mmu_devices;
|
||||
bool const _iommu;
|
||||
Registry<Session_component> _sessions {};
|
||||
};
|
||||
|
@ -264,6 +264,7 @@ Session_component::Session_component(Env & env,
|
||||
Attached_rom_dataspace const & config,
|
||||
Device_model & devices,
|
||||
Session_registry & registry,
|
||||
Io_mmu_devices & io_mmu_devices,
|
||||
Label const & label,
|
||||
Resources const & resources,
|
||||
Diag const & diag,
|
||||
@ -274,7 +275,8 @@ Session_component::Session_component(Env & env,
|
||||
Session_object<Platform::Session>(env.ep(), resources, label, diag),
|
||||
Session_registry::Element(registry, *this),
|
||||
Dynamic_rom_session::Xml_producer("devices"),
|
||||
_env(env), _config(config), _devices(devices), _info(info), _version(version),
|
||||
_env(env), _config(config), _devices(devices),
|
||||
_io_mmu_devices(io_mmu_devices), _info(info), _version(version),
|
||||
_iommu(iommu)
|
||||
{
|
||||
/*
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <device_component.h>
|
||||
#include <device_pd.h>
|
||||
#include <device_owner.h>
|
||||
#include <io_mmu.h>
|
||||
|
||||
namespace Driver {
|
||||
class Session_component;
|
||||
@ -50,6 +51,7 @@ class Driver::Session_component
|
||||
Attached_rom_dataspace const & config,
|
||||
Device_model & devices,
|
||||
Session_registry & registry,
|
||||
Io_mmu_devices & io_mmu_devices,
|
||||
Label const & label,
|
||||
Resources const & resources,
|
||||
Diag const & diag,
|
||||
@ -109,6 +111,8 @@ class Driver::Session_component
|
||||
Env & _env;
|
||||
Attached_rom_dataspace const & _config;
|
||||
Device_model & _devices;
|
||||
|
||||
Io_mmu_devices & _io_mmu_devices;
|
||||
Device::Owner _owner_id { *this };
|
||||
Constrained_ram_allocator _env_ram { _env.pd(),
|
||||
_ram_quota_guard(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user