Lines Matching defs:pldt

65 void i386_reset_ldt(struct proc_ldt *pldt); 
68 i386_reset_ldt(struct proc_ldt *pldt)
70 xen_set_ldt((vm_offset_t)pldt->ldt_base, pldt->ldt_len);
414 struct proc_ldt *pldt;
423 pldt = mdp->md_ldt;
425 i386_reset_ldt(pldt);
426 PCPU_SET(currentldt, (int)pldt);
429 gdt[PCPU_GET(cpuid) * NGDT + GUSERLDT_SEL].sd = pldt->ldt_sd;
431 gdt[GUSERLDT_SEL].sd = pldt->ldt_sd;
462 struct proc_ldt *pldt, *new_ldt;
481 if ((pldt = mdp->md_ldt)) {
482 if (len > pldt->ldt_len)
483 len = pldt->ldt_len;
484 bcopy(pldt->ldt_base, new_ldt->ldt_base,
502 struct proc_ldt *pldt, *new_ldt;
525 if ((pldt = mdp->md_ldt) != NULL) {
526 if (len > pldt->ldt_len)
527 len = pldt->ldt_len;
528 bcopy(pldt->ldt_base, new_ldt->ldt_base,
544 struct proc_ldt *pldt;
547 if ((pldt = mdp->md_ldt) == NULL) {
563 user_ldt_deref(pldt);
567 user_ldt_deref(struct proc_ldt *pldt)
571 if (--pldt->ldt_refcnt == 0) {
573 kmem_free(kernel_map, (vm_offset_t)pldt->ldt_base,
574 pldt->ldt_len * sizeof(union descriptor));
575 free(pldt, M_SUBPROC);
592 struct proc_ldt *pldt;
602 if ((pldt = td->td_proc->p_md.md_ldt) != NULL) {
603 nldt = pldt->ldt_len;
604 lp = &((union descriptor *)(pldt->ldt_base))[uap->start];
635 struct proc_ldt *pldt;
656 if ((pldt = mdp->md_ldt) == NULL ||
657 uap->start >= pldt->ldt_len) {
662 if (largest_ld > pldt->ldt_len)
663 largest_ld = pldt->ldt_len;
665 bzero(&((union descriptor *)(pldt->ldt_base))[uap->start],
744 if ((pldt = mdp->md_ldt) == NULL) {
749 pldt = mdp->md_ldt;
756 dp = &((union descriptor *)(pldt->ldt_base))[NLDT];
757 for (i = NLDT; i < pldt->ldt_len; ++i) {
762 if (i >= pldt->ldt_len) {
763 if ((error = i386_ldt_grow(td, pldt->ldt_len+1))) {
791 struct proc_ldt *pldt = mdp->md_ldt;
797 &((union descriptor *)(pldt->ldt_base))[start],
811 struct proc_ldt *pldt = mdp->md_ldt;
817 &((union descriptor *)(pldt->ldt_base))[start],
827 struct proc_ldt *new_ldt, *pldt;
839 if ((pldt = mdp->md_ldt) == NULL || len > pldt->ldt_len) {
843 pldt = mdp->md_ldt;
845 if (pldt != NULL) {
846 if (new_ldt->ldt_len <= pldt->ldt_len) {
864 old_ldt_base = pldt->ldt_base;
865 old_ldt_len = pldt->ldt_len;
866 pldt->ldt_sd = new_ldt->ldt_sd;
867 pldt->ldt_base = new_ldt->ldt_base;
868 pldt->ldt_len = new_ldt->ldt_len;
870 mdp->md_ldt = pldt = new_ldt;