Annotate session interfaces with CAP_QUOTA

The new 'CAP_QUOTA' enum value denotes the capability quota to be
transferred from the client to the server at session-creation time.

Issue #2398
This commit is contained in:
Norman Feske 2017-05-07 22:03:25 +02:00 committed by Christian Helmuth
parent bc82cce72b
commit c1b981ede4
63 changed files with 193 additions and 45 deletions

View File

@ -32,7 +32,7 @@ struct Genode::Vm_connection : Connection<Vm_session>, Vm_session_client
unsigned long affinity)
{
return session(parent,
"priority=0x%lx, affinity=0x%lx, ram_quota=16K, label=\"%s\"",
"priority=0x%lx, affinity=0x%lx, ram_quota=16K, cap_quota=10, label=\"%s\"",
priority, affinity, label);
}

View File

@ -26,6 +26,8 @@ namespace Genode {
{
static const char *service_name() { return "VM"; }
enum { CAP_QUOTA = 3 };
class Invalid_dataspace : Exception { };
/**

View File

@ -31,6 +31,8 @@ struct Sync::Session : Genode::Session
{
static const char *service_name() { return "Sync"; }
enum { CAP_QUOTA = 2 };
virtual ~Session() { }
virtual void threshold(unsigned threshold) = 0;

View File

@ -39,6 +39,8 @@ struct Test::Session : Genode::Session
{
static const char *service_name() { return "TEST"; }
enum { CAP_QUOTA = 2 };
GENODE_RPC(Rpc_cap_void, bool, cap_void, Genode::Native_capability,
Genode::addr_t &);
GENODE_RPC(Rpc_void_cap, Genode::Native_capability,

View File

@ -33,8 +33,8 @@ struct Genode::Cpu_connection : Connection<Cpu_session>, Cpu_session_client
long priority, Affinity const &affinity)
{
return session(parent, affinity,
"priority=0x%lx, ram_quota=128K, label=\"%s\"",
priority, label);
"priority=0x%lx, ram_quota=128K, cap_quota=%u, label=\"%s\"",
priority, CAP_QUOTA, label);
}
/**

View File

@ -34,6 +34,13 @@ struct Genode::Cpu_session : Session
{
static const char *service_name() { return "CPU"; }
/*
* A CPU session consumes a dataspace capability for the session-object
* allocation, its session capability, the capability of the 'Native_cpu'
* RPC interface, and a capability for the trace-control dataspace.
*/
enum { CAP_QUOTA = 4 };
typedef Cpu_session_client Client;

View File

@ -30,8 +30,8 @@ struct Genode::Io_mem_connection : Connection<Io_mem_session>, Io_mem_session_cl
Capability<Io_mem_session> _session(Parent &parent, addr_t base, size_t size,
bool write_combined)
{
return session("ram_quota=6K, base=0x%p, size=0x%lx, wc=%s",
base, size, write_combined ? "yes" : "no");
return session("cap_quota=%u, ram_quota=6K, base=0x%p, size=0x%lx, wc=%s",
CAP_QUOTA, base, size, write_combined ? "yes" : "no");
}
/**

View File

@ -33,6 +33,13 @@ struct Genode::Io_mem_session : Session
{
static const char *service_name() { return "IO_MEM"; }
/*
* An I/O-memory session consumes a dataspace capability for the
* session-object allocation, its session capability, and a dataspace
* capability for the handed-out memory-mapped I/O dataspace.
*/
enum { CAP_QUOTA = 3 };
virtual ~Io_mem_session() { }
/**

View File

@ -30,8 +30,8 @@ struct Genode::Io_port_connection : Connection<Io_port_session>,
*/
Capability<Io_port_session> _session(Parent &parent, unsigned base, unsigned size)
{
return session(parent, "ram_quota=6K, io_port_base=%u, io_port_size=%u",
base, size);
return session(parent, "ram_quota=6K, cap_quota=%u, io_port_base=%u, io_port_size=%u",
CAP_QUOTA, base, size);
}
/**

View File

@ -35,6 +35,8 @@ struct Genode::Io_port_session : Session
{
static const char *service_name() { return "IO_PORT"; }
enum { CAP_QUOTA = 2 };
virtual ~Io_port_session() { }
/******************************

View File

@ -32,7 +32,7 @@ struct Genode::Irq_connection : Connection<Irq_session>, Irq_session_client
Irq_session::Polarity polarity,
Genode::addr_t device_config_phys)
{
return session("ram_quota=6K, irq_number=%u, irq_trigger=%u, "
return session("ram_quota=6K, cap_quota=4, irq_number=%u, irq_trigger=%u, "
" irq_polarity=%u, device_config_phys=0x%lx",
irq, trigger, polarity, device_config_phys);
}

View File

@ -75,6 +75,8 @@ struct Genode::Irq_session : Session
static const char * service_name() { return "IRQ"; }
enum { CAP_QUOTA = 3 };
/*********************
** RPC declaration **

View File

@ -31,8 +31,8 @@ struct Genode::Log_connection : Connection<Log_session>, Log_session_client
Log_connection(Env &env, Session_label label = Session_label())
:
Connection<Log_session>(env, session(env.parent(),
"ram_quota=%ld, label=\"%s\"",
RAM_QUOTA, label.string())),
"ram_quota=%ld, cap_quota=%ld, label=\"%s\"",
RAM_QUOTA, CAP_QUOTA, label.string())),
Log_session_client(cap())
{ }
@ -45,8 +45,8 @@ struct Genode::Log_connection : Connection<Log_session>, Log_session_client
*/
Log_connection(Session_label label = Session_label()) __attribute__((deprecated))
:
Connection<Log_session>(session("ram_quota=%ld, label=\"%s\"",
RAM_QUOTA, label.string())),
Connection<Log_session>(session("ram_quota=%ld, cap_quota=%ld, label=\"%s\"",
RAM_QUOTA, CAP_QUOTA, label.string())),
Log_session_client(cap())
{ }
};

View File

@ -30,6 +30,12 @@ struct Genode::Log_session : Session
{
static const char *service_name() { return "LOG"; }
/*
* A LOG connection consumes a dataspace capability for the session-object
* allocation and its session capability.
*/
enum { CAP_QUOTA = 2 };
typedef Log_session_client Client;
virtual ~Log_session() { }

View File

@ -32,8 +32,8 @@ struct Genode::Pd_connection : Connection<Pd_session>, Pd_session_client
Pd_connection(Env &env, char const *label = "")
:
Connection<Pd_session>(env, session(env.parent(),
"ram_quota=%u, label=\"%s\"",
RAM_QUOTA, label)),
"ram_quota=%u, cap_quota=%u, label=\"%s\"",
RAM_QUOTA, CAP_QUOTA, label)),
Pd_session_client(cap())
{ }

