sched: implement user-configurable fs and gs segment base addresses
This commit is contained in:
@@ -13,7 +13,11 @@
|
||||
#define SYS_TASK_CREATE 0x09u
|
||||
#define SYS_TASK_CREATE_THREAD 0x0Au
|
||||
#define SYS_TASK_GET_ADDRESS_SPACE 0x0Bu
|
||||
#define SYS_TASK_CONFIG_GET 0x2Au
|
||||
#define SYS_TASK_CONFIG_SET 0x2Bu
|
||||
#define SYS_THREAD_START 0x0Cu
|
||||
#define SYS_THREAD_CONFIG_GET 0x2Cu
|
||||
#define SYS_THREAD_CONFIG_SET 0x2Du
|
||||
#define SYS_VM_OBJECT_CREATE 0x0Du
|
||||
#define SYS_VM_OBJECT_READ 0x0Eu
|
||||
#define SYS_VM_OBJECT_WRITE 0x0Fu
|
||||
|
||||
@@ -16,8 +16,17 @@
|
||||
#define MAP_ADDRESS_INVALID ((virt_addr_t)0)
|
||||
#define KERN_HANDLE_INVALID ((kern_handle_t)0xFFFFFFFF)
|
||||
|
||||
#define KERN_CFG_INVALID 0x00u
|
||||
#define KERN_CFG_PAGE_SIZE 0x01u
|
||||
/* config keys for use with kern_config_get/kern_config_set */
|
||||
#define KERN_CFG_INVALID 0x00000u
|
||||
#define KERN_CFG_PAGE_SIZE 0x00001u
|
||||
|
||||
/* config keys for use with task_config_get/task_config_set */
|
||||
#define TASK_CFG_INVALID 0x00000u
|
||||
|
||||
/* config keys for use with thread_config_get/thread_config_set */
|
||||
#define THREAD_CFG_INVALID 0x00000u
|
||||
#define THREAD_CFG_FSBASE 0x20001u
|
||||
#define THREAD_CFG_GSBASE 0x20002u
|
||||
|
||||
/* maximum number of handles that can be sent in a single message */
|
||||
#define KERN_MSG_MAX_HANDLES 64
|
||||
@@ -53,16 +62,20 @@
|
||||
|
||||
#define IOVEC(p, len) \
|
||||
{ \
|
||||
.io_base = (virt_addr_t)(p), .io_len = (len), \
|
||||
.io_base = (virt_addr_t)(p), \
|
||||
.io_len = (len), \
|
||||
}
|
||||
#define MSG_HANDLE(mode, value) \
|
||||
{ \
|
||||
.hnd_mode = (mode), .hnd_value = (value), \
|
||||
.hnd_mode = (mode), \
|
||||
.hnd_value = (value), \
|
||||
}
|
||||
#define MSG(data, data_count, handles, handles_len) \
|
||||
{ \
|
||||
.msg_data = (data), .msg_data_count = (data_count), \
|
||||
.msg_handles = (handles), .msg_handles_count = (handles_len), \
|
||||
.msg_data = (data), \
|
||||
.msg_data_count = (data_count), \
|
||||
.msg_handles = (handles), \
|
||||
.msg_handles_count = (handles_len), \
|
||||
}
|
||||
|
||||
typedef uintptr_t phys_addr_t;
|
||||
|
||||
Reference in New Issue
Block a user