NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
The protocol our parent provides. More...
#include <parent.h>
Public Types | |
enum | { TYPE_INVALID = 0, TYPE_OPEN, TYPE_CLOSE, TYPE_GENERIC_END, TYPE_GET_PORTAL, TYPE_REGISTER, TYPE_UNREGISTER, TYPE_GET_QUOTA, TYPE_SINGLETON, TYPE_REQ_KILL, TYPE_SIGNAL } |
Protocol operations (message types). More... | |
enum | { CAP_CHILD_ID = Config::CAP_PARENT_BEGIN, CAP_SC_USAGE, CAP_CHILD_EC, CAP_PARENT_ID, CAP_PT_PERCPU, CAP_PT_IDLE_SCS = CAP_PT_PERCPU + Config::MAX_CPUS } |
Capabilities used by parent to construct child. More... |
Public Member Functions | |
static_assert ((CAP_PT_PERCPU+Config::MAX_CPUS)< (1U<< Config::CAP_RESERVED_ORDER),"Capability Space misconfiguration.") |
Static Public Member Functions | |
static Utcb & | init_frame (Utcb &utcb, unsigned op, unsigned id) |
static unsigned | call (Utcb &utcb, unsigned cap_base, bool drop_frame, bool percpu=true) |
Low-level systemcall. | |
static unsigned | get_pseudonym (Utcb &utcb, const char *service, unsigned instance, unsigned cap_pseudonym, unsigned parent_id=CAP_PARENT_ID) |
static unsigned | release_pseudonym (Utcb &utcb, unsigned cap_pseudonym) |
static unsigned | get_portal (Utcb &utcb, unsigned cap_pseudonym, unsigned cap_portal, bool blocking, char const *service_name=0) |
Ask parent to get the portal to talk to the service. | |
static unsigned | register_service (Utcb &utcb, const char *service, unsigned cpu, unsigned pt, unsigned cap_service, char *revoke_mem=0) |
static unsigned | unregister_service (Utcb &utcb, unsigned cap_service) |
static unsigned | get_quota (Utcb &utcb, unsigned cap_client_pseudonym, const char *name, long invalue, long *outvalue=0) |
static unsigned | set_singleton (Utcb &utcb, unsigned cap_client_pseudonym, unsigned cap_local_session) |
static unsigned | check_singleton (Utcb &utcb, unsigned cap_client_pseudonym, unsigned &cap_local_session, Crd crd=Crd(0, 31, DESC_CAP_ALL)) |
Services can use check_singleton() in conjunction with set_singleton() to enforce a one-session-per-client policy. | |
static unsigned | kill (Utcb &utcb, unsigned cap_client_pseudonym, unsigned service_cap=0) |
static unsigned | signal (Utcb &utcb, unsigned value) |
Signals an (arbitrary) event to the parent. |
The protocol our parent provides.
It allows to open a new session and request per-CPU-portals.
To be used by both clients and services.
Missing: restrict quota, get_quota
anonymous enum |
Protocol operations (message types).
anonymous enum |
Capabilities used by parent to construct child.
CAP_CHILD_ID |
Temporary SM capability used by parent during child construction. alloc_cap don't work here - translate window issue. |
CAP_SC_USAGE |
SM capability to get access to child utilization information provided by admission service. Temporary capability - If this cap is rebound this index becomes invalid. |
CAP_CHILD_EC |
EC capability of first child thread. |
CAP_PARENT_ID |
Semaphore capability used by parent to identify children. Also used by child to signal events to parents (ParentProtocol::signal()). |
CAP_PT_PERCPU |
Portal capabilities (according to number of CPUs) passed by parent to child. |
CAP_PT_IDLE_SCS |
Idle SCs. Only created for the admission service. |
|
inlinestatic |
Low-level systemcall.
|
inlinestatic |
Services can use check_singleton() in conjunction with set_singleton() to enforce a one-session-per-client policy.
This is not done automatically.
|
inlinestatic |
Ask parent to get the portal to talk to the service.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
cap_service | Capability selector where parent delegates us the service identifier. It seems that this identifier is not used for anything. |
revoke_mem | Memory page the parent will use to signalize us that some client has died (or closed session). The service can use this to figure out when it is not necessary to search for dead clients. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Signals an (arbitrary) event to the parent.
value | Identifies the event. |
ParentProtocol::static_assert | ( | ) |
|
inlinestatic |