View File

@ -35,6 +35,14 @@ struct Genode::Pd_session : Session
{
static const char *service_name() { return "PD"; }
/*
* A PD session consumes a dataspace capability for the session-object
* allocation, a capability for the 'Native_pd' RPC interface, its
* session capability, and the RPC capabilities for the 3 contained
* region maps.
*/
enum { CAP_QUOTA = 6 };
typedef Pd_session_client Client;
virtual ~Pd_session() { }

View File

@ -22,7 +22,7 @@ namespace Genode { struct Ram_connection; }
struct Genode::Ram_connection : Connection<Ram_session>, Ram_session_client
{
enum { RAM_QUOTA = 4*1024*sizeof(long) };
enum { RAM_QUOTA = 4096*sizeof(long) };
/**
* Issue session request
@ -33,8 +33,8 @@ struct Genode::Ram_connection : Connection<Ram_session>, Ram_session_client
addr_t phys_start, size_t phys_size)
{
return session(parent,
"ram_quota=%u, phys_start=0x%lx, phys_size=0x%lx, "
"label=\"%s\"", RAM_QUOTA, phys_start, phys_size, label);
"ram_quota=%u, cap_quota=%u, phys_start=0x%lx, phys_size=0x%lx, "
"label=\"%s\"", RAM_QUOTA, CAP_QUOTA, phys_start, phys_size, label);
}
/**

View File

@ -42,6 +42,8 @@ struct Genode::Ram_session : Session
{
static const char *service_name() { return "RAM"; }
enum { CAP_QUOTA = 8 };
typedef Ram_session_client Client;

View File

@ -29,7 +29,8 @@ struct Genode::Rm_connection : Connection<Rm_session>, Rm_session_client
*/
Rm_connection(Env &env)
:
Connection<Rm_session>(env, session(env.parent(), "ram_quota=%u", RAM_QUOTA)),
Connection<Rm_session>(env, session(env.parent(), "ram_quota=%u, cap_quota=%u",
RAM_QUOTA, CAP_QUOTA)),
Rm_session_client(cap())
{ }
@ -42,7 +43,7 @@ struct Genode::Rm_connection : Connection<Rm_session>, Rm_session_client
*/
Rm_connection() __attribute__((deprecated))
:
Connection<Rm_session>(session("ram_quota=%u", RAM_QUOTA)),
Connection<Rm_session>(session("ram_quota=%u, cap_quota=%u", RAM_QUOTA, CAP_QUOTA)),
Rm_session_client(cap())
{ }
};

View File

@ -24,6 +24,12 @@ struct Genode::Rm_session : Session
{
static const char *service_name() { return "RM"; }
/*
* An RM session consumes a dataspace capability for the session-object
* allocation and its session capability.
*/
enum { CAP_QUOTA = 2 };
/**
* Exception types
*

View File

@ -34,7 +34,8 @@ class Genode::Rom_connection : public Connection<Rom_session>,
Rom_session_capability _session(Parent &parent, char const *label)
{
return session("ram_quota=%ld, label=\"%s\"", RAM_QUOTA, label);
return session("ram_quota=%ld, cap_quota=%ld, label=\"%s\"",
RAM_QUOTA, CAP_QUOTA, label);
}
public:

View File

@ -38,6 +38,13 @@ struct Genode::Rom_session : Session
{
static const char *service_name() { return "ROM"; }
/*
* A ROM session consumes a dataspace capability for the session-object
* allocation, a dataspace capability for the ROM dataspace, and its
* session capability.
*/
enum { CAP_QUOTA = 3 };
typedef Rom_session_client Client;
virtual ~Rom_session() { }

View File

@ -26,6 +26,8 @@ struct Genode::Trace::Session : Genode::Session
{
static const char *service_name() { return "TRACE"; }
enum { CAP_QUOTA = 4 };
/**
* Allocate policy-module backing store
*

View File

@ -28,6 +28,8 @@ namespace Test {
{
static const char *service_name() { return "MP_RPC_TEST"; }
enum { CAP_QUOTA = 2 };
GENODE_RPC(Rpc_test_untyped, void, test_untyped, unsigned);
GENODE_RPC(Rpc_test_cap, void, test_cap, Genode::Native_capability);
GENODE_RPC(Rpc_test_cap_reply, Genode::Native_capability,

View File

@ -26,7 +26,7 @@ struct Hello::Connection : Genode::Connection<Session>, Session_client
:
/* create session */
Genode::Connection<Hello::Session>(env, session(env.parent(),
"ram_quota=6K")),
"ram_quota=6K, cap_quota=4")),
/* initialize RPC interface */
Session_client(cap()) { }

View File

@ -24,6 +24,8 @@ struct Hello::Session : Genode::Session
{
static const char *service_name() { return "Hello"; }
enum { CAP_QUOTA = 2 };
virtual void say_hello() = 0;
virtual int add(int a, int b) = 0;

View File

@ -271,6 +271,8 @@ class Audio_in::Session : public Genode::Session
static const char *service_name() { return "Audio_in"; }
enum { CAP_QUOTA = 4 };
/**
* Return stream of this session, see 'Stream' above
*/

View File

@ -30,8 +30,8 @@ struct Audio_in::Connection : Genode::Connection<Session>, Audio_in::Session_cli
*/
Capability<Audio_in::Session> _session(Genode::Parent &parent, char const *channel)
{
return session(parent, "ram_quota=%ld, channel=\"%s\"",
10*1024 + sizeof(Stream), channel);
return session(parent, "ram_quota=%ld, cap_quota=%ld, channel=\"%s\"",
10*1024 + sizeof(Stream), CAP_QUOTA, channel);
}
/**

View File

@ -307,6 +307,8 @@ class Audio_out::Session : public Genode::Session
static const char *service_name() { return "Audio_out"; }
enum { CAP_QUOTA = 4 };
/**
* Return stream of this session, see 'Stream' above
*/

View File

@ -30,8 +30,8 @@ struct Audio_out::Connection : Genode::Connection<Session>, Audio_out::Session_c
*/
Capability<Audio_out::Session> _session(Genode::Parent &parent, char const *channel)
{
return session(parent, "ram_quota=%ld, channel=\"%s\"",
2*4096 + 2048 + sizeof(Stream), channel);
return session(parent, "ram_quota=%ld, cap_quota=%ld, channel=\"%s\"",
2*4096 + 2048 + sizeof(Stream), CAP_QUOTA, channel);
}
/**

View File

@ -129,6 +129,8 @@ struct Block::Session : public Genode::Session
static const char *service_name() { return "Block"; }
enum { CAP_QUOTA = 5 };
virtual ~Session() { }
/**

View File

@ -30,8 +30,8 @@ struct Block::Connection : Genode::Connection<Session>, Session_client
Capability<Block::Session> _session(Genode::Parent &parent,
char const *label, Genode::size_t tx_buf_size)
{
return session(parent, "ram_quota=%ld, tx_buf_size=%ld, label=\"%s\"",
14*1024 + tx_buf_size, tx_buf_size, label);
return session(parent, "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"",
14*1024 + tx_buf_size, CAP_QUOTA, tx_buf_size, label);
}
/**

View File

@ -48,11 +48,13 @@ struct File_system::Connection_base : Genode::Connection<Session>, Session_clien
{
return session(parent,
"ram_quota=%ld, "
"cap_quota=%ld, "
"tx_buf_size=%ld, "
"label=\"%s\", "
"root=\"%s\", "
"writeable=%d",
8*1024*sizeof(long) + tx_buf_size,
CAP_QUOTA,
tx_buf_size,
label, root, writeable);
}

View File

@ -256,6 +256,8 @@ struct File_system::Session : public Genode::Session
static const char *service_name() { return "File_system"; }
enum { CAP_QUOTA = 5 };
virtual ~Session() { }
/**

View File

@ -43,8 +43,9 @@ class Framebuffer::Connection : public Genode::Connection<Session>,
char argbuf[ARGBUF_SIZE];
argbuf[0] = 0;
/* donate ram quota for storing server-side meta data */
/* donate ram and cap quota for storing server-side meta data */
Arg_string::set_arg(argbuf, sizeof(argbuf), "ram_quota", RAM_QUOTA);
Arg_string::set_arg(argbuf, sizeof(argbuf), "cap_quota", CAP_QUOTA);
/* set optional session-constructor arguments */
if (width)

View File

@ -82,6 +82,13 @@ struct Framebuffer::Session : Genode::Session
{
static const char *service_name() { return "Framebuffer"; }
/*
* A framebuffer session consumes a dataspace capability for the server's
* session-object allocation, a dataspace capability for the framebuffer
* dataspace, and its session capability.
*/
enum { CAP_QUOTA = 3 };
typedef Session_client Client;
virtual ~Session() { }

View File

@ -29,7 +29,8 @@ struct Gpio::Connection : Genode::Connection<Session>, Session_client
Connection(Genode::Env &env, unsigned long gpio_pin)
:
Genode::Connection<Session>(env, session(env.parent(),
"ram_quota=8K, gpio=%ld", gpio_pin)),
"ram_quota=8K, cap_quota=%ld, gpio=%ld",
CAP_QUOTA, gpio_pin)),
Session_client(cap())
{ }

View File

@ -28,6 +28,8 @@ struct Gpio::Session : Genode::Session
{
static const char *service_name() { return "Gpio"; }
enum { CAP_QUOTA = 2 };
enum Direction { IN, OUT };
enum Irq_type { LOW_LEVEL, HIGH_LEVEL, FALLING_EDGE, RISING_EDGE };

View File

@ -27,7 +27,8 @@ struct Input::Connection : Genode::Connection<Session>, Session_client
* \noapi
*/
Capability<Input::Session> _session(Genode::Parent &parent, char const *label) {
return session(parent, "ram_quota=18K, label=\"%s\"", label); }
return session(parent, "ram_quota=18K, cap_quota=%u, label=\"%s\"",
CAP_QUOTA, label); }
/**
* Constructor
@ -48,7 +49,8 @@ struct Input::Connection : Genode::Connection<Session>, Session_client
Connection() __attribute__((deprecated))
:
Genode::Connection<Input::Session>(
session(*Genode::env_deprecated()->parent(), "ram_quota=18K")),
session(*Genode::env_deprecated()->parent(),
"ram_quota=18K, cap_quota=3")),
Session_client(*Genode::env_deprecated()->rm_session(), cap())
{ }
};

View File

@ -26,6 +26,13 @@ struct Input::Session : Genode::Session
{
static const char *service_name() { return "Input"; }
/*
* An input session consumes a dataspace capability for the server's
* session-object allocation, a dataspace capability for the input
* buffer, and its session capability.
*/
enum { CAP_QUOTA = 3 };
virtual ~Session() { }
/**

View File

@ -56,6 +56,8 @@ struct Loader::Session : Genode::Session
static const char *service_name() { return "Loader"; }
enum { CAP_QUOTA = 2 };
virtual ~Session() { }
/**

View File

@ -34,9 +34,9 @@ struct Nic::Connection : Genode::Connection<Session>, Session_client
Genode::size_t rx_buf_size)
{
return session(parent,
"ram_quota=%ld, tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"",
"ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"",
32*1024*sizeof(long) + tx_buf_size + rx_buf_size,
tx_buf_size, rx_buf_size, label);
CAP_QUOTA, tx_buf_size, rx_buf_size, label);
}
/**

View File

@ -68,6 +68,14 @@ struct Nic::Session : Genode::Session
static const char *service_name() { return "Nic"; }
/*
* A NIC session consumes a dataspace capability for the server-side
* session object, a session capability, two packet-stream dataspaces for
* rx and tx, and four signal context capabilities for the data-flow
* signals.
*/
enum { CAP_QUOTA = 8 };
virtual ~Session() { }
/**

View File

@ -53,6 +53,7 @@ class Nitpicker::Connection : public Genode::Connection<Session>,
*/
using Genode::Arg_string;
Arg_string::set_arg(argbuf, sizeof(argbuf), "ram_quota", RAM_QUOTA);
Arg_string::set_arg(argbuf, sizeof(argbuf), "cap_quota", CAP_QUOTA);
return session(parent, argbuf);
}

