• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/i386/i386/

Lines Matching refs:pcb

64 #include <machine/pcb.h>
173 * offset of the fpu save area from the pcb address. FPU save area
176 CTASSERT(sizeof(struct pcb) % XSAVE_AREA_ALIGN == 0);
838 restore_npx_curthread(struct thread *td, struct pcb *pcb)
850 if ((pcb->pcb_flags & PCB_NPXINITDONE) == 0) {
861 bcopy(npx_initialstate, pcb->pcb_save, cpu_max_ext_state_size);
862 fpurstor(pcb->pcb_save);
863 if (pcb->pcb_initial_npxcw != __INITIAL_NPXCW__)
864 fldcw(pcb->pcb_initial_npxcw);
865 pcb->pcb_flags |= PCB_NPXINITDONE;
866 if (PCB_USER_FPU(pcb))
867 pcb->pcb_flags |= PCB_NPXUSERINITDONE;
869 fpurstor(pcb->pcb_save);
878 * access foreign pcb's.
931 void npxswitch(struct thread *td, struct pcb *pcb);
933 npxswitch(struct thread *td, struct pcb *pcb)
937 !PCB_USER_FPU(pcb)) {
941 restore_npx_curthread(td, pcb);
1002 * Get the user state of the FPU into pcb->pcb_user_save without
1009 struct pcb *pcb;
1018 pcb = td->td_pcb;
1020 if ((pcb->pcb_flags & PCB_NPXINITDONE) == 0) {
1021 bcopy(npx_initialstate, get_pcb_user_save_pcb(pcb),
1023 SET_FPU_CW(get_pcb_user_save_pcb(pcb), pcb->pcb_initial_npxcw);
1029 fpusave(get_pcb_user_save_pcb(pcb));
1045 sa = (char *)get_pcb_user_save_pcb(pcb);
1070 struct pcb *pcb;
1073 pcb = td->td_pcb;
1074 if (PCB_USER_FPU(pcb))
1075 pcb->pcb_flags |= PCB_NPXINITDONE;
1076 pcb->pcb_flags |= PCB_NPXUSERINITDONE;
1121 struct pcb *pcb;
1129 pcb = td->td_pcb;
1132 if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) {
1139 pcb->pcb_flags |= PCB_NPXUSERINITDONE | PCB_NPXINITDONE;
1423 struct pcb *pcb;
1425 pcb = td->td_pcb;
1430 KASSERT((pcb->pcb_flags & PCB_NPXNOSAVE) == 0,
1450 pcb->pcb_flags |= PCB_KERNNPX | PCB_NPXNOSAVE | PCB_NPXINITDONE;
1457 pcb = td->td_pcb;
1459 KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save ==
1460 get_pcb_user_save_pcb(pcb), ("mangled pcb_save"));
1462 if ((pcb->pcb_flags & PCB_NPXINITDONE) != 0)
1465 ctx->prev = pcb->pcb_save;
1466 pcb->pcb_save = fpu_kern_ctx_savefpu(ctx);
1467 pcb->pcb_flags |= PCB_KERNNPX;
1468 pcb->pcb_flags &= ~PCB_NPXINITDONE;
1475 struct pcb *pcb;
1477 pcb = td->td_pcb;
1479 if ((pcb->pcb_flags & PCB_NPXNOSAVE) != 0) {
1485 pcb->pcb_flags &= ~(PCB_NPXNOSAVE | PCB_NPXINITDONE);
1500 pcb->pcb_save = ctx->prev;
1503 if (pcb->pcb_save == get_pcb_user_save_pcb(pcb)) {
1504 if ((pcb->pcb_flags & PCB_NPXUSERINITDONE) != 0) {
1505 pcb->pcb_flags |= PCB_NPXINITDONE;
1506 if ((pcb->pcb_flags & PCB_KERNNPX_THR) == 0)
1507 pcb->pcb_flags &= ~PCB_KERNNPX;
1508 } else if ((pcb->pcb_flags & PCB_KERNNPX_THR) == 0)
1509 pcb->pcb_flags &= ~(PCB_NPXINITDONE | PCB_KERNNPX);
1512 pcb->pcb_flags |= PCB_NPXINITDONE;
1514 pcb->pcb_flags &= ~PCB_NPXINITDONE;
1515 KASSERT(!PCB_USER_FPU(pcb), ("unpaired fpu_kern_leave"));