1 #include <lunaix/process.h>
3 #include <sys/mm/mempart.h>
4 #include <sys/x86_isa.h>
6 volatile struct x86_tss _tss = { .link = 0,
7 .esp0 = KERNEL_STACK_END,
11 proc_init_transfer(struct proc_info* proc,
16 struct exec_param* execp =
17 (struct exec_param*)(stack_top - sizeof(struct exec_param));
18 isr_param* isrp = (isr_param*)((ptr_t)execp - sizeof(isr_param));
20 *execp = (struct exec_param){
21 .cs = KCODE_SEG, .ss = KDATA_SEG, .eip = target, .eflags = cpu_ldstate()
24 *isrp = (isr_param){ .registers = { .ds = KDATA_SEG,
30 if ((flags & TRANSFER_IE)) {
31 execp->eflags |= 0x200;
34 proc->intr_ctx = isrp;