View File

@ -38,6 +38,15 @@ struct Nitpicker::Session : Genode::Session
{
static const char *service_name() { return "Nitpicker"; }
/*
* A nitpicker session consumes a dataspace capability for the server's
* session-object allocation, a session capability, a dataspace capability
* for the command buffer, and the capabilities needed for the aggregated
* 'Framebuffer' and 'Input' sessions.
*/
enum { CAP_QUOTA = Framebuffer::Session::CAP_QUOTA
+ Input::Session::CAP_QUOTA + 3 };
typedef Session_client Client;
/**

View File

@ -27,7 +27,8 @@ struct Platform::Connection : Genode::Connection<Session>, Client
* Constructor
*/
Connection(Genode::Env &env)
: Genode::Connection<Session>(env, session(env.parent(), "ram_quota=6K")),
: Genode::Connection<Session>(env, session(env.parent(),
"ram_quota=6K, cap_quota=%ld", CAP_QUOTA)),
Client(cap()) { }
/**

View File

@ -32,8 +32,8 @@ struct Regulator::Connection : Genode::Connection<Session>, Session_client
char const *label,
Regulator_id regulator)
{
return session("ram_quota=8K, regulator=\"%s\", label=\"%s\"",
regulator_name_by_id(regulator), label);
return session("ram_quota=8K, cap_quota=%ld, regulator=\"%s\", label=\"%s\"",
CAP_QUOTA, regulator_name_by_id(regulator), label);
}
/**

View File

@ -23,6 +23,8 @@ struct Regulator::Session : public Genode::Session
{
static const char *service_name() { return "Regulator"; }
enum { CAP_QUOTA = 2 };
virtual ~Session() { }
/**

View File

@ -32,8 +32,8 @@ struct Report::Connection : Genode::Connection<Session>, Session_client
Capability<Report::Session> _session(Genode::Parent &parent,
char const *label, size_t buffer_size)
{
return session(parent, "label=\"%s\", ram_quota=%ld, buffer_size=%zd",
label, 10*1024 + buffer_size, buffer_size);
return session(parent, "label=\"%s\", ram_quota=%ld, cap_quota=%ld, buffer_size=%zd",
label, 10*1024 + buffer_size, CAP_QUOTA, buffer_size);
}
/**

View File

@ -52,6 +52,13 @@ struct Report::Session : Genode::Session
{
static const char *service_name() { return "Report"; }
/*
* A report session consumes a dataspace capability for the server's
* session-object allocation, the session capability, and a dataspace
* capability for the report buffer.
*/
enum { CAP_QUOTA = 3 };
typedef Session_client Client;
/**

View File

@ -42,6 +42,8 @@ struct Rtc::Session : Genode::Session
{
static const char *service_name() { return "Rtc"; }
enum { CAP_QUOTA = 2 };
virtual Timestamp current_time() = 0;
GENODE_RPC(Rpc_current_time, Timestamp, current_time);

View File

@ -38,6 +38,8 @@ struct Platform::Session : Genode::Session
static const char *service_name() { return "Platform"; }
enum { CAP_QUOTA = 2 };
virtual ~Session() { }
virtual void enable(Device dev) = 0;

View File

@ -29,6 +29,8 @@ struct Platform::Session : Genode::Session
{
static const char *service_name() { return "Platform"; }
enum { CAP_QUOTA = 2 };
/**
* Setup framebuffer
*

View File

@ -26,7 +26,8 @@ struct Platform::Connection : Genode::Connection<Session>, Client
*/
Connection(Genode::Env &env)
:
Genode::Connection<Session>(env, session("ram_quota=16K")),
Genode::Connection<Session>(env, session("ram_quota=16K, cap_quota=%u",
CAP_QUOTA)),
Client(cap())
{ }
@ -39,7 +40,8 @@ struct Platform::Connection : Genode::Connection<Session>, Client
*/
Connection() __attribute__((deprecated))
:
Genode::Connection<Session>(session("ram_quota=16K")),
Genode::Connection<Session>(session("ram_quota=16K, cap_quota=%u",
CAP_QUOTA)),
Client(cap())
{ }
};

