mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-25 08:21:08 +00:00
platform_drv: use label of client for ram session
This commit is contained in:
parent
81f0cacf66
commit
a72f81472b
@ -133,16 +133,17 @@ namespace Platform {
|
|||||||
Genode::Allocator_guard _md_alloc;
|
Genode::Allocator_guard _md_alloc;
|
||||||
Genode::List<Device_component> _device_list;
|
Genode::List<Device_component> _device_list;
|
||||||
Genode::Rpc_entrypoint &_device_pd_ep;
|
Genode::Rpc_entrypoint &_device_pd_ep;
|
||||||
|
Genode::Session_label _label;
|
||||||
|
|
||||||
struct Resources {
|
struct Resources {
|
||||||
Genode::Ram_connection _ram;
|
Genode::Ram_connection _ram;
|
||||||
Genode::List<Platform::Ram_dataspace> _ram_caps;
|
Genode::List<Platform::Ram_dataspace> _ram_caps;
|
||||||
Genode::Tslab<Platform::Ram_dataspace, 4096 - 64> _ram_caps_slab;
|
Genode::Tslab<Platform::Ram_dataspace, 4096 - 64> _ram_caps_slab;
|
||||||
|
|
||||||
Resources(Genode::Allocator_guard &md_alloc)
|
Resources(Genode::Allocator_guard &md_alloc, Genode::Session_label &label)
|
||||||
:
|
:
|
||||||
/* restrict physical address to 3G on 32bit */
|
/* restrict physical address to 3G on 32bit, 4G on 64bit */
|
||||||
_ram("dma", 0, (sizeof(void *) == 4)
|
_ram(label.string(), 0, (sizeof(void *) == 4)
|
||||||
? 0xc0000000UL : 0x100000000ULL),
|
? 0xc0000000UL : 0x100000000ULL),
|
||||||
_ram_caps_slab(&md_alloc)
|
_ram_caps_slab(&md_alloc)
|
||||||
{
|
{
|
||||||
@ -236,7 +237,6 @@ namespace Platform {
|
|||||||
bool valid() { return policy && policy->root().valid() && child.valid(); }
|
bool valid() { return policy && policy->root().valid() && child.valid(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
Genode::Session_label _label;
|
|
||||||
Genode::Session_policy _policy;
|
Genode::Session_policy _policy;
|
||||||
|
|
||||||
Genode::Lazy_volatile_object<struct Devicepd> _device_pd;
|
Genode::Lazy_volatile_object<struct Devicepd> _device_pd;
|
||||||
@ -501,8 +501,8 @@ namespace Platform {
|
|||||||
_ep(ep),
|
_ep(ep),
|
||||||
_md_alloc(md_alloc, Genode::Arg_string::find_arg(args, "ram_quota").long_value(0)),
|
_md_alloc(md_alloc, Genode::Arg_string::find_arg(args, "ram_quota").long_value(0)),
|
||||||
_device_pd_ep(device_pd_ep),
|
_device_pd_ep(device_pd_ep),
|
||||||
_resources(_md_alloc),
|
|
||||||
_label(Genode::label_from_args(args)),
|
_label(Genode::label_from_args(args)),
|
||||||
|
_resources(_md_alloc, _label),
|
||||||
_policy(_label)
|
_policy(_label)
|
||||||
{
|
{
|
||||||
/* non-pci devices */
|
/* non-pci devices */
|
||||||
|
Loading…
Reference in New Issue
Block a user