Remove use of pcb_fs and pcb_gs.
This commit is contained in:
parent
89d9e55136
commit
5659e1960c
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: netbsd32_machdep.c,v 1.1 2001/06/19 00:21:17 fvdl Exp $ */
|
/* $NetBSD: netbsd32_machdep.c,v 1.2 2002/05/26 12:19:38 fvdl Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||||
@ -333,8 +333,8 @@ process_read_regs32(struct proc *p, struct reg32 *regs)
|
|||||||
struct trapframe *tf = p->p_md.md_regs;
|
struct trapframe *tf = p->p_md.md_regs;
|
||||||
struct pcb *pcb = &p->p_addr->u_pcb;
|
struct pcb *pcb = &p->p_addr->u_pcb;
|
||||||
|
|
||||||
regs->r_gs = pcb->pcb_gs;
|
regs->r_gs = LSEL(LUCODE32_SEL, SEL_UPL);
|
||||||
regs->r_fs = pcb->pcb_fs;
|
regs->r_fs = LSEL(LUCODE32_SEL, SEL_UPL);
|
||||||
regs->r_es = LSEL(LUCODE32_SEL, SEL_UPL);
|
regs->r_es = LSEL(LUCODE32_SEL, SEL_UPL);
|
||||||
regs->r_ds = LSEL(LUCODE32_SEL, SEL_UPL);
|
regs->r_ds = LSEL(LUCODE32_SEL, SEL_UPL);
|
||||||
regs->r_eflags = tf->tf_eflags;
|
regs->r_eflags = tf->tf_eflags;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: process_machdep.c,v 1.1 2001/06/19 00:21:18 fvdl Exp $ */
|
/* $NetBSD: process_machdep.c,v 1.2 2002/05/26 12:19:38 fvdl Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||||
@ -234,8 +234,6 @@ process_write_regs(p, regs)
|
|||||||
|
|
||||||
simple_unlock(&pmap->pm_lock);
|
simple_unlock(&pmap->pm_lock);
|
||||||
|
|
||||||
pcb->pcb_gs = regs->r_gs;
|
|
||||||
pcb->pcb_fs = regs->r_fs;
|
|
||||||
tf->tf_eflags = regs->r_eflags;
|
tf->tf_eflags = regs->r_eflags;
|
||||||
tf->tf_r15 = regs->r_r15;
|
tf->tf_r15 = regs->r_r15;
|
||||||
tf->tf_r14 = regs->r_r14;
|
tf->tf_r14 = regs->r_r14;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: sys_machdep.c,v 1.1 2001/06/19 00:21:18 fvdl Exp $ */
|
/* $NetBSD: sys_machdep.c,v 1.2 2002/05/26 12:19:38 fvdl Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
@ -142,7 +142,6 @@ x86_64_set_ldt(p, args, retval)
|
|||||||
int error, i, n;
|
int error, i, n;
|
||||||
struct pcb *pcb = &p->p_addr->u_pcb;
|
struct pcb *pcb = &p->p_addr->u_pcb;
|
||||||
pmap_t pmap = p->p_vmspace->vm_map.pmap;
|
pmap_t pmap = p->p_vmspace->vm_map.pmap;
|
||||||
int fsslot, gsslot;
|
|
||||||
struct x86_64_set_ldt_args ua;
|
struct x86_64_set_ldt_args ua;
|
||||||
union descriptor desc;
|
union descriptor desc;
|
||||||
|
|
||||||
@ -208,8 +207,6 @@ x86_64_set_ldt(p, args, retval)
|
|||||||
|
|
||||||
if (pcb == curpcb)
|
if (pcb == curpcb)
|
||||||
savectx(curpcb);
|
savectx(curpcb);
|
||||||
fsslot = IDXSEL(pcb->pcb_fs);
|
|
||||||
gsslot = IDXSEL(pcb->pcb_gs);
|
|
||||||
error = 0;
|
error = 0;
|
||||||
|
|
||||||
/* Check descriptors for access violations. */
|
/* Check descriptors for access violations. */
|
||||||
@ -234,9 +231,6 @@ x86_64_set_ldt(p, args, retval)
|
|||||||
(gdt[IDXSEL(desc.gd.gd_selector)].sd.sd_dpl !=
|
(gdt[IDXSEL(desc.gd.gd_selector)].sd.sd_dpl !=
|
||||||
SEL_UPL)))
|
SEL_UPL)))
|
||||||
return (EACCES);
|
return (EACCES);
|
||||||
/* Can't replace in use descriptor with gate. */
|
|
||||||
if (n == fsslot || n == gsslot)
|
|
||||||
return (EBUSY);
|
|
||||||
break;
|
break;
|
||||||
case SDT_MEMEC:
|
case SDT_MEMEC:
|
||||||
case SDT_MEMEAC:
|
case SDT_MEMEAC:
|
||||||
@ -270,10 +264,6 @@ x86_64_set_ldt(p, args, retval)
|
|||||||
/* Only user (ring-3) descriptors may be present. */
|
/* Only user (ring-3) descriptors may be present. */
|
||||||
if (desc.sd.sd_dpl != SEL_UPL)
|
if (desc.sd.sd_dpl != SEL_UPL)
|
||||||
return (EACCES);
|
return (EACCES);
|
||||||
} else {
|
|
||||||
/* Must be "present" if in use. */
|
|
||||||
if (n == fsslot || n == gsslot)
|
|
||||||
return (EBUSY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user