Lines Matching defs:pcb

392 	struct pcb *pcb = &clwp->lwp_pcb;
395 if (pcb->pcb_rupdate == 0) {
396 pcb->pcb_ds = rp->r_ds;
397 pcb->pcb_es = rp->r_es;
398 pcb->pcb_fs = rp->r_fs;
399 pcb->pcb_gs = rp->r_gs;
400 pcb->pcb_rupdate = 1;
435 * Here we save the current values from the lwp regs into the pcb
436 * and set pcb->pcb_rupdate to 1 to tell the rest of the kernel
437 * that the pcb copy of the segment registers is the current one.
462 pcb_t *pcb = &lwp->lwp_pcb;
465 ASSERT(VALID_LWP_DESC(&pcb->pcb_fsdesc));
466 ASSERT(VALID_LWP_DESC(&pcb->pcb_gsdesc));
468 if (pcb->pcb_rupdate == 0) {
478 pcb->pcb_ds = rp->r_ds;
479 pcb->pcb_es = rp->r_es;
480 pcb->pcb_fs = rp->r_fs;
481 pcb->pcb_gs = rp->r_gs;
482 pcb->pcb_rupdate = 1;
498 * Update the segment registers with new values from the pcb.
511 pcb_t *pcb = &lwp->lwp_pcb;
528 pcb->pcb_gs) != 0) {
533 rp->r_gs = pcb->pcb_gs;
542 __set_gs(pcb->pcb_gs);
557 rp->r_gs = pcb->pcb_gs;
583 if (pcb->pcb_gs == LWPGS_SEL || pcb->pcb_gs == 0) {
586 pcb->pcb_gsbase)) {
591 wrmsr(MSR_AMD_KGSBASE, pcb->pcb_gsbase);
595 __set_ds(pcb->pcb_ds);
596 rp->r_ds = pcb->pcb_ds;
598 __set_es(pcb->pcb_es);
599 rp->r_es = pcb->pcb_es;
601 __set_fs(pcb->pcb_fs);
602 rp->r_fs = pcb->pcb_fs;
607 if (pcb->pcb_fs == LWPFS_SEL || pcb->pcb_fs == 0) {
610 pcb->pcb_fsbase)) {
615 wrmsr(MSR_AMD_FSBASE, pcb->pcb_fsbase);
708 pcb_t *pcb = &lwp->lwp_pcb;
710 ASSERT(VALID_LWP_DESC(&pcb->pcb_fsdesc));
711 ASSERT(VALID_LWP_DESC(&pcb->pcb_gsdesc));
717 gdt_update_usegd(GDT_LWPFS, &pcb->pcb_fsdesc);
718 gdt_update_usegd(GDT_LWPGS, &pcb->pcb_gsdesc);
729 pcb_t *pcb = &lwp->lwp_pcb;
735 gdt_update_usegd(GDT_LWPFS, &pcb->pcb_fsdesc);
736 gdt_update_usegd(GDT_LWPGS, &pcb->pcb_gsdesc);
833 * pcb->pcb_rupdate == 1. Only sys_rtt gets to clear the bit.
897 pcb_t *pcb = &lwp->lwp_pcb;
915 pcb->pcb_fs = pcb->pcb_gs = 0;
916 pcb->pcb_fsbase = pcb->pcb_gsbase = 0;
932 pcb->pcb_fsdesc = pcb->pcb_gsdesc = zero_udesc;
951 pcb->pcb_fsdesc = pcb->pcb_gsdesc = zero_u32desc;
962 pcb->pcb_ds = rp->r_ds;
963 pcb->pcb_es = rp->r_es;
964 pcb->pcb_rupdate = 1;
976 pcb->pcb_fsdesc = pcb->pcb_gsdesc = zero_udesc;
979 * For %gs we need to reset LWP_GSBASE in pcb and the
995 pcb->pcb_fpu.fpu_flags = 0;