24#ifndef __L4_SYS__ARCH_X86__SEGMENT_H__
25#define __L4_SYS__ARCH_X86__SEGMENT_H__
28#error This header file can only be used with a L4API version!
31#include <l4/sys/ipc.h>
52 unsigned int entry_number_start,
l4_utcb_t *utcb);
72 unsigned int entry_number_start,
l4_utcb_t *utcb);
92 = (L4_UTCB_GENERIC_DATA_SIZE - 2)
153 unsigned *user_cs,
unsigned *user32_cs,
160#include <l4/sys/task.h>
161#include <l4/sys/thread.h>
165 unsigned int entry_number_start,
l4_utcb_t *utcb)
170 l4_utcb_mr_u(utcb)->
mr[1] = entry_number_start;
171 __builtin_memcpy(&l4_utcb_mr_u(utcb)->mr[2], ldt,
182 return l4_utcb_mr_u(utcb)->
mr[0];
187 unsigned *user_cs,
unsigned *user32_cs,
202 *user32_cs = m->
mr[2];
L4_sys_segment
Constants for identifying segments.
@ L4_AMD64_SEGMENT_GS
Constant identifying the GS segment.
@ L4_AMD64_SEGMENT_FS
Constant identifying the FS segment.
L4_task_ldt_x86_consts
Contants for LDT handling.
@ L4_TASK_LDT_X86_MAX_ENTRIES
Maximum number of LDT entries that can be written with one call.
@ L4_TASK_LDT_X86_ENTRY_SIZE
Size of an LDT entry.
long fiasco_amd64_segment_info(l4_cap_idx_t thread, unsigned *user_ds, unsigned *user_cs, unsigned *user32_cs, l4_utcb_t *utcb)
Get segment information.
long fiasco_amd64_set_segment_base(l4_cap_idx_t thread, enum L4_sys_segment segr, l4_umword_t base, l4_utcb_t *utcb)
Set the base address for a segment.
long fiasco_amd64_set_fs(l4_cap_idx_t thread, l4_umword_t base, l4_utcb_t *utcb)
Set the base address for the FS segment.
long fiasco_ldt_set(l4_cap_idx_t task, void *ldt, unsigned int num_desc, unsigned int entry_number_start, l4_utcb_t *utcb)
Set LDT segments descriptors.
unsigned fiasco_gdt_get_entry_offset(l4_cap_idx_t thread, l4_utcb_t *utcb)
Return the offset of the entry in the GDT.
long fiasco_gdt_set(l4_cap_idx_t thread, void *desc, unsigned int size, unsigned int entry_number_start, l4_utcb_t *utcb)
Set GDT segment descriptors.
unsigned long l4_umword_t
Unsigned machine word.
#define L4_MWORD_BITS
Size of machine words in bits.
unsigned long l4_cap_idx_t
Capability selector type.
@ L4_EINVAL
Invalid argument.
l4_msgtag_t l4_ipc_call(l4_cap_idx_t object, l4_utcb_t *utcb, l4_msgtag_t tag, l4_timeout_t timeout) L4_NOTHROW
Object call (usual invocation).
l4_msgtag_t l4_msgtag(long label, unsigned words, unsigned items, unsigned flags) L4_NOTHROW
Create a message tag from the specified values.
@ L4_PROTO_TASK
Protocol for messages to a task object.
@ L4_PROTO_THREAD
Protocol for messages to a thread object.
@ L4_TASK_LDT_SET_X86_OP
x86: LDT set
@ L4_THREAD_AMD64_GET_SEGMENT_INFO_OP
Get segment information.
@ L4_THREAD_X86_GDT_OP
Gdt.
#define L4_IPC_NEVER
never timeout
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
#define L4_INLINE
L4 Inline function attribute.
Encapsulation of the message-register block in the UTCB.
l4_umword_t mr[L4_UTCB_GENERIC_DATA_SIZE]
Message registers.