mirror of
https://github.com/drasko/codezero.git
synced 2026-01-19 06:13:16 +01:00
Capability manipulation syscalls
Support for capability replicate, share, grant, deduce, and split. The code builds, but hasn't been tested.
This commit is contained in:
@@ -7,18 +7,21 @@
|
||||
#define __API_CAPABILITY_H__
|
||||
|
||||
/* Capability syscall request types */
|
||||
#define CAP_CONTROL_NCAPS 0x00
|
||||
#define CAP_CONTROL_READ 0x01
|
||||
#define CAP_CONTROL_SHARE 0x02
|
||||
#define CAP_CONTROL_GRANT 0x03
|
||||
#define CAP_CONTROL_MODIFY 0x05
|
||||
#define CAP_CONTROL_NCAPS 0x00000000
|
||||
#define CAP_CONTROL_READ 0x00000001
|
||||
#define CAP_CONTROL_SHARE 0x00000002
|
||||
#define CAP_CONTROL_GRANT 0x00000003
|
||||
#define CAP_CONTROL_REPLICATE 0x00000005
|
||||
#define CAP_CONTROL_SPLIT 0x00000006
|
||||
#define CAP_CONTROL_DEDUCE 0x00000007
|
||||
|
||||
#define CAP_SHARE_MASK 0x1F
|
||||
#define CAP_SHARE_SPACE 0x01
|
||||
#define CAP_SHARE_CONTAINER 0x02
|
||||
#define CAP_SHARE_GROUP 0x04
|
||||
#define CAP_SHARE_CHILD 0x08 /* All that we are pager of */
|
||||
#define CAP_SHARE_SIBLING 0x10 /* All that have a common pager */
|
||||
#define CAP_SHARE_MASK 0x00000003
|
||||
#define CAP_SHARE_SINGLE 0x00000001
|
||||
#define CAP_SHARE_ALL 0x00000002
|
||||
|
||||
#define CAP_GRANT_MASK 0x00000003
|
||||
#define CAP_GRANT_SINGLE 0x00000001
|
||||
#define CAP_GRANT_ALL 0x00000002
|
||||
|
||||
/* Task's primary capability list */
|
||||
#define TASK_CAP_LIST(task) \
|
||||
|
||||
@@ -42,7 +42,8 @@ int sys_ipc_control(void);
|
||||
int sys_map(unsigned long phys, unsigned long virt, unsigned long npages,
|
||||
unsigned int flags, l4id_t tid);
|
||||
int sys_getid(struct task_ids *ids);
|
||||
int sys_capability_control(unsigned int req, unsigned int flags, void *addr);
|
||||
int sys_capability_control(unsigned int req, unsigned int flags,
|
||||
l4id_t capid, l4id_t target, void *addr);
|
||||
int sys_container_control(unsigned int req, unsigned int flags, void *addr);
|
||||
int sys_time(struct timeval *tv, int set);
|
||||
int sys_mutex_control(unsigned long mutex_address, int mutex_op);
|
||||
|
||||
Reference in New Issue
Block a user