Lines Matching refs:tf
16 extern void ThreadKThreadEntry(TrapFrame *tf);
32 TrapFrame *tf;
34 tf = (TrapFrame *)(stacktop - sizeof(*tf));
35 sf = (ThreadArchStackFrame *)(stacktop - sizeof(*tf) - sizeof(*sf));
38 memset(tf, 0, sizeof(*tf));
44 sf->rdi = (uint64_t)tf;
46 tf->ds = 0;
47 tf->ss = 0; //SEL_KDS;
48 tf->rsp = stacktop;
49 tf->cs = SEL_KCS;
50 tf->rip = (uint64_t)f;
51 tf->rdi = (uint64_t)arg1;
52 tf->rsi = (uint64_t)arg2;
53 tf->rdx = (uint64_t)arg3;
54 tf->rflags = RFLAGS_IF;
60 TrapFrame tf;
62 memset(&tf, 0, sizeof(tf));
63 tf.ds = SEL_UDS | 3;
64 tf.rip = (uint64_t)arg1;
65 tf.cs = SEL_UCS | 3;
66 tf.rsp = (uint64_t)arg2 + MEM_USERSPACE_STKLEN - PGSIZE;
67 tf.ss = SEL_UDS | 3;
68 tf.rflags = RFLAGS_IF;
69 tf.rdi = (uint64_t)arg3; /* Userspace Argument */
71 Trap_Pop(&tf);