View File

@ -36,6 +36,8 @@ struct Platform::Session : Genode::Session
static const char *service_name() { return "Platform"; }
enum { CAP_QUOTA = 2 };
virtual ~Session() { }
/**

View File

@ -50,8 +50,8 @@ struct Terminal::Connection : Genode::Connection<Session>, Session_client
Connection(Genode::Env &env, char const *label = "")
:
Genode::Connection<Session>(env, session(env.parent(),
"ram_quota=%ld, label=\"%s\"",
10*1024, label)),
"ram_quota=%ld, cap_quota=%ld, label=\"%s\"",
10*1024, CAP_QUOTA, label)),
Session_client(env.rm(), cap())
{
wait_for_connection(cap());

View File

@ -26,6 +26,13 @@ struct Terminal::Session : Genode::Session
{
static const char *service_name() { return "Terminal"; }
/*
* A terminal session consumes a dataspace capability for the server's
* session-object allocation, its session capability, and a dataspace
* capability for the communication buffer.
*/
enum { CAP_QUOTA = 3 };
class Size
{
private:

View File

@ -40,7 +40,9 @@ class Timer::Connection : public Genode::Connection<Session>, public Session_cli
*/
Connection(Genode::Env &env, char const *label = "")
:
Genode::Connection<Session>(env, session(env.parent(), "ram_quota=10K, label=\"%s\"", label)),
Genode::Connection<Session>(env, session(env.parent(),
"ram_quota=10K, cap_quota=%u, label=\"%s\"",
CAP_QUOTA, label)),
Session_client(cap())
{
/* register default signal handler */

View File

@ -28,6 +28,8 @@ struct Timer::Session : Genode::Session
static const char *service_name() { return "Timer"; }
enum { CAP_QUOTA = 2 };
virtual ~Session() { }
/**

View File

@ -31,8 +31,8 @@ struct Usb::Connection : Genode::Connection<Session>, Session_client
char const *label,
Genode::size_t tx_buf_size)
{
return session(parent, "ram_quota=%ld, tx_buf_size=%ld, label=\"%s\"",
3 * 4096 + tx_buf_size, tx_buf_size, label);
return session(parent, "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"",
3 * 4096 + tx_buf_size, CAP_QUOTA, tx_buf_size, label);
}
/**

View File

@ -155,6 +155,8 @@ struct Usb::Session : public Genode::Session
static const char *service_name() { return "Usb"; }
enum { CAP_QUOTA = 5 };
/**
* Send from the server to the client upon device state change
*/

View File

@ -30,6 +30,8 @@ struct Platform::Device_pd : Genode::Session
{
static const char *service_name() { return "DEVICE_PD"; }
enum { CAP_QUOTA = 2 };
typedef Device_pd_client Client;
GENODE_RPC_THROW(Rpc_attach_dma_mem, void, attach_dma_mem,

View File

@ -30,6 +30,8 @@ namespace Noux {
{
static const char *service_name() { return "Noux"; }
enum { CAP_QUOTA = 3 };
virtual ~Session() { }
virtual Dataspace_capability sysio_dataspace() = 0;