1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00

Retire write-only PCB_GS32BIT pcb flag on amd64.

This commit is contained in:
Dmitry Chagin 2013-05-09 21:42:43 +00:00
parent 6c7d832824
commit d127f15308
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=250423
6 changed files with 3 additions and 7 deletions

View File

@ -167,7 +167,6 @@ ASSYM(PCB_FPUSUSPEND, offsetof(struct pcb, pcb_fpususpend));
ASSYM(PCB_SIZE, sizeof(struct pcb)); ASSYM(PCB_SIZE, sizeof(struct pcb));
ASSYM(PCB_FULL_IRET, PCB_FULL_IRET); ASSYM(PCB_FULL_IRET, PCB_FULL_IRET);
ASSYM(PCB_DBREGS, PCB_DBREGS); ASSYM(PCB_DBREGS, PCB_DBREGS);
ASSYM(PCB_GS32BIT, PCB_GS32BIT);
ASSYM(PCB_32BIT, PCB_32BIT); ASSYM(PCB_32BIT, PCB_32BIT);
ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0)); ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));

View File

@ -964,7 +964,7 @@ exec_setregs(struct thread *td, struct image_params *imgp, u_long stack)
pcb->pcb_fsbase = 0; pcb->pcb_fsbase = 0;
pcb->pcb_gsbase = 0; pcb->pcb_gsbase = 0;
clear_pcb_flags(pcb, PCB_32BIT | PCB_GS32BIT); clear_pcb_flags(pcb, PCB_32BIT);
pcb->pcb_initial_fpucw = __INITIAL_FPUCW__; pcb->pcb_initial_fpucw = __INITIAL_FPUCW__;
set_pcb_flags(pcb, PCB_FULL_IRET); set_pcb_flags(pcb, PCB_FULL_IRET);

View File

@ -1001,6 +1001,5 @@ ia32_setregs(struct thread *td, struct image_params *imgp, u_long stack)
/* Return via doreti so that we can change to a different %cs */ /* Return via doreti so that we can change to a different %cs */
set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET); set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET);
clear_pcb_flags(pcb, PCB_GS32BIT);
td->td_retval[1] = 0; td->td_retval[1] = 0;
} }

View File

@ -77,7 +77,6 @@ struct pcb {
#define PCB_KERNFPU 0x04 /* kernel uses fpu */ #define PCB_KERNFPU 0x04 /* kernel uses fpu */
#define PCB_FPUINITDONE 0x08 /* fpu state is initialized */ #define PCB_FPUINITDONE 0x08 /* fpu state is initialized */
#define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */ #define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */
#define PCB_GS32BIT 0x20 /* linux gs switch */
#define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */ #define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */
uint16_t pcb_initial_fpucw; uint16_t pcb_initial_fpucw;

View File

@ -447,7 +447,7 @@ linux_set_cloned_tls(struct thread *td, void *desc)
pcb->pcb_gsbase = (register_t)info.base_addr; pcb->pcb_gsbase = (register_t)info.base_addr;
/* XXXKIB pcb->pcb_gs32sd = sd; */ /* XXXKIB pcb->pcb_gs32sd = sd; */
td->td_frame->tf_gs = GSEL(GUGS32_SEL, SEL_UPL); td->td_frame->tf_gs = GSEL(GUGS32_SEL, SEL_UPL);
set_pcb_flags(pcb, PCB_GS32BIT | PCB_32BIT); set_pcb_flags(pcb, PCB_32BIT);
} }
return (error); return (error);
@ -1026,7 +1026,7 @@ linux_set_thread_area(struct thread *td,
pcb = td->td_pcb; pcb = td->td_pcb;
pcb->pcb_gsbase = (register_t)info.base_addr; pcb->pcb_gsbase = (register_t)info.base_addr;
set_pcb_flags(pcb, PCB_32BIT | PCB_GS32BIT); set_pcb_flags(pcb, PCB_32BIT);
update_gdt_gsbase(td, info.base_addr); update_gdt_gsbase(td, info.base_addr);
return (0); return (0);

View File

@ -868,7 +868,6 @@ exec_linux_setregs(struct thread *td, struct image_params *imgp, u_long stack)
/* Do full restore on return so that we can change to a different %cs */ /* Do full restore on return so that we can change to a different %cs */
set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET); set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET);
clear_pcb_flags(pcb, PCB_GS32BIT);
td->td_retval[1] = 0; td->td_retval[1] = 0;
} }