Lines Matching defs:uap
98 sysarch_ldt(struct thread *td, struct sysarch_args *uap, int uap_space)
108 AUDIT_ARG_CMD(uap->op);
110 error = copyin(uap->parms, &la, sizeof(struct i386_ldt_args));
115 largs = (struct i386_ldt_args *)uap->parms;
117 switch (uap->op) {
172 sysarch(struct thread *td, struct sysarch_args *uap)
191 switch (uap->op) {
214 ktrcapfail(CAPFAIL_SYSCALL, &uap->op);
221 if (uap->op == I386_GET_LDT || uap->op == I386_SET_LDT)
222 return (sysarch_ldt(td, uap, UIO_USERSPACE));
231 AUDIT_ARG_CMD(uap->op);
232 switch (uap->op) {
235 if ((error = copyin(uap->parms, &iargs,
240 if ((error = copyin(uap->parms, &i386xfpu,
248 if ((error = copyin(uap->parms, &i386pkru,
257 if ((error = copyin(uap->parms, &a64xfpu,
263 if ((error = copyin(uap->parms, &a64pkru,
271 switch (uap->op) {
275 error = copyout(&iargs, uap->parms,
284 error = copyout(&i386base, uap->parms, sizeof(i386base));
287 error = copyin(uap->parms, &i386base, sizeof(i386base));
298 error = copyout(&i386base, uap->parms, sizeof(i386base));
301 error = copyin(uap->parms, &i386base, sizeof(i386base));
311 error = copyout(&pcb->pcb_fsbase, uap->parms,
316 error = copyin(uap->parms, &a64base, sizeof(a64base));
329 error = copyout(&pcb->pcb_gsbase, uap->parms,
334 error = copyin(uap->parms, &a64base, sizeof(a64base));
391 amd64_set_ioperm(struct thread *td, struct i386_ioperm_args *uap)
404 if (uap->start > uap->start + uap->length ||
405 uap->start + uap->length > IOPAGES * PAGE_SIZE * NBBY)
435 for (i = uap->start; i < uap->start + uap->length; i++) {
436 if (uap->enable)
445 amd64_get_ioperm(struct thread *td, struct i386_ioperm_args *uap)
450 if (uap->start >= IOPAGES * PAGE_SIZE * NBBY)
453 uap->length = 0;
459 i = uap->start;
461 uap->enable = !state;
462 uap->length = 1;
464 for (i = uap->start + 1; i < IOPAGES * PAGE_SIZE * NBBY; i++) {
467 uap->length++;
608 amd64_get_ldt(struct thread *td, struct i386_ldt_args *uap)
618 uap->start, uap->num, (void *)uap->descs);
622 if (pldt == NULL || uap->start >= max_ldt_segment || uap->num == 0) {
626 num = min(uap->num, max_ldt_segment - uap->start);
627 lp = &((struct user_segment_descriptor *)(pldt->ldt_base))[uap->start];
634 error = copyout(data, uap->descs, num *
643 amd64_set_ldt(struct thread *td, struct i386_ldt_args *uap,
655 uap->start, uap->num, (void *)uap->descs);
664 if (uap->start == 0 && uap->num == 0)
665 uap->num = max_ldt_segment;
666 if (uap->num == 0)
669 uap->start >= max_ldt_segment)
671 largest_ld = uap->start + uap->num;
674 if (largest_ld < uap->start)
677 for (i = uap->start; i < largest_ld; i++)
683 if (!(uap->start == LDT_AUTO_ALLOC && uap->num == 1)) {
685 largest_ld = uap->start + uap->num;
686 if (uap->start >= max_ldt_segment ||
688 largest_ld < uap->start)
693 for (i = 0; i < uap->num; i++) {
748 if (uap->start == LDT_AUTO_ALLOC && uap->num == 1) {
771 uap->start = i;
775 largest_ld = uap->start + uap->num;
780 error = amd64_set_ldt_data(td, uap->start, uap->num,
786 td->td_retval[0] = uap->start;