mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Implement cpu_set_upcall_kse. May need tweaking.
This commit is contained in:
parent
d489dec95c
commit
93dee5536e
1 changed files with 12 additions and 0 deletions
|
|
@ -195,6 +195,18 @@ cpu_set_upcall(struct thread *td, struct thread *td0)
|
|||
void
|
||||
cpu_set_upcall_kse(struct thread *td, struct kse_upcall *ku)
|
||||
{
|
||||
struct trapframe *tf;
|
||||
uint64_t sp;
|
||||
|
||||
tf = td->td_frame;
|
||||
sp = (uint64_t)ku->ku_stack.ss_sp + ku->ku_stack.ss_size;
|
||||
tf->tf_out[0] = (uint64_t)ku->ku_mailbox;
|
||||
tf->tf_out[6] = sp - SPOFF - sizeof(struct frame);
|
||||
tf->tf_tpc = (uint64_t)ku->ku_func;
|
||||
tf->tf_tnpc = tf->tf_tpc + 4;
|
||||
|
||||
td->td_retval[0] = tf->tf_out[0];
|
||||
td->td_retval[1] = tf->tf_out[1];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue